diff --git a/WAProto/WAProto.proto b/WAProto/WAProto.proto index 5d6eac5..e398c2a 100644 --- a/WAProto/WAProto.proto +++ b/WAProto/WAProto.proto @@ -31,37 +31,6 @@ message ADVSignedKeyIndexList { optional bytes accountSignature = 2; } -message AppVersion { - optional uint32 primary = 1; - optional uint32 secondary = 2; - optional uint32 tertiary = 3; - optional uint32 quaternary = 4; - optional uint32 quinary = 5; -} - -message CompanionProps { - optional string os = 1; - optional AppVersion version = 2; - enum CompanionPropsPlatformType { - UNKNOWN = 0; - CHROME = 1; - FIREFOX = 2; - IE = 3; - OPERA = 4; - SAFARI = 5; - EDGE = 6; - DESKTOP = 7; - IPAD = 8; - ANDROID_TABLET = 9; - OHANA = 10; - ALOHA = 11; - CATALINA = 12; - TCL_TV = 13; - } - optional CompanionPropsPlatformType platformType = 3; - optional bool requireFullSync = 4; -} - message ActionLink { optional string url = 1; optional string buttonTitle = 2; @@ -79,6 +48,16 @@ message AdReplyInfo { optional string caption = 17; } +message AgentAction { + optional string name = 1; + optional int32 deviceID = 2; + optional bool isDeleted = 3; +} + +message AndroidUnsupportedActions { + optional bool allowed = 1; +} + message AppStateFatalExceptionNotification { repeated string collectionNames = 1; optional int64 timestamp = 2; @@ -113,6 +92,19 @@ message AppStateSyncKeyShare { repeated AppStateSyncKey keys = 1; } +message AppVersion { + optional uint32 primary = 1; + optional uint32 secondary = 2; + optional uint32 tertiary = 3; + optional uint32 quaternary = 4; + optional uint32 quinary = 5; +} + +message ArchiveChatAction { + optional bool archived = 1; + optional SyncActionMessageRange messageRange = 2; +} + message AudioMessage { optional string url = 1; optional string mimetype = 2; @@ -129,6 +121,57 @@ message AudioMessage { optional bytes waveform = 19; } +message AutoDownloadSettings { + optional bool downloadImages = 1; + optional bool downloadAudio = 2; + optional bool downloadVideo = 3; + optional bool downloadDocuments = 4; +} + +message BizAccountLinkInfo { + optional uint64 whatsappBizAcctFbid = 1; + optional string whatsappAcctNumber = 2; + optional uint64 issueTime = 3; + enum BizAccountLinkInfoHostStorageType { + ON_PREMISE = 0; + FACEBOOK = 1; + } + optional BizAccountLinkInfoHostStorageType hostStorage = 4; + enum BizAccountLinkInfoAccountType { + ENTERPRISE = 0; + } + optional BizAccountLinkInfoAccountType accountType = 5; +} + +message BizAccountPayload { + optional VerifiedNameCertificate vnameCert = 1; + optional bytes bizAcctLinkInfo = 2; +} + +message BizIdentityInfo { + enum BizIdentityInfoVerifiedLevelValue { + UNKNOWN = 0; + LOW = 1; + HIGH = 2; + } + optional BizIdentityInfoVerifiedLevelValue vlevel = 1; + optional VerifiedNameCertificate vnameCert = 2; + optional bool signed = 3; + optional bool revoked = 4; + enum BizIdentityInfoHostStorageType { + ON_PREMISE = 0; + FACEBOOK = 1; + } + optional BizIdentityInfoHostStorageType hostStorage = 5; + enum BizIdentityInfoActualActorsType { + SELF = 0; + BSP = 1; + } + optional BizIdentityInfoActualActorsType actualActors = 6; + optional uint64 privacyModeTs = 7; + optional uint64 featureControls = 8; +} + message Button { optional string buttonId = 1; optional ButtonText buttonText = 2; @@ -141,6 +184,10 @@ message Button { optional NativeFlowInfo nativeFlowInfo = 4; } +message ButtonText { + optional string displayText = 1; +} + message ButtonsMessage { optional string contentText = 6; optional string footerText = 7; @@ -178,10 +225,6 @@ message ButtonsResponseMessage { } } -message ButtonText { - optional string displayText = 1; -} - message Call { optional bytes callKey = 1; optional string conversionSource = 2; @@ -204,17 +247,129 @@ message CatalogSnapshot { optional string description = 3; } +message CertChain { + optional CertChainNoiseCertificate leaf = 1; + optional CertChainNoiseCertificate intermediate = 2; +} + +// Renamed from CertChain$NoiseCertificate +message CertChainNoiseCertificate { + optional bytes details = 1; + optional bytes signature = 2; +} + +// Renamed from CertChain$NoiseCertificate$Details +message CertChainNoiseCertificateDetails { + optional uint32 serial = 1; + optional uint32 issuerSerial = 2; + optional bytes key = 3; + optional uint64 notBefore = 4; + optional uint64 notAfter = 5; +} + +message Chain { + optional bytes senderRatchetKey = 1; + optional bytes senderRatchetKeyPrivate = 2; + optional ChainKey chainKey = 3; + repeated MessageKey messageKeys = 4; +} + +message ChainKey { + optional uint32 index = 1; + optional bytes key = 2; +} + message Chat { optional string displayName = 1; optional string id = 2; } +message ClearChatAction { + optional SyncActionMessageRange messageRange = 1; +} + +message ClientFinish { + optional bytes static = 1; + optional bytes payload = 2; +} + +message ClientHello { + optional bytes ephemeral = 1; + optional bytes static = 2; + optional bytes payload = 3; +} + +message ClientPayload { + optional uint64 username = 1; + optional bool passive = 3; + optional UserAgent userAgent = 5; + optional WebInfo webInfo = 6; + optional string pushName = 7; + optional sfixed32 sessionId = 9; + optional bool shortConnect = 10; + enum ClientPayloadConnectType { + CELLULAR_UNKNOWN = 0; + WIFI_UNKNOWN = 1; + CELLULAR_EDGE = 100; + CELLULAR_IDEN = 101; + CELLULAR_UMTS = 102; + CELLULAR_EVDO = 103; + CELLULAR_GPRS = 104; + CELLULAR_HSDPA = 105; + CELLULAR_HSUPA = 106; + CELLULAR_HSPA = 107; + CELLULAR_CDMA = 108; + CELLULAR_1XRTT = 109; + CELLULAR_EHRPD = 110; + CELLULAR_LTE = 111; + CELLULAR_HSPAP = 112; + } + optional ClientPayloadConnectType connectType = 12; + enum ClientPayloadConnectReason { + PUSH = 0; + USER_ACTIVATED = 1; + SCHEDULED = 2; + ERROR_RECONNECT = 3; + NETWORK_SWITCH = 4; + PING_RECONNECT = 5; + } + optional ClientPayloadConnectReason connectReason = 13; + repeated int32 shards = 14; + optional DNSSource dnsSource = 15; + optional uint32 connectAttemptCount = 16; + optional uint32 device = 18; + optional DevicePairingRegistrationData devicePairingData = 19; + enum ClientPayloadProduct { + WHATSAPP = 0; + MESSENGER = 1; + } + optional ClientPayloadProduct product = 20; + optional bytes fbCat = 21; + optional bytes fbUserAgent = 22; + optional bool oc = 23; + optional int32 lc = 24; + enum ClientPayloadIOSAppExtension { + SHARE_EXTENSION = 0; + SERVICE_EXTENSION = 1; + INTENTS_EXTENSION = 2; + } + optional ClientPayloadIOSAppExtension iosAppExtension = 30; + optional uint64 fbAppId = 31; + optional bytes fbDeviceId = 32; + optional bool pull = 33; +} + message CollectionMessage { optional string bizJid = 1; optional string id = 2; optional int32 messageVersion = 3; } +message ContactAction { + optional string fullName = 1; + optional string firstName = 2; +} + message ContactMessage { optional string displayName = 1; optional string vcard = 16; @@ -251,13 +406,80 @@ message ContextInfo { optional ActionLink actionLink = 33; optional string groupSubject = 34; optional string parentGroupJid = 35; - optional bytes messageSecret = 36; +} + +message Conversation { + required string id = 1; + repeated HistorySyncMsg messages = 2; + optional string newJid = 3; + optional string oldJid = 4; + optional uint64 lastMsgTimestamp = 5; + optional uint32 unreadCount = 6; + optional bool readOnly = 7; + optional bool endOfHistoryTransfer = 8; + optional uint32 ephemeralExpiration = 9; + optional int64 ephemeralSettingTimestamp = 10; + enum ConversationEndOfHistoryTransferType { + COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY = 0; + COMPLETE_AND_NO_MORE_MESSAGE_REMAIN_ON_PRIMARY = 1; + } + optional ConversationEndOfHistoryTransferType endOfHistoryTransferType = 11; + optional uint64 conversationTimestamp = 12; + optional string name = 13; + optional string pHash = 14; + optional bool notSpam = 15; + optional bool archived = 16; + optional DisappearingMode disappearingMode = 17; + optional uint32 unreadMentionCount = 18; + optional bool markedAsUnread = 19; + repeated GroupParticipant participant = 20; + optional bytes tcToken = 21; + optional uint64 tcTokenTimestamp = 22; + optional bytes contactPrimaryIdentityKey = 23; + optional uint32 pinned = 24; + optional uint64 muteEndTime = 25; + optional WallpaperSettings wallpaper = 26; + optional MediaVisibility mediaVisibility = 27; + optional uint64 tcTokenSenderTimestamp = 28; + optional bool suspended = 29; + optional bool terminated = 30; + optional uint64 createdAt = 31; + optional string createdBy = 32; + optional string description = 33; + optional bool support = 34; + optional bool isParentGroup = 35; + optional bool isDefaultSubgroup = 36; + optional string parentGroupId = 37; + optional string displayName = 38; + optional string pnJid = 39; + optional bool selfMasked = 40; +} + +message DNSSource { + enum DNSSourceDNSResolutionMethod { + SYSTEM = 0; + GOOGLE = 1; + HARDCODED = 2; + OVERRIDE = 3; + FALLBACK = 4; + } + optional DNSSourceDNSResolutionMethod dnsMethod = 15; + optional bool appCached = 16; } message DeclinePaymentRequestMessage { optional MessageKey key = 1; } +message DeleteChatAction { + optional SyncActionMessageRange messageRange = 1; +} + +message DeleteMessageForMeAction { + optional bool deleteMedia = 1; + optional int64 messageTimestamp = 2; +} + message DeviceListMetadata { optional bytes senderKeyHash = 1; optional uint64 senderTimestamp = 2; @@ -267,6 +489,40 @@ message DeviceListMetadata { repeated uint32 recipientKeyIndexes = 10 [packed=true]; } +message DevicePairingRegistrationData { + optional bytes eRegid = 1; + optional bytes eKeytype = 2; + optional bytes eIdent = 3; + optional bytes eSkeyId = 4; + optional bytes eSkeyVal = 5; + optional bytes eSkeySig = 6; + optional bytes buildHash = 7; + optional bytes deviceProps = 8; +} + +message DeviceProps { + optional string os = 1; + optional AppVersion version = 2; + enum DevicePropsPlatformType { + UNKNOWN = 0; + CHROME = 1; + FIREFOX = 2; + IE = 3; + OPERA = 4; + SAFARI = 5; + EDGE = 6; + DESKTOP = 7; + IPAD = 8; + ANDROID_TABLET = 9; + OHANA = 10; + ALOHA = 11; + CATALINA = 12; + TCL_TV = 13; + } + optional DevicePropsPlatformType platformType = 3; + optional bool requireFullSync = 4; +} + message DeviceSentMessage { optional string destinationJid = 1; optional Message message = 2; @@ -304,6 +560,16 @@ message DocumentMessage { optional uint32 thumbnailWidth = 19; } +message EphemeralSetting { + optional sfixed32 duration = 1; + optional sfixed64 timestamp = 2; +} + +message ExitCode { + optional uint64 code = 1; + optional string text = 2; +} + message ExtendedTextMessage { optional string text = 1; optional string matchedText = 2; @@ -366,6 +632,26 @@ message ExternalAdReplyInfo { optional bool showAdAttribution = 12; } +message ExternalBlobReference { + optional bytes mediaKey = 1; + optional string directPath = 2; + optional string handle = 3; + optional uint64 fileSizeBytes = 4; + optional bytes fileSha256 = 5; + optional bytes fileEncSha256 = 6; +} + +message FavoriteStickerAction { + optional string directPath = 1; + optional string lastUploadTimestamp = 2; + optional string handle = 3; + optional string encFilehash = 4; + optional string stickerHashWithoutMeta = 5; + optional string mediaKey = 6; + optional int64 mediaKeyTimestamp = 7; + optional bool isFavorite = 8; +} + message Footer { optional string text = 1; } @@ -387,6 +673,19 @@ message FutureProofMessage { optional Message message = 1; } +message GlobalSettings { + optional WallpaperSettings lightThemeWallpaper = 1; + optional MediaVisibility mediaVisibility = 2; + optional WallpaperSettings darkThemeWallpaper = 3; + optional AutoDownloadSettings autoDownloadWiFi = 4; + optional AutoDownloadSettings autoDownloadCellular = 5; + optional AutoDownloadSettings autoDownloadRoaming = 6; + optional bool showIndividualNotificationsPreview = 7; + optional bool showGroupNotificationsPreview = 8; + optional int32 disappearingModeDuration = 9; + optional int64 disappearingModeTimestamp = 10; +} + message GroupInviteMessage { optional string groupJid = 1; optional string inviteCode = 2; @@ -402,46 +701,14 @@ message GroupInviteMessage { optional GroupInviteMessageGroupType groupType = 8; } -message Header { - optional string title = 1; - optional string subtitle = 2; - optional bool hasMediaAttachment = 5; - oneof media { - DocumentMessage documentMessage = 3; - ImageMessage imageMessage = 4; - bytes jpegThumbnail = 6; - VideoMessage videoMessage = 7; +message GroupParticipant { + required string userJid = 1; + enum GroupParticipantRank { + REGULAR = 0; + ADMIN = 1; + SUPERADMIN = 2; } -} - -message HighlyStructuredMessage { - optional string namespace = 1; - optional string elementName = 2; - repeated string params = 3; - optional string fallbackLg = 4; - optional string fallbackLc = 5; - repeated HSMLocalizableParameter localizableParams = 6; - optional string deterministicLg = 7; - optional string deterministicLc = 8; - optional TemplateMessage hydratedHsm = 9; -} - -message HistorySyncNotification { - optional bytes fileSha256 = 1; - optional uint64 fileLength = 2; - optional bytes mediaKey = 3; - optional bytes fileEncSha256 = 4; - optional string directPath = 5; - enum HistorySyncNotificationHistorySyncType { - INITIAL_BOOTSTRAP = 0; - INITIAL_STATUS_V3 = 1; - FULL = 2; - RECENT = 3; - PUSH_NAME = 4; - } - optional HistorySyncNotificationHistorySyncType syncType = 6; - optional uint32 chunkOrder = 7; - optional string originalMessageId = 8; + optional GroupParticipantRank rank = 2; } message HSMCurrency { @@ -491,6 +758,78 @@ message HSMLocalizableParameter { } } +message HandshakeMessage { + optional ClientHello clientHello = 2; + optional ServerHello serverHello = 3; + optional ClientFinish clientFinish = 4; +} + +message Header { + optional string title = 1; + optional string subtitle = 2; + optional bool hasMediaAttachment = 5; + oneof media { + DocumentMessage documentMessage = 3; + ImageMessage imageMessage = 4; + bytes jpegThumbnail = 6; + VideoMessage videoMessage = 7; + } +} + +message HighlyStructuredMessage { + optional string namespace = 1; + optional string elementName = 2; + repeated string params = 3; + optional string fallbackLg = 4; + optional string fallbackLc = 5; + repeated HSMLocalizableParameter localizableParams = 6; + optional string deterministicLg = 7; + optional string deterministicLc = 8; + optional TemplateMessage hydratedHsm = 9; +} + +message HistorySync { + enum HistorySyncHistorySyncType { + INITIAL_BOOTSTRAP = 0; + INITIAL_STATUS_V3 = 1; + FULL = 2; + RECENT = 3; + PUSH_NAME = 4; + } + required HistorySyncHistorySyncType syncType = 1; + repeated Conversation conversations = 2; + repeated WebMessageInfo statusV3Messages = 3; + optional uint32 chunkOrder = 5; + optional uint32 progress = 6; + repeated Pushname pushnames = 7; + optional GlobalSettings globalSettings = 8; + optional bytes threadIdUserSecret = 9; + optional uint32 threadDsTimeframeOffset = 10; +} + +message HistorySyncMsg { + optional WebMessageInfo message = 1; + optional uint64 msgOrderId = 2; +} + +message HistorySyncNotification { + optional bytes fileSha256 = 1; + optional uint64 fileLength = 2; + optional bytes mediaKey = 3; + optional bytes fileEncSha256 = 4; + optional string directPath = 5; + enum HistorySyncNotificationHistorySyncType { + INITIAL_BOOTSTRAP = 0; + INITIAL_STATUS_V3 = 1; + FULL = 2; + RECENT = 3; + PUSH_NAME = 4; + } + optional HistorySyncNotificationHistorySyncType syncType = 6; + optional uint32 chunkOrder = 7; + optional string originalMessageId = 8; +} + message HydratedCallButton { optional string displayText = 1; optional string phoneNumber = 2; @@ -529,6 +868,11 @@ message HydratedURLButton { optional string url = 2; } +message IdentityKeyPairStructure { + optional bytes publicKey = 1; + optional bytes privateKey = 2; +} + message ImageMessage { optional string url = 1; optional string mimetype = 2; @@ -616,6 +960,42 @@ message InvoiceMessage { optional bytes attachmentJpegThumbnail = 10; } +message KeepInChat { + optional KeepType keepType = 1; + optional int64 serverTimestamp = 2; + optional string deviceJid = 3; +} + +message KeepInChatMessage { + optional MessageKey key = 1; + optional KeepType keepType = 2; + optional int64 timestampMs = 3; +} + +enum KeepType { + UNKNOWN = 0; + KEEP_FOR_ALL = 1; + UNDO_KEEP_FOR_ALL = 2; +} +message KeyExpiration { + optional int32 expiredKeyEpoch = 1; +} + +message KeyId { + optional bytes id = 1; +} + +message LabelAssociationAction { + optional bool labeled = 1; +} + +message LabelEditAction { + optional string name = 1; + optional int32 color = 2; + optional int32 predefinedId = 3; + optional bool deleted = 4; +} + message ListMessage { optional string title = 1; optional string description = 2; @@ -657,6 +1037,16 @@ message LiveLocationMessage { optional ContextInfo contextInfo = 17; } +message LocaleSetting { + optional string locale = 1; +} + +message LocalizedName { + optional string lg = 1; + optional string lc = 2; + optional string verifiedName = 3; +} + message Location { optional double degreesLatitude = 1; optional double degreesLongitude = 2; @@ -678,6 +1068,32 @@ message LocationMessage { optional ContextInfo contextInfo = 17; } +message MarkChatAsReadAction { + optional bool read = 1; + optional SyncActionMessageRange messageRange = 2; +} + +message MediaData { + optional string localPath = 1; +} + +message MediaRetryNotification { + optional string stanzaId = 1; + optional string directPath = 2; + enum MediaRetryNotificationResultType { + GENERAL_ERROR = 0; + SUCCESS = 1; + NOT_FOUND = 2; + DECRYPTION_ERROR = 3; + } + optional MediaRetryNotificationResultType result = 3; +} + +enum MediaVisibility { + DEFAULT = 0; + OFF = 1; + ON = 2; +} message Message { optional string conversation = 1; optional SenderKeyDistributionMessage senderKeyDistributionMessage = 2; @@ -721,11 +1137,21 @@ message Message { optional InteractiveResponseMessage interactiveResponseMessage = 48; optional PollCreationMessage pollCreationMessage = 49; optional PollUpdateMessage pollUpdateMessage = 50; + optional KeepInChatMessage keepInChatMessage = 51; } message MessageContextInfo { optional DeviceListMetadata deviceListMetadata = 1; optional int32 deviceListMetadataVersion = 2; + optional bytes messageSecret = 3; + optional bytes paddingBytes = 4; +} + +message MessageKey { + optional string remoteJid = 1; + optional bool fromMe = 2; + optional string id = 3; + optional string participant = 4; } message Money { @@ -734,6 +1160,37 @@ message Money { optional string currencyCode = 3; } +message MsgOpaqueData { + optional string body = 1; + optional string caption = 3; + optional double lng = 5; + optional bool isLive = 6; + optional double lat = 7; + optional int32 paymentAmount1000 = 8; + optional string paymentNoteMsgBody = 9; + optional string canonicalUrl = 10; + optional string matchedText = 11; + optional string title = 12; + optional string description = 13; + optional bytes futureproofBuffer = 14; + optional string clientUrl = 15; + optional string loc = 16; + optional string pollName = 17; + repeated PollOption pollOptions = 18; + optional uint32 pollSelectableOptionsCount = 20; + optional bytes messageSecret = 21; +} + +message MsgRowOpaqueData { + optional MsgOpaqueData currentMsg = 1; + optional MsgOpaqueData quotedMsg = 2; +} + +message MuteAction { + optional bool muted = 1; + optional int64 muteEndTimestamp = 2; +} + message NativeFlowButton { optional string name = 1; optional string buttonParamsJson = 2; @@ -756,6 +1213,27 @@ message NativeFlowResponseMessage { optional int32 version = 3; } +message NoiseCertificate { + optional bytes details = 1; + optional bytes signature = 2; +} + +// Renamed from NoiseCertificate$Details +message NoiseCertificateDetails { + optional uint32 serial = 1; + optional string issuer = 2; + optional uint64 expires = 3; + optional string subject = 4; + optional bytes key = 5; +} + +message NotificationMessageInfo { + optional MessageKey key = 1; + optional Message message = 2; + optional uint64 messageTimestamp = 3; + optional string participant = 4; +} + message Option { optional string optionName = 1; } @@ -781,6 +1259,15 @@ message OrderMessage { optional ContextInfo contextInfo = 17; } +// Renamed from PaymentBackground$MediaData +message PBMediaData { + optional bytes mediaKey = 1; + optional int64 mediaKeyTimestamp = 2; + optional bytes fileSha256 = 3; + optional bytes fileEncSha256 = 4; + optional string directPath = 5; +} + message PaymentBackground { optional string id = 1; optional uint64 fileLength = 2; @@ -798,990 +1285,6 @@ message PaymentBackground { optional PaymentBackgroundType type = 10; } -message PaymentInviteMessage { - enum PaymentInviteMessageServiceType { - UNKNOWN = 0; - FBPAY = 1; - NOVI = 2; - UPI = 3; - } - optional PaymentInviteMessageServiceType serviceType = 1; - optional int64 expiryTimestamp = 2; -} - -// Renamed from PaymentBackground$MediaData -message PBMediaData { - optional bytes mediaKey = 1; - optional int64 mediaKeyTimestamp = 2; - optional bytes fileSha256 = 3; - optional bytes fileEncSha256 = 4; - optional string directPath = 5; -} - -message Point { - optional int32 xDeprecated = 1; - optional int32 yDeprecated = 2; - optional double x = 3; - optional double y = 4; -} - -message PollCreationMessage { - optional bytes encKey = 1; - optional string name = 2; - repeated Option options = 3; - optional uint32 selectableOptionsCount = 4; - optional ContextInfo contextInfo = 5; -} - -message PollEncValue { - optional bytes encPayload = 1; - optional bytes encIv = 2; -} - -message PollUpdateMessage { - optional MessageKey pollCreationMessageKey = 1; - optional PollEncValue vote = 2; -} - -message PollVoteMessage { - repeated bytes selectedOptions = 1; - optional int64 senderTimestampMs = 2; -} - -message Product { - optional string productId = 1; -} - -message ProductListHeaderImage { - optional string productId = 1; - optional bytes jpegThumbnail = 2; -} - -message ProductListInfo { - repeated ProductSection productSections = 1; - optional ProductListHeaderImage headerImage = 2; - optional string businessOwnerJid = 3; -} - -message ProductMessage { - optional ProductSnapshot product = 1; - optional string businessOwnerJid = 2; - optional CatalogSnapshot catalog = 4; - optional string body = 5; - optional string footer = 6; - optional ContextInfo contextInfo = 17; -} - -message ProductSection { - optional string title = 1; - repeated Product products = 2; -} - -message ProductSnapshot { - optional ImageMessage productImage = 1; - optional string productId = 2; - optional string title = 3; - optional string description = 4; - optional string currencyCode = 5; - optional int64 priceAmount1000 = 6; - optional string retailerId = 7; - optional string url = 8; - optional uint32 productImageCount = 9; - optional string firstImageId = 11; - optional int64 salePriceAmount1000 = 12; -} - -message ProtocolMessage { - optional MessageKey key = 1; - enum ProtocolMessageType { - REVOKE = 0; - EPHEMERAL_SETTING = 3; - EPHEMERAL_SYNC_RESPONSE = 4; - HISTORY_SYNC_NOTIFICATION = 5; - APP_STATE_SYNC_KEY_SHARE = 6; - APP_STATE_SYNC_KEY_REQUEST = 7; - MSG_FANOUT_BACKFILL_REQUEST = 8; - INITIAL_SECURITY_NOTIFICATION_SETTING_SYNC = 9; - APP_STATE_FATAL_EXCEPTION_NOTIFICATION = 10; - } - optional ProtocolMessageType type = 2; - optional uint32 ephemeralExpiration = 4; - optional int64 ephemeralSettingTimestamp = 5; - optional HistorySyncNotification historySyncNotification = 6; - optional AppStateSyncKeyShare appStateSyncKeyShare = 7; - optional AppStateSyncKeyRequest appStateSyncKeyRequest = 8; - optional InitialSecurityNotificationSettingSync initialSecurityNotificationSettingSync = 9; - optional AppStateFatalExceptionNotification appStateFatalExceptionNotification = 10; - optional DisappearingMode disappearingMode = 11; -} - -message QuickReplyButton { - optional HighlyStructuredMessage displayText = 1; - optional string id = 2; -} - -message ReactionMessage { - optional MessageKey key = 1; - optional string text = 2; - optional string groupingKey = 3; - optional int64 senderTimestampMs = 4; -} - -message RequestPaymentMessage { - optional Message noteMessage = 4; - optional string currencyCodeIso4217 = 1; - optional uint64 amount1000 = 2; - optional string requestFrom = 3; - optional int64 expiryTimestamp = 5; - optional Money amount = 6; - optional PaymentBackground background = 7; -} - -message Row { - optional string title = 1; - optional string description = 2; - optional string rowId = 3; -} - -message Section { - optional string title = 1; - repeated Row rows = 2; -} - -message SenderKeyDistributionMessage { - optional string groupId = 1; - optional bytes axolotlSenderKeyDistributionMessage = 2; -} - -message SendPaymentMessage { - optional Message noteMessage = 2; - optional MessageKey requestMessageKey = 3; - optional PaymentBackground background = 4; -} - -message ShopMessage { - optional string id = 1; - enum ShopMessageSurface { - UNKNOWN_SURFACE = 0; - FB = 1; - IG = 2; - WA = 3; - } - optional ShopMessageSurface surface = 2; - optional int32 messageVersion = 3; -} - -message SingleSelectReply { - optional string selectedRowId = 1; -} - -message StickerMessage { - optional string url = 1; - optional bytes fileSha256 = 2; - optional bytes fileEncSha256 = 3; - optional bytes mediaKey = 4; - optional string mimetype = 5; - optional uint32 height = 6; - optional uint32 width = 7; - optional string directPath = 8; - optional uint64 fileLength = 9; - optional int64 mediaKeyTimestamp = 10; - optional uint32 firstFrameLength = 11; - optional bytes firstFrameSidecar = 12; - optional bool isAnimated = 13; - optional bytes pngThumbnail = 16; - optional ContextInfo contextInfo = 17; -} - -message StickerSyncRMRMessage { - repeated string filehash = 1; - optional string rmrSource = 2; - optional int64 requestTimestamp = 3; -} - -message TemplateButton { - optional uint32 index = 4; - oneof button { - QuickReplyButton quickReplyButton = 1; - URLButton urlButton = 2; - CallButton callButton = 3; - } -} - -message TemplateButtonReplyMessage { - optional string selectedId = 1; - optional string selectedDisplayText = 2; - optional ContextInfo contextInfo = 3; - optional uint32 selectedIndex = 4; -} - -message TemplateMessage { - optional ContextInfo contextInfo = 3; - optional HydratedFourRowTemplate hydratedTemplate = 4; - oneof format { - FourRowTemplate fourRowTemplate = 1; - HydratedFourRowTemplate hydratedFourRowTemplate = 2; - } -} - -message URLButton { - optional HighlyStructuredMessage displayText = 1; - optional HighlyStructuredMessage url = 2; -} - -message VideoMessage { - optional string url = 1; - optional string mimetype = 2; - optional bytes fileSha256 = 3; - optional uint64 fileLength = 4; - optional uint32 seconds = 5; - optional bytes mediaKey = 6; - optional string caption = 7; - optional bool gifPlayback = 8; - optional uint32 height = 9; - optional uint32 width = 10; - optional bytes fileEncSha256 = 11; - repeated InteractiveAnnotation interactiveAnnotations = 12; - optional string directPath = 13; - optional int64 mediaKeyTimestamp = 14; - optional bytes jpegThumbnail = 16; - optional ContextInfo contextInfo = 17; - optional bytes streamingSidecar = 18; - enum VideoMessageAttribution { - NONE = 0; - GIPHY = 1; - TENOR = 2; - } - optional VideoMessageAttribution gifAttribution = 19; - optional bool viewOnce = 20; - optional string thumbnailDirectPath = 21; - optional bytes thumbnailSha256 = 22; - optional bytes thumbnailEncSha256 = 23; - optional string staticUrl = 24; -} - -message EphemeralSetting { - optional sfixed32 duration = 1; - optional sfixed64 timestamp = 2; -} - -message AutoDownloadSettings { - optional bool downloadImages = 1; - optional bool downloadAudio = 2; - optional bool downloadVideo = 3; - optional bool downloadDocuments = 4; -} - -message Conversation { - required string id = 1; - repeated HistorySyncMsg messages = 2; - optional string newJid = 3; - optional string oldJid = 4; - optional uint64 lastMsgTimestamp = 5; - optional uint32 unreadCount = 6; - optional bool readOnly = 7; - optional bool endOfHistoryTransfer = 8; - optional uint32 ephemeralExpiration = 9; - optional int64 ephemeralSettingTimestamp = 10; - enum ConversationEndOfHistoryTransferType { - COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY = 0; - COMPLETE_AND_NO_MORE_MESSAGE_REMAIN_ON_PRIMARY = 1; - } - optional ConversationEndOfHistoryTransferType endOfHistoryTransferType = 11; - optional uint64 conversationTimestamp = 12; - optional string name = 13; - optional string pHash = 14; - optional bool notSpam = 15; - optional bool archived = 16; - optional DisappearingMode disappearingMode = 17; - optional uint32 unreadMentionCount = 18; - optional bool markedAsUnread = 19; - repeated GroupParticipant participant = 20; - optional bytes tcToken = 21; - optional uint64 tcTokenTimestamp = 22; - optional bytes contactPrimaryIdentityKey = 23; - optional uint32 pinned = 24; - optional uint64 muteEndTime = 25; - optional WallpaperSettings wallpaper = 26; - optional MediaVisibility mediaVisibility = 27; - optional uint64 tcTokenSenderTimestamp = 28; - optional bool suspended = 29; -} - -message GlobalSettings { - optional WallpaperSettings lightThemeWallpaper = 1; - optional MediaVisibility mediaVisibility = 2; - optional WallpaperSettings darkThemeWallpaper = 3; - optional AutoDownloadSettings autoDownloadWiFi = 4; - optional AutoDownloadSettings autoDownloadCellular = 5; - optional AutoDownloadSettings autoDownloadRoaming = 6; - optional bool showIndividualNotificationsPreview = 7; - optional bool showGroupNotificationsPreview = 8; -} - -message GroupParticipant { - required string userJid = 1; - enum GroupParticipantRank { - REGULAR = 0; - ADMIN = 1; - SUPERADMIN = 2; - } - optional GroupParticipantRank rank = 2; -} - -message HistorySync { - enum HistorySyncHistorySyncType { - INITIAL_BOOTSTRAP = 0; - INITIAL_STATUS_V3 = 1; - FULL = 2; - RECENT = 3; - PUSH_NAME = 4; - } - required HistorySyncHistorySyncType syncType = 1; - repeated Conversation conversations = 2; - repeated WebMessageInfo statusV3Messages = 3; - optional uint32 chunkOrder = 5; - optional uint32 progress = 6; - repeated Pushname pushnames = 7; - optional GlobalSettings globalSettings = 8; - optional bytes threadIdUserSecret = 9; - optional uint32 threadDsTimeframeOffset = 10; -} - -message HistorySyncMsg { - optional WebMessageInfo message = 1; - optional uint64 msgOrderId = 2; -} - -enum MediaVisibility { - DEFAULT = 0; - OFF = 1; - ON = 2; -} -message Pushname { - optional string id = 1; - optional string pushname = 2; -} - -message WallpaperSettings { - optional string filename = 1; - optional uint32 opacity = 2; -} - -message MsgOpaqueData { - optional string body = 1; - optional string caption = 3; - optional double lng = 5; - optional bool isLive = 6; - optional double lat = 7; - optional int32 paymentAmount1000 = 8; - optional string paymentNoteMsgBody = 9; - optional string canonicalUrl = 10; - optional string matchedText = 11; - optional string title = 12; - optional string description = 13; - optional bytes futureproofBuffer = 14; - optional string clientUrl = 15; - optional string loc = 16; - optional string pollName = 17; - repeated PollOption pollOptions = 18; - optional bytes pollEncKey = 19; - optional uint32 pollSelectableOptionsCount = 20; -} - -message MsgRowOpaqueData { - optional MsgOpaqueData currentMsg = 1; - optional MsgOpaqueData quotedMsg = 2; -} - -message PollOption { - optional string name = 1; -} - -message MediaRetryNotification { - optional string stanzaId = 1; - optional string directPath = 2; - enum MediaRetryNotificationResultType { - GENERAL_ERROR = 0; - SUCCESS = 1; - NOT_FOUND = 2; - DECRYPTION_ERROR = 3; - } - optional MediaRetryNotificationResultType result = 3; -} - -message ServerErrorReceipt { - optional string stanzaId = 1; -} - -message MessageKey { - optional string remoteJid = 1; - optional bool fromMe = 2; - optional string id = 3; - optional string participant = 4; -} - -// Duplicate type omitted -//message MessageKey { -// optional string remoteJid = 1; -// optional bool fromMe = 2; -// optional string id = 3; -// optional string participant = 4; -//} - -message ExitCode { - optional uint64 code = 1; - optional string text = 2; -} - -message ExternalBlobReference { - optional bytes mediaKey = 1; - optional string directPath = 2; - optional string handle = 3; - optional uint64 fileSizeBytes = 4; - optional bytes fileSha256 = 5; - optional bytes fileEncSha256 = 6; -} - -message KeyId { - optional bytes id = 1; -} - -message SyncdIndex { - optional bytes blob = 1; -} - -message SyncdMutation { - enum SyncdMutationSyncdOperation { - SET = 0; - REMOVE = 1; - } - optional SyncdMutationSyncdOperation operation = 1; - optional SyncdRecord record = 2; -} - -message SyncdMutations { - repeated SyncdMutation mutations = 1; -} - -message SyncdPatch { - optional SyncdVersion version = 1; - repeated SyncdMutation mutations = 2; - optional ExternalBlobReference externalMutations = 3; - optional bytes snapshotMac = 4; - optional bytes patchMac = 5; - optional KeyId keyId = 6; - optional ExitCode exitCode = 7; - optional uint32 deviceIndex = 8; -} - -message SyncdRecord { - optional SyncdIndex index = 1; - optional SyncdValue value = 2; - optional KeyId keyId = 3; -} - -message SyncdSnapshot { - optional SyncdVersion version = 1; - repeated SyncdRecord records = 2; - optional bytes mac = 3; - optional KeyId keyId = 4; -} - -message SyncdValue { - optional bytes blob = 1; -} - -message SyncdVersion { - optional uint64 version = 1; -} - -message AgentAction { - optional string name = 1; - optional int32 deviceID = 2; - optional bool isDeleted = 3; -} - -message AndroidUnsupportedActions { - optional bool allowed = 1; -} - -message ArchiveChatAction { - optional bool archived = 1; - optional SyncActionMessageRange messageRange = 2; -} - -message ClearChatAction { - optional SyncActionMessageRange messageRange = 1; -} - -message ContactAction { - optional string fullName = 1; - optional string firstName = 2; -} - -message DeleteChatAction { - optional SyncActionMessageRange messageRange = 1; -} - -message DeleteMessageForMeAction { - optional bool deleteMedia = 1; - optional int64 messageTimestamp = 2; -} - -message FavoriteStickerAction { - optional string directPath = 1; - optional string lastUploadTimestamp = 2; - optional string handle = 3; - optional string encFilehash = 4; - optional string stickerHashWithoutMeta = 5; - optional string mediaKey = 6; - optional int64 mediaKeyTimestamp = 7; - optional bool isFavorite = 8; -} - -message KeyExpiration { - optional int32 expiredKeyEpoch = 1; -} - -message LabelAssociationAction { - optional bool labeled = 1; -} - -message LabelEditAction { - optional string name = 1; - optional int32 color = 2; - optional int32 predefinedId = 3; - optional bool deleted = 4; -} - -message LocaleSetting { - optional string locale = 1; -} - -message MarkChatAsReadAction { - optional bool read = 1; - optional SyncActionMessageRange messageRange = 2; -} - -message MuteAction { - optional bool muted = 1; - optional int64 muteEndTimestamp = 2; -} - -message PinAction { - optional bool pinned = 1; -} - -message PrimaryFeature { - repeated string flags = 1; -} - -message PushNameSetting { - optional string name = 1; -} - -message QuickReplyAction { - optional string shortcut = 1; - optional string message = 2; - repeated string keywords = 3; - optional int32 count = 4; - optional bool deleted = 5; -} - -message RecentEmojiWeight { - optional string emoji = 1; - optional float weight = 2; -} - -message RecentEmojiWeightsAction { - repeated RecentEmojiWeight weights = 1; -} - -message RecentStickerMetadata { - optional string directPath = 1; - optional string encFilehash = 2; - optional string mediaKey = 3; - optional string stanzaId = 4; - optional string chatJid = 5; - optional string participant = 6; - optional bool isSentByMe = 7; -} - -message RecentStickerWeight { - optional string filehash = 1; - optional float weight = 2; -} - -message RecentStickerWeightsAction { - repeated RecentStickerWeight weights = 1; -} - -message SecurityNotificationSetting { - optional bool showNotification = 1; -} - -message StarAction { - optional bool starred = 1; -} - -message SubscriptionAction { - optional bool isDeactivated = 1; - optional bool isAutoRenewing = 2; - optional int64 expirationDate = 3; -} - -message SyncActionData { - optional bytes index = 1; - optional SyncActionValue value = 2; - optional bytes padding = 3; - optional int32 version = 4; -} - -message SyncActionMessage { - optional MessageKey key = 1; - optional int64 timestamp = 2; -} - -message SyncActionMessageRange { - optional int64 lastMessageTimestamp = 1; - optional int64 lastSystemMessageTimestamp = 2; - repeated SyncActionMessage messages = 3; -} - -message SyncActionValue { - optional int64 timestamp = 1; - optional StarAction starAction = 2; - optional ContactAction contactAction = 3; - optional MuteAction muteAction = 4; - optional PinAction pinAction = 5; - optional SecurityNotificationSetting securityNotificationSetting = 6; - optional PushNameSetting pushNameSetting = 7; - optional QuickReplyAction quickReplyAction = 8; - optional RecentStickerWeightsAction recentStickerWeightsAction = 9; - optional RecentStickerMetadata recentStickerMetadata = 10; - optional RecentEmojiWeightsAction recentEmojiWeightsAction = 11; - optional LabelEditAction labelEditAction = 14; - optional LabelAssociationAction labelAssociationAction = 15; - optional LocaleSetting localeSetting = 16; - optional ArchiveChatAction archiveChatAction = 17; - optional DeleteMessageForMeAction deleteMessageForMeAction = 18; - optional KeyExpiration keyExpiration = 19; - optional MarkChatAsReadAction markChatAsReadAction = 20; - optional ClearChatAction clearChatAction = 21; - optional DeleteChatAction deleteChatAction = 22; - optional UnarchiveChatsSetting unarchiveChatsSetting = 23; - optional PrimaryFeature primaryFeature = 24; - optional FavoriteStickerAction favoriteStickerAction = 25; - optional AndroidUnsupportedActions androidUnsupportedActions = 26; - optional AgentAction agentAction = 27; - optional SubscriptionAction subscriptionAction = 28; - optional UserStatusMuteAction userStatusMuteAction = 29; - optional TimeFormatAction timeFormatAction = 30; -} - -message TimeFormatAction { - optional bool isTwentyFourHourFormatEnabled = 1; -} - -message UnarchiveChatsSetting { - optional bool unarchiveChats = 1; -} - -message UserStatusMuteAction { - optional bool muted = 1; -} - -message BizAccountLinkInfo { - optional uint64 whatsappBizAcctFbid = 1; - optional string whatsappAcctNumber = 2; - optional uint64 issueTime = 3; - enum BizAccountLinkInfoHostStorageType { - ON_PREMISE = 0; - FACEBOOK = 1; - } - optional BizAccountLinkInfoHostStorageType hostStorage = 4; - enum BizAccountLinkInfoAccountType { - ENTERPRISE = 0; - } - optional BizAccountLinkInfoAccountType accountType = 5; -} - -message BizAccountPayload { - optional VerifiedNameCertificate vnameCert = 1; - optional bytes bizAcctLinkInfo = 2; -} - -message BizIdentityInfo { - enum BizIdentityInfoVerifiedLevelValue { - UNKNOWN = 0; - LOW = 1; - HIGH = 2; - } - optional BizIdentityInfoVerifiedLevelValue vlevel = 1; - optional VerifiedNameCertificate vnameCert = 2; - optional bool signed = 3; - optional bool revoked = 4; - enum BizIdentityInfoHostStorageType { - ON_PREMISE = 0; - FACEBOOK = 1; - } - optional BizIdentityInfoHostStorageType hostStorage = 5; - enum BizIdentityInfoActualActorsType { - SELF = 0; - BSP = 1; - } - optional BizIdentityInfoActualActorsType actualActors = 6; - optional uint64 privacyModeTs = 7; - optional uint64 featureControls = 8; -} - -message LocalizedName { - optional string lg = 1; - optional string lc = 2; - optional string verifiedName = 3; -} - -message VerifiedNameCertificate { - optional bytes details = 1; - optional bytes signature = 2; - optional bytes serverSignature = 3; -} - -// Renamed from VerifiedNameCertificate$Details -message VerifiedNameDetails { - optional uint64 serial = 1; - optional string issuer = 2; - optional string verifiedName = 4; - repeated LocalizedName localizedNames = 8; - optional uint64 issueTime = 10; -} - -// Duplicate type omitted -//message AppVersion { -// optional uint32 primary = 1; -// optional uint32 secondary = 2; -// optional uint32 tertiary = 3; -// optional uint32 quaternary = 4; -// optional uint32 quinary = 5; -//} - -message CertChain { - optional NoiseCertificate leaf = 1; - optional NoiseCertificate intermediate = 2; -} - -message ClientFinish { - optional bytes static = 1; - optional bytes payload = 2; -} - -message ClientHello { - optional bytes ephemeral = 1; - optional bytes static = 2; - optional bytes payload = 3; -} - -message ClientPayload { - optional uint64 username = 1; - optional bool passive = 3; - optional UserAgent userAgent = 5; - optional WebInfo webInfo = 6; - optional string pushName = 7; - optional sfixed32 sessionId = 9; - optional bool shortConnect = 10; - enum ClientPayloadConnectType { - CELLULAR_UNKNOWN = 0; - WIFI_UNKNOWN = 1; - CELLULAR_EDGE = 100; - CELLULAR_IDEN = 101; - CELLULAR_UMTS = 102; - CELLULAR_EVDO = 103; - CELLULAR_GPRS = 104; - CELLULAR_HSDPA = 105; - CELLULAR_HSUPA = 106; - CELLULAR_HSPA = 107; - CELLULAR_CDMA = 108; - CELLULAR_1XRTT = 109; - CELLULAR_EHRPD = 110; - CELLULAR_LTE = 111; - CELLULAR_HSPAP = 112; - } - optional ClientPayloadConnectType connectType = 12; - enum ClientPayloadConnectReason { - PUSH = 0; - USER_ACTIVATED = 1; - SCHEDULED = 2; - ERROR_RECONNECT = 3; - NETWORK_SWITCH = 4; - PING_RECONNECT = 5; - } - optional ClientPayloadConnectReason connectReason = 13; - repeated int32 shards = 14; - optional DNSSource dnsSource = 15; - optional uint32 connectAttemptCount = 16; - optional uint32 device = 18; - optional CompanionRegData regData = 19; - enum ClientPayloadProduct { - WHATSAPP = 0; - MESSENGER = 1; - } - optional ClientPayloadProduct product = 20; - optional bytes fbCat = 21; - optional bytes fbUserAgent = 22; - optional bool oc = 23; - optional int32 lc = 24; - enum ClientPayloadIOSAppExtension { - SHARE_EXTENSION = 0; - SERVICE_EXTENSION = 1; - INTENTS_EXTENSION = 2; - } - optional ClientPayloadIOSAppExtension iosAppExtension = 30; - optional uint64 fbAppId = 31; - optional bytes fbDeviceId = 32; - optional bool pull = 33; -} - -message CompanionRegData { - optional bytes eRegid = 1; - optional bytes eKeytype = 2; - optional bytes eIdent = 3; - optional bytes eSkeyId = 4; - optional bytes eSkeyVal = 5; - optional bytes eSkeySig = 6; - optional bytes buildHash = 7; - optional bytes companionProps = 8; -} - -message Details { - optional uint32 serial = 1; - optional uint32 issuerSerial = 2; - optional bytes key = 3; - optional uint64 notBefore = 4; - optional uint64 notAfter = 5; -} - -message DNSSource { - enum DNSSourceDNSResolutionMethod { - SYSTEM = 0; - GOOGLE = 1; - HARDCODED = 2; - OVERRIDE = 3; - FALLBACK = 4; - } - optional DNSSourceDNSResolutionMethod dnsMethod = 15; - optional bool appCached = 16; -} - -message HandshakeMessage { - optional ClientHello clientHello = 2; - optional ServerHello serverHello = 3; - optional ClientFinish clientFinish = 4; -} - -message NoiseCertificate { - optional bytes details = 1; - optional bytes signature = 2; -} - -message ServerHello { - optional bytes ephemeral = 1; - optional bytes static = 2; - optional bytes payload = 3; -} - -message UserAgent { - enum UserAgentPlatform { - ANDROID = 0; - IOS = 1; - WINDOWS_PHONE = 2; - BLACKBERRY = 3; - BLACKBERRYX = 4; - S40 = 5; - S60 = 6; - PYTHON_CLIENT = 7; - TIZEN = 8; - ENTERPRISE = 9; - SMB_ANDROID = 10; - KAIOS = 11; - SMB_IOS = 12; - WINDOWS = 13; - WEB = 14; - PORTAL = 15; - GREEN_ANDROID = 16; - GREEN_IPHONE = 17; - BLUE_ANDROID = 18; - BLUE_IPHONE = 19; - FBLITE_ANDROID = 20; - MLITE_ANDROID = 21; - IGLITE_ANDROID = 22; - PAGE = 23; - MACOS = 24; - OCULUS_MSG = 25; - OCULUS_CALL = 26; - MILAN = 27; - CAPI = 28; - } - optional UserAgentPlatform platform = 1; - optional AppVersion appVersion = 2; - optional string mcc = 3; - optional string mnc = 4; - optional string osVersion = 5; - optional string manufacturer = 6; - optional string device = 7; - optional string osBuildNumber = 8; - optional string phoneId = 9; - enum UserAgentReleaseChannel { - RELEASE = 0; - BETA = 1; - ALPHA = 2; - DEBUG = 3; - } - optional UserAgentReleaseChannel releaseChannel = 10; - optional string localeLanguageIso6391 = 11; - optional string localeCountryIso31661Alpha2 = 12; - optional string deviceBoard = 13; -} - -message WebdPayload { - optional bool usesParticipantInKey = 1; - optional bool supportsStarredMessages = 2; - optional bool supportsDocumentMessages = 3; - optional bool supportsUrlMessages = 4; - optional bool supportsMediaRetry = 5; - optional bool supportsE2EImage = 6; - optional bool supportsE2EVideo = 7; - optional bool supportsE2EAudio = 8; - optional bool supportsE2EDocument = 9; - optional string documentTypes = 10; - optional bytes features = 11; -} - -message WebInfo { - optional string refToken = 1; - optional string version = 2; - optional WebdPayload webdPayload = 3; - enum WebInfoWebSubPlatform { - WEB_BROWSER = 0; - APP_STORE = 1; - WIN_STORE = 2; - DARWIN = 3; - WIN32 = 4; - } - optional WebInfoWebSubPlatform webSubPlatform = 4; -} - -message MediaData { - optional string localPath = 1; -} - -message NotificationMessageInfo { - optional MessageKey key = 1; - optional Message message = 2; - optional uint64 messageTimestamp = 3; - optional string participant = 4; -} - message PaymentInfo { enum PaymentInfoCurrency { UNKNOWN_CURRENCY = 0; @@ -1850,21 +1353,189 @@ message PaymentInfo { optional Money exchangeAmount = 13; } +message PaymentInviteMessage { + enum PaymentInviteMessageServiceType { + UNKNOWN = 0; + FBPAY = 1; + NOVI = 2; + UPI = 3; + } + optional PaymentInviteMessageServiceType serviceType = 1; + optional int64 expiryTimestamp = 2; +} + +message PendingKeyExchange { + optional uint32 sequence = 1; + optional bytes localBaseKey = 2; + optional bytes localBaseKeyPrivate = 3; + optional bytes localRatchetKey = 4; + optional bytes localRatchetKeyPrivate = 5; + optional bytes localIdentityKey = 7; + optional bytes localIdentityKeyPrivate = 8; +} + +message PendingPreKey { + optional uint32 preKeyId = 1; + optional int32 signedPreKeyId = 3; + optional bytes baseKey = 2; +} + message PhotoChange { optional bytes oldPhoto = 1; optional bytes newPhoto = 2; optional uint32 newPhotoId = 3; } +message PinAction { + optional bool pinned = 1; +} + +message Point { + optional int32 xDeprecated = 1; + optional int32 yDeprecated = 2; + optional double x = 3; + optional double y = 4; +} + message PollAdditionalMetadata { optional bool pollInvalidated = 1; } +message PollCreationMessage { + optional bytes encKey = 1; + optional string name = 2; + repeated Option options = 3; + optional uint32 selectableOptionsCount = 4; + optional ContextInfo contextInfo = 5; +} + +message PollEncValue { + optional bytes encPayload = 1; + optional bytes encIv = 2; +} + +message PollOption { + optional string name = 1; +} + message PollUpdate { optional MessageKey pollUpdateMessageKey = 1; optional PollVoteMessage vote = 2; } +message PollUpdateMessage { + optional MessageKey pollCreationMessageKey = 1; + optional PollEncValue vote = 2; + optional PollUpdateMessageMetadata metadata = 3; +} + +message PollUpdateMessageMetadata { +} + +message PollVoteMessage { + repeated bytes selectedOptions = 1; + optional int64 senderTimestampMs = 2; +} + +message PreKeyRecordStructure { + optional uint32 id = 1; + optional bytes publicKey = 2; + optional bytes privateKey = 3; +} + +message PrimaryFeature { + repeated string flags = 1; +} + +message Product { + optional string productId = 1; +} + +message ProductListHeaderImage { + optional string productId = 1; + optional bytes jpegThumbnail = 2; +} + +message ProductListInfo { + repeated ProductSection productSections = 1; + optional ProductListHeaderImage headerImage = 2; + optional string businessOwnerJid = 3; +} + +message ProductMessage { + optional ProductSnapshot product = 1; + optional string businessOwnerJid = 2; + optional CatalogSnapshot catalog = 4; + optional string body = 5; + optional string footer = 6; + optional ContextInfo contextInfo = 17; +} + +message ProductSection { + optional string title = 1; + repeated Product products = 2; +} + +message ProductSnapshot { + optional ImageMessage productImage = 1; + optional string productId = 2; + optional string title = 3; + optional string description = 4; + optional string currencyCode = 5; + optional int64 priceAmount1000 = 6; + optional string retailerId = 7; + optional string url = 8; + optional uint32 productImageCount = 9; + optional string firstImageId = 11; + optional int64 salePriceAmount1000 = 12; +} + +message ProtocolMessage { + optional MessageKey key = 1; + enum ProtocolMessageType { + REVOKE = 0; + EPHEMERAL_SETTING = 3; + EPHEMERAL_SYNC_RESPONSE = 4; + HISTORY_SYNC_NOTIFICATION = 5; + APP_STATE_SYNC_KEY_SHARE = 6; + APP_STATE_SYNC_KEY_REQUEST = 7; + MSG_FANOUT_BACKFILL_REQUEST = 8; + INITIAL_SECURITY_NOTIFICATION_SETTING_SYNC = 9; + APP_STATE_FATAL_EXCEPTION_NOTIFICATION = 10; + } + optional ProtocolMessageType type = 2; + optional uint32 ephemeralExpiration = 4; + optional int64 ephemeralSettingTimestamp = 5; + optional HistorySyncNotification historySyncNotification = 6; + optional AppStateSyncKeyShare appStateSyncKeyShare = 7; + optional AppStateSyncKeyRequest appStateSyncKeyRequest = 8; + optional InitialSecurityNotificationSettingSync initialSecurityNotificationSettingSync = 9; + optional AppStateFatalExceptionNotification appStateFatalExceptionNotification = 10; + optional DisappearingMode disappearingMode = 11; +} + +message PushNameSetting { + optional string name = 1; +} + +message Pushname { + optional string id = 1; + optional string pushname = 2; +} + +message QuickReplyAction { + optional string shortcut = 1; + optional string message = 2; + repeated string keywords = 3; + optional int32 count = 4; + optional bool deleted = 5; +} + +message QuickReplyButton { + optional HighlyStructuredMessage displayText = 1; + optional string id = 2; +} + message Reaction { optional MessageKey key = 1; optional string text = 2; @@ -1873,11 +1544,387 @@ message Reaction { optional bool unread = 5; } +message ReactionMessage { + optional MessageKey key = 1; + optional string text = 2; + optional string groupingKey = 3; + optional int64 senderTimestampMs = 4; +} + +message RecentEmojiWeight { + optional string emoji = 1; + optional float weight = 2; +} + +message RecentEmojiWeightsAction { + repeated RecentEmojiWeight weights = 1; +} + +message RecentStickerMetadata { + optional string directPath = 1; + optional string encFilehash = 2; + optional string mediaKey = 3; + optional string stanzaId = 4; + optional string chatJid = 5; + optional string participant = 6; + optional bool isSentByMe = 7; +} + +message RecentStickerWeight { + optional string filehash = 1; + optional float weight = 2; +} + +message RecentStickerWeightsAction { + repeated RecentStickerWeight weights = 1; +} + +message RecordStructure { + optional SessionStructure currentSession = 1; + repeated SessionStructure previousSessions = 2; +} + +message RequestPaymentMessage { + optional Message noteMessage = 4; + optional string currencyCodeIso4217 = 1; + optional uint64 amount1000 = 2; + optional string requestFrom = 3; + optional int64 expiryTimestamp = 5; + optional Money amount = 6; + optional PaymentBackground background = 7; +} + +message Row { + optional string title = 1; + optional string description = 2; + optional string rowId = 3; +} + +message Section { + optional string title = 1; + repeated Row rows = 2; +} + +message SecurityNotificationSetting { + optional bool showNotification = 1; +} + +message SendPaymentMessage { + optional Message noteMessage = 2; + optional MessageKey requestMessageKey = 3; + optional PaymentBackground background = 4; +} + +message SenderChainKey { + optional uint32 iteration = 1; + optional bytes seed = 2; +} + +message SenderKeyDistributionMessage { + optional string groupId = 1; + optional bytes axolotlSenderKeyDistributionMessage = 2; +} + +message SenderKeyRecordStructure { + repeated SenderKeyStateStructure senderKeyStates = 1; +} + +message SenderKeyStateStructure { + optional uint32 senderKeyId = 1; + optional SenderChainKey senderChainKey = 2; + optional SenderSigningKey senderSigningKey = 3; + repeated SenderMessageKey senderMessageKeys = 4; +} + +message SenderMessageKey { + optional uint32 iteration = 1; + optional bytes seed = 2; +} + +message SenderSigningKey { + optional bytes public = 1; + optional bytes private = 2; +} + +message ServerErrorReceipt { + optional string stanzaId = 1; +} + +message ServerHello { + optional bytes ephemeral = 1; + optional bytes static = 2; + optional bytes payload = 3; +} + +message SessionStructure { + optional uint32 sessionVersion = 1; + optional bytes localIdentityPublic = 2; + optional bytes remoteIdentityPublic = 3; + optional bytes rootKey = 4; + optional uint32 previousCounter = 5; + optional Chain senderChain = 6; + repeated Chain receiverChains = 7; + optional PendingKeyExchange pendingKeyExchange = 8; + optional PendingPreKey pendingPreKey = 9; + optional uint32 remoteRegistrationId = 10; + optional uint32 localRegistrationId = 11; + optional bool needsRefresh = 12; + optional bytes aliceBaseKey = 13; +} + +message ShopMessage { + optional string id = 1; + enum ShopMessageSurface { + UNKNOWN_SURFACE = 0; + FB = 1; + IG = 2; + WA = 3; + } + optional ShopMessageSurface surface = 2; + optional int32 messageVersion = 3; +} + +message SignedPreKeyRecordStructure { + optional uint32 id = 1; + optional bytes publicKey = 2; + optional bytes privateKey = 3; + optional bytes signature = 4; + optional fixed64 timestamp = 5; +} + +message SingleSelectReply { + optional string selectedRowId = 1; +} + +message StarAction { + optional bool starred = 1; +} + message StatusPSA { required uint64 campaignId = 44; optional uint64 campaignExpirationTimestamp = 45; } +message StickerMessage { + optional string url = 1; + optional bytes fileSha256 = 2; + optional bytes fileEncSha256 = 3; + optional bytes mediaKey = 4; + optional string mimetype = 5; + optional uint32 height = 6; + optional uint32 width = 7; + optional string directPath = 8; + optional uint64 fileLength = 9; + optional int64 mediaKeyTimestamp = 10; + optional uint32 firstFrameLength = 11; + optional bytes firstFrameSidecar = 12; + optional bool isAnimated = 13; + optional bytes pngThumbnail = 16; + optional ContextInfo contextInfo = 17; +} + +message StickerSyncRMRMessage { + repeated string filehash = 1; + optional string rmrSource = 2; + optional int64 requestTimestamp = 3; +} + +message SubscriptionAction { + optional bool isDeactivated = 1; + optional bool isAutoRenewing = 2; + optional int64 expirationDate = 3; +} + +message SyncActionData { + optional bytes index = 1; + optional SyncActionValue value = 2; + optional bytes padding = 3; + optional int32 version = 4; +} + +message SyncActionMessage { + optional MessageKey key = 1; + optional int64 timestamp = 2; +} + +message SyncActionMessageRange { + optional int64 lastMessageTimestamp = 1; + optional int64 lastSystemMessageTimestamp = 2; + repeated SyncActionMessage messages = 3; +} + +message SyncActionValue { + optional int64 timestamp = 1; + optional StarAction starAction = 2; + optional ContactAction contactAction = 3; + optional MuteAction muteAction = 4; + optional PinAction pinAction = 5; + optional SecurityNotificationSetting securityNotificationSetting = 6; + optional PushNameSetting pushNameSetting = 7; + optional QuickReplyAction quickReplyAction = 8; + optional RecentStickerWeightsAction recentStickerWeightsAction = 9; + optional RecentStickerMetadata recentStickerMetadata = 10; + optional RecentEmojiWeightsAction recentEmojiWeightsAction = 11; + optional LabelEditAction labelEditAction = 14; + optional LabelAssociationAction labelAssociationAction = 15; + optional LocaleSetting localeSetting = 16; + optional ArchiveChatAction archiveChatAction = 17; + optional DeleteMessageForMeAction deleteMessageForMeAction = 18; + optional KeyExpiration keyExpiration = 19; + optional MarkChatAsReadAction markChatAsReadAction = 20; + optional ClearChatAction clearChatAction = 21; + optional DeleteChatAction deleteChatAction = 22; + optional UnarchiveChatsSetting unarchiveChatsSetting = 23; + optional PrimaryFeature primaryFeature = 24; + optional FavoriteStickerAction favoriteStickerAction = 25; + optional AndroidUnsupportedActions androidUnsupportedActions = 26; + optional AgentAction agentAction = 27; + optional SubscriptionAction subscriptionAction = 28; + optional UserStatusMuteAction userStatusMuteAction = 29; + optional TimeFormatAction timeFormatAction = 30; +} + +message SyncdIndex { + optional bytes blob = 1; +} + +message SyncdMutation { + enum SyncdMutationSyncdOperation { + SET = 0; + REMOVE = 1; + } + optional SyncdMutationSyncdOperation operation = 1; + optional SyncdRecord record = 2; +} + +// Unknown entity +message SyncdMutations { + repeated SyncdMutation mutations = 1; +} + +message SyncdPatch { + optional SyncdVersion version = 1; + repeated SyncdMutation mutations = 2; + optional ExternalBlobReference externalMutations = 3; + optional bytes snapshotMac = 4; + optional bytes patchMac = 5; + optional KeyId keyId = 6; + optional ExitCode exitCode = 7; + optional uint32 deviceIndex = 8; +} + +message SyncdRecord { + optional SyncdIndex index = 1; + optional SyncdValue value = 2; + optional KeyId keyId = 3; +} + +message SyncdSnapshot { + optional SyncdVersion version = 1; + repeated SyncdRecord records = 2; + optional bytes mac = 3; + optional KeyId keyId = 4; +} + +message SyncdValue { + optional bytes blob = 1; +} + +message SyncdVersion { + optional uint64 version = 1; +} + +message TemplateButton { + optional uint32 index = 4; + oneof button { + QuickReplyButton quickReplyButton = 1; + URLButton urlButton = 2; + CallButton callButton = 3; + } +} + +message TemplateButtonReplyMessage { + optional string selectedId = 1; + optional string selectedDisplayText = 2; + optional ContextInfo contextInfo = 3; + optional uint32 selectedIndex = 4; +} + +message TemplateMessage { + optional ContextInfo contextInfo = 3; + optional HydratedFourRowTemplate hydratedTemplate = 4; + oneof format { + FourRowTemplate fourRowTemplate = 1; + HydratedFourRowTemplate hydratedFourRowTemplate = 2; + } +} + +message TimeFormatAction { + optional bool isTwentyFourHourFormatEnabled = 1; +} + +message URLButton { + optional HighlyStructuredMessage displayText = 1; + optional HighlyStructuredMessage url = 2; +} + +message UnarchiveChatsSetting { + optional bool unarchiveChats = 1; +} + +message UserAgent { + enum UserAgentPlatform { + ANDROID = 0; + IOS = 1; + WINDOWS_PHONE = 2; + BLACKBERRY = 3; + BLACKBERRYX = 4; + S40 = 5; + S60 = 6; + PYTHON_CLIENT = 7; + TIZEN = 8; + ENTERPRISE = 9; + SMB_ANDROID = 10; + KAIOS = 11; + SMB_IOS = 12; + WINDOWS = 13; + WEB = 14; + PORTAL = 15; + GREEN_ANDROID = 16; + GREEN_IPHONE = 17; + BLUE_ANDROID = 18; + BLUE_IPHONE = 19; + FBLITE_ANDROID = 20; + MLITE_ANDROID = 21; + IGLITE_ANDROID = 22; + PAGE = 23; + MACOS = 24; + OCULUS_MSG = 25; + OCULUS_CALL = 26; + MILAN = 27; + CAPI = 28; + } + optional UserAgentPlatform platform = 1; + optional AppVersion appVersion = 2; + optional string mcc = 3; + optional string mnc = 4; + optional string osVersion = 5; + optional string manufacturer = 6; + optional string device = 7; + optional string osBuildNumber = 8; + optional string phoneId = 9; + enum UserAgentReleaseChannel { + RELEASE = 0; + BETA = 1; + ALPHA = 2; + DEBUG = 3; + } + optional UserAgentReleaseChannel releaseChannel = 10; + optional string localeLanguageIso6391 = 11; + optional string localeCountryIso31661Alpha2 = 12; + optional string deviceBoard = 13; +} + message UserReceipt { required string userJid = 1; optional int64 receiptTimestamp = 2; @@ -1887,6 +1934,61 @@ message UserReceipt { repeated string deliveredDeviceJid = 6; } +message UserStatusMuteAction { + optional bool muted = 1; +} + +message VerifiedNameCertificate { + optional bytes details = 1; + optional bytes signature = 2; + optional bytes serverSignature = 3; +} + +// Renamed from VerifiedNameCertificate$Details +message VerifiedNameDetails { + optional uint64 serial = 1; + optional string issuer = 2; + optional string verifiedName = 4; + repeated LocalizedName localizedNames = 8; + optional uint64 issueTime = 10; +} + +message VideoMessage { + optional string url = 1; + optional string mimetype = 2; + optional bytes fileSha256 = 3; + optional uint64 fileLength = 4; + optional uint32 seconds = 5; + optional bytes mediaKey = 6; + optional string caption = 7; + optional bool gifPlayback = 8; + optional uint32 height = 9; + optional uint32 width = 10; + optional bytes fileEncSha256 = 11; + repeated InteractiveAnnotation interactiveAnnotations = 12; + optional string directPath = 13; + optional int64 mediaKeyTimestamp = 14; + optional bytes jpegThumbnail = 16; + optional ContextInfo contextInfo = 17; + optional bytes streamingSidecar = 18; + enum VideoMessageAttribution { + NONE = 0; + GIPHY = 1; + TENOR = 2; + } + optional VideoMessageAttribution gifAttribution = 19; + optional bool viewOnce = 20; + optional string thumbnailDirectPath = 21; + optional bytes thumbnailSha256 = 22; + optional bytes thumbnailEncSha256 = 23; + optional string staticUrl = 24; +} + +message WallpaperSettings { + optional string filename = 1; + optional uint32 opacity = 2; +} + message WebFeatures { enum WebFeaturesFlag { NOT_STARTED = 0; @@ -1941,6 +2043,20 @@ message WebFeatures { optional WebFeaturesFlag noDeleteMessageTimeLimit = 49; } +message WebInfo { + optional string refToken = 1; + optional string version = 2; + optional WebdPayload webdPayload = 3; + enum WebInfoWebSubPlatform { + WEB_BROWSER = 0; + APP_STORE = 1; + WIN_STORE = 2; + DARWIN = 3; + WIN32 = 4; + } + optional WebInfoWebSubPlatform webSubPlatform = 4; +} + message WebMessageInfo { required MessageKey key = 1; optional Message message = 2; @@ -2108,6 +2224,7 @@ message WebMessageInfo { GROUP_PARTICIPANT_ACCEPT = 140; GROUP_PARTICIPANT_LINKED_GROUP_JOIN = 141; COMMUNITY_CREATE = 142; + EPHEMERAL_KEEP_IN_CHAT = 143; } optional WebMessageInfoStubType messageStubType = 24; optional bool clearMedia = 25; @@ -2141,6 +2258,7 @@ message WebMessageInfo { optional string agentId = 47; optional bool statusAlreadyViewed = 48; optional bytes messageSecret = 49; + optional KeepInChat keepInChat = 50; } message WebNotificationsInfo { @@ -2149,3 +2267,17 @@ message WebNotificationsInfo { optional uint32 notifyMessageCount = 4; repeated WebMessageInfo notifyMessages = 5; } + +message WebdPayload { + optional bool usesParticipantInKey = 1; + optional bool supportsStarredMessages = 2; + optional bool supportsDocumentMessages = 3; + optional bool supportsUrlMessages = 4; + optional bool supportsMediaRetry = 5; + optional bool supportsE2EImage = 6; + optional bool supportsE2EVideo = 7; + optional bool supportsE2EAudio = 8; + optional bool supportsE2EDocument = 9; + optional string documentTypes = 10; + optional bytes features = 11; +} diff --git a/WAProto/index.d.ts b/WAProto/index.d.ts index 50d7b88..5d7e7d2 100644 --- a/WAProto/index.d.ts +++ b/WAProto/index.d.ts @@ -512,249 +512,6 @@ export namespace proto { public toJSON(): { [k: string]: any }; } - /** Properties of an AppVersion. */ - interface IAppVersion { - - /** AppVersion primary */ - primary?: (number|null); - - /** AppVersion secondary */ - secondary?: (number|null); - - /** AppVersion tertiary */ - tertiary?: (number|null); - - /** AppVersion quaternary */ - quaternary?: (number|null); - - /** AppVersion quinary */ - quinary?: (number|null); - } - - /** Represents an AppVersion. */ - class AppVersion implements IAppVersion { - - /** - * Constructs a new AppVersion. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IAppVersion); - - /** AppVersion primary. */ - public primary: number; - - /** AppVersion secondary. */ - public secondary: number; - - /** AppVersion tertiary. */ - public tertiary: number; - - /** AppVersion quaternary. */ - public quaternary: number; - - /** AppVersion quinary. */ - public quinary: number; - - /** - * Creates a new AppVersion instance using the specified properties. - * @param [properties] Properties to set - * @returns AppVersion instance - */ - public static create(properties?: proto.IAppVersion): proto.AppVersion; - - /** - * Encodes the specified AppVersion message. Does not implicitly {@link proto.AppVersion.verify|verify} messages. - * @param message AppVersion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IAppVersion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AppVersion message, length delimited. Does not implicitly {@link proto.AppVersion.verify|verify} messages. - * @param message AppVersion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IAppVersion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AppVersion message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AppVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.AppVersion; - - /** - * Decodes an AppVersion message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AppVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.AppVersion; - - /** - * Verifies an AppVersion message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AppVersion message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AppVersion - */ - public static fromObject(object: { [k: string]: any }): proto.AppVersion; - - /** - * Creates a plain object from an AppVersion message. Also converts values to other types if specified. - * @param message AppVersion - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.AppVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AppVersion to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a CompanionProps. */ - interface ICompanionProps { - - /** CompanionProps os */ - os?: (string|null); - - /** CompanionProps version */ - version?: (proto.IAppVersion|null); - - /** CompanionProps platformType */ - platformType?: (proto.CompanionProps.CompanionPropsPlatformType|null); - - /** CompanionProps requireFullSync */ - requireFullSync?: (boolean|null); - } - - /** Represents a CompanionProps. */ - class CompanionProps implements ICompanionProps { - - /** - * Constructs a new CompanionProps. - * @param [properties] Properties to set - */ - constructor(properties?: proto.ICompanionProps); - - /** CompanionProps os. */ - public os: string; - - /** CompanionProps version. */ - public version?: (proto.IAppVersion|null); - - /** CompanionProps platformType. */ - public platformType: proto.CompanionProps.CompanionPropsPlatformType; - - /** CompanionProps requireFullSync. */ - public requireFullSync: boolean; - - /** - * Creates a new CompanionProps instance using the specified properties. - * @param [properties] Properties to set - * @returns CompanionProps instance - */ - public static create(properties?: proto.ICompanionProps): proto.CompanionProps; - - /** - * Encodes the specified CompanionProps message. Does not implicitly {@link proto.CompanionProps.verify|verify} messages. - * @param message CompanionProps message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.ICompanionProps, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CompanionProps message, length delimited. Does not implicitly {@link proto.CompanionProps.verify|verify} messages. - * @param message CompanionProps message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.ICompanionProps, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CompanionProps message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CompanionProps - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.CompanionProps; - - /** - * Decodes a CompanionProps message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CompanionProps - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.CompanionProps; - - /** - * Verifies a CompanionProps message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CompanionProps message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CompanionProps - */ - public static fromObject(object: { [k: string]: any }): proto.CompanionProps; - - /** - * Creates a plain object from a CompanionProps message. Also converts values to other types if specified. - * @param message CompanionProps - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.CompanionProps, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CompanionProps to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace CompanionProps { - - /** CompanionPropsPlatformType enum. */ - enum CompanionPropsPlatformType { - UNKNOWN = 0, - CHROME = 1, - FIREFOX = 2, - IE = 3, - OPERA = 4, - SAFARI = 5, - EDGE = 6, - DESKTOP = 7, - IPAD = 8, - ANDROID_TABLET = 9, - OHANA = 10, - ALOHA = 11, - CATALINA = 12, - TCL_TV = 13 - } - } - /** Properties of an ActionLink. */ interface IActionLink { @@ -969,6 +726,198 @@ export namespace proto { } } + /** Properties of an AgentAction. */ + interface IAgentAction { + + /** AgentAction name */ + name?: (string|null); + + /** AgentAction deviceID */ + deviceID?: (number|null); + + /** AgentAction isDeleted */ + isDeleted?: (boolean|null); + } + + /** Represents an AgentAction. */ + class AgentAction implements IAgentAction { + + /** + * Constructs a new AgentAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IAgentAction); + + /** AgentAction name. */ + public name: string; + + /** AgentAction deviceID. */ + public deviceID: number; + + /** AgentAction isDeleted. */ + public isDeleted: boolean; + + /** + * Creates a new AgentAction instance using the specified properties. + * @param [properties] Properties to set + * @returns AgentAction instance + */ + public static create(properties?: proto.IAgentAction): proto.AgentAction; + + /** + * Encodes the specified AgentAction message. Does not implicitly {@link proto.AgentAction.verify|verify} messages. + * @param message AgentAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IAgentAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AgentAction message, length delimited. Does not implicitly {@link proto.AgentAction.verify|verify} messages. + * @param message AgentAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IAgentAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AgentAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AgentAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.AgentAction; + + /** + * Decodes an AgentAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AgentAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.AgentAction; + + /** + * Verifies an AgentAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AgentAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AgentAction + */ + public static fromObject(object: { [k: string]: any }): proto.AgentAction; + + /** + * Creates a plain object from an AgentAction message. Also converts values to other types if specified. + * @param message AgentAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.AgentAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AgentAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AndroidUnsupportedActions. */ + interface IAndroidUnsupportedActions { + + /** AndroidUnsupportedActions allowed */ + allowed?: (boolean|null); + } + + /** Represents an AndroidUnsupportedActions. */ + class AndroidUnsupportedActions implements IAndroidUnsupportedActions { + + /** + * Constructs a new AndroidUnsupportedActions. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IAndroidUnsupportedActions); + + /** AndroidUnsupportedActions allowed. */ + public allowed: boolean; + + /** + * Creates a new AndroidUnsupportedActions instance using the specified properties. + * @param [properties] Properties to set + * @returns AndroidUnsupportedActions instance + */ + public static create(properties?: proto.IAndroidUnsupportedActions): proto.AndroidUnsupportedActions; + + /** + * Encodes the specified AndroidUnsupportedActions message. Does not implicitly {@link proto.AndroidUnsupportedActions.verify|verify} messages. + * @param message AndroidUnsupportedActions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IAndroidUnsupportedActions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AndroidUnsupportedActions message, length delimited. Does not implicitly {@link proto.AndroidUnsupportedActions.verify|verify} messages. + * @param message AndroidUnsupportedActions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IAndroidUnsupportedActions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AndroidUnsupportedActions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AndroidUnsupportedActions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.AndroidUnsupportedActions; + + /** + * Decodes an AndroidUnsupportedActions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AndroidUnsupportedActions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.AndroidUnsupportedActions; + + /** + * Verifies an AndroidUnsupportedActions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AndroidUnsupportedActions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AndroidUnsupportedActions + */ + public static fromObject(object: { [k: string]: any }): proto.AndroidUnsupportedActions; + + /** + * Creates a plain object from an AndroidUnsupportedActions message. Also converts values to other types if specified. + * @param message AndroidUnsupportedActions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.AndroidUnsupportedActions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AndroidUnsupportedActions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of an AppStateFatalExceptionNotification. */ interface IAppStateFatalExceptionNotification { @@ -1635,6 +1584,216 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of an AppVersion. */ + interface IAppVersion { + + /** AppVersion primary */ + primary?: (number|null); + + /** AppVersion secondary */ + secondary?: (number|null); + + /** AppVersion tertiary */ + tertiary?: (number|null); + + /** AppVersion quaternary */ + quaternary?: (number|null); + + /** AppVersion quinary */ + quinary?: (number|null); + } + + /** Represents an AppVersion. */ + class AppVersion implements IAppVersion { + + /** + * Constructs a new AppVersion. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IAppVersion); + + /** AppVersion primary. */ + public primary: number; + + /** AppVersion secondary. */ + public secondary: number; + + /** AppVersion tertiary. */ + public tertiary: number; + + /** AppVersion quaternary. */ + public quaternary: number; + + /** AppVersion quinary. */ + public quinary: number; + + /** + * Creates a new AppVersion instance using the specified properties. + * @param [properties] Properties to set + * @returns AppVersion instance + */ + public static create(properties?: proto.IAppVersion): proto.AppVersion; + + /** + * Encodes the specified AppVersion message. Does not implicitly {@link proto.AppVersion.verify|verify} messages. + * @param message AppVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IAppVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AppVersion message, length delimited. Does not implicitly {@link proto.AppVersion.verify|verify} messages. + * @param message AppVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IAppVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AppVersion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AppVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.AppVersion; + + /** + * Decodes an AppVersion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AppVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.AppVersion; + + /** + * Verifies an AppVersion message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AppVersion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AppVersion + */ + public static fromObject(object: { [k: string]: any }): proto.AppVersion; + + /** + * Creates a plain object from an AppVersion message. Also converts values to other types if specified. + * @param message AppVersion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.AppVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AppVersion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an ArchiveChatAction. */ + interface IArchiveChatAction { + + /** ArchiveChatAction archived */ + archived?: (boolean|null); + + /** ArchiveChatAction messageRange */ + messageRange?: (proto.ISyncActionMessageRange|null); + } + + /** Represents an ArchiveChatAction. */ + class ArchiveChatAction implements IArchiveChatAction { + + /** + * Constructs a new ArchiveChatAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IArchiveChatAction); + + /** ArchiveChatAction archived. */ + public archived: boolean; + + /** ArchiveChatAction messageRange. */ + public messageRange?: (proto.ISyncActionMessageRange|null); + + /** + * Creates a new ArchiveChatAction instance using the specified properties. + * @param [properties] Properties to set + * @returns ArchiveChatAction instance + */ + public static create(properties?: proto.IArchiveChatAction): proto.ArchiveChatAction; + + /** + * Encodes the specified ArchiveChatAction message. Does not implicitly {@link proto.ArchiveChatAction.verify|verify} messages. + * @param message ArchiveChatAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IArchiveChatAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ArchiveChatAction message, length delimited. Does not implicitly {@link proto.ArchiveChatAction.verify|verify} messages. + * @param message ArchiveChatAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IArchiveChatAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ArchiveChatAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ArchiveChatAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.ArchiveChatAction; + + /** + * Decodes an ArchiveChatAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ArchiveChatAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.ArchiveChatAction; + + /** + * Verifies an ArchiveChatAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ArchiveChatAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ArchiveChatAction + */ + public static fromObject(object: { [k: string]: any }): proto.ArchiveChatAction; + + /** + * Creates a plain object from an ArchiveChatAction message. Also converts values to other types if specified. + * @param message ArchiveChatAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ArchiveChatAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ArchiveChatAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of an AudioMessage. */ interface IAudioMessage { @@ -1797,6 +1956,492 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of an AutoDownloadSettings. */ + interface IAutoDownloadSettings { + + /** AutoDownloadSettings downloadImages */ + downloadImages?: (boolean|null); + + /** AutoDownloadSettings downloadAudio */ + downloadAudio?: (boolean|null); + + /** AutoDownloadSettings downloadVideo */ + downloadVideo?: (boolean|null); + + /** AutoDownloadSettings downloadDocuments */ + downloadDocuments?: (boolean|null); + } + + /** Represents an AutoDownloadSettings. */ + class AutoDownloadSettings implements IAutoDownloadSettings { + + /** + * Constructs a new AutoDownloadSettings. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IAutoDownloadSettings); + + /** AutoDownloadSettings downloadImages. */ + public downloadImages: boolean; + + /** AutoDownloadSettings downloadAudio. */ + public downloadAudio: boolean; + + /** AutoDownloadSettings downloadVideo. */ + public downloadVideo: boolean; + + /** AutoDownloadSettings downloadDocuments. */ + public downloadDocuments: boolean; + + /** + * Creates a new AutoDownloadSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns AutoDownloadSettings instance + */ + public static create(properties?: proto.IAutoDownloadSettings): proto.AutoDownloadSettings; + + /** + * Encodes the specified AutoDownloadSettings message. Does not implicitly {@link proto.AutoDownloadSettings.verify|verify} messages. + * @param message AutoDownloadSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IAutoDownloadSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AutoDownloadSettings message, length delimited. Does not implicitly {@link proto.AutoDownloadSettings.verify|verify} messages. + * @param message AutoDownloadSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IAutoDownloadSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AutoDownloadSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AutoDownloadSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.AutoDownloadSettings; + + /** + * Decodes an AutoDownloadSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AutoDownloadSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.AutoDownloadSettings; + + /** + * Verifies an AutoDownloadSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AutoDownloadSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AutoDownloadSettings + */ + public static fromObject(object: { [k: string]: any }): proto.AutoDownloadSettings; + + /** + * Creates a plain object from an AutoDownloadSettings message. Also converts values to other types if specified. + * @param message AutoDownloadSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.AutoDownloadSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AutoDownloadSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a BizAccountLinkInfo. */ + interface IBizAccountLinkInfo { + + /** BizAccountLinkInfo whatsappBizAcctFbid */ + whatsappBizAcctFbid?: (number|Long|null); + + /** BizAccountLinkInfo whatsappAcctNumber */ + whatsappAcctNumber?: (string|null); + + /** BizAccountLinkInfo issueTime */ + issueTime?: (number|Long|null); + + /** BizAccountLinkInfo hostStorage */ + hostStorage?: (proto.BizAccountLinkInfo.BizAccountLinkInfoHostStorageType|null); + + /** BizAccountLinkInfo accountType */ + accountType?: (proto.BizAccountLinkInfo.BizAccountLinkInfoAccountType|null); + } + + /** Represents a BizAccountLinkInfo. */ + class BizAccountLinkInfo implements IBizAccountLinkInfo { + + /** + * Constructs a new BizAccountLinkInfo. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IBizAccountLinkInfo); + + /** BizAccountLinkInfo whatsappBizAcctFbid. */ + public whatsappBizAcctFbid: (number|Long); + + /** BizAccountLinkInfo whatsappAcctNumber. */ + public whatsappAcctNumber: string; + + /** BizAccountLinkInfo issueTime. */ + public issueTime: (number|Long); + + /** BizAccountLinkInfo hostStorage. */ + public hostStorage: proto.BizAccountLinkInfo.BizAccountLinkInfoHostStorageType; + + /** BizAccountLinkInfo accountType. */ + public accountType: proto.BizAccountLinkInfo.BizAccountLinkInfoAccountType; + + /** + * Creates a new BizAccountLinkInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns BizAccountLinkInfo instance + */ + public static create(properties?: proto.IBizAccountLinkInfo): proto.BizAccountLinkInfo; + + /** + * Encodes the specified BizAccountLinkInfo message. Does not implicitly {@link proto.BizAccountLinkInfo.verify|verify} messages. + * @param message BizAccountLinkInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IBizAccountLinkInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BizAccountLinkInfo message, length delimited. Does not implicitly {@link proto.BizAccountLinkInfo.verify|verify} messages. + * @param message BizAccountLinkInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IBizAccountLinkInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BizAccountLinkInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BizAccountLinkInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.BizAccountLinkInfo; + + /** + * Decodes a BizAccountLinkInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BizAccountLinkInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.BizAccountLinkInfo; + + /** + * Verifies a BizAccountLinkInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BizAccountLinkInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BizAccountLinkInfo + */ + public static fromObject(object: { [k: string]: any }): proto.BizAccountLinkInfo; + + /** + * Creates a plain object from a BizAccountLinkInfo message. Also converts values to other types if specified. + * @param message BizAccountLinkInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.BizAccountLinkInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BizAccountLinkInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace BizAccountLinkInfo { + + /** BizAccountLinkInfoHostStorageType enum. */ + enum BizAccountLinkInfoHostStorageType { + ON_PREMISE = 0, + FACEBOOK = 1 + } + + /** BizAccountLinkInfoAccountType enum. */ + enum BizAccountLinkInfoAccountType { + ENTERPRISE = 0 + } + } + + /** Properties of a BizAccountPayload. */ + interface IBizAccountPayload { + + /** BizAccountPayload vnameCert */ + vnameCert?: (proto.IVerifiedNameCertificate|null); + + /** BizAccountPayload bizAcctLinkInfo */ + bizAcctLinkInfo?: (Uint8Array|null); + } + + /** Represents a BizAccountPayload. */ + class BizAccountPayload implements IBizAccountPayload { + + /** + * Constructs a new BizAccountPayload. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IBizAccountPayload); + + /** BizAccountPayload vnameCert. */ + public vnameCert?: (proto.IVerifiedNameCertificate|null); + + /** BizAccountPayload bizAcctLinkInfo. */ + public bizAcctLinkInfo: Uint8Array; + + /** + * Creates a new BizAccountPayload instance using the specified properties. + * @param [properties] Properties to set + * @returns BizAccountPayload instance + */ + public static create(properties?: proto.IBizAccountPayload): proto.BizAccountPayload; + + /** + * Encodes the specified BizAccountPayload message. Does not implicitly {@link proto.BizAccountPayload.verify|verify} messages. + * @param message BizAccountPayload message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IBizAccountPayload, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BizAccountPayload message, length delimited. Does not implicitly {@link proto.BizAccountPayload.verify|verify} messages. + * @param message BizAccountPayload message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IBizAccountPayload, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BizAccountPayload message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BizAccountPayload + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.BizAccountPayload; + + /** + * Decodes a BizAccountPayload message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BizAccountPayload + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.BizAccountPayload; + + /** + * Verifies a BizAccountPayload message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BizAccountPayload message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BizAccountPayload + */ + public static fromObject(object: { [k: string]: any }): proto.BizAccountPayload; + + /** + * Creates a plain object from a BizAccountPayload message. Also converts values to other types if specified. + * @param message BizAccountPayload + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.BizAccountPayload, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BizAccountPayload to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a BizIdentityInfo. */ + interface IBizIdentityInfo { + + /** BizIdentityInfo vlevel */ + vlevel?: (proto.BizIdentityInfo.BizIdentityInfoVerifiedLevelValue|null); + + /** BizIdentityInfo vnameCert */ + vnameCert?: (proto.IVerifiedNameCertificate|null); + + /** BizIdentityInfo signed */ + signed?: (boolean|null); + + /** BizIdentityInfo revoked */ + revoked?: (boolean|null); + + /** BizIdentityInfo hostStorage */ + hostStorage?: (proto.BizIdentityInfo.BizIdentityInfoHostStorageType|null); + + /** BizIdentityInfo actualActors */ + actualActors?: (proto.BizIdentityInfo.BizIdentityInfoActualActorsType|null); + + /** BizIdentityInfo privacyModeTs */ + privacyModeTs?: (number|Long|null); + + /** BizIdentityInfo featureControls */ + featureControls?: (number|Long|null); + } + + /** Represents a BizIdentityInfo. */ + class BizIdentityInfo implements IBizIdentityInfo { + + /** + * Constructs a new BizIdentityInfo. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IBizIdentityInfo); + + /** BizIdentityInfo vlevel. */ + public vlevel: proto.BizIdentityInfo.BizIdentityInfoVerifiedLevelValue; + + /** BizIdentityInfo vnameCert. */ + public vnameCert?: (proto.IVerifiedNameCertificate|null); + + /** BizIdentityInfo signed. */ + public signed: boolean; + + /** BizIdentityInfo revoked. */ + public revoked: boolean; + + /** BizIdentityInfo hostStorage. */ + public hostStorage: proto.BizIdentityInfo.BizIdentityInfoHostStorageType; + + /** BizIdentityInfo actualActors. */ + public actualActors: proto.BizIdentityInfo.BizIdentityInfoActualActorsType; + + /** BizIdentityInfo privacyModeTs. */ + public privacyModeTs: (number|Long); + + /** BizIdentityInfo featureControls. */ + public featureControls: (number|Long); + + /** + * Creates a new BizIdentityInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns BizIdentityInfo instance + */ + public static create(properties?: proto.IBizIdentityInfo): proto.BizIdentityInfo; + + /** + * Encodes the specified BizIdentityInfo message. Does not implicitly {@link proto.BizIdentityInfo.verify|verify} messages. + * @param message BizIdentityInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IBizIdentityInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BizIdentityInfo message, length delimited. Does not implicitly {@link proto.BizIdentityInfo.verify|verify} messages. + * @param message BizIdentityInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IBizIdentityInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BizIdentityInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BizIdentityInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.BizIdentityInfo; + + /** + * Decodes a BizIdentityInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BizIdentityInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.BizIdentityInfo; + + /** + * Verifies a BizIdentityInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BizIdentityInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BizIdentityInfo + */ + public static fromObject(object: { [k: string]: any }): proto.BizIdentityInfo; + + /** + * Creates a plain object from a BizIdentityInfo message. Also converts values to other types if specified. + * @param message BizIdentityInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.BizIdentityInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BizIdentityInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace BizIdentityInfo { + + /** BizIdentityInfoVerifiedLevelValue enum. */ + enum BizIdentityInfoVerifiedLevelValue { + UNKNOWN = 0, + LOW = 1, + HIGH = 2 + } + + /** BizIdentityInfoHostStorageType enum. */ + enum BizIdentityInfoHostStorageType { + ON_PREMISE = 0, + FACEBOOK = 1 + } + + /** BizIdentityInfoActualActorsType enum. */ + enum BizIdentityInfoActualActorsType { + SELF = 0, + BSP = 1 + } + } + /** Properties of a Button. */ interface IButton { @@ -1915,6 +2560,96 @@ export namespace proto { } } + /** Properties of a ButtonText. */ + interface IButtonText { + + /** ButtonText displayText */ + displayText?: (string|null); + } + + /** Represents a ButtonText. */ + class ButtonText implements IButtonText { + + /** + * Constructs a new ButtonText. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IButtonText); + + /** ButtonText displayText. */ + public displayText: string; + + /** + * Creates a new ButtonText instance using the specified properties. + * @param [properties] Properties to set + * @returns ButtonText instance + */ + public static create(properties?: proto.IButtonText): proto.ButtonText; + + /** + * Encodes the specified ButtonText message. Does not implicitly {@link proto.ButtonText.verify|verify} messages. + * @param message ButtonText message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IButtonText, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ButtonText message, length delimited. Does not implicitly {@link proto.ButtonText.verify|verify} messages. + * @param message ButtonText message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IButtonText, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ButtonText message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ButtonText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.ButtonText; + + /** + * Decodes a ButtonText message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ButtonText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.ButtonText; + + /** + * Verifies a ButtonText message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ButtonText message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ButtonText + */ + public static fromObject(object: { [k: string]: any }): proto.ButtonText; + + /** + * Creates a plain object from a ButtonText message. Also converts values to other types if specified. + * @param message ButtonText + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ButtonText, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ButtonText to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a ButtonsMessage. */ interface IButtonsMessage { @@ -2196,96 +2931,6 @@ export namespace proto { } } - /** Properties of a ButtonText. */ - interface IButtonText { - - /** ButtonText displayText */ - displayText?: (string|null); - } - - /** Represents a ButtonText. */ - class ButtonText implements IButtonText { - - /** - * Constructs a new ButtonText. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IButtonText); - - /** ButtonText displayText. */ - public displayText: string; - - /** - * Creates a new ButtonText instance using the specified properties. - * @param [properties] Properties to set - * @returns ButtonText instance - */ - public static create(properties?: proto.IButtonText): proto.ButtonText; - - /** - * Encodes the specified ButtonText message. Does not implicitly {@link proto.ButtonText.verify|verify} messages. - * @param message ButtonText message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IButtonText, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ButtonText message, length delimited. Does not implicitly {@link proto.ButtonText.verify|verify} messages. - * @param message ButtonText message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IButtonText, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ButtonText message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ButtonText - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.ButtonText; - - /** - * Decodes a ButtonText message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ButtonText - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.ButtonText; - - /** - * Verifies a ButtonText message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ButtonText message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ButtonText - */ - public static fromObject(object: { [k: string]: any }): proto.ButtonText; - - /** - * Creates a plain object from a ButtonText message. Also converts values to other types if specified. - * @param message ButtonText - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.ButtonText, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ButtonText to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - /** Properties of a Call. */ interface ICall { @@ -2682,6 +3327,516 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a CertChain. */ + interface ICertChain { + + /** CertChain leaf */ + leaf?: (proto.ICertChainNoiseCertificate|null); + + /** CertChain intermediate */ + intermediate?: (proto.ICertChainNoiseCertificate|null); + } + + /** Represents a CertChain. */ + class CertChain implements ICertChain { + + /** + * Constructs a new CertChain. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ICertChain); + + /** CertChain leaf. */ + public leaf?: (proto.ICertChainNoiseCertificate|null); + + /** CertChain intermediate. */ + public intermediate?: (proto.ICertChainNoiseCertificate|null); + + /** + * Creates a new CertChain instance using the specified properties. + * @param [properties] Properties to set + * @returns CertChain instance + */ + public static create(properties?: proto.ICertChain): proto.CertChain; + + /** + * Encodes the specified CertChain message. Does not implicitly {@link proto.CertChain.verify|verify} messages. + * @param message CertChain message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ICertChain, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CertChain message, length delimited. Does not implicitly {@link proto.CertChain.verify|verify} messages. + * @param message CertChain message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ICertChain, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CertChain message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CertChain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.CertChain; + + /** + * Decodes a CertChain message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CertChain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.CertChain; + + /** + * Verifies a CertChain message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CertChain message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CertChain + */ + public static fromObject(object: { [k: string]: any }): proto.CertChain; + + /** + * Creates a plain object from a CertChain message. Also converts values to other types if specified. + * @param message CertChain + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.CertChain, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CertChain to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CertChainNoiseCertificate. */ + interface ICertChainNoiseCertificate { + + /** CertChainNoiseCertificate details */ + details?: (Uint8Array|null); + + /** CertChainNoiseCertificate signature */ + signature?: (Uint8Array|null); + } + + /** Represents a CertChainNoiseCertificate. */ + class CertChainNoiseCertificate implements ICertChainNoiseCertificate { + + /** + * Constructs a new CertChainNoiseCertificate. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ICertChainNoiseCertificate); + + /** CertChainNoiseCertificate details. */ + public details: Uint8Array; + + /** CertChainNoiseCertificate signature. */ + public signature: Uint8Array; + + /** + * Creates a new CertChainNoiseCertificate instance using the specified properties. + * @param [properties] Properties to set + * @returns CertChainNoiseCertificate instance + */ + public static create(properties?: proto.ICertChainNoiseCertificate): proto.CertChainNoiseCertificate; + + /** + * Encodes the specified CertChainNoiseCertificate message. Does not implicitly {@link proto.CertChainNoiseCertificate.verify|verify} messages. + * @param message CertChainNoiseCertificate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ICertChainNoiseCertificate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CertChainNoiseCertificate message, length delimited. Does not implicitly {@link proto.CertChainNoiseCertificate.verify|verify} messages. + * @param message CertChainNoiseCertificate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ICertChainNoiseCertificate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CertChainNoiseCertificate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CertChainNoiseCertificate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.CertChainNoiseCertificate; + + /** + * Decodes a CertChainNoiseCertificate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CertChainNoiseCertificate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.CertChainNoiseCertificate; + + /** + * Verifies a CertChainNoiseCertificate message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CertChainNoiseCertificate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CertChainNoiseCertificate + */ + public static fromObject(object: { [k: string]: any }): proto.CertChainNoiseCertificate; + + /** + * Creates a plain object from a CertChainNoiseCertificate message. Also converts values to other types if specified. + * @param message CertChainNoiseCertificate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.CertChainNoiseCertificate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CertChainNoiseCertificate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CertChainNoiseCertificateDetails. */ + interface ICertChainNoiseCertificateDetails { + + /** CertChainNoiseCertificateDetails serial */ + serial?: (number|null); + + /** CertChainNoiseCertificateDetails issuerSerial */ + issuerSerial?: (number|null); + + /** CertChainNoiseCertificateDetails key */ + key?: (Uint8Array|null); + + /** CertChainNoiseCertificateDetails notBefore */ + notBefore?: (number|Long|null); + + /** CertChainNoiseCertificateDetails notAfter */ + notAfter?: (number|Long|null); + } + + /** Represents a CertChainNoiseCertificateDetails. */ + class CertChainNoiseCertificateDetails implements ICertChainNoiseCertificateDetails { + + /** + * Constructs a new CertChainNoiseCertificateDetails. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ICertChainNoiseCertificateDetails); + + /** CertChainNoiseCertificateDetails serial. */ + public serial: number; + + /** CertChainNoiseCertificateDetails issuerSerial. */ + public issuerSerial: number; + + /** CertChainNoiseCertificateDetails key. */ + public key: Uint8Array; + + /** CertChainNoiseCertificateDetails notBefore. */ + public notBefore: (number|Long); + + /** CertChainNoiseCertificateDetails notAfter. */ + public notAfter: (number|Long); + + /** + * Creates a new CertChainNoiseCertificateDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns CertChainNoiseCertificateDetails instance + */ + public static create(properties?: proto.ICertChainNoiseCertificateDetails): proto.CertChainNoiseCertificateDetails; + + /** + * Encodes the specified CertChainNoiseCertificateDetails message. Does not implicitly {@link proto.CertChainNoiseCertificateDetails.verify|verify} messages. + * @param message CertChainNoiseCertificateDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ICertChainNoiseCertificateDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CertChainNoiseCertificateDetails message, length delimited. Does not implicitly {@link proto.CertChainNoiseCertificateDetails.verify|verify} messages. + * @param message CertChainNoiseCertificateDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ICertChainNoiseCertificateDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CertChainNoiseCertificateDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CertChainNoiseCertificateDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.CertChainNoiseCertificateDetails; + + /** + * Decodes a CertChainNoiseCertificateDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CertChainNoiseCertificateDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.CertChainNoiseCertificateDetails; + + /** + * Verifies a CertChainNoiseCertificateDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CertChainNoiseCertificateDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CertChainNoiseCertificateDetails + */ + public static fromObject(object: { [k: string]: any }): proto.CertChainNoiseCertificateDetails; + + /** + * Creates a plain object from a CertChainNoiseCertificateDetails message. Also converts values to other types if specified. + * @param message CertChainNoiseCertificateDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.CertChainNoiseCertificateDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CertChainNoiseCertificateDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Chain. */ + interface IChain { + + /** Chain senderRatchetKey */ + senderRatchetKey?: (Uint8Array|null); + + /** Chain senderRatchetKeyPrivate */ + senderRatchetKeyPrivate?: (Uint8Array|null); + + /** Chain chainKey */ + chainKey?: (proto.IChainKey|null); + + /** Chain messageKeys */ + messageKeys?: (proto.IMessageKey[]|null); + } + + /** Represents a Chain. */ + class Chain implements IChain { + + /** + * Constructs a new Chain. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IChain); + + /** Chain senderRatchetKey. */ + public senderRatchetKey: Uint8Array; + + /** Chain senderRatchetKeyPrivate. */ + public senderRatchetKeyPrivate: Uint8Array; + + /** Chain chainKey. */ + public chainKey?: (proto.IChainKey|null); + + /** Chain messageKeys. */ + public messageKeys: proto.IMessageKey[]; + + /** + * Creates a new Chain instance using the specified properties. + * @param [properties] Properties to set + * @returns Chain instance + */ + public static create(properties?: proto.IChain): proto.Chain; + + /** + * Encodes the specified Chain message. Does not implicitly {@link proto.Chain.verify|verify} messages. + * @param message Chain message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IChain, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Chain message, length delimited. Does not implicitly {@link proto.Chain.verify|verify} messages. + * @param message Chain message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IChain, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Chain message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Chain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.Chain; + + /** + * Decodes a Chain message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Chain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.Chain; + + /** + * Verifies a Chain message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Chain message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Chain + */ + public static fromObject(object: { [k: string]: any }): proto.Chain; + + /** + * Creates a plain object from a Chain message. Also converts values to other types if specified. + * @param message Chain + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Chain, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Chain to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ChainKey. */ + interface IChainKey { + + /** ChainKey index */ + index?: (number|null); + + /** ChainKey key */ + key?: (Uint8Array|null); + } + + /** Represents a ChainKey. */ + class ChainKey implements IChainKey { + + /** + * Constructs a new ChainKey. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IChainKey); + + /** ChainKey index. */ + public index: number; + + /** ChainKey key. */ + public key: Uint8Array; + + /** + * Creates a new ChainKey instance using the specified properties. + * @param [properties] Properties to set + * @returns ChainKey instance + */ + public static create(properties?: proto.IChainKey): proto.ChainKey; + + /** + * Encodes the specified ChainKey message. Does not implicitly {@link proto.ChainKey.verify|verify} messages. + * @param message ChainKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IChainKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChainKey message, length delimited. Does not implicitly {@link proto.ChainKey.verify|verify} messages. + * @param message ChainKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IChainKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChainKey message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChainKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.ChainKey; + + /** + * Decodes a ChainKey message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChainKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.ChainKey; + + /** + * Verifies a ChainKey message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChainKey message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChainKey + */ + public static fromObject(object: { [k: string]: any }): proto.ChainKey; + + /** + * Creates a plain object from a ChainKey message. Also converts values to other types if specified. + * @param message ChainKey + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ChainKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChainKey to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a Chat. */ interface IChat { @@ -2778,6 +3933,561 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a ClearChatAction. */ + interface IClearChatAction { + + /** ClearChatAction messageRange */ + messageRange?: (proto.ISyncActionMessageRange|null); + } + + /** Represents a ClearChatAction. */ + class ClearChatAction implements IClearChatAction { + + /** + * Constructs a new ClearChatAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IClearChatAction); + + /** ClearChatAction messageRange. */ + public messageRange?: (proto.ISyncActionMessageRange|null); + + /** + * Creates a new ClearChatAction instance using the specified properties. + * @param [properties] Properties to set + * @returns ClearChatAction instance + */ + public static create(properties?: proto.IClearChatAction): proto.ClearChatAction; + + /** + * Encodes the specified ClearChatAction message. Does not implicitly {@link proto.ClearChatAction.verify|verify} messages. + * @param message ClearChatAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IClearChatAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClearChatAction message, length delimited. Does not implicitly {@link proto.ClearChatAction.verify|verify} messages. + * @param message ClearChatAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IClearChatAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClearChatAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClearChatAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.ClearChatAction; + + /** + * Decodes a ClearChatAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClearChatAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.ClearChatAction; + + /** + * Verifies a ClearChatAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClearChatAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClearChatAction + */ + public static fromObject(object: { [k: string]: any }): proto.ClearChatAction; + + /** + * Creates a plain object from a ClearChatAction message. Also converts values to other types if specified. + * @param message ClearChatAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ClearChatAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClearChatAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ClientFinish. */ + interface IClientFinish { + + /** ClientFinish static */ + "static"?: (Uint8Array|null); + + /** ClientFinish payload */ + payload?: (Uint8Array|null); + } + + /** Represents a ClientFinish. */ + class ClientFinish implements IClientFinish { + + /** + * Constructs a new ClientFinish. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IClientFinish); + + /** ClientFinish static. */ + public static: Uint8Array; + + /** ClientFinish payload. */ + public payload: Uint8Array; + + /** + * Creates a new ClientFinish instance using the specified properties. + * @param [properties] Properties to set + * @returns ClientFinish instance + */ + public static create(properties?: proto.IClientFinish): proto.ClientFinish; + + /** + * Encodes the specified ClientFinish message. Does not implicitly {@link proto.ClientFinish.verify|verify} messages. + * @param message ClientFinish message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IClientFinish, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClientFinish message, length delimited. Does not implicitly {@link proto.ClientFinish.verify|verify} messages. + * @param message ClientFinish message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IClientFinish, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClientFinish message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClientFinish + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.ClientFinish; + + /** + * Decodes a ClientFinish message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClientFinish + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.ClientFinish; + + /** + * Verifies a ClientFinish message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClientFinish message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClientFinish + */ + public static fromObject(object: { [k: string]: any }): proto.ClientFinish; + + /** + * Creates a plain object from a ClientFinish message. Also converts values to other types if specified. + * @param message ClientFinish + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ClientFinish, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClientFinish to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ClientHello. */ + interface IClientHello { + + /** ClientHello ephemeral */ + ephemeral?: (Uint8Array|null); + + /** ClientHello static */ + "static"?: (Uint8Array|null); + + /** ClientHello payload */ + payload?: (Uint8Array|null); + } + + /** Represents a ClientHello. */ + class ClientHello implements IClientHello { + + /** + * Constructs a new ClientHello. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IClientHello); + + /** ClientHello ephemeral. */ + public ephemeral: Uint8Array; + + /** ClientHello static. */ + public static: Uint8Array; + + /** ClientHello payload. */ + public payload: Uint8Array; + + /** + * Creates a new ClientHello instance using the specified properties. + * @param [properties] Properties to set + * @returns ClientHello instance + */ + public static create(properties?: proto.IClientHello): proto.ClientHello; + + /** + * Encodes the specified ClientHello message. Does not implicitly {@link proto.ClientHello.verify|verify} messages. + * @param message ClientHello message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IClientHello, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClientHello message, length delimited. Does not implicitly {@link proto.ClientHello.verify|verify} messages. + * @param message ClientHello message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IClientHello, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClientHello message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClientHello + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.ClientHello; + + /** + * Decodes a ClientHello message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClientHello + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.ClientHello; + + /** + * Verifies a ClientHello message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClientHello message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClientHello + */ + public static fromObject(object: { [k: string]: any }): proto.ClientHello; + + /** + * Creates a plain object from a ClientHello message. Also converts values to other types if specified. + * @param message ClientHello + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ClientHello, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClientHello to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ClientPayload. */ + interface IClientPayload { + + /** ClientPayload username */ + username?: (number|Long|null); + + /** ClientPayload passive */ + passive?: (boolean|null); + + /** ClientPayload userAgent */ + userAgent?: (proto.IUserAgent|null); + + /** ClientPayload webInfo */ + webInfo?: (proto.IWebInfo|null); + + /** ClientPayload pushName */ + pushName?: (string|null); + + /** ClientPayload sessionId */ + sessionId?: (number|null); + + /** ClientPayload shortConnect */ + shortConnect?: (boolean|null); + + /** ClientPayload connectType */ + connectType?: (proto.ClientPayload.ClientPayloadConnectType|null); + + /** ClientPayload connectReason */ + connectReason?: (proto.ClientPayload.ClientPayloadConnectReason|null); + + /** ClientPayload shards */ + shards?: (number[]|null); + + /** ClientPayload dnsSource */ + dnsSource?: (proto.IDNSSource|null); + + /** ClientPayload connectAttemptCount */ + connectAttemptCount?: (number|null); + + /** ClientPayload device */ + device?: (number|null); + + /** ClientPayload devicePairingData */ + devicePairingData?: (proto.IDevicePairingRegistrationData|null); + + /** ClientPayload product */ + product?: (proto.ClientPayload.ClientPayloadProduct|null); + + /** ClientPayload fbCat */ + fbCat?: (Uint8Array|null); + + /** ClientPayload fbUserAgent */ + fbUserAgent?: (Uint8Array|null); + + /** ClientPayload oc */ + oc?: (boolean|null); + + /** ClientPayload lc */ + lc?: (number|null); + + /** ClientPayload iosAppExtension */ + iosAppExtension?: (proto.ClientPayload.ClientPayloadIOSAppExtension|null); + + /** ClientPayload fbAppId */ + fbAppId?: (number|Long|null); + + /** ClientPayload fbDeviceId */ + fbDeviceId?: (Uint8Array|null); + + /** ClientPayload pull */ + pull?: (boolean|null); + } + + /** Represents a ClientPayload. */ + class ClientPayload implements IClientPayload { + + /** + * Constructs a new ClientPayload. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IClientPayload); + + /** ClientPayload username. */ + public username: (number|Long); + + /** ClientPayload passive. */ + public passive: boolean; + + /** ClientPayload userAgent. */ + public userAgent?: (proto.IUserAgent|null); + + /** ClientPayload webInfo. */ + public webInfo?: (proto.IWebInfo|null); + + /** ClientPayload pushName. */ + public pushName: string; + + /** ClientPayload sessionId. */ + public sessionId: number; + + /** ClientPayload shortConnect. */ + public shortConnect: boolean; + + /** ClientPayload connectType. */ + public connectType: proto.ClientPayload.ClientPayloadConnectType; + + /** ClientPayload connectReason. */ + public connectReason: proto.ClientPayload.ClientPayloadConnectReason; + + /** ClientPayload shards. */ + public shards: number[]; + + /** ClientPayload dnsSource. */ + public dnsSource?: (proto.IDNSSource|null); + + /** ClientPayload connectAttemptCount. */ + public connectAttemptCount: number; + + /** ClientPayload device. */ + public device: number; + + /** ClientPayload devicePairingData. */ + public devicePairingData?: (proto.IDevicePairingRegistrationData|null); + + /** ClientPayload product. */ + public product: proto.ClientPayload.ClientPayloadProduct; + + /** ClientPayload fbCat. */ + public fbCat: Uint8Array; + + /** ClientPayload fbUserAgent. */ + public fbUserAgent: Uint8Array; + + /** ClientPayload oc. */ + public oc: boolean; + + /** ClientPayload lc. */ + public lc: number; + + /** ClientPayload iosAppExtension. */ + public iosAppExtension: proto.ClientPayload.ClientPayloadIOSAppExtension; + + /** ClientPayload fbAppId. */ + public fbAppId: (number|Long); + + /** ClientPayload fbDeviceId. */ + public fbDeviceId: Uint8Array; + + /** ClientPayload pull. */ + public pull: boolean; + + /** + * Creates a new ClientPayload instance using the specified properties. + * @param [properties] Properties to set + * @returns ClientPayload instance + */ + public static create(properties?: proto.IClientPayload): proto.ClientPayload; + + /** + * Encodes the specified ClientPayload message. Does not implicitly {@link proto.ClientPayload.verify|verify} messages. + * @param message ClientPayload message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IClientPayload, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClientPayload message, length delimited. Does not implicitly {@link proto.ClientPayload.verify|verify} messages. + * @param message ClientPayload message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IClientPayload, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClientPayload message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClientPayload + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.ClientPayload; + + /** + * Decodes a ClientPayload message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClientPayload + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.ClientPayload; + + /** + * Verifies a ClientPayload message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClientPayload message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClientPayload + */ + public static fromObject(object: { [k: string]: any }): proto.ClientPayload; + + /** + * Creates a plain object from a ClientPayload message. Also converts values to other types if specified. + * @param message ClientPayload + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ClientPayload, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClientPayload to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ClientPayload { + + /** ClientPayloadConnectType enum. */ + enum ClientPayloadConnectType { + CELLULAR_UNKNOWN = 0, + WIFI_UNKNOWN = 1, + CELLULAR_EDGE = 100, + CELLULAR_IDEN = 101, + CELLULAR_UMTS = 102, + CELLULAR_EVDO = 103, + CELLULAR_GPRS = 104, + CELLULAR_HSDPA = 105, + CELLULAR_HSUPA = 106, + CELLULAR_HSPA = 107, + CELLULAR_CDMA = 108, + CELLULAR_1XRTT = 109, + CELLULAR_EHRPD = 110, + CELLULAR_LTE = 111, + CELLULAR_HSPAP = 112 + } + + /** ClientPayloadConnectReason enum. */ + enum ClientPayloadConnectReason { + PUSH = 0, + USER_ACTIVATED = 1, + SCHEDULED = 2, + ERROR_RECONNECT = 3, + NETWORK_SWITCH = 4, + PING_RECONNECT = 5 + } + + /** ClientPayloadProduct enum. */ + enum ClientPayloadProduct { + WHATSAPP = 0, + MESSENGER = 1 + } + + /** ClientPayloadIOSAppExtension enum. */ + enum ClientPayloadIOSAppExtension { + SHARE_EXTENSION = 0, + SERVICE_EXTENSION = 1, + INTENTS_EXTENSION = 2 + } + } + /** Properties of a CollectionMessage. */ interface ICollectionMessage { @@ -2880,6 +4590,102 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a ContactAction. */ + interface IContactAction { + + /** ContactAction fullName */ + fullName?: (string|null); + + /** ContactAction firstName */ + firstName?: (string|null); + } + + /** Represents a ContactAction. */ + class ContactAction implements IContactAction { + + /** + * Constructs a new ContactAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IContactAction); + + /** ContactAction fullName. */ + public fullName: string; + + /** ContactAction firstName. */ + public firstName: string; + + /** + * Creates a new ContactAction instance using the specified properties. + * @param [properties] Properties to set + * @returns ContactAction instance + */ + public static create(properties?: proto.IContactAction): proto.ContactAction; + + /** + * Encodes the specified ContactAction message. Does not implicitly {@link proto.ContactAction.verify|verify} messages. + * @param message ContactAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IContactAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ContactAction message, length delimited. Does not implicitly {@link proto.ContactAction.verify|verify} messages. + * @param message ContactAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IContactAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ContactAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ContactAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.ContactAction; + + /** + * Decodes a ContactAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ContactAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.ContactAction; + + /** + * Verifies a ContactAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ContactAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ContactAction + */ + public static fromObject(object: { [k: string]: any }): proto.ContactAction; + + /** + * Creates a plain object from a ContactAction message. Also converts values to other types if specified. + * @param message ContactAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ContactAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ContactAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a ContactMessage. */ interface IContactMessage { @@ -3155,9 +4961,6 @@ export namespace proto { /** ContextInfo parentGroupJid */ parentGroupJid?: (string|null); - - /** ContextInfo messageSecret */ - messageSecret?: (Uint8Array|null); } /** Represents a ContextInfo. */ @@ -3238,9 +5041,6 @@ export namespace proto { /** ContextInfo parentGroupJid. */ public parentGroupJid: string; - /** ContextInfo messageSecret. */ - public messageSecret: Uint8Array; - /** * Creates a new ContextInfo instance using the specified properties. * @param [properties] Properties to set @@ -3312,6 +5112,447 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a Conversation. */ + interface IConversation { + + /** Conversation id */ + id: string; + + /** Conversation messages */ + messages?: (proto.IHistorySyncMsg[]|null); + + /** Conversation newJid */ + newJid?: (string|null); + + /** Conversation oldJid */ + oldJid?: (string|null); + + /** Conversation lastMsgTimestamp */ + lastMsgTimestamp?: (number|Long|null); + + /** Conversation unreadCount */ + unreadCount?: (number|null); + + /** Conversation readOnly */ + readOnly?: (boolean|null); + + /** Conversation endOfHistoryTransfer */ + endOfHistoryTransfer?: (boolean|null); + + /** Conversation ephemeralExpiration */ + ephemeralExpiration?: (number|null); + + /** Conversation ephemeralSettingTimestamp */ + ephemeralSettingTimestamp?: (number|Long|null); + + /** Conversation endOfHistoryTransferType */ + endOfHistoryTransferType?: (proto.Conversation.ConversationEndOfHistoryTransferType|null); + + /** Conversation conversationTimestamp */ + conversationTimestamp?: (number|Long|null); + + /** Conversation name */ + name?: (string|null); + + /** Conversation pHash */ + pHash?: (string|null); + + /** Conversation notSpam */ + notSpam?: (boolean|null); + + /** Conversation archived */ + archived?: (boolean|null); + + /** Conversation disappearingMode */ + disappearingMode?: (proto.IDisappearingMode|null); + + /** Conversation unreadMentionCount */ + unreadMentionCount?: (number|null); + + /** Conversation markedAsUnread */ + markedAsUnread?: (boolean|null); + + /** Conversation participant */ + participant?: (proto.IGroupParticipant[]|null); + + /** Conversation tcToken */ + tcToken?: (Uint8Array|null); + + /** Conversation tcTokenTimestamp */ + tcTokenTimestamp?: (number|Long|null); + + /** Conversation contactPrimaryIdentityKey */ + contactPrimaryIdentityKey?: (Uint8Array|null); + + /** Conversation pinned */ + pinned?: (number|null); + + /** Conversation muteEndTime */ + muteEndTime?: (number|Long|null); + + /** Conversation wallpaper */ + wallpaper?: (proto.IWallpaperSettings|null); + + /** Conversation mediaVisibility */ + mediaVisibility?: (proto.MediaVisibility|null); + + /** Conversation tcTokenSenderTimestamp */ + tcTokenSenderTimestamp?: (number|Long|null); + + /** Conversation suspended */ + suspended?: (boolean|null); + + /** Conversation terminated */ + terminated?: (boolean|null); + + /** Conversation createdAt */ + createdAt?: (number|Long|null); + + /** Conversation createdBy */ + createdBy?: (string|null); + + /** Conversation description */ + description?: (string|null); + + /** Conversation support */ + support?: (boolean|null); + + /** Conversation isParentGroup */ + isParentGroup?: (boolean|null); + + /** Conversation isDefaultSubgroup */ + isDefaultSubgroup?: (boolean|null); + + /** Conversation parentGroupId */ + parentGroupId?: (string|null); + + /** Conversation displayName */ + displayName?: (string|null); + + /** Conversation pnJid */ + pnJid?: (string|null); + + /** Conversation selfMasked */ + selfMasked?: (boolean|null); + } + + /** Represents a Conversation. */ + class Conversation implements IConversation { + + /** + * Constructs a new Conversation. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IConversation); + + /** Conversation id. */ + public id: string; + + /** Conversation messages. */ + public messages: proto.IHistorySyncMsg[]; + + /** Conversation newJid. */ + public newJid: string; + + /** Conversation oldJid. */ + public oldJid: string; + + /** Conversation lastMsgTimestamp. */ + public lastMsgTimestamp: (number|Long); + + /** Conversation unreadCount. */ + public unreadCount: number; + + /** Conversation readOnly. */ + public readOnly: boolean; + + /** Conversation endOfHistoryTransfer. */ + public endOfHistoryTransfer: boolean; + + /** Conversation ephemeralExpiration. */ + public ephemeralExpiration: number; + + /** Conversation ephemeralSettingTimestamp. */ + public ephemeralSettingTimestamp: (number|Long); + + /** Conversation endOfHistoryTransferType. */ + public endOfHistoryTransferType: proto.Conversation.ConversationEndOfHistoryTransferType; + + /** Conversation conversationTimestamp. */ + public conversationTimestamp: (number|Long); + + /** Conversation name. */ + public name: string; + + /** Conversation pHash. */ + public pHash: string; + + /** Conversation notSpam. */ + public notSpam: boolean; + + /** Conversation archived. */ + public archived: boolean; + + /** Conversation disappearingMode. */ + public disappearingMode?: (proto.IDisappearingMode|null); + + /** Conversation unreadMentionCount. */ + public unreadMentionCount: number; + + /** Conversation markedAsUnread. */ + public markedAsUnread: boolean; + + /** Conversation participant. */ + public participant: proto.IGroupParticipant[]; + + /** Conversation tcToken. */ + public tcToken: Uint8Array; + + /** Conversation tcTokenTimestamp. */ + public tcTokenTimestamp: (number|Long); + + /** Conversation contactPrimaryIdentityKey. */ + public contactPrimaryIdentityKey: Uint8Array; + + /** Conversation pinned. */ + public pinned: number; + + /** Conversation muteEndTime. */ + public muteEndTime: (number|Long); + + /** Conversation wallpaper. */ + public wallpaper?: (proto.IWallpaperSettings|null); + + /** Conversation mediaVisibility. */ + public mediaVisibility: proto.MediaVisibility; + + /** Conversation tcTokenSenderTimestamp. */ + public tcTokenSenderTimestamp: (number|Long); + + /** Conversation suspended. */ + public suspended: boolean; + + /** Conversation terminated. */ + public terminated: boolean; + + /** Conversation createdAt. */ + public createdAt: (number|Long); + + /** Conversation createdBy. */ + public createdBy: string; + + /** Conversation description. */ + public description: string; + + /** Conversation support. */ + public support: boolean; + + /** Conversation isParentGroup. */ + public isParentGroup: boolean; + + /** Conversation isDefaultSubgroup. */ + public isDefaultSubgroup: boolean; + + /** Conversation parentGroupId. */ + public parentGroupId: string; + + /** Conversation displayName. */ + public displayName: string; + + /** Conversation pnJid. */ + public pnJid: string; + + /** Conversation selfMasked. */ + public selfMasked: boolean; + + /** + * Creates a new Conversation instance using the specified properties. + * @param [properties] Properties to set + * @returns Conversation instance + */ + public static create(properties?: proto.IConversation): proto.Conversation; + + /** + * Encodes the specified Conversation message. Does not implicitly {@link proto.Conversation.verify|verify} messages. + * @param message Conversation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IConversation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Conversation message, length delimited. Does not implicitly {@link proto.Conversation.verify|verify} messages. + * @param message Conversation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IConversation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Conversation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Conversation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.Conversation; + + /** + * Decodes a Conversation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Conversation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.Conversation; + + /** + * Verifies a Conversation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Conversation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Conversation + */ + public static fromObject(object: { [k: string]: any }): proto.Conversation; + + /** + * Creates a plain object from a Conversation message. Also converts values to other types if specified. + * @param message Conversation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Conversation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Conversation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Conversation { + + /** ConversationEndOfHistoryTransferType enum. */ + enum ConversationEndOfHistoryTransferType { + COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY = 0, + COMPLETE_AND_NO_MORE_MESSAGE_REMAIN_ON_PRIMARY = 1 + } + } + + /** Properties of a DNSSource. */ + interface IDNSSource { + + /** DNSSource dnsMethod */ + dnsMethod?: (proto.DNSSource.DNSSourceDNSResolutionMethod|null); + + /** DNSSource appCached */ + appCached?: (boolean|null); + } + + /** Represents a DNSSource. */ + class DNSSource implements IDNSSource { + + /** + * Constructs a new DNSSource. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IDNSSource); + + /** DNSSource dnsMethod. */ + public dnsMethod: proto.DNSSource.DNSSourceDNSResolutionMethod; + + /** DNSSource appCached. */ + public appCached: boolean; + + /** + * Creates a new DNSSource instance using the specified properties. + * @param [properties] Properties to set + * @returns DNSSource instance + */ + public static create(properties?: proto.IDNSSource): proto.DNSSource; + + /** + * Encodes the specified DNSSource message. Does not implicitly {@link proto.DNSSource.verify|verify} messages. + * @param message DNSSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IDNSSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DNSSource message, length delimited. Does not implicitly {@link proto.DNSSource.verify|verify} messages. + * @param message DNSSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IDNSSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DNSSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DNSSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.DNSSource; + + /** + * Decodes a DNSSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DNSSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.DNSSource; + + /** + * Verifies a DNSSource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DNSSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DNSSource + */ + public static fromObject(object: { [k: string]: any }): proto.DNSSource; + + /** + * Creates a plain object from a DNSSource message. Also converts values to other types if specified. + * @param message DNSSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.DNSSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DNSSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace DNSSource { + + /** DNSSourceDNSResolutionMethod enum. */ + enum DNSSourceDNSResolutionMethod { + SYSTEM = 0, + GOOGLE = 1, + HARDCODED = 2, + OVERRIDE = 3, + FALLBACK = 4 + } + } + /** Properties of a DeclinePaymentRequestMessage. */ interface IDeclinePaymentRequestMessage { @@ -3402,6 +5643,192 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a DeleteChatAction. */ + interface IDeleteChatAction { + + /** DeleteChatAction messageRange */ + messageRange?: (proto.ISyncActionMessageRange|null); + } + + /** Represents a DeleteChatAction. */ + class DeleteChatAction implements IDeleteChatAction { + + /** + * Constructs a new DeleteChatAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IDeleteChatAction); + + /** DeleteChatAction messageRange. */ + public messageRange?: (proto.ISyncActionMessageRange|null); + + /** + * Creates a new DeleteChatAction instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteChatAction instance + */ + public static create(properties?: proto.IDeleteChatAction): proto.DeleteChatAction; + + /** + * Encodes the specified DeleteChatAction message. Does not implicitly {@link proto.DeleteChatAction.verify|verify} messages. + * @param message DeleteChatAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IDeleteChatAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteChatAction message, length delimited. Does not implicitly {@link proto.DeleteChatAction.verify|verify} messages. + * @param message DeleteChatAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IDeleteChatAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteChatAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteChatAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.DeleteChatAction; + + /** + * Decodes a DeleteChatAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteChatAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.DeleteChatAction; + + /** + * Verifies a DeleteChatAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteChatAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteChatAction + */ + public static fromObject(object: { [k: string]: any }): proto.DeleteChatAction; + + /** + * Creates a plain object from a DeleteChatAction message. Also converts values to other types if specified. + * @param message DeleteChatAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.DeleteChatAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteChatAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteMessageForMeAction. */ + interface IDeleteMessageForMeAction { + + /** DeleteMessageForMeAction deleteMedia */ + deleteMedia?: (boolean|null); + + /** DeleteMessageForMeAction messageTimestamp */ + messageTimestamp?: (number|Long|null); + } + + /** Represents a DeleteMessageForMeAction. */ + class DeleteMessageForMeAction implements IDeleteMessageForMeAction { + + /** + * Constructs a new DeleteMessageForMeAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IDeleteMessageForMeAction); + + /** DeleteMessageForMeAction deleteMedia. */ + public deleteMedia: boolean; + + /** DeleteMessageForMeAction messageTimestamp. */ + public messageTimestamp: (number|Long); + + /** + * Creates a new DeleteMessageForMeAction instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteMessageForMeAction instance + */ + public static create(properties?: proto.IDeleteMessageForMeAction): proto.DeleteMessageForMeAction; + + /** + * Encodes the specified DeleteMessageForMeAction message. Does not implicitly {@link proto.DeleteMessageForMeAction.verify|verify} messages. + * @param message DeleteMessageForMeAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IDeleteMessageForMeAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteMessageForMeAction message, length delimited. Does not implicitly {@link proto.DeleteMessageForMeAction.verify|verify} messages. + * @param message DeleteMessageForMeAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IDeleteMessageForMeAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteMessageForMeAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteMessageForMeAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.DeleteMessageForMeAction; + + /** + * Decodes a DeleteMessageForMeAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteMessageForMeAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.DeleteMessageForMeAction; + + /** + * Verifies a DeleteMessageForMeAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteMessageForMeAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteMessageForMeAction + */ + public static fromObject(object: { [k: string]: any }): proto.DeleteMessageForMeAction; + + /** + * Creates a plain object from a DeleteMessageForMeAction message. Also converts values to other types if specified. + * @param message DeleteMessageForMeAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.DeleteMessageForMeAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteMessageForMeAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a DeviceListMetadata. */ interface IDeviceListMetadata { @@ -3522,6 +5949,267 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a DevicePairingRegistrationData. */ + interface IDevicePairingRegistrationData { + + /** DevicePairingRegistrationData eRegid */ + eRegid?: (Uint8Array|null); + + /** DevicePairingRegistrationData eKeytype */ + eKeytype?: (Uint8Array|null); + + /** DevicePairingRegistrationData eIdent */ + eIdent?: (Uint8Array|null); + + /** DevicePairingRegistrationData eSkeyId */ + eSkeyId?: (Uint8Array|null); + + /** DevicePairingRegistrationData eSkeyVal */ + eSkeyVal?: (Uint8Array|null); + + /** DevicePairingRegistrationData eSkeySig */ + eSkeySig?: (Uint8Array|null); + + /** DevicePairingRegistrationData buildHash */ + buildHash?: (Uint8Array|null); + + /** DevicePairingRegistrationData deviceProps */ + deviceProps?: (Uint8Array|null); + } + + /** Represents a DevicePairingRegistrationData. */ + class DevicePairingRegistrationData implements IDevicePairingRegistrationData { + + /** + * Constructs a new DevicePairingRegistrationData. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IDevicePairingRegistrationData); + + /** DevicePairingRegistrationData eRegid. */ + public eRegid: Uint8Array; + + /** DevicePairingRegistrationData eKeytype. */ + public eKeytype: Uint8Array; + + /** DevicePairingRegistrationData eIdent. */ + public eIdent: Uint8Array; + + /** DevicePairingRegistrationData eSkeyId. */ + public eSkeyId: Uint8Array; + + /** DevicePairingRegistrationData eSkeyVal. */ + public eSkeyVal: Uint8Array; + + /** DevicePairingRegistrationData eSkeySig. */ + public eSkeySig: Uint8Array; + + /** DevicePairingRegistrationData buildHash. */ + public buildHash: Uint8Array; + + /** DevicePairingRegistrationData deviceProps. */ + public deviceProps: Uint8Array; + + /** + * Creates a new DevicePairingRegistrationData instance using the specified properties. + * @param [properties] Properties to set + * @returns DevicePairingRegistrationData instance + */ + public static create(properties?: proto.IDevicePairingRegistrationData): proto.DevicePairingRegistrationData; + + /** + * Encodes the specified DevicePairingRegistrationData message. Does not implicitly {@link proto.DevicePairingRegistrationData.verify|verify} messages. + * @param message DevicePairingRegistrationData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IDevicePairingRegistrationData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DevicePairingRegistrationData message, length delimited. Does not implicitly {@link proto.DevicePairingRegistrationData.verify|verify} messages. + * @param message DevicePairingRegistrationData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IDevicePairingRegistrationData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DevicePairingRegistrationData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DevicePairingRegistrationData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.DevicePairingRegistrationData; + + /** + * Decodes a DevicePairingRegistrationData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DevicePairingRegistrationData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.DevicePairingRegistrationData; + + /** + * Verifies a DevicePairingRegistrationData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DevicePairingRegistrationData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DevicePairingRegistrationData + */ + public static fromObject(object: { [k: string]: any }): proto.DevicePairingRegistrationData; + + /** + * Creates a plain object from a DevicePairingRegistrationData message. Also converts values to other types if specified. + * @param message DevicePairingRegistrationData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.DevicePairingRegistrationData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DevicePairingRegistrationData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeviceProps. */ + interface IDeviceProps { + + /** DeviceProps os */ + os?: (string|null); + + /** DeviceProps version */ + version?: (proto.IAppVersion|null); + + /** DeviceProps platformType */ + platformType?: (proto.DeviceProps.DevicePropsPlatformType|null); + + /** DeviceProps requireFullSync */ + requireFullSync?: (boolean|null); + } + + /** Represents a DeviceProps. */ + class DeviceProps implements IDeviceProps { + + /** + * Constructs a new DeviceProps. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IDeviceProps); + + /** DeviceProps os. */ + public os: string; + + /** DeviceProps version. */ + public version?: (proto.IAppVersion|null); + + /** DeviceProps platformType. */ + public platformType: proto.DeviceProps.DevicePropsPlatformType; + + /** DeviceProps requireFullSync. */ + public requireFullSync: boolean; + + /** + * Creates a new DeviceProps instance using the specified properties. + * @param [properties] Properties to set + * @returns DeviceProps instance + */ + public static create(properties?: proto.IDeviceProps): proto.DeviceProps; + + /** + * Encodes the specified DeviceProps message. Does not implicitly {@link proto.DeviceProps.verify|verify} messages. + * @param message DeviceProps message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IDeviceProps, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeviceProps message, length delimited. Does not implicitly {@link proto.DeviceProps.verify|verify} messages. + * @param message DeviceProps message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IDeviceProps, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeviceProps message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeviceProps + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.DeviceProps; + + /** + * Decodes a DeviceProps message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeviceProps + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.DeviceProps; + + /** + * Verifies a DeviceProps message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeviceProps message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeviceProps + */ + public static fromObject(object: { [k: string]: any }): proto.DeviceProps; + + /** + * Creates a plain object from a DeviceProps message. Also converts values to other types if specified. + * @param message DeviceProps + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.DeviceProps, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeviceProps to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace DeviceProps { + + /** DevicePropsPlatformType enum. */ + enum DevicePropsPlatformType { + UNKNOWN = 0, + CHROME = 1, + FIREFOX = 2, + IE = 3, + OPERA = 4, + SAFARI = 5, + EDGE = 6, + DESKTOP = 7, + IPAD = 8, + ANDROID_TABLET = 9, + OHANA = 10, + ALOHA = 11, + CATALINA = 12, + TCL_TV = 13 + } + } + /** Properties of a DeviceSentMessage. */ interface IDeviceSentMessage { @@ -3922,6 +6610,198 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of an EphemeralSetting. */ + interface IEphemeralSetting { + + /** EphemeralSetting duration */ + duration?: (number|null); + + /** EphemeralSetting timestamp */ + timestamp?: (number|Long|null); + } + + /** Represents an EphemeralSetting. */ + class EphemeralSetting implements IEphemeralSetting { + + /** + * Constructs a new EphemeralSetting. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IEphemeralSetting); + + /** EphemeralSetting duration. */ + public duration: number; + + /** EphemeralSetting timestamp. */ + public timestamp: (number|Long); + + /** + * Creates a new EphemeralSetting instance using the specified properties. + * @param [properties] Properties to set + * @returns EphemeralSetting instance + */ + public static create(properties?: proto.IEphemeralSetting): proto.EphemeralSetting; + + /** + * Encodes the specified EphemeralSetting message. Does not implicitly {@link proto.EphemeralSetting.verify|verify} messages. + * @param message EphemeralSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IEphemeralSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EphemeralSetting message, length delimited. Does not implicitly {@link proto.EphemeralSetting.verify|verify} messages. + * @param message EphemeralSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IEphemeralSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EphemeralSetting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EphemeralSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.EphemeralSetting; + + /** + * Decodes an EphemeralSetting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EphemeralSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.EphemeralSetting; + + /** + * Verifies an EphemeralSetting message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EphemeralSetting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EphemeralSetting + */ + public static fromObject(object: { [k: string]: any }): proto.EphemeralSetting; + + /** + * Creates a plain object from an EphemeralSetting message. Also converts values to other types if specified. + * @param message EphemeralSetting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.EphemeralSetting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EphemeralSetting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an ExitCode. */ + interface IExitCode { + + /** ExitCode code */ + code?: (number|Long|null); + + /** ExitCode text */ + text?: (string|null); + } + + /** Represents an ExitCode. */ + class ExitCode implements IExitCode { + + /** + * Constructs a new ExitCode. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IExitCode); + + /** ExitCode code. */ + public code: (number|Long); + + /** ExitCode text. */ + public text: string; + + /** + * Creates a new ExitCode instance using the specified properties. + * @param [properties] Properties to set + * @returns ExitCode instance + */ + public static create(properties?: proto.IExitCode): proto.ExitCode; + + /** + * Encodes the specified ExitCode message. Does not implicitly {@link proto.ExitCode.verify|verify} messages. + * @param message ExitCode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IExitCode, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExitCode message, length delimited. Does not implicitly {@link proto.ExitCode.verify|verify} messages. + * @param message ExitCode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IExitCode, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExitCode message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExitCode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.ExitCode; + + /** + * Decodes an ExitCode message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExitCode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.ExitCode; + + /** + * Verifies an ExitCode message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExitCode message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExitCode + */ + public static fromObject(object: { [k: string]: any }): proto.ExitCode; + + /** + * Creates a plain object from an ExitCode message. Also converts values to other types if specified. + * @param message ExitCode + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ExitCode, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExitCode to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of an ExtendedTextMessage. */ interface IExtendedTextMessage { @@ -4335,6 +7215,258 @@ export namespace proto { } } + /** Properties of an ExternalBlobReference. */ + interface IExternalBlobReference { + + /** ExternalBlobReference mediaKey */ + mediaKey?: (Uint8Array|null); + + /** ExternalBlobReference directPath */ + directPath?: (string|null); + + /** ExternalBlobReference handle */ + handle?: (string|null); + + /** ExternalBlobReference fileSizeBytes */ + fileSizeBytes?: (number|Long|null); + + /** ExternalBlobReference fileSha256 */ + fileSha256?: (Uint8Array|null); + + /** ExternalBlobReference fileEncSha256 */ + fileEncSha256?: (Uint8Array|null); + } + + /** Represents an ExternalBlobReference. */ + class ExternalBlobReference implements IExternalBlobReference { + + /** + * Constructs a new ExternalBlobReference. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IExternalBlobReference); + + /** ExternalBlobReference mediaKey. */ + public mediaKey: Uint8Array; + + /** ExternalBlobReference directPath. */ + public directPath: string; + + /** ExternalBlobReference handle. */ + public handle: string; + + /** ExternalBlobReference fileSizeBytes. */ + public fileSizeBytes: (number|Long); + + /** ExternalBlobReference fileSha256. */ + public fileSha256: Uint8Array; + + /** ExternalBlobReference fileEncSha256. */ + public fileEncSha256: Uint8Array; + + /** + * Creates a new ExternalBlobReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ExternalBlobReference instance + */ + public static create(properties?: proto.IExternalBlobReference): proto.ExternalBlobReference; + + /** + * Encodes the specified ExternalBlobReference message. Does not implicitly {@link proto.ExternalBlobReference.verify|verify} messages. + * @param message ExternalBlobReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IExternalBlobReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExternalBlobReference message, length delimited. Does not implicitly {@link proto.ExternalBlobReference.verify|verify} messages. + * @param message ExternalBlobReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IExternalBlobReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExternalBlobReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExternalBlobReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.ExternalBlobReference; + + /** + * Decodes an ExternalBlobReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExternalBlobReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.ExternalBlobReference; + + /** + * Verifies an ExternalBlobReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExternalBlobReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExternalBlobReference + */ + public static fromObject(object: { [k: string]: any }): proto.ExternalBlobReference; + + /** + * Creates a plain object from an ExternalBlobReference message. Also converts values to other types if specified. + * @param message ExternalBlobReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ExternalBlobReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExternalBlobReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FavoriteStickerAction. */ + interface IFavoriteStickerAction { + + /** FavoriteStickerAction directPath */ + directPath?: (string|null); + + /** FavoriteStickerAction lastUploadTimestamp */ + lastUploadTimestamp?: (string|null); + + /** FavoriteStickerAction handle */ + handle?: (string|null); + + /** FavoriteStickerAction encFilehash */ + encFilehash?: (string|null); + + /** FavoriteStickerAction stickerHashWithoutMeta */ + stickerHashWithoutMeta?: (string|null); + + /** FavoriteStickerAction mediaKey */ + mediaKey?: (string|null); + + /** FavoriteStickerAction mediaKeyTimestamp */ + mediaKeyTimestamp?: (number|Long|null); + + /** FavoriteStickerAction isFavorite */ + isFavorite?: (boolean|null); + } + + /** Represents a FavoriteStickerAction. */ + class FavoriteStickerAction implements IFavoriteStickerAction { + + /** + * Constructs a new FavoriteStickerAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IFavoriteStickerAction); + + /** FavoriteStickerAction directPath. */ + public directPath: string; + + /** FavoriteStickerAction lastUploadTimestamp. */ + public lastUploadTimestamp: string; + + /** FavoriteStickerAction handle. */ + public handle: string; + + /** FavoriteStickerAction encFilehash. */ + public encFilehash: string; + + /** FavoriteStickerAction stickerHashWithoutMeta. */ + public stickerHashWithoutMeta: string; + + /** FavoriteStickerAction mediaKey. */ + public mediaKey: string; + + /** FavoriteStickerAction mediaKeyTimestamp. */ + public mediaKeyTimestamp: (number|Long); + + /** FavoriteStickerAction isFavorite. */ + public isFavorite: boolean; + + /** + * Creates a new FavoriteStickerAction instance using the specified properties. + * @param [properties] Properties to set + * @returns FavoriteStickerAction instance + */ + public static create(properties?: proto.IFavoriteStickerAction): proto.FavoriteStickerAction; + + /** + * Encodes the specified FavoriteStickerAction message. Does not implicitly {@link proto.FavoriteStickerAction.verify|verify} messages. + * @param message FavoriteStickerAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IFavoriteStickerAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FavoriteStickerAction message, length delimited. Does not implicitly {@link proto.FavoriteStickerAction.verify|verify} messages. + * @param message FavoriteStickerAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IFavoriteStickerAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FavoriteStickerAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FavoriteStickerAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.FavoriteStickerAction; + + /** + * Decodes a FavoriteStickerAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FavoriteStickerAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.FavoriteStickerAction; + + /** + * Verifies a FavoriteStickerAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FavoriteStickerAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FavoriteStickerAction + */ + public static fromObject(object: { [k: string]: any }): proto.FavoriteStickerAction; + + /** + * Creates a plain object from a FavoriteStickerAction message. Also converts values to other types if specified. + * @param message FavoriteStickerAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.FavoriteStickerAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FavoriteStickerAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a Footer. */ interface IFooter { @@ -4650,6 +7782,150 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a GlobalSettings. */ + interface IGlobalSettings { + + /** GlobalSettings lightThemeWallpaper */ + lightThemeWallpaper?: (proto.IWallpaperSettings|null); + + /** GlobalSettings mediaVisibility */ + mediaVisibility?: (proto.MediaVisibility|null); + + /** GlobalSettings darkThemeWallpaper */ + darkThemeWallpaper?: (proto.IWallpaperSettings|null); + + /** GlobalSettings autoDownloadWiFi */ + autoDownloadWiFi?: (proto.IAutoDownloadSettings|null); + + /** GlobalSettings autoDownloadCellular */ + autoDownloadCellular?: (proto.IAutoDownloadSettings|null); + + /** GlobalSettings autoDownloadRoaming */ + autoDownloadRoaming?: (proto.IAutoDownloadSettings|null); + + /** GlobalSettings showIndividualNotificationsPreview */ + showIndividualNotificationsPreview?: (boolean|null); + + /** GlobalSettings showGroupNotificationsPreview */ + showGroupNotificationsPreview?: (boolean|null); + + /** GlobalSettings disappearingModeDuration */ + disappearingModeDuration?: (number|null); + + /** GlobalSettings disappearingModeTimestamp */ + disappearingModeTimestamp?: (number|Long|null); + } + + /** Represents a GlobalSettings. */ + class GlobalSettings implements IGlobalSettings { + + /** + * Constructs a new GlobalSettings. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IGlobalSettings); + + /** GlobalSettings lightThemeWallpaper. */ + public lightThemeWallpaper?: (proto.IWallpaperSettings|null); + + /** GlobalSettings mediaVisibility. */ + public mediaVisibility: proto.MediaVisibility; + + /** GlobalSettings darkThemeWallpaper. */ + public darkThemeWallpaper?: (proto.IWallpaperSettings|null); + + /** GlobalSettings autoDownloadWiFi. */ + public autoDownloadWiFi?: (proto.IAutoDownloadSettings|null); + + /** GlobalSettings autoDownloadCellular. */ + public autoDownloadCellular?: (proto.IAutoDownloadSettings|null); + + /** GlobalSettings autoDownloadRoaming. */ + public autoDownloadRoaming?: (proto.IAutoDownloadSettings|null); + + /** GlobalSettings showIndividualNotificationsPreview. */ + public showIndividualNotificationsPreview: boolean; + + /** GlobalSettings showGroupNotificationsPreview. */ + public showGroupNotificationsPreview: boolean; + + /** GlobalSettings disappearingModeDuration. */ + public disappearingModeDuration: number; + + /** GlobalSettings disappearingModeTimestamp. */ + public disappearingModeTimestamp: (number|Long); + + /** + * Creates a new GlobalSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GlobalSettings instance + */ + public static create(properties?: proto.IGlobalSettings): proto.GlobalSettings; + + /** + * Encodes the specified GlobalSettings message. Does not implicitly {@link proto.GlobalSettings.verify|verify} messages. + * @param message GlobalSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IGlobalSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GlobalSettings message, length delimited. Does not implicitly {@link proto.GlobalSettings.verify|verify} messages. + * @param message GlobalSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IGlobalSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GlobalSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GlobalSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.GlobalSettings; + + /** + * Decodes a GlobalSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GlobalSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.GlobalSettings; + + /** + * Verifies a GlobalSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GlobalSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GlobalSettings + */ + public static fromObject(object: { [k: string]: any }): proto.GlobalSettings; + + /** + * Creates a plain object from a GlobalSettings message. Also converts values to other types if specified. + * @param message GlobalSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.GlobalSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GlobalSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a GroupInviteMessage. */ interface IGroupInviteMessage { @@ -4791,414 +8067,109 @@ export namespace proto { } } - /** Properties of a Header. */ - interface IHeader { + /** Properties of a GroupParticipant. */ + interface IGroupParticipant { - /** Header title */ - title?: (string|null); + /** GroupParticipant userJid */ + userJid: string; - /** Header subtitle */ - subtitle?: (string|null); - - /** Header hasMediaAttachment */ - hasMediaAttachment?: (boolean|null); - - /** Header documentMessage */ - documentMessage?: (proto.IDocumentMessage|null); - - /** Header imageMessage */ - imageMessage?: (proto.IImageMessage|null); - - /** Header jpegThumbnail */ - jpegThumbnail?: (Uint8Array|null); - - /** Header videoMessage */ - videoMessage?: (proto.IVideoMessage|null); + /** GroupParticipant rank */ + rank?: (proto.GroupParticipant.GroupParticipantRank|null); } - /** Represents a Header. */ - class Header implements IHeader { + /** Represents a GroupParticipant. */ + class GroupParticipant implements IGroupParticipant { /** - * Constructs a new Header. + * Constructs a new GroupParticipant. * @param [properties] Properties to set */ - constructor(properties?: proto.IHeader); + constructor(properties?: proto.IGroupParticipant); - /** Header title. */ - public title: string; + /** GroupParticipant userJid. */ + public userJid: string; - /** Header subtitle. */ - public subtitle: string; - - /** Header hasMediaAttachment. */ - public hasMediaAttachment: boolean; - - /** Header documentMessage. */ - public documentMessage?: (proto.IDocumentMessage|null); - - /** Header imageMessage. */ - public imageMessage?: (proto.IImageMessage|null); - - /** Header jpegThumbnail. */ - public jpegThumbnail?: (Uint8Array|null); - - /** Header videoMessage. */ - public videoMessage?: (proto.IVideoMessage|null); - - /** Header media. */ - public media?: ("documentMessage"|"imageMessage"|"jpegThumbnail"|"videoMessage"); + /** GroupParticipant rank. */ + public rank: proto.GroupParticipant.GroupParticipantRank; /** - * Creates a new Header instance using the specified properties. + * Creates a new GroupParticipant instance using the specified properties. * @param [properties] Properties to set - * @returns Header instance + * @returns GroupParticipant instance */ - public static create(properties?: proto.IHeader): proto.Header; + public static create(properties?: proto.IGroupParticipant): proto.GroupParticipant; /** - * Encodes the specified Header message. Does not implicitly {@link proto.Header.verify|verify} messages. - * @param message Header message or plain object to encode + * Encodes the specified GroupParticipant message. Does not implicitly {@link proto.GroupParticipant.verify|verify} messages. + * @param message GroupParticipant message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: proto.IHeader, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: proto.IGroupParticipant, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Header message, length delimited. Does not implicitly {@link proto.Header.verify|verify} messages. - * @param message Header message or plain object to encode + * Encodes the specified GroupParticipant message, length delimited. Does not implicitly {@link proto.GroupParticipant.verify|verify} messages. + * @param message GroupParticipant message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: proto.IHeader, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: proto.IGroupParticipant, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Header message from the specified reader or buffer. + * Decodes a GroupParticipant message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Header + * @returns GroupParticipant * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.Header; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.GroupParticipant; /** - * Decodes a Header message from the specified reader or buffer, length delimited. + * Decodes a GroupParticipant message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Header + * @returns GroupParticipant * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.Header; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.GroupParticipant; /** - * Verifies a Header message. + * Verifies a GroupParticipant message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Header message from a plain object. Also converts values to their respective internal types. + * Creates a GroupParticipant message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Header + * @returns GroupParticipant */ - public static fromObject(object: { [k: string]: any }): proto.Header; + public static fromObject(object: { [k: string]: any }): proto.GroupParticipant; /** - * Creates a plain object from a Header message. Also converts values to other types if specified. - * @param message Header + * Creates a plain object from a GroupParticipant message. Also converts values to other types if specified. + * @param message GroupParticipant * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: proto.Header, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: proto.GroupParticipant, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Header to JSON. + * Converts this GroupParticipant to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a HighlyStructuredMessage. */ - interface IHighlyStructuredMessage { + namespace GroupParticipant { - /** HighlyStructuredMessage namespace */ - namespace?: (string|null); - - /** HighlyStructuredMessage elementName */ - elementName?: (string|null); - - /** HighlyStructuredMessage params */ - params?: (string[]|null); - - /** HighlyStructuredMessage fallbackLg */ - fallbackLg?: (string|null); - - /** HighlyStructuredMessage fallbackLc */ - fallbackLc?: (string|null); - - /** HighlyStructuredMessage localizableParams */ - localizableParams?: (proto.IHSMLocalizableParameter[]|null); - - /** HighlyStructuredMessage deterministicLg */ - deterministicLg?: (string|null); - - /** HighlyStructuredMessage deterministicLc */ - deterministicLc?: (string|null); - - /** HighlyStructuredMessage hydratedHsm */ - hydratedHsm?: (proto.ITemplateMessage|null); - } - - /** Represents a HighlyStructuredMessage. */ - class HighlyStructuredMessage implements IHighlyStructuredMessage { - - /** - * Constructs a new HighlyStructuredMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IHighlyStructuredMessage); - - /** HighlyStructuredMessage namespace. */ - public namespace: string; - - /** HighlyStructuredMessage elementName. */ - public elementName: string; - - /** HighlyStructuredMessage params. */ - public params: string[]; - - /** HighlyStructuredMessage fallbackLg. */ - public fallbackLg: string; - - /** HighlyStructuredMessage fallbackLc. */ - public fallbackLc: string; - - /** HighlyStructuredMessage localizableParams. */ - public localizableParams: proto.IHSMLocalizableParameter[]; - - /** HighlyStructuredMessage deterministicLg. */ - public deterministicLg: string; - - /** HighlyStructuredMessage deterministicLc. */ - public deterministicLc: string; - - /** HighlyStructuredMessage hydratedHsm. */ - public hydratedHsm?: (proto.ITemplateMessage|null); - - /** - * Creates a new HighlyStructuredMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns HighlyStructuredMessage instance - */ - public static create(properties?: proto.IHighlyStructuredMessage): proto.HighlyStructuredMessage; - - /** - * Encodes the specified HighlyStructuredMessage message. Does not implicitly {@link proto.HighlyStructuredMessage.verify|verify} messages. - * @param message HighlyStructuredMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IHighlyStructuredMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HighlyStructuredMessage message, length delimited. Does not implicitly {@link proto.HighlyStructuredMessage.verify|verify} messages. - * @param message HighlyStructuredMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IHighlyStructuredMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HighlyStructuredMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HighlyStructuredMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.HighlyStructuredMessage; - - /** - * Decodes a HighlyStructuredMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HighlyStructuredMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.HighlyStructuredMessage; - - /** - * Verifies a HighlyStructuredMessage message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HighlyStructuredMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HighlyStructuredMessage - */ - public static fromObject(object: { [k: string]: any }): proto.HighlyStructuredMessage; - - /** - * Creates a plain object from a HighlyStructuredMessage message. Also converts values to other types if specified. - * @param message HighlyStructuredMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.HighlyStructuredMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HighlyStructuredMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a HistorySyncNotification. */ - interface IHistorySyncNotification { - - /** HistorySyncNotification fileSha256 */ - fileSha256?: (Uint8Array|null); - - /** HistorySyncNotification fileLength */ - fileLength?: (number|Long|null); - - /** HistorySyncNotification mediaKey */ - mediaKey?: (Uint8Array|null); - - /** HistorySyncNotification fileEncSha256 */ - fileEncSha256?: (Uint8Array|null); - - /** HistorySyncNotification directPath */ - directPath?: (string|null); - - /** HistorySyncNotification syncType */ - syncType?: (proto.HistorySyncNotification.HistorySyncNotificationHistorySyncType|null); - - /** HistorySyncNotification chunkOrder */ - chunkOrder?: (number|null); - - /** HistorySyncNotification originalMessageId */ - originalMessageId?: (string|null); - } - - /** Represents a HistorySyncNotification. */ - class HistorySyncNotification implements IHistorySyncNotification { - - /** - * Constructs a new HistorySyncNotification. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IHistorySyncNotification); - - /** HistorySyncNotification fileSha256. */ - public fileSha256: Uint8Array; - - /** HistorySyncNotification fileLength. */ - public fileLength: (number|Long); - - /** HistorySyncNotification mediaKey. */ - public mediaKey: Uint8Array; - - /** HistorySyncNotification fileEncSha256. */ - public fileEncSha256: Uint8Array; - - /** HistorySyncNotification directPath. */ - public directPath: string; - - /** HistorySyncNotification syncType. */ - public syncType: proto.HistorySyncNotification.HistorySyncNotificationHistorySyncType; - - /** HistorySyncNotification chunkOrder. */ - public chunkOrder: number; - - /** HistorySyncNotification originalMessageId. */ - public originalMessageId: string; - - /** - * Creates a new HistorySyncNotification instance using the specified properties. - * @param [properties] Properties to set - * @returns HistorySyncNotification instance - */ - public static create(properties?: proto.IHistorySyncNotification): proto.HistorySyncNotification; - - /** - * Encodes the specified HistorySyncNotification message. Does not implicitly {@link proto.HistorySyncNotification.verify|verify} messages. - * @param message HistorySyncNotification message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IHistorySyncNotification, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HistorySyncNotification message, length delimited. Does not implicitly {@link proto.HistorySyncNotification.verify|verify} messages. - * @param message HistorySyncNotification message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IHistorySyncNotification, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HistorySyncNotification message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HistorySyncNotification - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.HistorySyncNotification; - - /** - * Decodes a HistorySyncNotification message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HistorySyncNotification - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.HistorySyncNotification; - - /** - * Verifies a HistorySyncNotification message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HistorySyncNotification message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HistorySyncNotification - */ - public static fromObject(object: { [k: string]: any }): proto.HistorySyncNotification; - - /** - * Creates a plain object from a HistorySyncNotification message. Also converts values to other types if specified. - * @param message HistorySyncNotification - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.HistorySyncNotification, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HistorySyncNotification to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace HistorySyncNotification { - - /** HistorySyncNotificationHistorySyncType enum. */ - enum HistorySyncNotificationHistorySyncType { - INITIAL_BOOTSTRAP = 0, - INITIAL_STATUS_V3 = 1, - FULL = 2, - RECENT = 3, - PUSH_NAME = 4 + /** GroupParticipantRank enum. */ + enum GroupParticipantRank { + REGULAR = 0, + ADMIN = 1, + SUPERADMIN = 2 } } @@ -5738,6 +8709,765 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a HandshakeMessage. */ + interface IHandshakeMessage { + + /** HandshakeMessage clientHello */ + clientHello?: (proto.IClientHello|null); + + /** HandshakeMessage serverHello */ + serverHello?: (proto.IServerHello|null); + + /** HandshakeMessage clientFinish */ + clientFinish?: (proto.IClientFinish|null); + } + + /** Represents a HandshakeMessage. */ + class HandshakeMessage implements IHandshakeMessage { + + /** + * Constructs a new HandshakeMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IHandshakeMessage); + + /** HandshakeMessage clientHello. */ + public clientHello?: (proto.IClientHello|null); + + /** HandshakeMessage serverHello. */ + public serverHello?: (proto.IServerHello|null); + + /** HandshakeMessage clientFinish. */ + public clientFinish?: (proto.IClientFinish|null); + + /** + * Creates a new HandshakeMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns HandshakeMessage instance + */ + public static create(properties?: proto.IHandshakeMessage): proto.HandshakeMessage; + + /** + * Encodes the specified HandshakeMessage message. Does not implicitly {@link proto.HandshakeMessage.verify|verify} messages. + * @param message HandshakeMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IHandshakeMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HandshakeMessage message, length delimited. Does not implicitly {@link proto.HandshakeMessage.verify|verify} messages. + * @param message HandshakeMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IHandshakeMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HandshakeMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HandshakeMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.HandshakeMessage; + + /** + * Decodes a HandshakeMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HandshakeMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.HandshakeMessage; + + /** + * Verifies a HandshakeMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HandshakeMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HandshakeMessage + */ + public static fromObject(object: { [k: string]: any }): proto.HandshakeMessage; + + /** + * Creates a plain object from a HandshakeMessage message. Also converts values to other types if specified. + * @param message HandshakeMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.HandshakeMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HandshakeMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Header. */ + interface IHeader { + + /** Header title */ + title?: (string|null); + + /** Header subtitle */ + subtitle?: (string|null); + + /** Header hasMediaAttachment */ + hasMediaAttachment?: (boolean|null); + + /** Header documentMessage */ + documentMessage?: (proto.IDocumentMessage|null); + + /** Header imageMessage */ + imageMessage?: (proto.IImageMessage|null); + + /** Header jpegThumbnail */ + jpegThumbnail?: (Uint8Array|null); + + /** Header videoMessage */ + videoMessage?: (proto.IVideoMessage|null); + } + + /** Represents a Header. */ + class Header implements IHeader { + + /** + * Constructs a new Header. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IHeader); + + /** Header title. */ + public title: string; + + /** Header subtitle. */ + public subtitle: string; + + /** Header hasMediaAttachment. */ + public hasMediaAttachment: boolean; + + /** Header documentMessage. */ + public documentMessage?: (proto.IDocumentMessage|null); + + /** Header imageMessage. */ + public imageMessage?: (proto.IImageMessage|null); + + /** Header jpegThumbnail. */ + public jpegThumbnail?: (Uint8Array|null); + + /** Header videoMessage. */ + public videoMessage?: (proto.IVideoMessage|null); + + /** Header media. */ + public media?: ("documentMessage"|"imageMessage"|"jpegThumbnail"|"videoMessage"); + + /** + * Creates a new Header instance using the specified properties. + * @param [properties] Properties to set + * @returns Header instance + */ + public static create(properties?: proto.IHeader): proto.Header; + + /** + * Encodes the specified Header message. Does not implicitly {@link proto.Header.verify|verify} messages. + * @param message Header message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Header message, length delimited. Does not implicitly {@link proto.Header.verify|verify} messages. + * @param message Header message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Header message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Header + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.Header; + + /** + * Decodes a Header message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Header + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.Header; + + /** + * Verifies a Header message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Header message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Header + */ + public static fromObject(object: { [k: string]: any }): proto.Header; + + /** + * Creates a plain object from a Header message. Also converts values to other types if specified. + * @param message Header + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Header, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Header to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HighlyStructuredMessage. */ + interface IHighlyStructuredMessage { + + /** HighlyStructuredMessage namespace */ + namespace?: (string|null); + + /** HighlyStructuredMessage elementName */ + elementName?: (string|null); + + /** HighlyStructuredMessage params */ + params?: (string[]|null); + + /** HighlyStructuredMessage fallbackLg */ + fallbackLg?: (string|null); + + /** HighlyStructuredMessage fallbackLc */ + fallbackLc?: (string|null); + + /** HighlyStructuredMessage localizableParams */ + localizableParams?: (proto.IHSMLocalizableParameter[]|null); + + /** HighlyStructuredMessage deterministicLg */ + deterministicLg?: (string|null); + + /** HighlyStructuredMessage deterministicLc */ + deterministicLc?: (string|null); + + /** HighlyStructuredMessage hydratedHsm */ + hydratedHsm?: (proto.ITemplateMessage|null); + } + + /** Represents a HighlyStructuredMessage. */ + class HighlyStructuredMessage implements IHighlyStructuredMessage { + + /** + * Constructs a new HighlyStructuredMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IHighlyStructuredMessage); + + /** HighlyStructuredMessage namespace. */ + public namespace: string; + + /** HighlyStructuredMessage elementName. */ + public elementName: string; + + /** HighlyStructuredMessage params. */ + public params: string[]; + + /** HighlyStructuredMessage fallbackLg. */ + public fallbackLg: string; + + /** HighlyStructuredMessage fallbackLc. */ + public fallbackLc: string; + + /** HighlyStructuredMessage localizableParams. */ + public localizableParams: proto.IHSMLocalizableParameter[]; + + /** HighlyStructuredMessage deterministicLg. */ + public deterministicLg: string; + + /** HighlyStructuredMessage deterministicLc. */ + public deterministicLc: string; + + /** HighlyStructuredMessage hydratedHsm. */ + public hydratedHsm?: (proto.ITemplateMessage|null); + + /** + * Creates a new HighlyStructuredMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns HighlyStructuredMessage instance + */ + public static create(properties?: proto.IHighlyStructuredMessage): proto.HighlyStructuredMessage; + + /** + * Encodes the specified HighlyStructuredMessage message. Does not implicitly {@link proto.HighlyStructuredMessage.verify|verify} messages. + * @param message HighlyStructuredMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IHighlyStructuredMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HighlyStructuredMessage message, length delimited. Does not implicitly {@link proto.HighlyStructuredMessage.verify|verify} messages. + * @param message HighlyStructuredMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IHighlyStructuredMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HighlyStructuredMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HighlyStructuredMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.HighlyStructuredMessage; + + /** + * Decodes a HighlyStructuredMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HighlyStructuredMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.HighlyStructuredMessage; + + /** + * Verifies a HighlyStructuredMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HighlyStructuredMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HighlyStructuredMessage + */ + public static fromObject(object: { [k: string]: any }): proto.HighlyStructuredMessage; + + /** + * Creates a plain object from a HighlyStructuredMessage message. Also converts values to other types if specified. + * @param message HighlyStructuredMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.HighlyStructuredMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HighlyStructuredMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HistorySync. */ + interface IHistorySync { + + /** HistorySync syncType */ + syncType: proto.HistorySync.HistorySyncHistorySyncType; + + /** HistorySync conversations */ + conversations?: (proto.IConversation[]|null); + + /** HistorySync statusV3Messages */ + statusV3Messages?: (proto.IWebMessageInfo[]|null); + + /** HistorySync chunkOrder */ + chunkOrder?: (number|null); + + /** HistorySync progress */ + progress?: (number|null); + + /** HistorySync pushnames */ + pushnames?: (proto.IPushname[]|null); + + /** HistorySync globalSettings */ + globalSettings?: (proto.IGlobalSettings|null); + + /** HistorySync threadIdUserSecret */ + threadIdUserSecret?: (Uint8Array|null); + + /** HistorySync threadDsTimeframeOffset */ + threadDsTimeframeOffset?: (number|null); + } + + /** Represents a HistorySync. */ + class HistorySync implements IHistorySync { + + /** + * Constructs a new HistorySync. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IHistorySync); + + /** HistorySync syncType. */ + public syncType: proto.HistorySync.HistorySyncHistorySyncType; + + /** HistorySync conversations. */ + public conversations: proto.IConversation[]; + + /** HistorySync statusV3Messages. */ + public statusV3Messages: proto.IWebMessageInfo[]; + + /** HistorySync chunkOrder. */ + public chunkOrder: number; + + /** HistorySync progress. */ + public progress: number; + + /** HistorySync pushnames. */ + public pushnames: proto.IPushname[]; + + /** HistorySync globalSettings. */ + public globalSettings?: (proto.IGlobalSettings|null); + + /** HistorySync threadIdUserSecret. */ + public threadIdUserSecret: Uint8Array; + + /** HistorySync threadDsTimeframeOffset. */ + public threadDsTimeframeOffset: number; + + /** + * Creates a new HistorySync instance using the specified properties. + * @param [properties] Properties to set + * @returns HistorySync instance + */ + public static create(properties?: proto.IHistorySync): proto.HistorySync; + + /** + * Encodes the specified HistorySync message. Does not implicitly {@link proto.HistorySync.verify|verify} messages. + * @param message HistorySync message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IHistorySync, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HistorySync message, length delimited. Does not implicitly {@link proto.HistorySync.verify|verify} messages. + * @param message HistorySync message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IHistorySync, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HistorySync message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HistorySync + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.HistorySync; + + /** + * Decodes a HistorySync message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HistorySync + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.HistorySync; + + /** + * Verifies a HistorySync message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HistorySync message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HistorySync + */ + public static fromObject(object: { [k: string]: any }): proto.HistorySync; + + /** + * Creates a plain object from a HistorySync message. Also converts values to other types if specified. + * @param message HistorySync + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.HistorySync, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HistorySync to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace HistorySync { + + /** HistorySyncHistorySyncType enum. */ + enum HistorySyncHistorySyncType { + INITIAL_BOOTSTRAP = 0, + INITIAL_STATUS_V3 = 1, + FULL = 2, + RECENT = 3, + PUSH_NAME = 4 + } + } + + /** Properties of a HistorySyncMsg. */ + interface IHistorySyncMsg { + + /** HistorySyncMsg message */ + message?: (proto.IWebMessageInfo|null); + + /** HistorySyncMsg msgOrderId */ + msgOrderId?: (number|Long|null); + } + + /** Represents a HistorySyncMsg. */ + class HistorySyncMsg implements IHistorySyncMsg { + + /** + * Constructs a new HistorySyncMsg. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IHistorySyncMsg); + + /** HistorySyncMsg message. */ + public message?: (proto.IWebMessageInfo|null); + + /** HistorySyncMsg msgOrderId. */ + public msgOrderId: (number|Long); + + /** + * Creates a new HistorySyncMsg instance using the specified properties. + * @param [properties] Properties to set + * @returns HistorySyncMsg instance + */ + public static create(properties?: proto.IHistorySyncMsg): proto.HistorySyncMsg; + + /** + * Encodes the specified HistorySyncMsg message. Does not implicitly {@link proto.HistorySyncMsg.verify|verify} messages. + * @param message HistorySyncMsg message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IHistorySyncMsg, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HistorySyncMsg message, length delimited. Does not implicitly {@link proto.HistorySyncMsg.verify|verify} messages. + * @param message HistorySyncMsg message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IHistorySyncMsg, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HistorySyncMsg message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HistorySyncMsg + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.HistorySyncMsg; + + /** + * Decodes a HistorySyncMsg message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HistorySyncMsg + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.HistorySyncMsg; + + /** + * Verifies a HistorySyncMsg message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HistorySyncMsg message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HistorySyncMsg + */ + public static fromObject(object: { [k: string]: any }): proto.HistorySyncMsg; + + /** + * Creates a plain object from a HistorySyncMsg message. Also converts values to other types if specified. + * @param message HistorySyncMsg + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.HistorySyncMsg, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HistorySyncMsg to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HistorySyncNotification. */ + interface IHistorySyncNotification { + + /** HistorySyncNotification fileSha256 */ + fileSha256?: (Uint8Array|null); + + /** HistorySyncNotification fileLength */ + fileLength?: (number|Long|null); + + /** HistorySyncNotification mediaKey */ + mediaKey?: (Uint8Array|null); + + /** HistorySyncNotification fileEncSha256 */ + fileEncSha256?: (Uint8Array|null); + + /** HistorySyncNotification directPath */ + directPath?: (string|null); + + /** HistorySyncNotification syncType */ + syncType?: (proto.HistorySyncNotification.HistorySyncNotificationHistorySyncType|null); + + /** HistorySyncNotification chunkOrder */ + chunkOrder?: (number|null); + + /** HistorySyncNotification originalMessageId */ + originalMessageId?: (string|null); + } + + /** Represents a HistorySyncNotification. */ + class HistorySyncNotification implements IHistorySyncNotification { + + /** + * Constructs a new HistorySyncNotification. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IHistorySyncNotification); + + /** HistorySyncNotification fileSha256. */ + public fileSha256: Uint8Array; + + /** HistorySyncNotification fileLength. */ + public fileLength: (number|Long); + + /** HistorySyncNotification mediaKey. */ + public mediaKey: Uint8Array; + + /** HistorySyncNotification fileEncSha256. */ + public fileEncSha256: Uint8Array; + + /** HistorySyncNotification directPath. */ + public directPath: string; + + /** HistorySyncNotification syncType. */ + public syncType: proto.HistorySyncNotification.HistorySyncNotificationHistorySyncType; + + /** HistorySyncNotification chunkOrder. */ + public chunkOrder: number; + + /** HistorySyncNotification originalMessageId. */ + public originalMessageId: string; + + /** + * Creates a new HistorySyncNotification instance using the specified properties. + * @param [properties] Properties to set + * @returns HistorySyncNotification instance + */ + public static create(properties?: proto.IHistorySyncNotification): proto.HistorySyncNotification; + + /** + * Encodes the specified HistorySyncNotification message. Does not implicitly {@link proto.HistorySyncNotification.verify|verify} messages. + * @param message HistorySyncNotification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IHistorySyncNotification, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HistorySyncNotification message, length delimited. Does not implicitly {@link proto.HistorySyncNotification.verify|verify} messages. + * @param message HistorySyncNotification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IHistorySyncNotification, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HistorySyncNotification message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HistorySyncNotification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.HistorySyncNotification; + + /** + * Decodes a HistorySyncNotification message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HistorySyncNotification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.HistorySyncNotification; + + /** + * Verifies a HistorySyncNotification message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HistorySyncNotification message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HistorySyncNotification + */ + public static fromObject(object: { [k: string]: any }): proto.HistorySyncNotification; + + /** + * Creates a plain object from a HistorySyncNotification message. Also converts values to other types if specified. + * @param message HistorySyncNotification + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.HistorySyncNotification, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HistorySyncNotification to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace HistorySyncNotification { + + /** HistorySyncNotificationHistorySyncType enum. */ + enum HistorySyncNotificationHistorySyncType { + INITIAL_BOOTSTRAP = 0, + INITIAL_STATUS_V3 = 1, + FULL = 2, + RECENT = 3, + PUSH_NAME = 4 + } + } + /** Properties of a HydratedCallButton. */ interface IHydratedCallButton { @@ -6278,6 +10008,102 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of an IdentityKeyPairStructure. */ + interface IIdentityKeyPairStructure { + + /** IdentityKeyPairStructure publicKey */ + publicKey?: (Uint8Array|null); + + /** IdentityKeyPairStructure privateKey */ + privateKey?: (Uint8Array|null); + } + + /** Represents an IdentityKeyPairStructure. */ + class IdentityKeyPairStructure implements IIdentityKeyPairStructure { + + /** + * Constructs a new IdentityKeyPairStructure. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IIdentityKeyPairStructure); + + /** IdentityKeyPairStructure publicKey. */ + public publicKey: Uint8Array; + + /** IdentityKeyPairStructure privateKey. */ + public privateKey: Uint8Array; + + /** + * Creates a new IdentityKeyPairStructure instance using the specified properties. + * @param [properties] Properties to set + * @returns IdentityKeyPairStructure instance + */ + public static create(properties?: proto.IIdentityKeyPairStructure): proto.IdentityKeyPairStructure; + + /** + * Encodes the specified IdentityKeyPairStructure message. Does not implicitly {@link proto.IdentityKeyPairStructure.verify|verify} messages. + * @param message IdentityKeyPairStructure message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IIdentityKeyPairStructure, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IdentityKeyPairStructure message, length delimited. Does not implicitly {@link proto.IdentityKeyPairStructure.verify|verify} messages. + * @param message IdentityKeyPairStructure message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IIdentityKeyPairStructure, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IdentityKeyPairStructure message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IdentityKeyPairStructure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.IdentityKeyPairStructure; + + /** + * Decodes an IdentityKeyPairStructure message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IdentityKeyPairStructure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.IdentityKeyPairStructure; + + /** + * Verifies an IdentityKeyPairStructure message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an IdentityKeyPairStructure message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IdentityKeyPairStructure + */ + public static fromObject(object: { [k: string]: any }): proto.IdentityKeyPairStructure; + + /** + * Creates a plain object from an IdentityKeyPairStructure message. Also converts values to other types if specified. + * @param message IdentityKeyPairStructure + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.IdentityKeyPairStructure, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IdentityKeyPairStructure to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of an ImageMessage. */ interface IImageMessage { @@ -7274,6 +11100,595 @@ export namespace proto { } } + /** Properties of a KeepInChat. */ + interface IKeepInChat { + + /** KeepInChat keepType */ + keepType?: (proto.KeepType|null); + + /** KeepInChat serverTimestamp */ + serverTimestamp?: (number|Long|null); + + /** KeepInChat deviceJid */ + deviceJid?: (string|null); + } + + /** Represents a KeepInChat. */ + class KeepInChat implements IKeepInChat { + + /** + * Constructs a new KeepInChat. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IKeepInChat); + + /** KeepInChat keepType. */ + public keepType: proto.KeepType; + + /** KeepInChat serverTimestamp. */ + public serverTimestamp: (number|Long); + + /** KeepInChat deviceJid. */ + public deviceJid: string; + + /** + * Creates a new KeepInChat instance using the specified properties. + * @param [properties] Properties to set + * @returns KeepInChat instance + */ + public static create(properties?: proto.IKeepInChat): proto.KeepInChat; + + /** + * Encodes the specified KeepInChat message. Does not implicitly {@link proto.KeepInChat.verify|verify} messages. + * @param message KeepInChat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IKeepInChat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KeepInChat message, length delimited. Does not implicitly {@link proto.KeepInChat.verify|verify} messages. + * @param message KeepInChat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IKeepInChat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KeepInChat message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KeepInChat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.KeepInChat; + + /** + * Decodes a KeepInChat message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KeepInChat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.KeepInChat; + + /** + * Verifies a KeepInChat message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a KeepInChat message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KeepInChat + */ + public static fromObject(object: { [k: string]: any }): proto.KeepInChat; + + /** + * Creates a plain object from a KeepInChat message. Also converts values to other types if specified. + * @param message KeepInChat + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.KeepInChat, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KeepInChat to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a KeepInChatMessage. */ + interface IKeepInChatMessage { + + /** KeepInChatMessage key */ + key?: (proto.IMessageKey|null); + + /** KeepInChatMessage keepType */ + keepType?: (proto.KeepType|null); + + /** KeepInChatMessage timestampMs */ + timestampMs?: (number|Long|null); + } + + /** Represents a KeepInChatMessage. */ + class KeepInChatMessage implements IKeepInChatMessage { + + /** + * Constructs a new KeepInChatMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IKeepInChatMessage); + + /** KeepInChatMessage key. */ + public key?: (proto.IMessageKey|null); + + /** KeepInChatMessage keepType. */ + public keepType: proto.KeepType; + + /** KeepInChatMessage timestampMs. */ + public timestampMs: (number|Long); + + /** + * Creates a new KeepInChatMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns KeepInChatMessage instance + */ + public static create(properties?: proto.IKeepInChatMessage): proto.KeepInChatMessage; + + /** + * Encodes the specified KeepInChatMessage message. Does not implicitly {@link proto.KeepInChatMessage.verify|verify} messages. + * @param message KeepInChatMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IKeepInChatMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KeepInChatMessage message, length delimited. Does not implicitly {@link proto.KeepInChatMessage.verify|verify} messages. + * @param message KeepInChatMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IKeepInChatMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KeepInChatMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KeepInChatMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.KeepInChatMessage; + + /** + * Decodes a KeepInChatMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KeepInChatMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.KeepInChatMessage; + + /** + * Verifies a KeepInChatMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a KeepInChatMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KeepInChatMessage + */ + public static fromObject(object: { [k: string]: any }): proto.KeepInChatMessage; + + /** + * Creates a plain object from a KeepInChatMessage message. Also converts values to other types if specified. + * @param message KeepInChatMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.KeepInChatMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KeepInChatMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** KeepType enum. */ + enum KeepType { + UNKNOWN = 0, + KEEP_FOR_ALL = 1, + UNDO_KEEP_FOR_ALL = 2 + } + + /** Properties of a KeyExpiration. */ + interface IKeyExpiration { + + /** KeyExpiration expiredKeyEpoch */ + expiredKeyEpoch?: (number|null); + } + + /** Represents a KeyExpiration. */ + class KeyExpiration implements IKeyExpiration { + + /** + * Constructs a new KeyExpiration. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IKeyExpiration); + + /** KeyExpiration expiredKeyEpoch. */ + public expiredKeyEpoch: number; + + /** + * Creates a new KeyExpiration instance using the specified properties. + * @param [properties] Properties to set + * @returns KeyExpiration instance + */ + public static create(properties?: proto.IKeyExpiration): proto.KeyExpiration; + + /** + * Encodes the specified KeyExpiration message. Does not implicitly {@link proto.KeyExpiration.verify|verify} messages. + * @param message KeyExpiration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IKeyExpiration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KeyExpiration message, length delimited. Does not implicitly {@link proto.KeyExpiration.verify|verify} messages. + * @param message KeyExpiration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IKeyExpiration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KeyExpiration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KeyExpiration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.KeyExpiration; + + /** + * Decodes a KeyExpiration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KeyExpiration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.KeyExpiration; + + /** + * Verifies a KeyExpiration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a KeyExpiration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KeyExpiration + */ + public static fromObject(object: { [k: string]: any }): proto.KeyExpiration; + + /** + * Creates a plain object from a KeyExpiration message. Also converts values to other types if specified. + * @param message KeyExpiration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.KeyExpiration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KeyExpiration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a KeyId. */ + interface IKeyId { + + /** KeyId id */ + id?: (Uint8Array|null); + } + + /** Represents a KeyId. */ + class KeyId implements IKeyId { + + /** + * Constructs a new KeyId. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IKeyId); + + /** KeyId id. */ + public id: Uint8Array; + + /** + * Creates a new KeyId instance using the specified properties. + * @param [properties] Properties to set + * @returns KeyId instance + */ + public static create(properties?: proto.IKeyId): proto.KeyId; + + /** + * Encodes the specified KeyId message. Does not implicitly {@link proto.KeyId.verify|verify} messages. + * @param message KeyId message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IKeyId, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KeyId message, length delimited. Does not implicitly {@link proto.KeyId.verify|verify} messages. + * @param message KeyId message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IKeyId, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KeyId message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KeyId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.KeyId; + + /** + * Decodes a KeyId message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KeyId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.KeyId; + + /** + * Verifies a KeyId message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a KeyId message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KeyId + */ + public static fromObject(object: { [k: string]: any }): proto.KeyId; + + /** + * Creates a plain object from a KeyId message. Also converts values to other types if specified. + * @param message KeyId + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.KeyId, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KeyId to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a LabelAssociationAction. */ + interface ILabelAssociationAction { + + /** LabelAssociationAction labeled */ + labeled?: (boolean|null); + } + + /** Represents a LabelAssociationAction. */ + class LabelAssociationAction implements ILabelAssociationAction { + + /** + * Constructs a new LabelAssociationAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ILabelAssociationAction); + + /** LabelAssociationAction labeled. */ + public labeled: boolean; + + /** + * Creates a new LabelAssociationAction instance using the specified properties. + * @param [properties] Properties to set + * @returns LabelAssociationAction instance + */ + public static create(properties?: proto.ILabelAssociationAction): proto.LabelAssociationAction; + + /** + * Encodes the specified LabelAssociationAction message. Does not implicitly {@link proto.LabelAssociationAction.verify|verify} messages. + * @param message LabelAssociationAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ILabelAssociationAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LabelAssociationAction message, length delimited. Does not implicitly {@link proto.LabelAssociationAction.verify|verify} messages. + * @param message LabelAssociationAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ILabelAssociationAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LabelAssociationAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LabelAssociationAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.LabelAssociationAction; + + /** + * Decodes a LabelAssociationAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LabelAssociationAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.LabelAssociationAction; + + /** + * Verifies a LabelAssociationAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LabelAssociationAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LabelAssociationAction + */ + public static fromObject(object: { [k: string]: any }): proto.LabelAssociationAction; + + /** + * Creates a plain object from a LabelAssociationAction message. Also converts values to other types if specified. + * @param message LabelAssociationAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.LabelAssociationAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LabelAssociationAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a LabelEditAction. */ + interface ILabelEditAction { + + /** LabelEditAction name */ + name?: (string|null); + + /** LabelEditAction color */ + color?: (number|null); + + /** LabelEditAction predefinedId */ + predefinedId?: (number|null); + + /** LabelEditAction deleted */ + deleted?: (boolean|null); + } + + /** Represents a LabelEditAction. */ + class LabelEditAction implements ILabelEditAction { + + /** + * Constructs a new LabelEditAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ILabelEditAction); + + /** LabelEditAction name. */ + public name: string; + + /** LabelEditAction color. */ + public color: number; + + /** LabelEditAction predefinedId. */ + public predefinedId: number; + + /** LabelEditAction deleted. */ + public deleted: boolean; + + /** + * Creates a new LabelEditAction instance using the specified properties. + * @param [properties] Properties to set + * @returns LabelEditAction instance + */ + public static create(properties?: proto.ILabelEditAction): proto.LabelEditAction; + + /** + * Encodes the specified LabelEditAction message. Does not implicitly {@link proto.LabelEditAction.verify|verify} messages. + * @param message LabelEditAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ILabelEditAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LabelEditAction message, length delimited. Does not implicitly {@link proto.LabelEditAction.verify|verify} messages. + * @param message LabelEditAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ILabelEditAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LabelEditAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LabelEditAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.LabelEditAction; + + /** + * Decodes a LabelEditAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LabelEditAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.LabelEditAction; + + /** + * Verifies a LabelEditAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LabelEditAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LabelEditAction + */ + public static fromObject(object: { [k: string]: any }): proto.LabelEditAction; + + /** + * Creates a plain object from a LabelEditAction message. Also converts values to other types if specified. + * @param message LabelEditAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.LabelEditAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LabelEditAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a ListMessage. */ interface IListMessage { @@ -7683,6 +12098,198 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a LocaleSetting. */ + interface ILocaleSetting { + + /** LocaleSetting locale */ + locale?: (string|null); + } + + /** Represents a LocaleSetting. */ + class LocaleSetting implements ILocaleSetting { + + /** + * Constructs a new LocaleSetting. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ILocaleSetting); + + /** LocaleSetting locale. */ + public locale: string; + + /** + * Creates a new LocaleSetting instance using the specified properties. + * @param [properties] Properties to set + * @returns LocaleSetting instance + */ + public static create(properties?: proto.ILocaleSetting): proto.LocaleSetting; + + /** + * Encodes the specified LocaleSetting message. Does not implicitly {@link proto.LocaleSetting.verify|verify} messages. + * @param message LocaleSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ILocaleSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LocaleSetting message, length delimited. Does not implicitly {@link proto.LocaleSetting.verify|verify} messages. + * @param message LocaleSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ILocaleSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LocaleSetting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LocaleSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.LocaleSetting; + + /** + * Decodes a LocaleSetting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LocaleSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.LocaleSetting; + + /** + * Verifies a LocaleSetting message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LocaleSetting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LocaleSetting + */ + public static fromObject(object: { [k: string]: any }): proto.LocaleSetting; + + /** + * Creates a plain object from a LocaleSetting message. Also converts values to other types if specified. + * @param message LocaleSetting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.LocaleSetting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LocaleSetting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a LocalizedName. */ + interface ILocalizedName { + + /** LocalizedName lg */ + lg?: (string|null); + + /** LocalizedName lc */ + lc?: (string|null); + + /** LocalizedName verifiedName */ + verifiedName?: (string|null); + } + + /** Represents a LocalizedName. */ + class LocalizedName implements ILocalizedName { + + /** + * Constructs a new LocalizedName. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ILocalizedName); + + /** LocalizedName lg. */ + public lg: string; + + /** LocalizedName lc. */ + public lc: string; + + /** LocalizedName verifiedName. */ + public verifiedName: string; + + /** + * Creates a new LocalizedName instance using the specified properties. + * @param [properties] Properties to set + * @returns LocalizedName instance + */ + public static create(properties?: proto.ILocalizedName): proto.LocalizedName; + + /** + * Encodes the specified LocalizedName message. Does not implicitly {@link proto.LocalizedName.verify|verify} messages. + * @param message LocalizedName message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ILocalizedName, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LocalizedName message, length delimited. Does not implicitly {@link proto.LocalizedName.verify|verify} messages. + * @param message LocalizedName message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ILocalizedName, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LocalizedName message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LocalizedName + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.LocalizedName; + + /** + * Decodes a LocalizedName message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LocalizedName + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.LocalizedName; + + /** + * Verifies a LocalizedName message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LocalizedName message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LocalizedName + */ + public static fromObject(object: { [k: string]: any }): proto.LocalizedName; + + /** + * Creates a plain object from a LocalizedName message. Also converts values to other types if specified. + * @param message LocalizedName + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.LocalizedName, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LocalizedName to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a Location. */ interface ILocation { @@ -7941,6 +12548,312 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a MarkChatAsReadAction. */ + interface IMarkChatAsReadAction { + + /** MarkChatAsReadAction read */ + read?: (boolean|null); + + /** MarkChatAsReadAction messageRange */ + messageRange?: (proto.ISyncActionMessageRange|null); + } + + /** Represents a MarkChatAsReadAction. */ + class MarkChatAsReadAction implements IMarkChatAsReadAction { + + /** + * Constructs a new MarkChatAsReadAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IMarkChatAsReadAction); + + /** MarkChatAsReadAction read. */ + public read: boolean; + + /** MarkChatAsReadAction messageRange. */ + public messageRange?: (proto.ISyncActionMessageRange|null); + + /** + * Creates a new MarkChatAsReadAction instance using the specified properties. + * @param [properties] Properties to set + * @returns MarkChatAsReadAction instance + */ + public static create(properties?: proto.IMarkChatAsReadAction): proto.MarkChatAsReadAction; + + /** + * Encodes the specified MarkChatAsReadAction message. Does not implicitly {@link proto.MarkChatAsReadAction.verify|verify} messages. + * @param message MarkChatAsReadAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IMarkChatAsReadAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MarkChatAsReadAction message, length delimited. Does not implicitly {@link proto.MarkChatAsReadAction.verify|verify} messages. + * @param message MarkChatAsReadAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IMarkChatAsReadAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MarkChatAsReadAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MarkChatAsReadAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.MarkChatAsReadAction; + + /** + * Decodes a MarkChatAsReadAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MarkChatAsReadAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.MarkChatAsReadAction; + + /** + * Verifies a MarkChatAsReadAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MarkChatAsReadAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MarkChatAsReadAction + */ + public static fromObject(object: { [k: string]: any }): proto.MarkChatAsReadAction; + + /** + * Creates a plain object from a MarkChatAsReadAction message. Also converts values to other types if specified. + * @param message MarkChatAsReadAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.MarkChatAsReadAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MarkChatAsReadAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MediaData. */ + interface IMediaData { + + /** MediaData localPath */ + localPath?: (string|null); + } + + /** Represents a MediaData. */ + class MediaData implements IMediaData { + + /** + * Constructs a new MediaData. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IMediaData); + + /** MediaData localPath. */ + public localPath: string; + + /** + * Creates a new MediaData instance using the specified properties. + * @param [properties] Properties to set + * @returns MediaData instance + */ + public static create(properties?: proto.IMediaData): proto.MediaData; + + /** + * Encodes the specified MediaData message. Does not implicitly {@link proto.MediaData.verify|verify} messages. + * @param message MediaData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IMediaData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MediaData message, length delimited. Does not implicitly {@link proto.MediaData.verify|verify} messages. + * @param message MediaData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IMediaData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MediaData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MediaData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.MediaData; + + /** + * Decodes a MediaData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MediaData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.MediaData; + + /** + * Verifies a MediaData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MediaData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MediaData + */ + public static fromObject(object: { [k: string]: any }): proto.MediaData; + + /** + * Creates a plain object from a MediaData message. Also converts values to other types if specified. + * @param message MediaData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.MediaData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MediaData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MediaRetryNotification. */ + interface IMediaRetryNotification { + + /** MediaRetryNotification stanzaId */ + stanzaId?: (string|null); + + /** MediaRetryNotification directPath */ + directPath?: (string|null); + + /** MediaRetryNotification result */ + result?: (proto.MediaRetryNotification.MediaRetryNotificationResultType|null); + } + + /** Represents a MediaRetryNotification. */ + class MediaRetryNotification implements IMediaRetryNotification { + + /** + * Constructs a new MediaRetryNotification. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IMediaRetryNotification); + + /** MediaRetryNotification stanzaId. */ + public stanzaId: string; + + /** MediaRetryNotification directPath. */ + public directPath: string; + + /** MediaRetryNotification result. */ + public result: proto.MediaRetryNotification.MediaRetryNotificationResultType; + + /** + * Creates a new MediaRetryNotification instance using the specified properties. + * @param [properties] Properties to set + * @returns MediaRetryNotification instance + */ + public static create(properties?: proto.IMediaRetryNotification): proto.MediaRetryNotification; + + /** + * Encodes the specified MediaRetryNotification message. Does not implicitly {@link proto.MediaRetryNotification.verify|verify} messages. + * @param message MediaRetryNotification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IMediaRetryNotification, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MediaRetryNotification message, length delimited. Does not implicitly {@link proto.MediaRetryNotification.verify|verify} messages. + * @param message MediaRetryNotification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IMediaRetryNotification, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MediaRetryNotification message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MediaRetryNotification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.MediaRetryNotification; + + /** + * Decodes a MediaRetryNotification message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MediaRetryNotification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.MediaRetryNotification; + + /** + * Verifies a MediaRetryNotification message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MediaRetryNotification message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MediaRetryNotification + */ + public static fromObject(object: { [k: string]: any }): proto.MediaRetryNotification; + + /** + * Creates a plain object from a MediaRetryNotification message. Also converts values to other types if specified. + * @param message MediaRetryNotification + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.MediaRetryNotification, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MediaRetryNotification to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace MediaRetryNotification { + + /** MediaRetryNotificationResultType enum. */ + enum MediaRetryNotificationResultType { + GENERAL_ERROR = 0, + SUCCESS = 1, + NOT_FOUND = 2, + DECRYPTION_ERROR = 3 + } + } + + /** MediaVisibility enum. */ + enum MediaVisibility { + DEFAULT = 0, + OFF = 1, + ON = 2 + } + /** Properties of a Message. */ interface IMessage { @@ -8069,6 +12982,9 @@ export namespace proto { /** Message pollUpdateMessage */ pollUpdateMessage?: (proto.IPollUpdateMessage|null); + + /** Message keepInChatMessage */ + keepInChatMessage?: (proto.IKeepInChatMessage|null); } /** Represents a Message. */ @@ -8206,6 +13122,9 @@ export namespace proto { /** Message pollUpdateMessage. */ public pollUpdateMessage?: (proto.IPollUpdateMessage|null); + /** Message keepInChatMessage. */ + public keepInChatMessage?: (proto.IKeepInChatMessage|null); + /** * Creates a new Message instance using the specified properties. * @param [properties] Properties to set @@ -8285,6 +13204,12 @@ export namespace proto { /** MessageContextInfo deviceListMetadataVersion */ deviceListMetadataVersion?: (number|null); + + /** MessageContextInfo messageSecret */ + messageSecret?: (Uint8Array|null); + + /** MessageContextInfo paddingBytes */ + paddingBytes?: (Uint8Array|null); } /** Represents a MessageContextInfo. */ @@ -8302,6 +13227,12 @@ export namespace proto { /** MessageContextInfo deviceListMetadataVersion. */ public deviceListMetadataVersion: number; + /** MessageContextInfo messageSecret. */ + public messageSecret: Uint8Array; + + /** MessageContextInfo paddingBytes. */ + public paddingBytes: Uint8Array; + /** * Creates a new MessageContextInfo instance using the specified properties. * @param [properties] Properties to set @@ -8373,6 +13304,114 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a MessageKey. */ + interface IMessageKey { + + /** MessageKey remoteJid */ + remoteJid?: (string|null); + + /** MessageKey fromMe */ + fromMe?: (boolean|null); + + /** MessageKey id */ + id?: (string|null); + + /** MessageKey participant */ + participant?: (string|null); + } + + /** Represents a MessageKey. */ + class MessageKey implements IMessageKey { + + /** + * Constructs a new MessageKey. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IMessageKey); + + /** MessageKey remoteJid. */ + public remoteJid: string; + + /** MessageKey fromMe. */ + public fromMe: boolean; + + /** MessageKey id. */ + public id: string; + + /** MessageKey participant. */ + public participant: string; + + /** + * Creates a new MessageKey instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageKey instance + */ + public static create(properties?: proto.IMessageKey): proto.MessageKey; + + /** + * Encodes the specified MessageKey message. Does not implicitly {@link proto.MessageKey.verify|verify} messages. + * @param message MessageKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IMessageKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageKey message, length delimited. Does not implicitly {@link proto.MessageKey.verify|verify} messages. + * @param message MessageKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IMessageKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageKey message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.MessageKey; + + /** + * Decodes a MessageKey message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.MessageKey; + + /** + * Verifies a MessageKey message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageKey message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageKey + */ + public static fromObject(object: { [k: string]: any }): proto.MessageKey; + + /** + * Creates a plain object from a MessageKey message. Also converts values to other types if specified. + * @param message MessageKey + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.MessageKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageKey to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a Money. */ interface IMoney { @@ -8475,6 +13514,390 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a MsgOpaqueData. */ + interface IMsgOpaqueData { + + /** MsgOpaqueData body */ + body?: (string|null); + + /** MsgOpaqueData caption */ + caption?: (string|null); + + /** MsgOpaqueData lng */ + lng?: (number|null); + + /** MsgOpaqueData isLive */ + isLive?: (boolean|null); + + /** MsgOpaqueData lat */ + lat?: (number|null); + + /** MsgOpaqueData paymentAmount1000 */ + paymentAmount1000?: (number|null); + + /** MsgOpaqueData paymentNoteMsgBody */ + paymentNoteMsgBody?: (string|null); + + /** MsgOpaqueData canonicalUrl */ + canonicalUrl?: (string|null); + + /** MsgOpaqueData matchedText */ + matchedText?: (string|null); + + /** MsgOpaqueData title */ + title?: (string|null); + + /** MsgOpaqueData description */ + description?: (string|null); + + /** MsgOpaqueData futureproofBuffer */ + futureproofBuffer?: (Uint8Array|null); + + /** MsgOpaqueData clientUrl */ + clientUrl?: (string|null); + + /** MsgOpaqueData loc */ + loc?: (string|null); + + /** MsgOpaqueData pollName */ + pollName?: (string|null); + + /** MsgOpaqueData pollOptions */ + pollOptions?: (proto.IPollOption[]|null); + + /** MsgOpaqueData pollSelectableOptionsCount */ + pollSelectableOptionsCount?: (number|null); + + /** MsgOpaqueData messageSecret */ + messageSecret?: (Uint8Array|null); + } + + /** Represents a MsgOpaqueData. */ + class MsgOpaqueData implements IMsgOpaqueData { + + /** + * Constructs a new MsgOpaqueData. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IMsgOpaqueData); + + /** MsgOpaqueData body. */ + public body: string; + + /** MsgOpaqueData caption. */ + public caption: string; + + /** MsgOpaqueData lng. */ + public lng: number; + + /** MsgOpaqueData isLive. */ + public isLive: boolean; + + /** MsgOpaqueData lat. */ + public lat: number; + + /** MsgOpaqueData paymentAmount1000. */ + public paymentAmount1000: number; + + /** MsgOpaqueData paymentNoteMsgBody. */ + public paymentNoteMsgBody: string; + + /** MsgOpaqueData canonicalUrl. */ + public canonicalUrl: string; + + /** MsgOpaqueData matchedText. */ + public matchedText: string; + + /** MsgOpaqueData title. */ + public title: string; + + /** MsgOpaqueData description. */ + public description: string; + + /** MsgOpaqueData futureproofBuffer. */ + public futureproofBuffer: Uint8Array; + + /** MsgOpaqueData clientUrl. */ + public clientUrl: string; + + /** MsgOpaqueData loc. */ + public loc: string; + + /** MsgOpaqueData pollName. */ + public pollName: string; + + /** MsgOpaqueData pollOptions. */ + public pollOptions: proto.IPollOption[]; + + /** MsgOpaqueData pollSelectableOptionsCount. */ + public pollSelectableOptionsCount: number; + + /** MsgOpaqueData messageSecret. */ + public messageSecret: Uint8Array; + + /** + * Creates a new MsgOpaqueData instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgOpaqueData instance + */ + public static create(properties?: proto.IMsgOpaqueData): proto.MsgOpaqueData; + + /** + * Encodes the specified MsgOpaqueData message. Does not implicitly {@link proto.MsgOpaqueData.verify|verify} messages. + * @param message MsgOpaqueData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IMsgOpaqueData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MsgOpaqueData message, length delimited. Does not implicitly {@link proto.MsgOpaqueData.verify|verify} messages. + * @param message MsgOpaqueData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IMsgOpaqueData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgOpaqueData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgOpaqueData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.MsgOpaqueData; + + /** + * Decodes a MsgOpaqueData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgOpaqueData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.MsgOpaqueData; + + /** + * Verifies a MsgOpaqueData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MsgOpaqueData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgOpaqueData + */ + public static fromObject(object: { [k: string]: any }): proto.MsgOpaqueData; + + /** + * Creates a plain object from a MsgOpaqueData message. Also converts values to other types if specified. + * @param message MsgOpaqueData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.MsgOpaqueData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MsgOpaqueData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgRowOpaqueData. */ + interface IMsgRowOpaqueData { + + /** MsgRowOpaqueData currentMsg */ + currentMsg?: (proto.IMsgOpaqueData|null); + + /** MsgRowOpaqueData quotedMsg */ + quotedMsg?: (proto.IMsgOpaqueData|null); + } + + /** Represents a MsgRowOpaqueData. */ + class MsgRowOpaqueData implements IMsgRowOpaqueData { + + /** + * Constructs a new MsgRowOpaqueData. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IMsgRowOpaqueData); + + /** MsgRowOpaqueData currentMsg. */ + public currentMsg?: (proto.IMsgOpaqueData|null); + + /** MsgRowOpaqueData quotedMsg. */ + public quotedMsg?: (proto.IMsgOpaqueData|null); + + /** + * Creates a new MsgRowOpaqueData instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgRowOpaqueData instance + */ + public static create(properties?: proto.IMsgRowOpaqueData): proto.MsgRowOpaqueData; + + /** + * Encodes the specified MsgRowOpaqueData message. Does not implicitly {@link proto.MsgRowOpaqueData.verify|verify} messages. + * @param message MsgRowOpaqueData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IMsgRowOpaqueData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MsgRowOpaqueData message, length delimited. Does not implicitly {@link proto.MsgRowOpaqueData.verify|verify} messages. + * @param message MsgRowOpaqueData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IMsgRowOpaqueData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgRowOpaqueData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgRowOpaqueData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.MsgRowOpaqueData; + + /** + * Decodes a MsgRowOpaqueData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgRowOpaqueData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.MsgRowOpaqueData; + + /** + * Verifies a MsgRowOpaqueData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MsgRowOpaqueData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgRowOpaqueData + */ + public static fromObject(object: { [k: string]: any }): proto.MsgRowOpaqueData; + + /** + * Creates a plain object from a MsgRowOpaqueData message. Also converts values to other types if specified. + * @param message MsgRowOpaqueData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.MsgRowOpaqueData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MsgRowOpaqueData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MuteAction. */ + interface IMuteAction { + + /** MuteAction muted */ + muted?: (boolean|null); + + /** MuteAction muteEndTimestamp */ + muteEndTimestamp?: (number|Long|null); + } + + /** Represents a MuteAction. */ + class MuteAction implements IMuteAction { + + /** + * Constructs a new MuteAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IMuteAction); + + /** MuteAction muted. */ + public muted: boolean; + + /** MuteAction muteEndTimestamp. */ + public muteEndTimestamp: (number|Long); + + /** + * Creates a new MuteAction instance using the specified properties. + * @param [properties] Properties to set + * @returns MuteAction instance + */ + public static create(properties?: proto.IMuteAction): proto.MuteAction; + + /** + * Encodes the specified MuteAction message. Does not implicitly {@link proto.MuteAction.verify|verify} messages. + * @param message MuteAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IMuteAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MuteAction message, length delimited. Does not implicitly {@link proto.MuteAction.verify|verify} messages. + * @param message MuteAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IMuteAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MuteAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MuteAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.MuteAction; + + /** + * Decodes a MuteAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MuteAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.MuteAction; + + /** + * Verifies a MuteAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MuteAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MuteAction + */ + public static fromObject(object: { [k: string]: any }): proto.MuteAction; + + /** + * Creates a plain object from a MuteAction message. Also converts values to other types if specified. + * @param message MuteAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.MuteAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MuteAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a NativeFlowButton. */ interface INativeFlowButton { @@ -8871,6 +14294,324 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a NoiseCertificate. */ + interface INoiseCertificate { + + /** NoiseCertificate details */ + details?: (Uint8Array|null); + + /** NoiseCertificate signature */ + signature?: (Uint8Array|null); + } + + /** Represents a NoiseCertificate. */ + class NoiseCertificate implements INoiseCertificate { + + /** + * Constructs a new NoiseCertificate. + * @param [properties] Properties to set + */ + constructor(properties?: proto.INoiseCertificate); + + /** NoiseCertificate details. */ + public details: Uint8Array; + + /** NoiseCertificate signature. */ + public signature: Uint8Array; + + /** + * Creates a new NoiseCertificate instance using the specified properties. + * @param [properties] Properties to set + * @returns NoiseCertificate instance + */ + public static create(properties?: proto.INoiseCertificate): proto.NoiseCertificate; + + /** + * Encodes the specified NoiseCertificate message. Does not implicitly {@link proto.NoiseCertificate.verify|verify} messages. + * @param message NoiseCertificate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.INoiseCertificate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NoiseCertificate message, length delimited. Does not implicitly {@link proto.NoiseCertificate.verify|verify} messages. + * @param message NoiseCertificate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.INoiseCertificate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NoiseCertificate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NoiseCertificate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.NoiseCertificate; + + /** + * Decodes a NoiseCertificate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NoiseCertificate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.NoiseCertificate; + + /** + * Verifies a NoiseCertificate message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NoiseCertificate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NoiseCertificate + */ + public static fromObject(object: { [k: string]: any }): proto.NoiseCertificate; + + /** + * Creates a plain object from a NoiseCertificate message. Also converts values to other types if specified. + * @param message NoiseCertificate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.NoiseCertificate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NoiseCertificate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a NoiseCertificateDetails. */ + interface INoiseCertificateDetails { + + /** NoiseCertificateDetails serial */ + serial?: (number|null); + + /** NoiseCertificateDetails issuer */ + issuer?: (string|null); + + /** NoiseCertificateDetails expires */ + expires?: (number|Long|null); + + /** NoiseCertificateDetails subject */ + subject?: (string|null); + + /** NoiseCertificateDetails key */ + key?: (Uint8Array|null); + } + + /** Represents a NoiseCertificateDetails. */ + class NoiseCertificateDetails implements INoiseCertificateDetails { + + /** + * Constructs a new NoiseCertificateDetails. + * @param [properties] Properties to set + */ + constructor(properties?: proto.INoiseCertificateDetails); + + /** NoiseCertificateDetails serial. */ + public serial: number; + + /** NoiseCertificateDetails issuer. */ + public issuer: string; + + /** NoiseCertificateDetails expires. */ + public expires: (number|Long); + + /** NoiseCertificateDetails subject. */ + public subject: string; + + /** NoiseCertificateDetails key. */ + public key: Uint8Array; + + /** + * Creates a new NoiseCertificateDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns NoiseCertificateDetails instance + */ + public static create(properties?: proto.INoiseCertificateDetails): proto.NoiseCertificateDetails; + + /** + * Encodes the specified NoiseCertificateDetails message. Does not implicitly {@link proto.NoiseCertificateDetails.verify|verify} messages. + * @param message NoiseCertificateDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.INoiseCertificateDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NoiseCertificateDetails message, length delimited. Does not implicitly {@link proto.NoiseCertificateDetails.verify|verify} messages. + * @param message NoiseCertificateDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.INoiseCertificateDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NoiseCertificateDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NoiseCertificateDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.NoiseCertificateDetails; + + /** + * Decodes a NoiseCertificateDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NoiseCertificateDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.NoiseCertificateDetails; + + /** + * Verifies a NoiseCertificateDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NoiseCertificateDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NoiseCertificateDetails + */ + public static fromObject(object: { [k: string]: any }): proto.NoiseCertificateDetails; + + /** + * Creates a plain object from a NoiseCertificateDetails message. Also converts values to other types if specified. + * @param message NoiseCertificateDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.NoiseCertificateDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NoiseCertificateDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a NotificationMessageInfo. */ + interface INotificationMessageInfo { + + /** NotificationMessageInfo key */ + key?: (proto.IMessageKey|null); + + /** NotificationMessageInfo message */ + message?: (proto.IMessage|null); + + /** NotificationMessageInfo messageTimestamp */ + messageTimestamp?: (number|Long|null); + + /** NotificationMessageInfo participant */ + participant?: (string|null); + } + + /** Represents a NotificationMessageInfo. */ + class NotificationMessageInfo implements INotificationMessageInfo { + + /** + * Constructs a new NotificationMessageInfo. + * @param [properties] Properties to set + */ + constructor(properties?: proto.INotificationMessageInfo); + + /** NotificationMessageInfo key. */ + public key?: (proto.IMessageKey|null); + + /** NotificationMessageInfo message. */ + public message?: (proto.IMessage|null); + + /** NotificationMessageInfo messageTimestamp. */ + public messageTimestamp: (number|Long); + + /** NotificationMessageInfo participant. */ + public participant: string; + + /** + * Creates a new NotificationMessageInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns NotificationMessageInfo instance + */ + public static create(properties?: proto.INotificationMessageInfo): proto.NotificationMessageInfo; + + /** + * Encodes the specified NotificationMessageInfo message. Does not implicitly {@link proto.NotificationMessageInfo.verify|verify} messages. + * @param message NotificationMessageInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.INotificationMessageInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NotificationMessageInfo message, length delimited. Does not implicitly {@link proto.NotificationMessageInfo.verify|verify} messages. + * @param message NotificationMessageInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.INotificationMessageInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NotificationMessageInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NotificationMessageInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.NotificationMessageInfo; + + /** + * Decodes a NotificationMessageInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NotificationMessageInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.NotificationMessageInfo; + + /** + * Verifies a NotificationMessageInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NotificationMessageInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NotificationMessageInfo + */ + public static fromObject(object: { [k: string]: any }): proto.NotificationMessageInfo; + + /** + * Creates a plain object from a NotificationMessageInfo message. Also converts values to other types if specified. + * @param message NotificationMessageInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.NotificationMessageInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NotificationMessageInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of an Option. */ interface IOption { @@ -9130,6 +14871,120 @@ export namespace proto { } } + /** Properties of a PBMediaData. */ + interface IPBMediaData { + + /** PBMediaData mediaKey */ + mediaKey?: (Uint8Array|null); + + /** PBMediaData mediaKeyTimestamp */ + mediaKeyTimestamp?: (number|Long|null); + + /** PBMediaData fileSha256 */ + fileSha256?: (Uint8Array|null); + + /** PBMediaData fileEncSha256 */ + fileEncSha256?: (Uint8Array|null); + + /** PBMediaData directPath */ + directPath?: (string|null); + } + + /** Represents a PBMediaData. */ + class PBMediaData implements IPBMediaData { + + /** + * Constructs a new PBMediaData. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IPBMediaData); + + /** PBMediaData mediaKey. */ + public mediaKey: Uint8Array; + + /** PBMediaData mediaKeyTimestamp. */ + public mediaKeyTimestamp: (number|Long); + + /** PBMediaData fileSha256. */ + public fileSha256: Uint8Array; + + /** PBMediaData fileEncSha256. */ + public fileEncSha256: Uint8Array; + + /** PBMediaData directPath. */ + public directPath: string; + + /** + * Creates a new PBMediaData instance using the specified properties. + * @param [properties] Properties to set + * @returns PBMediaData instance + */ + public static create(properties?: proto.IPBMediaData): proto.PBMediaData; + + /** + * Encodes the specified PBMediaData message. Does not implicitly {@link proto.PBMediaData.verify|verify} messages. + * @param message PBMediaData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IPBMediaData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PBMediaData message, length delimited. Does not implicitly {@link proto.PBMediaData.verify|verify} messages. + * @param message PBMediaData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IPBMediaData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PBMediaData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PBMediaData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.PBMediaData; + + /** + * Decodes a PBMediaData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PBMediaData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.PBMediaData; + + /** + * Verifies a PBMediaData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PBMediaData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PBMediaData + */ + public static fromObject(object: { [k: string]: any }): proto.PBMediaData; + + /** + * Creates a plain object from a PBMediaData message. Also converts values to other types if specified. + * @param message PBMediaData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.PBMediaData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PBMediaData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a PaymentBackground. */ interface IPaymentBackground { @@ -9283,6 +15138,229 @@ export namespace proto { } } + /** Properties of a PaymentInfo. */ + interface IPaymentInfo { + + /** PaymentInfo currencyDeprecated */ + currencyDeprecated?: (proto.PaymentInfo.PaymentInfoCurrency|null); + + /** PaymentInfo amount1000 */ + amount1000?: (number|Long|null); + + /** PaymentInfo receiverJid */ + receiverJid?: (string|null); + + /** PaymentInfo status */ + status?: (proto.PaymentInfo.PaymentInfoStatus|null); + + /** PaymentInfo transactionTimestamp */ + transactionTimestamp?: (number|Long|null); + + /** PaymentInfo requestMessageKey */ + requestMessageKey?: (proto.IMessageKey|null); + + /** PaymentInfo expiryTimestamp */ + expiryTimestamp?: (number|Long|null); + + /** PaymentInfo futureproofed */ + futureproofed?: (boolean|null); + + /** PaymentInfo currency */ + currency?: (string|null); + + /** PaymentInfo txnStatus */ + txnStatus?: (proto.PaymentInfo.PaymentInfoTxnStatus|null); + + /** PaymentInfo useNoviFiatFormat */ + useNoviFiatFormat?: (boolean|null); + + /** PaymentInfo primaryAmount */ + primaryAmount?: (proto.IMoney|null); + + /** PaymentInfo exchangeAmount */ + exchangeAmount?: (proto.IMoney|null); + } + + /** Represents a PaymentInfo. */ + class PaymentInfo implements IPaymentInfo { + + /** + * Constructs a new PaymentInfo. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IPaymentInfo); + + /** PaymentInfo currencyDeprecated. */ + public currencyDeprecated: proto.PaymentInfo.PaymentInfoCurrency; + + /** PaymentInfo amount1000. */ + public amount1000: (number|Long); + + /** PaymentInfo receiverJid. */ + public receiverJid: string; + + /** PaymentInfo status. */ + public status: proto.PaymentInfo.PaymentInfoStatus; + + /** PaymentInfo transactionTimestamp. */ + public transactionTimestamp: (number|Long); + + /** PaymentInfo requestMessageKey. */ + public requestMessageKey?: (proto.IMessageKey|null); + + /** PaymentInfo expiryTimestamp. */ + public expiryTimestamp: (number|Long); + + /** PaymentInfo futureproofed. */ + public futureproofed: boolean; + + /** PaymentInfo currency. */ + public currency: string; + + /** PaymentInfo txnStatus. */ + public txnStatus: proto.PaymentInfo.PaymentInfoTxnStatus; + + /** PaymentInfo useNoviFiatFormat. */ + public useNoviFiatFormat: boolean; + + /** PaymentInfo primaryAmount. */ + public primaryAmount?: (proto.IMoney|null); + + /** PaymentInfo exchangeAmount. */ + public exchangeAmount?: (proto.IMoney|null); + + /** + * Creates a new PaymentInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns PaymentInfo instance + */ + public static create(properties?: proto.IPaymentInfo): proto.PaymentInfo; + + /** + * Encodes the specified PaymentInfo message. Does not implicitly {@link proto.PaymentInfo.verify|verify} messages. + * @param message PaymentInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IPaymentInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PaymentInfo message, length delimited. Does not implicitly {@link proto.PaymentInfo.verify|verify} messages. + * @param message PaymentInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IPaymentInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PaymentInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PaymentInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.PaymentInfo; + + /** + * Decodes a PaymentInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PaymentInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.PaymentInfo; + + /** + * Verifies a PaymentInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PaymentInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PaymentInfo + */ + public static fromObject(object: { [k: string]: any }): proto.PaymentInfo; + + /** + * Creates a plain object from a PaymentInfo message. Also converts values to other types if specified. + * @param message PaymentInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.PaymentInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PaymentInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace PaymentInfo { + + /** PaymentInfoCurrency enum. */ + enum PaymentInfoCurrency { + UNKNOWN_CURRENCY = 0, + INR = 1 + } + + /** PaymentInfoStatus enum. */ + enum PaymentInfoStatus { + UNKNOWN_STATUS = 0, + PROCESSING = 1, + SENT = 2, + NEED_TO_ACCEPT = 3, + COMPLETE = 4, + COULD_NOT_COMPLETE = 5, + REFUNDED = 6, + EXPIRED = 7, + REJECTED = 8, + CANCELLED = 9, + WAITING_FOR_PAYER = 10, + WAITING = 11 + } + + /** PaymentInfoTxnStatus enum. */ + enum PaymentInfoTxnStatus { + UNKNOWN = 0, + PENDING_SETUP = 1, + PENDING_RECEIVER_SETUP = 2, + INIT = 3, + SUCCESS = 4, + COMPLETED = 5, + FAILED = 6, + FAILED_RISK = 7, + FAILED_PROCESSING = 8, + FAILED_RECEIVER_PROCESSING = 9, + FAILED_DA = 10, + FAILED_DA_FINAL = 11, + REFUNDED_TXN = 12, + REFUND_FAILED = 13, + REFUND_FAILED_PROCESSING = 14, + REFUND_FAILED_DA = 15, + EXPIRED_TXN = 16, + AUTH_CANCELED = 17, + AUTH_CANCEL_FAILED_PROCESSING = 18, + AUTH_CANCEL_FAILED = 19, + COLLECT_INIT = 20, + COLLECT_SUCCESS = 21, + COLLECT_FAILED = 22, + COLLECT_FAILED_RISK = 23, + COLLECT_REJECTED = 24, + COLLECT_EXPIRED = 25, + COLLECT_CANCELED = 26, + COLLECT_CANCELLING = 27, + IN_REVIEW = 28, + REVERSAL_SUCCESS = 29, + REVERSAL_PENDING = 30, + REFUND_PENDING = 31 + } + } + /** Properties of a PaymentInviteMessage. */ interface IPaymentInviteMessage { @@ -9390,115 +15468,421 @@ export namespace proto { } } - /** Properties of a PBMediaData. */ - interface IPBMediaData { + /** Properties of a PendingKeyExchange. */ + interface IPendingKeyExchange { - /** PBMediaData mediaKey */ - mediaKey?: (Uint8Array|null); + /** PendingKeyExchange sequence */ + sequence?: (number|null); - /** PBMediaData mediaKeyTimestamp */ - mediaKeyTimestamp?: (number|Long|null); + /** PendingKeyExchange localBaseKey */ + localBaseKey?: (Uint8Array|null); - /** PBMediaData fileSha256 */ - fileSha256?: (Uint8Array|null); + /** PendingKeyExchange localBaseKeyPrivate */ + localBaseKeyPrivate?: (Uint8Array|null); - /** PBMediaData fileEncSha256 */ - fileEncSha256?: (Uint8Array|null); + /** PendingKeyExchange localRatchetKey */ + localRatchetKey?: (Uint8Array|null); - /** PBMediaData directPath */ - directPath?: (string|null); + /** PendingKeyExchange localRatchetKeyPrivate */ + localRatchetKeyPrivate?: (Uint8Array|null); + + /** PendingKeyExchange localIdentityKey */ + localIdentityKey?: (Uint8Array|null); + + /** PendingKeyExchange localIdentityKeyPrivate */ + localIdentityKeyPrivate?: (Uint8Array|null); } - /** Represents a PBMediaData. */ - class PBMediaData implements IPBMediaData { + /** Represents a PendingKeyExchange. */ + class PendingKeyExchange implements IPendingKeyExchange { /** - * Constructs a new PBMediaData. + * Constructs a new PendingKeyExchange. * @param [properties] Properties to set */ - constructor(properties?: proto.IPBMediaData); + constructor(properties?: proto.IPendingKeyExchange); - /** PBMediaData mediaKey. */ - public mediaKey: Uint8Array; + /** PendingKeyExchange sequence. */ + public sequence: number; - /** PBMediaData mediaKeyTimestamp. */ - public mediaKeyTimestamp: (number|Long); + /** PendingKeyExchange localBaseKey. */ + public localBaseKey: Uint8Array; - /** PBMediaData fileSha256. */ - public fileSha256: Uint8Array; + /** PendingKeyExchange localBaseKeyPrivate. */ + public localBaseKeyPrivate: Uint8Array; - /** PBMediaData fileEncSha256. */ - public fileEncSha256: Uint8Array; + /** PendingKeyExchange localRatchetKey. */ + public localRatchetKey: Uint8Array; - /** PBMediaData directPath. */ - public directPath: string; + /** PendingKeyExchange localRatchetKeyPrivate. */ + public localRatchetKeyPrivate: Uint8Array; + + /** PendingKeyExchange localIdentityKey. */ + public localIdentityKey: Uint8Array; + + /** PendingKeyExchange localIdentityKeyPrivate. */ + public localIdentityKeyPrivate: Uint8Array; /** - * Creates a new PBMediaData instance using the specified properties. + * Creates a new PendingKeyExchange instance using the specified properties. * @param [properties] Properties to set - * @returns PBMediaData instance + * @returns PendingKeyExchange instance */ - public static create(properties?: proto.IPBMediaData): proto.PBMediaData; + public static create(properties?: proto.IPendingKeyExchange): proto.PendingKeyExchange; /** - * Encodes the specified PBMediaData message. Does not implicitly {@link proto.PBMediaData.verify|verify} messages. - * @param message PBMediaData message or plain object to encode + * Encodes the specified PendingKeyExchange message. Does not implicitly {@link proto.PendingKeyExchange.verify|verify} messages. + * @param message PendingKeyExchange message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: proto.IPBMediaData, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: proto.IPendingKeyExchange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PBMediaData message, length delimited. Does not implicitly {@link proto.PBMediaData.verify|verify} messages. - * @param message PBMediaData message or plain object to encode + * Encodes the specified PendingKeyExchange message, length delimited. Does not implicitly {@link proto.PendingKeyExchange.verify|verify} messages. + * @param message PendingKeyExchange message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: proto.IPBMediaData, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: proto.IPendingKeyExchange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PBMediaData message from the specified reader or buffer. + * Decodes a PendingKeyExchange message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PBMediaData + * @returns PendingKeyExchange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.PBMediaData; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.PendingKeyExchange; /** - * Decodes a PBMediaData message from the specified reader or buffer, length delimited. + * Decodes a PendingKeyExchange message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PBMediaData + * @returns PendingKeyExchange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.PBMediaData; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.PendingKeyExchange; /** - * Verifies a PBMediaData message. + * Verifies a PendingKeyExchange message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a PBMediaData message from a plain object. Also converts values to their respective internal types. + * Creates a PendingKeyExchange message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PBMediaData + * @returns PendingKeyExchange */ - public static fromObject(object: { [k: string]: any }): proto.PBMediaData; + public static fromObject(object: { [k: string]: any }): proto.PendingKeyExchange; /** - * Creates a plain object from a PBMediaData message. Also converts values to other types if specified. - * @param message PBMediaData + * Creates a plain object from a PendingKeyExchange message. Also converts values to other types if specified. + * @param message PendingKeyExchange * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: proto.PBMediaData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: proto.PendingKeyExchange, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PBMediaData to JSON. + * Converts this PendingKeyExchange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PendingPreKey. */ + interface IPendingPreKey { + + /** PendingPreKey preKeyId */ + preKeyId?: (number|null); + + /** PendingPreKey signedPreKeyId */ + signedPreKeyId?: (number|null); + + /** PendingPreKey baseKey */ + baseKey?: (Uint8Array|null); + } + + /** Represents a PendingPreKey. */ + class PendingPreKey implements IPendingPreKey { + + /** + * Constructs a new PendingPreKey. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IPendingPreKey); + + /** PendingPreKey preKeyId. */ + public preKeyId: number; + + /** PendingPreKey signedPreKeyId. */ + public signedPreKeyId: number; + + /** PendingPreKey baseKey. */ + public baseKey: Uint8Array; + + /** + * Creates a new PendingPreKey instance using the specified properties. + * @param [properties] Properties to set + * @returns PendingPreKey instance + */ + public static create(properties?: proto.IPendingPreKey): proto.PendingPreKey; + + /** + * Encodes the specified PendingPreKey message. Does not implicitly {@link proto.PendingPreKey.verify|verify} messages. + * @param message PendingPreKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IPendingPreKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PendingPreKey message, length delimited. Does not implicitly {@link proto.PendingPreKey.verify|verify} messages. + * @param message PendingPreKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IPendingPreKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PendingPreKey message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PendingPreKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.PendingPreKey; + + /** + * Decodes a PendingPreKey message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PendingPreKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.PendingPreKey; + + /** + * Verifies a PendingPreKey message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PendingPreKey message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PendingPreKey + */ + public static fromObject(object: { [k: string]: any }): proto.PendingPreKey; + + /** + * Creates a plain object from a PendingPreKey message. Also converts values to other types if specified. + * @param message PendingPreKey + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.PendingPreKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PendingPreKey to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PhotoChange. */ + interface IPhotoChange { + + /** PhotoChange oldPhoto */ + oldPhoto?: (Uint8Array|null); + + /** PhotoChange newPhoto */ + newPhoto?: (Uint8Array|null); + + /** PhotoChange newPhotoId */ + newPhotoId?: (number|null); + } + + /** Represents a PhotoChange. */ + class PhotoChange implements IPhotoChange { + + /** + * Constructs a new PhotoChange. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IPhotoChange); + + /** PhotoChange oldPhoto. */ + public oldPhoto: Uint8Array; + + /** PhotoChange newPhoto. */ + public newPhoto: Uint8Array; + + /** PhotoChange newPhotoId. */ + public newPhotoId: number; + + /** + * Creates a new PhotoChange instance using the specified properties. + * @param [properties] Properties to set + * @returns PhotoChange instance + */ + public static create(properties?: proto.IPhotoChange): proto.PhotoChange; + + /** + * Encodes the specified PhotoChange message. Does not implicitly {@link proto.PhotoChange.verify|verify} messages. + * @param message PhotoChange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IPhotoChange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PhotoChange message, length delimited. Does not implicitly {@link proto.PhotoChange.verify|verify} messages. + * @param message PhotoChange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IPhotoChange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PhotoChange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PhotoChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.PhotoChange; + + /** + * Decodes a PhotoChange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PhotoChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.PhotoChange; + + /** + * Verifies a PhotoChange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PhotoChange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PhotoChange + */ + public static fromObject(object: { [k: string]: any }): proto.PhotoChange; + + /** + * Creates a plain object from a PhotoChange message. Also converts values to other types if specified. + * @param message PhotoChange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.PhotoChange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PhotoChange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PinAction. */ + interface IPinAction { + + /** PinAction pinned */ + pinned?: (boolean|null); + } + + /** Represents a PinAction. */ + class PinAction implements IPinAction { + + /** + * Constructs a new PinAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IPinAction); + + /** PinAction pinned. */ + public pinned: boolean; + + /** + * Creates a new PinAction instance using the specified properties. + * @param [properties] Properties to set + * @returns PinAction instance + */ + public static create(properties?: proto.IPinAction): proto.PinAction; + + /** + * Encodes the specified PinAction message. Does not implicitly {@link proto.PinAction.verify|verify} messages. + * @param message PinAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IPinAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PinAction message, length delimited. Does not implicitly {@link proto.PinAction.verify|verify} messages. + * @param message PinAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IPinAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PinAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PinAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.PinAction; + + /** + * Decodes a PinAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PinAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.PinAction; + + /** + * Verifies a PinAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PinAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PinAction + */ + public static fromObject(object: { [k: string]: any }): proto.PinAction; + + /** + * Creates a plain object from a PinAction message. Also converts values to other types if specified. + * @param message PinAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.PinAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PinAction to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; @@ -9612,6 +15996,96 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a PollAdditionalMetadata. */ + interface IPollAdditionalMetadata { + + /** PollAdditionalMetadata pollInvalidated */ + pollInvalidated?: (boolean|null); + } + + /** Represents a PollAdditionalMetadata. */ + class PollAdditionalMetadata implements IPollAdditionalMetadata { + + /** + * Constructs a new PollAdditionalMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IPollAdditionalMetadata); + + /** PollAdditionalMetadata pollInvalidated. */ + public pollInvalidated: boolean; + + /** + * Creates a new PollAdditionalMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns PollAdditionalMetadata instance + */ + public static create(properties?: proto.IPollAdditionalMetadata): proto.PollAdditionalMetadata; + + /** + * Encodes the specified PollAdditionalMetadata message. Does not implicitly {@link proto.PollAdditionalMetadata.verify|verify} messages. + * @param message PollAdditionalMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IPollAdditionalMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PollAdditionalMetadata message, length delimited. Does not implicitly {@link proto.PollAdditionalMetadata.verify|verify} messages. + * @param message PollAdditionalMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IPollAdditionalMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PollAdditionalMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PollAdditionalMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.PollAdditionalMetadata; + + /** + * Decodes a PollAdditionalMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PollAdditionalMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.PollAdditionalMetadata; + + /** + * Verifies a PollAdditionalMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PollAdditionalMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PollAdditionalMetadata + */ + public static fromObject(object: { [k: string]: any }): proto.PollAdditionalMetadata; + + /** + * Creates a plain object from a PollAdditionalMetadata message. Also converts values to other types if specified. + * @param message PollAdditionalMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.PollAdditionalMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PollAdditionalMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a PollCreationMessage. */ interface IPollCreationMessage { @@ -9822,6 +16296,192 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a PollOption. */ + interface IPollOption { + + /** PollOption name */ + name?: (string|null); + } + + /** Represents a PollOption. */ + class PollOption implements IPollOption { + + /** + * Constructs a new PollOption. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IPollOption); + + /** PollOption name. */ + public name: string; + + /** + * Creates a new PollOption instance using the specified properties. + * @param [properties] Properties to set + * @returns PollOption instance + */ + public static create(properties?: proto.IPollOption): proto.PollOption; + + /** + * Encodes the specified PollOption message. Does not implicitly {@link proto.PollOption.verify|verify} messages. + * @param message PollOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IPollOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PollOption message, length delimited. Does not implicitly {@link proto.PollOption.verify|verify} messages. + * @param message PollOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IPollOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PollOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PollOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.PollOption; + + /** + * Decodes a PollOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PollOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.PollOption; + + /** + * Verifies a PollOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PollOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PollOption + */ + public static fromObject(object: { [k: string]: any }): proto.PollOption; + + /** + * Creates a plain object from a PollOption message. Also converts values to other types if specified. + * @param message PollOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.PollOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PollOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PollUpdate. */ + interface IPollUpdate { + + /** PollUpdate pollUpdateMessageKey */ + pollUpdateMessageKey?: (proto.IMessageKey|null); + + /** PollUpdate vote */ + vote?: (proto.IPollVoteMessage|null); + } + + /** Represents a PollUpdate. */ + class PollUpdate implements IPollUpdate { + + /** + * Constructs a new PollUpdate. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IPollUpdate); + + /** PollUpdate pollUpdateMessageKey. */ + public pollUpdateMessageKey?: (proto.IMessageKey|null); + + /** PollUpdate vote. */ + public vote?: (proto.IPollVoteMessage|null); + + /** + * Creates a new PollUpdate instance using the specified properties. + * @param [properties] Properties to set + * @returns PollUpdate instance + */ + public static create(properties?: proto.IPollUpdate): proto.PollUpdate; + + /** + * Encodes the specified PollUpdate message. Does not implicitly {@link proto.PollUpdate.verify|verify} messages. + * @param message PollUpdate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IPollUpdate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PollUpdate message, length delimited. Does not implicitly {@link proto.PollUpdate.verify|verify} messages. + * @param message PollUpdate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IPollUpdate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PollUpdate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PollUpdate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.PollUpdate; + + /** + * Decodes a PollUpdate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PollUpdate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.PollUpdate; + + /** + * Verifies a PollUpdate message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PollUpdate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PollUpdate + */ + public static fromObject(object: { [k: string]: any }): proto.PollUpdate; + + /** + * Creates a plain object from a PollUpdate message. Also converts values to other types if specified. + * @param message PollUpdate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.PollUpdate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PollUpdate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a PollUpdateMessage. */ interface IPollUpdateMessage { @@ -9830,6 +16490,9 @@ export namespace proto { /** PollUpdateMessage vote */ vote?: (proto.IPollEncValue|null); + + /** PollUpdateMessage metadata */ + metadata?: (proto.IPollUpdateMessageMetadata|null); } /** Represents a PollUpdateMessage. */ @@ -9847,6 +16510,9 @@ export namespace proto { /** PollUpdateMessage vote. */ public vote?: (proto.IPollEncValue|null); + /** PollUpdateMessage metadata. */ + public metadata?: (proto.IPollUpdateMessageMetadata|null); + /** * Creates a new PollUpdateMessage instance using the specified properties. * @param [properties] Properties to set @@ -9918,6 +16584,90 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a PollUpdateMessageMetadata. */ + interface IPollUpdateMessageMetadata { + } + + /** Represents a PollUpdateMessageMetadata. */ + class PollUpdateMessageMetadata implements IPollUpdateMessageMetadata { + + /** + * Constructs a new PollUpdateMessageMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IPollUpdateMessageMetadata); + + /** + * Creates a new PollUpdateMessageMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns PollUpdateMessageMetadata instance + */ + public static create(properties?: proto.IPollUpdateMessageMetadata): proto.PollUpdateMessageMetadata; + + /** + * Encodes the specified PollUpdateMessageMetadata message. Does not implicitly {@link proto.PollUpdateMessageMetadata.verify|verify} messages. + * @param message PollUpdateMessageMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IPollUpdateMessageMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PollUpdateMessageMetadata message, length delimited. Does not implicitly {@link proto.PollUpdateMessageMetadata.verify|verify} messages. + * @param message PollUpdateMessageMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IPollUpdateMessageMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PollUpdateMessageMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PollUpdateMessageMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.PollUpdateMessageMetadata; + + /** + * Decodes a PollUpdateMessageMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PollUpdateMessageMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.PollUpdateMessageMetadata; + + /** + * Verifies a PollUpdateMessageMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PollUpdateMessageMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PollUpdateMessageMetadata + */ + public static fromObject(object: { [k: string]: any }): proto.PollUpdateMessageMetadata; + + /** + * Creates a plain object from a PollUpdateMessageMetadata message. Also converts values to other types if specified. + * @param message PollUpdateMessageMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.PollUpdateMessageMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PollUpdateMessageMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a PollVoteMessage. */ interface IPollVoteMessage { @@ -10014,6 +16764,198 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a PreKeyRecordStructure. */ + interface IPreKeyRecordStructure { + + /** PreKeyRecordStructure id */ + id?: (number|null); + + /** PreKeyRecordStructure publicKey */ + publicKey?: (Uint8Array|null); + + /** PreKeyRecordStructure privateKey */ + privateKey?: (Uint8Array|null); + } + + /** Represents a PreKeyRecordStructure. */ + class PreKeyRecordStructure implements IPreKeyRecordStructure { + + /** + * Constructs a new PreKeyRecordStructure. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IPreKeyRecordStructure); + + /** PreKeyRecordStructure id. */ + public id: number; + + /** PreKeyRecordStructure publicKey. */ + public publicKey: Uint8Array; + + /** PreKeyRecordStructure privateKey. */ + public privateKey: Uint8Array; + + /** + * Creates a new PreKeyRecordStructure instance using the specified properties. + * @param [properties] Properties to set + * @returns PreKeyRecordStructure instance + */ + public static create(properties?: proto.IPreKeyRecordStructure): proto.PreKeyRecordStructure; + + /** + * Encodes the specified PreKeyRecordStructure message. Does not implicitly {@link proto.PreKeyRecordStructure.verify|verify} messages. + * @param message PreKeyRecordStructure message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IPreKeyRecordStructure, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PreKeyRecordStructure message, length delimited. Does not implicitly {@link proto.PreKeyRecordStructure.verify|verify} messages. + * @param message PreKeyRecordStructure message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IPreKeyRecordStructure, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PreKeyRecordStructure message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PreKeyRecordStructure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.PreKeyRecordStructure; + + /** + * Decodes a PreKeyRecordStructure message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PreKeyRecordStructure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.PreKeyRecordStructure; + + /** + * Verifies a PreKeyRecordStructure message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PreKeyRecordStructure message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PreKeyRecordStructure + */ + public static fromObject(object: { [k: string]: any }): proto.PreKeyRecordStructure; + + /** + * Creates a plain object from a PreKeyRecordStructure message. Also converts values to other types if specified. + * @param message PreKeyRecordStructure + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.PreKeyRecordStructure, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PreKeyRecordStructure to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PrimaryFeature. */ + interface IPrimaryFeature { + + /** PrimaryFeature flags */ + flags?: (string[]|null); + } + + /** Represents a PrimaryFeature. */ + class PrimaryFeature implements IPrimaryFeature { + + /** + * Constructs a new PrimaryFeature. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IPrimaryFeature); + + /** PrimaryFeature flags. */ + public flags: string[]; + + /** + * Creates a new PrimaryFeature instance using the specified properties. + * @param [properties] Properties to set + * @returns PrimaryFeature instance + */ + public static create(properties?: proto.IPrimaryFeature): proto.PrimaryFeature; + + /** + * Encodes the specified PrimaryFeature message. Does not implicitly {@link proto.PrimaryFeature.verify|verify} messages. + * @param message PrimaryFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IPrimaryFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PrimaryFeature message, length delimited. Does not implicitly {@link proto.PrimaryFeature.verify|verify} messages. + * @param message PrimaryFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IPrimaryFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PrimaryFeature message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PrimaryFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.PrimaryFeature; + + /** + * Decodes a PrimaryFeature message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PrimaryFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.PrimaryFeature; + + /** + * Verifies a PrimaryFeature message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PrimaryFeature message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PrimaryFeature + */ + public static fromObject(object: { [k: string]: any }): proto.PrimaryFeature; + + /** + * Creates a plain object from a PrimaryFeature message. Also converts values to other types if specified. + * @param message PrimaryFeature + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.PrimaryFeature, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PrimaryFeature to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a Product. */ interface IProduct { @@ -10828,6 +17770,306 @@ export namespace proto { } } + /** Properties of a PushNameSetting. */ + interface IPushNameSetting { + + /** PushNameSetting name */ + name?: (string|null); + } + + /** Represents a PushNameSetting. */ + class PushNameSetting implements IPushNameSetting { + + /** + * Constructs a new PushNameSetting. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IPushNameSetting); + + /** PushNameSetting name. */ + public name: string; + + /** + * Creates a new PushNameSetting instance using the specified properties. + * @param [properties] Properties to set + * @returns PushNameSetting instance + */ + public static create(properties?: proto.IPushNameSetting): proto.PushNameSetting; + + /** + * Encodes the specified PushNameSetting message. Does not implicitly {@link proto.PushNameSetting.verify|verify} messages. + * @param message PushNameSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IPushNameSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PushNameSetting message, length delimited. Does not implicitly {@link proto.PushNameSetting.verify|verify} messages. + * @param message PushNameSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IPushNameSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PushNameSetting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PushNameSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.PushNameSetting; + + /** + * Decodes a PushNameSetting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PushNameSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.PushNameSetting; + + /** + * Verifies a PushNameSetting message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PushNameSetting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PushNameSetting + */ + public static fromObject(object: { [k: string]: any }): proto.PushNameSetting; + + /** + * Creates a plain object from a PushNameSetting message. Also converts values to other types if specified. + * @param message PushNameSetting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.PushNameSetting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PushNameSetting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Pushname. */ + interface IPushname { + + /** Pushname id */ + id?: (string|null); + + /** Pushname pushname */ + pushname?: (string|null); + } + + /** Represents a Pushname. */ + class Pushname implements IPushname { + + /** + * Constructs a new Pushname. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IPushname); + + /** Pushname id. */ + public id: string; + + /** Pushname pushname. */ + public pushname: string; + + /** + * Creates a new Pushname instance using the specified properties. + * @param [properties] Properties to set + * @returns Pushname instance + */ + public static create(properties?: proto.IPushname): proto.Pushname; + + /** + * Encodes the specified Pushname message. Does not implicitly {@link proto.Pushname.verify|verify} messages. + * @param message Pushname message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IPushname, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Pushname message, length delimited. Does not implicitly {@link proto.Pushname.verify|verify} messages. + * @param message Pushname message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IPushname, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Pushname message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Pushname + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.Pushname; + + /** + * Decodes a Pushname message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Pushname + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.Pushname; + + /** + * Verifies a Pushname message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Pushname message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Pushname + */ + public static fromObject(object: { [k: string]: any }): proto.Pushname; + + /** + * Creates a plain object from a Pushname message. Also converts values to other types if specified. + * @param message Pushname + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Pushname, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Pushname to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a QuickReplyAction. */ + interface IQuickReplyAction { + + /** QuickReplyAction shortcut */ + shortcut?: (string|null); + + /** QuickReplyAction message */ + message?: (string|null); + + /** QuickReplyAction keywords */ + keywords?: (string[]|null); + + /** QuickReplyAction count */ + count?: (number|null); + + /** QuickReplyAction deleted */ + deleted?: (boolean|null); + } + + /** Represents a QuickReplyAction. */ + class QuickReplyAction implements IQuickReplyAction { + + /** + * Constructs a new QuickReplyAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IQuickReplyAction); + + /** QuickReplyAction shortcut. */ + public shortcut: string; + + /** QuickReplyAction message. */ + public message: string; + + /** QuickReplyAction keywords. */ + public keywords: string[]; + + /** QuickReplyAction count. */ + public count: number; + + /** QuickReplyAction deleted. */ + public deleted: boolean; + + /** + * Creates a new QuickReplyAction instance using the specified properties. + * @param [properties] Properties to set + * @returns QuickReplyAction instance + */ + public static create(properties?: proto.IQuickReplyAction): proto.QuickReplyAction; + + /** + * Encodes the specified QuickReplyAction message. Does not implicitly {@link proto.QuickReplyAction.verify|verify} messages. + * @param message QuickReplyAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IQuickReplyAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QuickReplyAction message, length delimited. Does not implicitly {@link proto.QuickReplyAction.verify|verify} messages. + * @param message QuickReplyAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IQuickReplyAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QuickReplyAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QuickReplyAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.QuickReplyAction; + + /** + * Decodes a QuickReplyAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QuickReplyAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.QuickReplyAction; + + /** + * Verifies a QuickReplyAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QuickReplyAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QuickReplyAction + */ + public static fromObject(object: { [k: string]: any }): proto.QuickReplyAction; + + /** + * Creates a plain object from a QuickReplyAction message. Also converts values to other types if specified. + * @param message QuickReplyAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.QuickReplyAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QuickReplyAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a QuickReplyButton. */ interface IQuickReplyButton { @@ -10924,6 +18166,120 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a Reaction. */ + interface IReaction { + + /** Reaction key */ + key?: (proto.IMessageKey|null); + + /** Reaction text */ + text?: (string|null); + + /** Reaction groupingKey */ + groupingKey?: (string|null); + + /** Reaction senderTimestampMs */ + senderTimestampMs?: (number|Long|null); + + /** Reaction unread */ + unread?: (boolean|null); + } + + /** Represents a Reaction. */ + class Reaction implements IReaction { + + /** + * Constructs a new Reaction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IReaction); + + /** Reaction key. */ + public key?: (proto.IMessageKey|null); + + /** Reaction text. */ + public text: string; + + /** Reaction groupingKey. */ + public groupingKey: string; + + /** Reaction senderTimestampMs. */ + public senderTimestampMs: (number|Long); + + /** Reaction unread. */ + public unread: boolean; + + /** + * Creates a new Reaction instance using the specified properties. + * @param [properties] Properties to set + * @returns Reaction instance + */ + public static create(properties?: proto.IReaction): proto.Reaction; + + /** + * Encodes the specified Reaction message. Does not implicitly {@link proto.Reaction.verify|verify} messages. + * @param message Reaction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IReaction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Reaction message, length delimited. Does not implicitly {@link proto.Reaction.verify|verify} messages. + * @param message Reaction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IReaction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Reaction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Reaction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.Reaction; + + /** + * Decodes a Reaction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Reaction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.Reaction; + + /** + * Verifies a Reaction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Reaction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Reaction + */ + public static fromObject(object: { [k: string]: any }): proto.Reaction; + + /** + * Creates a plain object from a Reaction message. Also converts values to other types if specified. + * @param message Reaction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Reaction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Reaction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a ReactionMessage. */ interface IReactionMessage { @@ -11032,6 +18388,600 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a RecentEmojiWeight. */ + interface IRecentEmojiWeight { + + /** RecentEmojiWeight emoji */ + emoji?: (string|null); + + /** RecentEmojiWeight weight */ + weight?: (number|null); + } + + /** Represents a RecentEmojiWeight. */ + class RecentEmojiWeight implements IRecentEmojiWeight { + + /** + * Constructs a new RecentEmojiWeight. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IRecentEmojiWeight); + + /** RecentEmojiWeight emoji. */ + public emoji: string; + + /** RecentEmojiWeight weight. */ + public weight: number; + + /** + * Creates a new RecentEmojiWeight instance using the specified properties. + * @param [properties] Properties to set + * @returns RecentEmojiWeight instance + */ + public static create(properties?: proto.IRecentEmojiWeight): proto.RecentEmojiWeight; + + /** + * Encodes the specified RecentEmojiWeight message. Does not implicitly {@link proto.RecentEmojiWeight.verify|verify} messages. + * @param message RecentEmojiWeight message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IRecentEmojiWeight, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RecentEmojiWeight message, length delimited. Does not implicitly {@link proto.RecentEmojiWeight.verify|verify} messages. + * @param message RecentEmojiWeight message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IRecentEmojiWeight, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RecentEmojiWeight message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RecentEmojiWeight + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.RecentEmojiWeight; + + /** + * Decodes a RecentEmojiWeight message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RecentEmojiWeight + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.RecentEmojiWeight; + + /** + * Verifies a RecentEmojiWeight message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RecentEmojiWeight message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecentEmojiWeight + */ + public static fromObject(object: { [k: string]: any }): proto.RecentEmojiWeight; + + /** + * Creates a plain object from a RecentEmojiWeight message. Also converts values to other types if specified. + * @param message RecentEmojiWeight + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.RecentEmojiWeight, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RecentEmojiWeight to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RecentEmojiWeightsAction. */ + interface IRecentEmojiWeightsAction { + + /** RecentEmojiWeightsAction weights */ + weights?: (proto.IRecentEmojiWeight[]|null); + } + + /** Represents a RecentEmojiWeightsAction. */ + class RecentEmojiWeightsAction implements IRecentEmojiWeightsAction { + + /** + * Constructs a new RecentEmojiWeightsAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IRecentEmojiWeightsAction); + + /** RecentEmojiWeightsAction weights. */ + public weights: proto.IRecentEmojiWeight[]; + + /** + * Creates a new RecentEmojiWeightsAction instance using the specified properties. + * @param [properties] Properties to set + * @returns RecentEmojiWeightsAction instance + */ + public static create(properties?: proto.IRecentEmojiWeightsAction): proto.RecentEmojiWeightsAction; + + /** + * Encodes the specified RecentEmojiWeightsAction message. Does not implicitly {@link proto.RecentEmojiWeightsAction.verify|verify} messages. + * @param message RecentEmojiWeightsAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IRecentEmojiWeightsAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RecentEmojiWeightsAction message, length delimited. Does not implicitly {@link proto.RecentEmojiWeightsAction.verify|verify} messages. + * @param message RecentEmojiWeightsAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IRecentEmojiWeightsAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RecentEmojiWeightsAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RecentEmojiWeightsAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.RecentEmojiWeightsAction; + + /** + * Decodes a RecentEmojiWeightsAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RecentEmojiWeightsAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.RecentEmojiWeightsAction; + + /** + * Verifies a RecentEmojiWeightsAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RecentEmojiWeightsAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecentEmojiWeightsAction + */ + public static fromObject(object: { [k: string]: any }): proto.RecentEmojiWeightsAction; + + /** + * Creates a plain object from a RecentEmojiWeightsAction message. Also converts values to other types if specified. + * @param message RecentEmojiWeightsAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.RecentEmojiWeightsAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RecentEmojiWeightsAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RecentStickerMetadata. */ + interface IRecentStickerMetadata { + + /** RecentStickerMetadata directPath */ + directPath?: (string|null); + + /** RecentStickerMetadata encFilehash */ + encFilehash?: (string|null); + + /** RecentStickerMetadata mediaKey */ + mediaKey?: (string|null); + + /** RecentStickerMetadata stanzaId */ + stanzaId?: (string|null); + + /** RecentStickerMetadata chatJid */ + chatJid?: (string|null); + + /** RecentStickerMetadata participant */ + participant?: (string|null); + + /** RecentStickerMetadata isSentByMe */ + isSentByMe?: (boolean|null); + } + + /** Represents a RecentStickerMetadata. */ + class RecentStickerMetadata implements IRecentStickerMetadata { + + /** + * Constructs a new RecentStickerMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IRecentStickerMetadata); + + /** RecentStickerMetadata directPath. */ + public directPath: string; + + /** RecentStickerMetadata encFilehash. */ + public encFilehash: string; + + /** RecentStickerMetadata mediaKey. */ + public mediaKey: string; + + /** RecentStickerMetadata stanzaId. */ + public stanzaId: string; + + /** RecentStickerMetadata chatJid. */ + public chatJid: string; + + /** RecentStickerMetadata participant. */ + public participant: string; + + /** RecentStickerMetadata isSentByMe. */ + public isSentByMe: boolean; + + /** + * Creates a new RecentStickerMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns RecentStickerMetadata instance + */ + public static create(properties?: proto.IRecentStickerMetadata): proto.RecentStickerMetadata; + + /** + * Encodes the specified RecentStickerMetadata message. Does not implicitly {@link proto.RecentStickerMetadata.verify|verify} messages. + * @param message RecentStickerMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IRecentStickerMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RecentStickerMetadata message, length delimited. Does not implicitly {@link proto.RecentStickerMetadata.verify|verify} messages. + * @param message RecentStickerMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IRecentStickerMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RecentStickerMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RecentStickerMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.RecentStickerMetadata; + + /** + * Decodes a RecentStickerMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RecentStickerMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.RecentStickerMetadata; + + /** + * Verifies a RecentStickerMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RecentStickerMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecentStickerMetadata + */ + public static fromObject(object: { [k: string]: any }): proto.RecentStickerMetadata; + + /** + * Creates a plain object from a RecentStickerMetadata message. Also converts values to other types if specified. + * @param message RecentStickerMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.RecentStickerMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RecentStickerMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RecentStickerWeight. */ + interface IRecentStickerWeight { + + /** RecentStickerWeight filehash */ + filehash?: (string|null); + + /** RecentStickerWeight weight */ + weight?: (number|null); + } + + /** Represents a RecentStickerWeight. */ + class RecentStickerWeight implements IRecentStickerWeight { + + /** + * Constructs a new RecentStickerWeight. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IRecentStickerWeight); + + /** RecentStickerWeight filehash. */ + public filehash: string; + + /** RecentStickerWeight weight. */ + public weight: number; + + /** + * Creates a new RecentStickerWeight instance using the specified properties. + * @param [properties] Properties to set + * @returns RecentStickerWeight instance + */ + public static create(properties?: proto.IRecentStickerWeight): proto.RecentStickerWeight; + + /** + * Encodes the specified RecentStickerWeight message. Does not implicitly {@link proto.RecentStickerWeight.verify|verify} messages. + * @param message RecentStickerWeight message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IRecentStickerWeight, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RecentStickerWeight message, length delimited. Does not implicitly {@link proto.RecentStickerWeight.verify|verify} messages. + * @param message RecentStickerWeight message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IRecentStickerWeight, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RecentStickerWeight message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RecentStickerWeight + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.RecentStickerWeight; + + /** + * Decodes a RecentStickerWeight message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RecentStickerWeight + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.RecentStickerWeight; + + /** + * Verifies a RecentStickerWeight message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RecentStickerWeight message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecentStickerWeight + */ + public static fromObject(object: { [k: string]: any }): proto.RecentStickerWeight; + + /** + * Creates a plain object from a RecentStickerWeight message. Also converts values to other types if specified. + * @param message RecentStickerWeight + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.RecentStickerWeight, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RecentStickerWeight to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RecentStickerWeightsAction. */ + interface IRecentStickerWeightsAction { + + /** RecentStickerWeightsAction weights */ + weights?: (proto.IRecentStickerWeight[]|null); + } + + /** Represents a RecentStickerWeightsAction. */ + class RecentStickerWeightsAction implements IRecentStickerWeightsAction { + + /** + * Constructs a new RecentStickerWeightsAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IRecentStickerWeightsAction); + + /** RecentStickerWeightsAction weights. */ + public weights: proto.IRecentStickerWeight[]; + + /** + * Creates a new RecentStickerWeightsAction instance using the specified properties. + * @param [properties] Properties to set + * @returns RecentStickerWeightsAction instance + */ + public static create(properties?: proto.IRecentStickerWeightsAction): proto.RecentStickerWeightsAction; + + /** + * Encodes the specified RecentStickerWeightsAction message. Does not implicitly {@link proto.RecentStickerWeightsAction.verify|verify} messages. + * @param message RecentStickerWeightsAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IRecentStickerWeightsAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RecentStickerWeightsAction message, length delimited. Does not implicitly {@link proto.RecentStickerWeightsAction.verify|verify} messages. + * @param message RecentStickerWeightsAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IRecentStickerWeightsAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RecentStickerWeightsAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RecentStickerWeightsAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.RecentStickerWeightsAction; + + /** + * Decodes a RecentStickerWeightsAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RecentStickerWeightsAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.RecentStickerWeightsAction; + + /** + * Verifies a RecentStickerWeightsAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RecentStickerWeightsAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecentStickerWeightsAction + */ + public static fromObject(object: { [k: string]: any }): proto.RecentStickerWeightsAction; + + /** + * Creates a plain object from a RecentStickerWeightsAction message. Also converts values to other types if specified. + * @param message RecentStickerWeightsAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.RecentStickerWeightsAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RecentStickerWeightsAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RecordStructure. */ + interface IRecordStructure { + + /** RecordStructure currentSession */ + currentSession?: (proto.ISessionStructure|null); + + /** RecordStructure previousSessions */ + previousSessions?: (proto.ISessionStructure[]|null); + } + + /** Represents a RecordStructure. */ + class RecordStructure implements IRecordStructure { + + /** + * Constructs a new RecordStructure. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IRecordStructure); + + /** RecordStructure currentSession. */ + public currentSession?: (proto.ISessionStructure|null); + + /** RecordStructure previousSessions. */ + public previousSessions: proto.ISessionStructure[]; + + /** + * Creates a new RecordStructure instance using the specified properties. + * @param [properties] Properties to set + * @returns RecordStructure instance + */ + public static create(properties?: proto.IRecordStructure): proto.RecordStructure; + + /** + * Encodes the specified RecordStructure message. Does not implicitly {@link proto.RecordStructure.verify|verify} messages. + * @param message RecordStructure message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IRecordStructure, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RecordStructure message, length delimited. Does not implicitly {@link proto.RecordStructure.verify|verify} messages. + * @param message RecordStructure message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IRecordStructure, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RecordStructure message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RecordStructure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.RecordStructure; + + /** + * Decodes a RecordStructure message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RecordStructure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.RecordStructure; + + /** + * Verifies a RecordStructure message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RecordStructure message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecordStructure + */ + public static fromObject(object: { [k: string]: any }): proto.RecordStructure; + + /** + * Creates a plain object from a RecordStructure message. Also converts values to other types if specified. + * @param message RecordStructure + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.RecordStructure, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RecordStructure to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a RequestPaymentMessage. */ interface IRequestPaymentMessage { @@ -11356,97 +19306,91 @@ export namespace proto { public toJSON(): { [k: string]: any }; } - /** Properties of a SenderKeyDistributionMessage. */ - interface ISenderKeyDistributionMessage { + /** Properties of a SecurityNotificationSetting. */ + interface ISecurityNotificationSetting { - /** SenderKeyDistributionMessage groupId */ - groupId?: (string|null); - - /** SenderKeyDistributionMessage axolotlSenderKeyDistributionMessage */ - axolotlSenderKeyDistributionMessage?: (Uint8Array|null); + /** SecurityNotificationSetting showNotification */ + showNotification?: (boolean|null); } - /** Represents a SenderKeyDistributionMessage. */ - class SenderKeyDistributionMessage implements ISenderKeyDistributionMessage { + /** Represents a SecurityNotificationSetting. */ + class SecurityNotificationSetting implements ISecurityNotificationSetting { /** - * Constructs a new SenderKeyDistributionMessage. + * Constructs a new SecurityNotificationSetting. * @param [properties] Properties to set */ - constructor(properties?: proto.ISenderKeyDistributionMessage); + constructor(properties?: proto.ISecurityNotificationSetting); - /** SenderKeyDistributionMessage groupId. */ - public groupId: string; - - /** SenderKeyDistributionMessage axolotlSenderKeyDistributionMessage. */ - public axolotlSenderKeyDistributionMessage: Uint8Array; + /** SecurityNotificationSetting showNotification. */ + public showNotification: boolean; /** - * Creates a new SenderKeyDistributionMessage instance using the specified properties. + * Creates a new SecurityNotificationSetting instance using the specified properties. * @param [properties] Properties to set - * @returns SenderKeyDistributionMessage instance + * @returns SecurityNotificationSetting instance */ - public static create(properties?: proto.ISenderKeyDistributionMessage): proto.SenderKeyDistributionMessage; + public static create(properties?: proto.ISecurityNotificationSetting): proto.SecurityNotificationSetting; /** - * Encodes the specified SenderKeyDistributionMessage message. Does not implicitly {@link proto.SenderKeyDistributionMessage.verify|verify} messages. - * @param message SenderKeyDistributionMessage message or plain object to encode + * Encodes the specified SecurityNotificationSetting message. Does not implicitly {@link proto.SecurityNotificationSetting.verify|verify} messages. + * @param message SecurityNotificationSetting message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: proto.ISenderKeyDistributionMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: proto.ISecurityNotificationSetting, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SenderKeyDistributionMessage message, length delimited. Does not implicitly {@link proto.SenderKeyDistributionMessage.verify|verify} messages. - * @param message SenderKeyDistributionMessage message or plain object to encode + * Encodes the specified SecurityNotificationSetting message, length delimited. Does not implicitly {@link proto.SecurityNotificationSetting.verify|verify} messages. + * @param message SecurityNotificationSetting message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: proto.ISenderKeyDistributionMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: proto.ISecurityNotificationSetting, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SenderKeyDistributionMessage message from the specified reader or buffer. + * Decodes a SecurityNotificationSetting message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SenderKeyDistributionMessage + * @returns SecurityNotificationSetting * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.SenderKeyDistributionMessage; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.SecurityNotificationSetting; /** - * Decodes a SenderKeyDistributionMessage message from the specified reader or buffer, length delimited. + * Decodes a SecurityNotificationSetting message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SenderKeyDistributionMessage + * @returns SecurityNotificationSetting * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.SenderKeyDistributionMessage; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.SecurityNotificationSetting; /** - * Verifies a SenderKeyDistributionMessage message. + * Verifies a SecurityNotificationSetting message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SenderKeyDistributionMessage message from a plain object. Also converts values to their respective internal types. + * Creates a SecurityNotificationSetting message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SenderKeyDistributionMessage + * @returns SecurityNotificationSetting */ - public static fromObject(object: { [k: string]: any }): proto.SenderKeyDistributionMessage; + public static fromObject(object: { [k: string]: any }): proto.SecurityNotificationSetting; /** - * Creates a plain object from a SenderKeyDistributionMessage message. Also converts values to other types if specified. - * @param message SenderKeyDistributionMessage + * Creates a plain object from a SecurityNotificationSetting message. Also converts values to other types if specified. + * @param message SecurityNotificationSetting * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: proto.SenderKeyDistributionMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: proto.SecurityNotificationSetting, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SenderKeyDistributionMessage to JSON. + * Converts this SecurityNotificationSetting to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; @@ -11554,6 +19498,942 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a SenderChainKey. */ + interface ISenderChainKey { + + /** SenderChainKey iteration */ + iteration?: (number|null); + + /** SenderChainKey seed */ + seed?: (Uint8Array|null); + } + + /** Represents a SenderChainKey. */ + class SenderChainKey implements ISenderChainKey { + + /** + * Constructs a new SenderChainKey. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ISenderChainKey); + + /** SenderChainKey iteration. */ + public iteration: number; + + /** SenderChainKey seed. */ + public seed: Uint8Array; + + /** + * Creates a new SenderChainKey instance using the specified properties. + * @param [properties] Properties to set + * @returns SenderChainKey instance + */ + public static create(properties?: proto.ISenderChainKey): proto.SenderChainKey; + + /** + * Encodes the specified SenderChainKey message. Does not implicitly {@link proto.SenderChainKey.verify|verify} messages. + * @param message SenderChainKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ISenderChainKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SenderChainKey message, length delimited. Does not implicitly {@link proto.SenderChainKey.verify|verify} messages. + * @param message SenderChainKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ISenderChainKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SenderChainKey message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SenderChainKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.SenderChainKey; + + /** + * Decodes a SenderChainKey message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SenderChainKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.SenderChainKey; + + /** + * Verifies a SenderChainKey message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SenderChainKey message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SenderChainKey + */ + public static fromObject(object: { [k: string]: any }): proto.SenderChainKey; + + /** + * Creates a plain object from a SenderChainKey message. Also converts values to other types if specified. + * @param message SenderChainKey + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SenderChainKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SenderChainKey to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SenderKeyDistributionMessage. */ + interface ISenderKeyDistributionMessage { + + /** SenderKeyDistributionMessage groupId */ + groupId?: (string|null); + + /** SenderKeyDistributionMessage axolotlSenderKeyDistributionMessage */ + axolotlSenderKeyDistributionMessage?: (Uint8Array|null); + } + + /** Represents a SenderKeyDistributionMessage. */ + class SenderKeyDistributionMessage implements ISenderKeyDistributionMessage { + + /** + * Constructs a new SenderKeyDistributionMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ISenderKeyDistributionMessage); + + /** SenderKeyDistributionMessage groupId. */ + public groupId: string; + + /** SenderKeyDistributionMessage axolotlSenderKeyDistributionMessage. */ + public axolotlSenderKeyDistributionMessage: Uint8Array; + + /** + * Creates a new SenderKeyDistributionMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns SenderKeyDistributionMessage instance + */ + public static create(properties?: proto.ISenderKeyDistributionMessage): proto.SenderKeyDistributionMessage; + + /** + * Encodes the specified SenderKeyDistributionMessage message. Does not implicitly {@link proto.SenderKeyDistributionMessage.verify|verify} messages. + * @param message SenderKeyDistributionMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ISenderKeyDistributionMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SenderKeyDistributionMessage message, length delimited. Does not implicitly {@link proto.SenderKeyDistributionMessage.verify|verify} messages. + * @param message SenderKeyDistributionMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ISenderKeyDistributionMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SenderKeyDistributionMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SenderKeyDistributionMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.SenderKeyDistributionMessage; + + /** + * Decodes a SenderKeyDistributionMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SenderKeyDistributionMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.SenderKeyDistributionMessage; + + /** + * Verifies a SenderKeyDistributionMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SenderKeyDistributionMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SenderKeyDistributionMessage + */ + public static fromObject(object: { [k: string]: any }): proto.SenderKeyDistributionMessage; + + /** + * Creates a plain object from a SenderKeyDistributionMessage message. Also converts values to other types if specified. + * @param message SenderKeyDistributionMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SenderKeyDistributionMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SenderKeyDistributionMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SenderKeyRecordStructure. */ + interface ISenderKeyRecordStructure { + + /** SenderKeyRecordStructure senderKeyStates */ + senderKeyStates?: (proto.ISenderKeyStateStructure[]|null); + } + + /** Represents a SenderKeyRecordStructure. */ + class SenderKeyRecordStructure implements ISenderKeyRecordStructure { + + /** + * Constructs a new SenderKeyRecordStructure. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ISenderKeyRecordStructure); + + /** SenderKeyRecordStructure senderKeyStates. */ + public senderKeyStates: proto.ISenderKeyStateStructure[]; + + /** + * Creates a new SenderKeyRecordStructure instance using the specified properties. + * @param [properties] Properties to set + * @returns SenderKeyRecordStructure instance + */ + public static create(properties?: proto.ISenderKeyRecordStructure): proto.SenderKeyRecordStructure; + + /** + * Encodes the specified SenderKeyRecordStructure message. Does not implicitly {@link proto.SenderKeyRecordStructure.verify|verify} messages. + * @param message SenderKeyRecordStructure message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ISenderKeyRecordStructure, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SenderKeyRecordStructure message, length delimited. Does not implicitly {@link proto.SenderKeyRecordStructure.verify|verify} messages. + * @param message SenderKeyRecordStructure message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ISenderKeyRecordStructure, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SenderKeyRecordStructure message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SenderKeyRecordStructure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.SenderKeyRecordStructure; + + /** + * Decodes a SenderKeyRecordStructure message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SenderKeyRecordStructure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.SenderKeyRecordStructure; + + /** + * Verifies a SenderKeyRecordStructure message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SenderKeyRecordStructure message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SenderKeyRecordStructure + */ + public static fromObject(object: { [k: string]: any }): proto.SenderKeyRecordStructure; + + /** + * Creates a plain object from a SenderKeyRecordStructure message. Also converts values to other types if specified. + * @param message SenderKeyRecordStructure + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SenderKeyRecordStructure, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SenderKeyRecordStructure to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SenderKeyStateStructure. */ + interface ISenderKeyStateStructure { + + /** SenderKeyStateStructure senderKeyId */ + senderKeyId?: (number|null); + + /** SenderKeyStateStructure senderChainKey */ + senderChainKey?: (proto.ISenderChainKey|null); + + /** SenderKeyStateStructure senderSigningKey */ + senderSigningKey?: (proto.ISenderSigningKey|null); + + /** SenderKeyStateStructure senderMessageKeys */ + senderMessageKeys?: (proto.ISenderMessageKey[]|null); + } + + /** Represents a SenderKeyStateStructure. */ + class SenderKeyStateStructure implements ISenderKeyStateStructure { + + /** + * Constructs a new SenderKeyStateStructure. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ISenderKeyStateStructure); + + /** SenderKeyStateStructure senderKeyId. */ + public senderKeyId: number; + + /** SenderKeyStateStructure senderChainKey. */ + public senderChainKey?: (proto.ISenderChainKey|null); + + /** SenderKeyStateStructure senderSigningKey. */ + public senderSigningKey?: (proto.ISenderSigningKey|null); + + /** SenderKeyStateStructure senderMessageKeys. */ + public senderMessageKeys: proto.ISenderMessageKey[]; + + /** + * Creates a new SenderKeyStateStructure instance using the specified properties. + * @param [properties] Properties to set + * @returns SenderKeyStateStructure instance + */ + public static create(properties?: proto.ISenderKeyStateStructure): proto.SenderKeyStateStructure; + + /** + * Encodes the specified SenderKeyStateStructure message. Does not implicitly {@link proto.SenderKeyStateStructure.verify|verify} messages. + * @param message SenderKeyStateStructure message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ISenderKeyStateStructure, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SenderKeyStateStructure message, length delimited. Does not implicitly {@link proto.SenderKeyStateStructure.verify|verify} messages. + * @param message SenderKeyStateStructure message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ISenderKeyStateStructure, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SenderKeyStateStructure message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SenderKeyStateStructure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.SenderKeyStateStructure; + + /** + * Decodes a SenderKeyStateStructure message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SenderKeyStateStructure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.SenderKeyStateStructure; + + /** + * Verifies a SenderKeyStateStructure message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SenderKeyStateStructure message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SenderKeyStateStructure + */ + public static fromObject(object: { [k: string]: any }): proto.SenderKeyStateStructure; + + /** + * Creates a plain object from a SenderKeyStateStructure message. Also converts values to other types if specified. + * @param message SenderKeyStateStructure + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SenderKeyStateStructure, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SenderKeyStateStructure to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SenderMessageKey. */ + interface ISenderMessageKey { + + /** SenderMessageKey iteration */ + iteration?: (number|null); + + /** SenderMessageKey seed */ + seed?: (Uint8Array|null); + } + + /** Represents a SenderMessageKey. */ + class SenderMessageKey implements ISenderMessageKey { + + /** + * Constructs a new SenderMessageKey. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ISenderMessageKey); + + /** SenderMessageKey iteration. */ + public iteration: number; + + /** SenderMessageKey seed. */ + public seed: Uint8Array; + + /** + * Creates a new SenderMessageKey instance using the specified properties. + * @param [properties] Properties to set + * @returns SenderMessageKey instance + */ + public static create(properties?: proto.ISenderMessageKey): proto.SenderMessageKey; + + /** + * Encodes the specified SenderMessageKey message. Does not implicitly {@link proto.SenderMessageKey.verify|verify} messages. + * @param message SenderMessageKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ISenderMessageKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SenderMessageKey message, length delimited. Does not implicitly {@link proto.SenderMessageKey.verify|verify} messages. + * @param message SenderMessageKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ISenderMessageKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SenderMessageKey message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SenderMessageKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.SenderMessageKey; + + /** + * Decodes a SenderMessageKey message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SenderMessageKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.SenderMessageKey; + + /** + * Verifies a SenderMessageKey message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SenderMessageKey message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SenderMessageKey + */ + public static fromObject(object: { [k: string]: any }): proto.SenderMessageKey; + + /** + * Creates a plain object from a SenderMessageKey message. Also converts values to other types if specified. + * @param message SenderMessageKey + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SenderMessageKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SenderMessageKey to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SenderSigningKey. */ + interface ISenderSigningKey { + + /** SenderSigningKey public */ + "public"?: (Uint8Array|null); + + /** SenderSigningKey private */ + "private"?: (Uint8Array|null); + } + + /** Represents a SenderSigningKey. */ + class SenderSigningKey implements ISenderSigningKey { + + /** + * Constructs a new SenderSigningKey. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ISenderSigningKey); + + /** SenderSigningKey public. */ + public public: Uint8Array; + + /** SenderSigningKey private. */ + public private: Uint8Array; + + /** + * Creates a new SenderSigningKey instance using the specified properties. + * @param [properties] Properties to set + * @returns SenderSigningKey instance + */ + public static create(properties?: proto.ISenderSigningKey): proto.SenderSigningKey; + + /** + * Encodes the specified SenderSigningKey message. Does not implicitly {@link proto.SenderSigningKey.verify|verify} messages. + * @param message SenderSigningKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ISenderSigningKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SenderSigningKey message, length delimited. Does not implicitly {@link proto.SenderSigningKey.verify|verify} messages. + * @param message SenderSigningKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ISenderSigningKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SenderSigningKey message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SenderSigningKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.SenderSigningKey; + + /** + * Decodes a SenderSigningKey message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SenderSigningKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.SenderSigningKey; + + /** + * Verifies a SenderSigningKey message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SenderSigningKey message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SenderSigningKey + */ + public static fromObject(object: { [k: string]: any }): proto.SenderSigningKey; + + /** + * Creates a plain object from a SenderSigningKey message. Also converts values to other types if specified. + * @param message SenderSigningKey + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SenderSigningKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SenderSigningKey to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServerErrorReceipt. */ + interface IServerErrorReceipt { + + /** ServerErrorReceipt stanzaId */ + stanzaId?: (string|null); + } + + /** Represents a ServerErrorReceipt. */ + class ServerErrorReceipt implements IServerErrorReceipt { + + /** + * Constructs a new ServerErrorReceipt. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IServerErrorReceipt); + + /** ServerErrorReceipt stanzaId. */ + public stanzaId: string; + + /** + * Creates a new ServerErrorReceipt instance using the specified properties. + * @param [properties] Properties to set + * @returns ServerErrorReceipt instance + */ + public static create(properties?: proto.IServerErrorReceipt): proto.ServerErrorReceipt; + + /** + * Encodes the specified ServerErrorReceipt message. Does not implicitly {@link proto.ServerErrorReceipt.verify|verify} messages. + * @param message ServerErrorReceipt message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IServerErrorReceipt, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServerErrorReceipt message, length delimited. Does not implicitly {@link proto.ServerErrorReceipt.verify|verify} messages. + * @param message ServerErrorReceipt message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IServerErrorReceipt, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServerErrorReceipt message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServerErrorReceipt + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.ServerErrorReceipt; + + /** + * Decodes a ServerErrorReceipt message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServerErrorReceipt + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.ServerErrorReceipt; + + /** + * Verifies a ServerErrorReceipt message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServerErrorReceipt message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServerErrorReceipt + */ + public static fromObject(object: { [k: string]: any }): proto.ServerErrorReceipt; + + /** + * Creates a plain object from a ServerErrorReceipt message. Also converts values to other types if specified. + * @param message ServerErrorReceipt + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ServerErrorReceipt, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServerErrorReceipt to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServerHello. */ + interface IServerHello { + + /** ServerHello ephemeral */ + ephemeral?: (Uint8Array|null); + + /** ServerHello static */ + "static"?: (Uint8Array|null); + + /** ServerHello payload */ + payload?: (Uint8Array|null); + } + + /** Represents a ServerHello. */ + class ServerHello implements IServerHello { + + /** + * Constructs a new ServerHello. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IServerHello); + + /** ServerHello ephemeral. */ + public ephemeral: Uint8Array; + + /** ServerHello static. */ + public static: Uint8Array; + + /** ServerHello payload. */ + public payload: Uint8Array; + + /** + * Creates a new ServerHello instance using the specified properties. + * @param [properties] Properties to set + * @returns ServerHello instance + */ + public static create(properties?: proto.IServerHello): proto.ServerHello; + + /** + * Encodes the specified ServerHello message. Does not implicitly {@link proto.ServerHello.verify|verify} messages. + * @param message ServerHello message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IServerHello, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServerHello message, length delimited. Does not implicitly {@link proto.ServerHello.verify|verify} messages. + * @param message ServerHello message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IServerHello, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServerHello message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServerHello + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.ServerHello; + + /** + * Decodes a ServerHello message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServerHello + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.ServerHello; + + /** + * Verifies a ServerHello message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServerHello message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServerHello + */ + public static fromObject(object: { [k: string]: any }): proto.ServerHello; + + /** + * Creates a plain object from a ServerHello message. Also converts values to other types if specified. + * @param message ServerHello + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ServerHello, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServerHello to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SessionStructure. */ + interface ISessionStructure { + + /** SessionStructure sessionVersion */ + sessionVersion?: (number|null); + + /** SessionStructure localIdentityPublic */ + localIdentityPublic?: (Uint8Array|null); + + /** SessionStructure remoteIdentityPublic */ + remoteIdentityPublic?: (Uint8Array|null); + + /** SessionStructure rootKey */ + rootKey?: (Uint8Array|null); + + /** SessionStructure previousCounter */ + previousCounter?: (number|null); + + /** SessionStructure senderChain */ + senderChain?: (proto.IChain|null); + + /** SessionStructure receiverChains */ + receiverChains?: (proto.IChain[]|null); + + /** SessionStructure pendingKeyExchange */ + pendingKeyExchange?: (proto.IPendingKeyExchange|null); + + /** SessionStructure pendingPreKey */ + pendingPreKey?: (proto.IPendingPreKey|null); + + /** SessionStructure remoteRegistrationId */ + remoteRegistrationId?: (number|null); + + /** SessionStructure localRegistrationId */ + localRegistrationId?: (number|null); + + /** SessionStructure needsRefresh */ + needsRefresh?: (boolean|null); + + /** SessionStructure aliceBaseKey */ + aliceBaseKey?: (Uint8Array|null); + } + + /** Represents a SessionStructure. */ + class SessionStructure implements ISessionStructure { + + /** + * Constructs a new SessionStructure. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ISessionStructure); + + /** SessionStructure sessionVersion. */ + public sessionVersion: number; + + /** SessionStructure localIdentityPublic. */ + public localIdentityPublic: Uint8Array; + + /** SessionStructure remoteIdentityPublic. */ + public remoteIdentityPublic: Uint8Array; + + /** SessionStructure rootKey. */ + public rootKey: Uint8Array; + + /** SessionStructure previousCounter. */ + public previousCounter: number; + + /** SessionStructure senderChain. */ + public senderChain?: (proto.IChain|null); + + /** SessionStructure receiverChains. */ + public receiverChains: proto.IChain[]; + + /** SessionStructure pendingKeyExchange. */ + public pendingKeyExchange?: (proto.IPendingKeyExchange|null); + + /** SessionStructure pendingPreKey. */ + public pendingPreKey?: (proto.IPendingPreKey|null); + + /** SessionStructure remoteRegistrationId. */ + public remoteRegistrationId: number; + + /** SessionStructure localRegistrationId. */ + public localRegistrationId: number; + + /** SessionStructure needsRefresh. */ + public needsRefresh: boolean; + + /** SessionStructure aliceBaseKey. */ + public aliceBaseKey: Uint8Array; + + /** + * Creates a new SessionStructure instance using the specified properties. + * @param [properties] Properties to set + * @returns SessionStructure instance + */ + public static create(properties?: proto.ISessionStructure): proto.SessionStructure; + + /** + * Encodes the specified SessionStructure message. Does not implicitly {@link proto.SessionStructure.verify|verify} messages. + * @param message SessionStructure message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ISessionStructure, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SessionStructure message, length delimited. Does not implicitly {@link proto.SessionStructure.verify|verify} messages. + * @param message SessionStructure message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ISessionStructure, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SessionStructure message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SessionStructure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.SessionStructure; + + /** + * Decodes a SessionStructure message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SessionStructure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.SessionStructure; + + /** + * Verifies a SessionStructure message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SessionStructure message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SessionStructure + */ + public static fromObject(object: { [k: string]: any }): proto.SessionStructure; + + /** + * Creates a plain object from a SessionStructure message. Also converts values to other types if specified. + * @param message SessionStructure + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SessionStructure, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SessionStructure to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a ShopMessage. */ interface IShopMessage { @@ -11667,6 +20547,120 @@ export namespace proto { } } + /** Properties of a SignedPreKeyRecordStructure. */ + interface ISignedPreKeyRecordStructure { + + /** SignedPreKeyRecordStructure id */ + id?: (number|null); + + /** SignedPreKeyRecordStructure publicKey */ + publicKey?: (Uint8Array|null); + + /** SignedPreKeyRecordStructure privateKey */ + privateKey?: (Uint8Array|null); + + /** SignedPreKeyRecordStructure signature */ + signature?: (Uint8Array|null); + + /** SignedPreKeyRecordStructure timestamp */ + timestamp?: (number|Long|null); + } + + /** Represents a SignedPreKeyRecordStructure. */ + class SignedPreKeyRecordStructure implements ISignedPreKeyRecordStructure { + + /** + * Constructs a new SignedPreKeyRecordStructure. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ISignedPreKeyRecordStructure); + + /** SignedPreKeyRecordStructure id. */ + public id: number; + + /** SignedPreKeyRecordStructure publicKey. */ + public publicKey: Uint8Array; + + /** SignedPreKeyRecordStructure privateKey. */ + public privateKey: Uint8Array; + + /** SignedPreKeyRecordStructure signature. */ + public signature: Uint8Array; + + /** SignedPreKeyRecordStructure timestamp. */ + public timestamp: (number|Long); + + /** + * Creates a new SignedPreKeyRecordStructure instance using the specified properties. + * @param [properties] Properties to set + * @returns SignedPreKeyRecordStructure instance + */ + public static create(properties?: proto.ISignedPreKeyRecordStructure): proto.SignedPreKeyRecordStructure; + + /** + * Encodes the specified SignedPreKeyRecordStructure message. Does not implicitly {@link proto.SignedPreKeyRecordStructure.verify|verify} messages. + * @param message SignedPreKeyRecordStructure message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ISignedPreKeyRecordStructure, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SignedPreKeyRecordStructure message, length delimited. Does not implicitly {@link proto.SignedPreKeyRecordStructure.verify|verify} messages. + * @param message SignedPreKeyRecordStructure message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ISignedPreKeyRecordStructure, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SignedPreKeyRecordStructure message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SignedPreKeyRecordStructure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.SignedPreKeyRecordStructure; + + /** + * Decodes a SignedPreKeyRecordStructure message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SignedPreKeyRecordStructure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.SignedPreKeyRecordStructure; + + /** + * Verifies a SignedPreKeyRecordStructure message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SignedPreKeyRecordStructure message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SignedPreKeyRecordStructure + */ + public static fromObject(object: { [k: string]: any }): proto.SignedPreKeyRecordStructure; + + /** + * Creates a plain object from a SignedPreKeyRecordStructure message. Also converts values to other types if specified. + * @param message SignedPreKeyRecordStructure + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SignedPreKeyRecordStructure, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SignedPreKeyRecordStructure to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a SingleSelectReply. */ interface ISingleSelectReply { @@ -11757,6 +20751,192 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a StarAction. */ + interface IStarAction { + + /** StarAction starred */ + starred?: (boolean|null); + } + + /** Represents a StarAction. */ + class StarAction implements IStarAction { + + /** + * Constructs a new StarAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IStarAction); + + /** StarAction starred. */ + public starred: boolean; + + /** + * Creates a new StarAction instance using the specified properties. + * @param [properties] Properties to set + * @returns StarAction instance + */ + public static create(properties?: proto.IStarAction): proto.StarAction; + + /** + * Encodes the specified StarAction message. Does not implicitly {@link proto.StarAction.verify|verify} messages. + * @param message StarAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IStarAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StarAction message, length delimited. Does not implicitly {@link proto.StarAction.verify|verify} messages. + * @param message StarAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IStarAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StarAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StarAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.StarAction; + + /** + * Decodes a StarAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StarAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.StarAction; + + /** + * Verifies a StarAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StarAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StarAction + */ + public static fromObject(object: { [k: string]: any }): proto.StarAction; + + /** + * Creates a plain object from a StarAction message. Also converts values to other types if specified. + * @param message StarAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.StarAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StarAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a StatusPSA. */ + interface IStatusPSA { + + /** StatusPSA campaignId */ + campaignId: (number|Long); + + /** StatusPSA campaignExpirationTimestamp */ + campaignExpirationTimestamp?: (number|Long|null); + } + + /** Represents a StatusPSA. */ + class StatusPSA implements IStatusPSA { + + /** + * Constructs a new StatusPSA. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IStatusPSA); + + /** StatusPSA campaignId. */ + public campaignId: (number|Long); + + /** StatusPSA campaignExpirationTimestamp. */ + public campaignExpirationTimestamp: (number|Long); + + /** + * Creates a new StatusPSA instance using the specified properties. + * @param [properties] Properties to set + * @returns StatusPSA instance + */ + public static create(properties?: proto.IStatusPSA): proto.StatusPSA; + + /** + * Encodes the specified StatusPSA message. Does not implicitly {@link proto.StatusPSA.verify|verify} messages. + * @param message StatusPSA message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IStatusPSA, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StatusPSA message, length delimited. Does not implicitly {@link proto.StatusPSA.verify|verify} messages. + * @param message StatusPSA message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IStatusPSA, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StatusPSA message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StatusPSA + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.StatusPSA; + + /** + * Decodes a StatusPSA message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StatusPSA + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.StatusPSA; + + /** + * Verifies a StatusPSA message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StatusPSA message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StatusPSA + */ + public static fromObject(object: { [k: string]: any }): proto.StatusPSA; + + /** + * Creates a plain object from a StatusPSA message. Also converts values to other types if specified. + * @param message StatusPSA + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.StatusPSA, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StatusPSA to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a StickerMessage. */ interface IStickerMessage { @@ -12033,2808 +21213,661 @@ export namespace proto { public toJSON(): { [k: string]: any }; } - /** Properties of a TemplateButton. */ - interface ITemplateButton { + /** Properties of a SubscriptionAction. */ + interface ISubscriptionAction { - /** TemplateButton index */ - index?: (number|null); + /** SubscriptionAction isDeactivated */ + isDeactivated?: (boolean|null); - /** TemplateButton quickReplyButton */ - quickReplyButton?: (proto.IQuickReplyButton|null); + /** SubscriptionAction isAutoRenewing */ + isAutoRenewing?: (boolean|null); - /** TemplateButton urlButton */ - urlButton?: (proto.IURLButton|null); - - /** TemplateButton callButton */ - callButton?: (proto.ICallButton|null); + /** SubscriptionAction expirationDate */ + expirationDate?: (number|Long|null); } - /** Represents a TemplateButton. */ - class TemplateButton implements ITemplateButton { + /** Represents a SubscriptionAction. */ + class SubscriptionAction implements ISubscriptionAction { /** - * Constructs a new TemplateButton. + * Constructs a new SubscriptionAction. * @param [properties] Properties to set */ - constructor(properties?: proto.ITemplateButton); + constructor(properties?: proto.ISubscriptionAction); - /** TemplateButton index. */ - public index: number; + /** SubscriptionAction isDeactivated. */ + public isDeactivated: boolean; - /** TemplateButton quickReplyButton. */ - public quickReplyButton?: (proto.IQuickReplyButton|null); + /** SubscriptionAction isAutoRenewing. */ + public isAutoRenewing: boolean; - /** TemplateButton urlButton. */ - public urlButton?: (proto.IURLButton|null); - - /** TemplateButton callButton. */ - public callButton?: (proto.ICallButton|null); - - /** TemplateButton button. */ - public button?: ("quickReplyButton"|"urlButton"|"callButton"); + /** SubscriptionAction expirationDate. */ + public expirationDate: (number|Long); /** - * Creates a new TemplateButton instance using the specified properties. + * Creates a new SubscriptionAction instance using the specified properties. * @param [properties] Properties to set - * @returns TemplateButton instance + * @returns SubscriptionAction instance */ - public static create(properties?: proto.ITemplateButton): proto.TemplateButton; + public static create(properties?: proto.ISubscriptionAction): proto.SubscriptionAction; /** - * Encodes the specified TemplateButton message. Does not implicitly {@link proto.TemplateButton.verify|verify} messages. - * @param message TemplateButton message or plain object to encode + * Encodes the specified SubscriptionAction message. Does not implicitly {@link proto.SubscriptionAction.verify|verify} messages. + * @param message SubscriptionAction message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: proto.ITemplateButton, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: proto.ISubscriptionAction, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TemplateButton message, length delimited. Does not implicitly {@link proto.TemplateButton.verify|verify} messages. - * @param message TemplateButton message or plain object to encode + * Encodes the specified SubscriptionAction message, length delimited. Does not implicitly {@link proto.SubscriptionAction.verify|verify} messages. + * @param message SubscriptionAction message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: proto.ITemplateButton, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: proto.ISubscriptionAction, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TemplateButton message from the specified reader or buffer. + * Decodes a SubscriptionAction message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TemplateButton + * @returns SubscriptionAction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.TemplateButton; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.SubscriptionAction; /** - * Decodes a TemplateButton message from the specified reader or buffer, length delimited. + * Decodes a SubscriptionAction message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TemplateButton + * @returns SubscriptionAction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.TemplateButton; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.SubscriptionAction; /** - * Verifies a TemplateButton message. + * Verifies a SubscriptionAction message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TemplateButton message from a plain object. Also converts values to their respective internal types. + * Creates a SubscriptionAction message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TemplateButton + * @returns SubscriptionAction */ - public static fromObject(object: { [k: string]: any }): proto.TemplateButton; + public static fromObject(object: { [k: string]: any }): proto.SubscriptionAction; /** - * Creates a plain object from a TemplateButton message. Also converts values to other types if specified. - * @param message TemplateButton + * Creates a plain object from a SubscriptionAction message. Also converts values to other types if specified. + * @param message SubscriptionAction * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: proto.TemplateButton, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: proto.SubscriptionAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TemplateButton to JSON. + * Converts this SubscriptionAction to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TemplateButtonReplyMessage. */ - interface ITemplateButtonReplyMessage { + /** Properties of a SyncActionData. */ + interface ISyncActionData { - /** TemplateButtonReplyMessage selectedId */ - selectedId?: (string|null); + /** SyncActionData index */ + index?: (Uint8Array|null); - /** TemplateButtonReplyMessage selectedDisplayText */ - selectedDisplayText?: (string|null); + /** SyncActionData value */ + value?: (proto.ISyncActionValue|null); - /** TemplateButtonReplyMessage contextInfo */ - contextInfo?: (proto.IContextInfo|null); + /** SyncActionData padding */ + padding?: (Uint8Array|null); - /** TemplateButtonReplyMessage selectedIndex */ - selectedIndex?: (number|null); + /** SyncActionData version */ + version?: (number|null); } - /** Represents a TemplateButtonReplyMessage. */ - class TemplateButtonReplyMessage implements ITemplateButtonReplyMessage { + /** Represents a SyncActionData. */ + class SyncActionData implements ISyncActionData { /** - * Constructs a new TemplateButtonReplyMessage. + * Constructs a new SyncActionData. * @param [properties] Properties to set */ - constructor(properties?: proto.ITemplateButtonReplyMessage); + constructor(properties?: proto.ISyncActionData); - /** TemplateButtonReplyMessage selectedId. */ - public selectedId: string; + /** SyncActionData index. */ + public index: Uint8Array; - /** TemplateButtonReplyMessage selectedDisplayText. */ - public selectedDisplayText: string; + /** SyncActionData value. */ + public value?: (proto.ISyncActionValue|null); - /** TemplateButtonReplyMessage contextInfo. */ - public contextInfo?: (proto.IContextInfo|null); + /** SyncActionData padding. */ + public padding: Uint8Array; - /** TemplateButtonReplyMessage selectedIndex. */ - public selectedIndex: number; + /** SyncActionData version. */ + public version: number; /** - * Creates a new TemplateButtonReplyMessage instance using the specified properties. + * Creates a new SyncActionData instance using the specified properties. * @param [properties] Properties to set - * @returns TemplateButtonReplyMessage instance + * @returns SyncActionData instance */ - public static create(properties?: proto.ITemplateButtonReplyMessage): proto.TemplateButtonReplyMessage; + public static create(properties?: proto.ISyncActionData): proto.SyncActionData; /** - * Encodes the specified TemplateButtonReplyMessage message. Does not implicitly {@link proto.TemplateButtonReplyMessage.verify|verify} messages. - * @param message TemplateButtonReplyMessage message or plain object to encode + * Encodes the specified SyncActionData message. Does not implicitly {@link proto.SyncActionData.verify|verify} messages. + * @param message SyncActionData message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: proto.ITemplateButtonReplyMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: proto.ISyncActionData, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TemplateButtonReplyMessage message, length delimited. Does not implicitly {@link proto.TemplateButtonReplyMessage.verify|verify} messages. - * @param message TemplateButtonReplyMessage message or plain object to encode + * Encodes the specified SyncActionData message, length delimited. Does not implicitly {@link proto.SyncActionData.verify|verify} messages. + * @param message SyncActionData message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: proto.ITemplateButtonReplyMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: proto.ISyncActionData, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TemplateButtonReplyMessage message from the specified reader or buffer. + * Decodes a SyncActionData message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TemplateButtonReplyMessage + * @returns SyncActionData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.TemplateButtonReplyMessage; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.SyncActionData; /** - * Decodes a TemplateButtonReplyMessage message from the specified reader or buffer, length delimited. + * Decodes a SyncActionData message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TemplateButtonReplyMessage + * @returns SyncActionData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.TemplateButtonReplyMessage; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.SyncActionData; /** - * Verifies a TemplateButtonReplyMessage message. + * Verifies a SyncActionData message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TemplateButtonReplyMessage message from a plain object. Also converts values to their respective internal types. + * Creates a SyncActionData message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TemplateButtonReplyMessage + * @returns SyncActionData */ - public static fromObject(object: { [k: string]: any }): proto.TemplateButtonReplyMessage; + public static fromObject(object: { [k: string]: any }): proto.SyncActionData; /** - * Creates a plain object from a TemplateButtonReplyMessage message. Also converts values to other types if specified. - * @param message TemplateButtonReplyMessage + * Creates a plain object from a SyncActionData message. Also converts values to other types if specified. + * @param message SyncActionData * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: proto.TemplateButtonReplyMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: proto.SyncActionData, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TemplateButtonReplyMessage to JSON. + * Converts this SyncActionData to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TemplateMessage. */ - interface ITemplateMessage { + /** Properties of a SyncActionMessage. */ + interface ISyncActionMessage { - /** TemplateMessage contextInfo */ - contextInfo?: (proto.IContextInfo|null); + /** SyncActionMessage key */ + key?: (proto.IMessageKey|null); - /** TemplateMessage hydratedTemplate */ - hydratedTemplate?: (proto.IHydratedFourRowTemplate|null); - - /** TemplateMessage fourRowTemplate */ - fourRowTemplate?: (proto.IFourRowTemplate|null); - - /** TemplateMessage hydratedFourRowTemplate */ - hydratedFourRowTemplate?: (proto.IHydratedFourRowTemplate|null); - } - - /** Represents a TemplateMessage. */ - class TemplateMessage implements ITemplateMessage { - - /** - * Constructs a new TemplateMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.ITemplateMessage); - - /** TemplateMessage contextInfo. */ - public contextInfo?: (proto.IContextInfo|null); - - /** TemplateMessage hydratedTemplate. */ - public hydratedTemplate?: (proto.IHydratedFourRowTemplate|null); - - /** TemplateMessage fourRowTemplate. */ - public fourRowTemplate?: (proto.IFourRowTemplate|null); - - /** TemplateMessage hydratedFourRowTemplate. */ - public hydratedFourRowTemplate?: (proto.IHydratedFourRowTemplate|null); - - /** TemplateMessage format. */ - public format?: ("fourRowTemplate"|"hydratedFourRowTemplate"); - - /** - * Creates a new TemplateMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns TemplateMessage instance - */ - public static create(properties?: proto.ITemplateMessage): proto.TemplateMessage; - - /** - * Encodes the specified TemplateMessage message. Does not implicitly {@link proto.TemplateMessage.verify|verify} messages. - * @param message TemplateMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.ITemplateMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TemplateMessage message, length delimited. Does not implicitly {@link proto.TemplateMessage.verify|verify} messages. - * @param message TemplateMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.ITemplateMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TemplateMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TemplateMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.TemplateMessage; - - /** - * Decodes a TemplateMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TemplateMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.TemplateMessage; - - /** - * Verifies a TemplateMessage message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TemplateMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TemplateMessage - */ - public static fromObject(object: { [k: string]: any }): proto.TemplateMessage; - - /** - * Creates a plain object from a TemplateMessage message. Also converts values to other types if specified. - * @param message TemplateMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.TemplateMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TemplateMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a URLButton. */ - interface IURLButton { - - /** URLButton displayText */ - displayText?: (proto.IHighlyStructuredMessage|null); - - /** URLButton url */ - url?: (proto.IHighlyStructuredMessage|null); - } - - /** Represents a URLButton. */ - class URLButton implements IURLButton { - - /** - * Constructs a new URLButton. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IURLButton); - - /** URLButton displayText. */ - public displayText?: (proto.IHighlyStructuredMessage|null); - - /** URLButton url. */ - public url?: (proto.IHighlyStructuredMessage|null); - - /** - * Creates a new URLButton instance using the specified properties. - * @param [properties] Properties to set - * @returns URLButton instance - */ - public static create(properties?: proto.IURLButton): proto.URLButton; - - /** - * Encodes the specified URLButton message. Does not implicitly {@link proto.URLButton.verify|verify} messages. - * @param message URLButton message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IURLButton, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified URLButton message, length delimited. Does not implicitly {@link proto.URLButton.verify|verify} messages. - * @param message URLButton message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IURLButton, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a URLButton message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns URLButton - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.URLButton; - - /** - * Decodes a URLButton message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns URLButton - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.URLButton; - - /** - * Verifies a URLButton message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a URLButton message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns URLButton - */ - public static fromObject(object: { [k: string]: any }): proto.URLButton; - - /** - * Creates a plain object from a URLButton message. Also converts values to other types if specified. - * @param message URLButton - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.URLButton, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this URLButton to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a VideoMessage. */ - interface IVideoMessage { - - /** VideoMessage url */ - url?: (string|null); - - /** VideoMessage mimetype */ - mimetype?: (string|null); - - /** VideoMessage fileSha256 */ - fileSha256?: (Uint8Array|null); - - /** VideoMessage fileLength */ - fileLength?: (number|Long|null); - - /** VideoMessage seconds */ - seconds?: (number|null); - - /** VideoMessage mediaKey */ - mediaKey?: (Uint8Array|null); - - /** VideoMessage caption */ - caption?: (string|null); - - /** VideoMessage gifPlayback */ - gifPlayback?: (boolean|null); - - /** VideoMessage height */ - height?: (number|null); - - /** VideoMessage width */ - width?: (number|null); - - /** VideoMessage fileEncSha256 */ - fileEncSha256?: (Uint8Array|null); - - /** VideoMessage interactiveAnnotations */ - interactiveAnnotations?: (proto.IInteractiveAnnotation[]|null); - - /** VideoMessage directPath */ - directPath?: (string|null); - - /** VideoMessage mediaKeyTimestamp */ - mediaKeyTimestamp?: (number|Long|null); - - /** VideoMessage jpegThumbnail */ - jpegThumbnail?: (Uint8Array|null); - - /** VideoMessage contextInfo */ - contextInfo?: (proto.IContextInfo|null); - - /** VideoMessage streamingSidecar */ - streamingSidecar?: (Uint8Array|null); - - /** VideoMessage gifAttribution */ - gifAttribution?: (proto.VideoMessage.VideoMessageAttribution|null); - - /** VideoMessage viewOnce */ - viewOnce?: (boolean|null); - - /** VideoMessage thumbnailDirectPath */ - thumbnailDirectPath?: (string|null); - - /** VideoMessage thumbnailSha256 */ - thumbnailSha256?: (Uint8Array|null); - - /** VideoMessage thumbnailEncSha256 */ - thumbnailEncSha256?: (Uint8Array|null); - - /** VideoMessage staticUrl */ - staticUrl?: (string|null); - } - - /** Represents a VideoMessage. */ - class VideoMessage implements IVideoMessage { - - /** - * Constructs a new VideoMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IVideoMessage); - - /** VideoMessage url. */ - public url: string; - - /** VideoMessage mimetype. */ - public mimetype: string; - - /** VideoMessage fileSha256. */ - public fileSha256: Uint8Array; - - /** VideoMessage fileLength. */ - public fileLength: (number|Long); - - /** VideoMessage seconds. */ - public seconds: number; - - /** VideoMessage mediaKey. */ - public mediaKey: Uint8Array; - - /** VideoMessage caption. */ - public caption: string; - - /** VideoMessage gifPlayback. */ - public gifPlayback: boolean; - - /** VideoMessage height. */ - public height: number; - - /** VideoMessage width. */ - public width: number; - - /** VideoMessage fileEncSha256. */ - public fileEncSha256: Uint8Array; - - /** VideoMessage interactiveAnnotations. */ - public interactiveAnnotations: proto.IInteractiveAnnotation[]; - - /** VideoMessage directPath. */ - public directPath: string; - - /** VideoMessage mediaKeyTimestamp. */ - public mediaKeyTimestamp: (number|Long); - - /** VideoMessage jpegThumbnail. */ - public jpegThumbnail: Uint8Array; - - /** VideoMessage contextInfo. */ - public contextInfo?: (proto.IContextInfo|null); - - /** VideoMessage streamingSidecar. */ - public streamingSidecar: Uint8Array; - - /** VideoMessage gifAttribution. */ - public gifAttribution: proto.VideoMessage.VideoMessageAttribution; - - /** VideoMessage viewOnce. */ - public viewOnce: boolean; - - /** VideoMessage thumbnailDirectPath. */ - public thumbnailDirectPath: string; - - /** VideoMessage thumbnailSha256. */ - public thumbnailSha256: Uint8Array; - - /** VideoMessage thumbnailEncSha256. */ - public thumbnailEncSha256: Uint8Array; - - /** VideoMessage staticUrl. */ - public staticUrl: string; - - /** - * Creates a new VideoMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns VideoMessage instance - */ - public static create(properties?: proto.IVideoMessage): proto.VideoMessage; - - /** - * Encodes the specified VideoMessage message. Does not implicitly {@link proto.VideoMessage.verify|verify} messages. - * @param message VideoMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IVideoMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VideoMessage message, length delimited. Does not implicitly {@link proto.VideoMessage.verify|verify} messages. - * @param message VideoMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IVideoMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VideoMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VideoMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.VideoMessage; - - /** - * Decodes a VideoMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VideoMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.VideoMessage; - - /** - * Verifies a VideoMessage message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VideoMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VideoMessage - */ - public static fromObject(object: { [k: string]: any }): proto.VideoMessage; - - /** - * Creates a plain object from a VideoMessage message. Also converts values to other types if specified. - * @param message VideoMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.VideoMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VideoMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace VideoMessage { - - /** VideoMessageAttribution enum. */ - enum VideoMessageAttribution { - NONE = 0, - GIPHY = 1, - TENOR = 2 - } - } - - /** Properties of an EphemeralSetting. */ - interface IEphemeralSetting { - - /** EphemeralSetting duration */ - duration?: (number|null); - - /** EphemeralSetting timestamp */ + /** SyncActionMessage timestamp */ timestamp?: (number|Long|null); } - /** Represents an EphemeralSetting. */ - class EphemeralSetting implements IEphemeralSetting { + /** Represents a SyncActionMessage. */ + class SyncActionMessage implements ISyncActionMessage { /** - * Constructs a new EphemeralSetting. + * Constructs a new SyncActionMessage. * @param [properties] Properties to set */ - constructor(properties?: proto.IEphemeralSetting); + constructor(properties?: proto.ISyncActionMessage); - /** EphemeralSetting duration. */ - public duration: number; + /** SyncActionMessage key. */ + public key?: (proto.IMessageKey|null); - /** EphemeralSetting timestamp. */ + /** SyncActionMessage timestamp. */ public timestamp: (number|Long); /** - * Creates a new EphemeralSetting instance using the specified properties. + * Creates a new SyncActionMessage instance using the specified properties. * @param [properties] Properties to set - * @returns EphemeralSetting instance + * @returns SyncActionMessage instance */ - public static create(properties?: proto.IEphemeralSetting): proto.EphemeralSetting; + public static create(properties?: proto.ISyncActionMessage): proto.SyncActionMessage; /** - * Encodes the specified EphemeralSetting message. Does not implicitly {@link proto.EphemeralSetting.verify|verify} messages. - * @param message EphemeralSetting message or plain object to encode + * Encodes the specified SyncActionMessage message. Does not implicitly {@link proto.SyncActionMessage.verify|verify} messages. + * @param message SyncActionMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: proto.IEphemeralSetting, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: proto.ISyncActionMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EphemeralSetting message, length delimited. Does not implicitly {@link proto.EphemeralSetting.verify|verify} messages. - * @param message EphemeralSetting message or plain object to encode + * Encodes the specified SyncActionMessage message, length delimited. Does not implicitly {@link proto.SyncActionMessage.verify|verify} messages. + * @param message SyncActionMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: proto.IEphemeralSetting, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: proto.ISyncActionMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EphemeralSetting message from the specified reader or buffer. + * Decodes a SyncActionMessage message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EphemeralSetting + * @returns SyncActionMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.EphemeralSetting; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.SyncActionMessage; /** - * Decodes an EphemeralSetting message from the specified reader or buffer, length delimited. + * Decodes a SyncActionMessage message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EphemeralSetting + * @returns SyncActionMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.EphemeralSetting; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.SyncActionMessage; /** - * Verifies an EphemeralSetting message. + * Verifies a SyncActionMessage message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an EphemeralSetting message from a plain object. Also converts values to their respective internal types. + * Creates a SyncActionMessage message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EphemeralSetting + * @returns SyncActionMessage */ - public static fromObject(object: { [k: string]: any }): proto.EphemeralSetting; + public static fromObject(object: { [k: string]: any }): proto.SyncActionMessage; /** - * Creates a plain object from an EphemeralSetting message. Also converts values to other types if specified. - * @param message EphemeralSetting + * Creates a plain object from a SyncActionMessage message. Also converts values to other types if specified. + * @param message SyncActionMessage * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: proto.EphemeralSetting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: proto.SyncActionMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EphemeralSetting to JSON. + * Converts this SyncActionMessage to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an AutoDownloadSettings. */ - interface IAutoDownloadSettings { + /** Properties of a SyncActionMessageRange. */ + interface ISyncActionMessageRange { - /** AutoDownloadSettings downloadImages */ - downloadImages?: (boolean|null); + /** SyncActionMessageRange lastMessageTimestamp */ + lastMessageTimestamp?: (number|Long|null); - /** AutoDownloadSettings downloadAudio */ - downloadAudio?: (boolean|null); + /** SyncActionMessageRange lastSystemMessageTimestamp */ + lastSystemMessageTimestamp?: (number|Long|null); - /** AutoDownloadSettings downloadVideo */ - downloadVideo?: (boolean|null); - - /** AutoDownloadSettings downloadDocuments */ - downloadDocuments?: (boolean|null); + /** SyncActionMessageRange messages */ + messages?: (proto.ISyncActionMessage[]|null); } - /** Represents an AutoDownloadSettings. */ - class AutoDownloadSettings implements IAutoDownloadSettings { + /** Represents a SyncActionMessageRange. */ + class SyncActionMessageRange implements ISyncActionMessageRange { /** - * Constructs a new AutoDownloadSettings. + * Constructs a new SyncActionMessageRange. * @param [properties] Properties to set */ - constructor(properties?: proto.IAutoDownloadSettings); + constructor(properties?: proto.ISyncActionMessageRange); - /** AutoDownloadSettings downloadImages. */ - public downloadImages: boolean; + /** SyncActionMessageRange lastMessageTimestamp. */ + public lastMessageTimestamp: (number|Long); - /** AutoDownloadSettings downloadAudio. */ - public downloadAudio: boolean; + /** SyncActionMessageRange lastSystemMessageTimestamp. */ + public lastSystemMessageTimestamp: (number|Long); - /** AutoDownloadSettings downloadVideo. */ - public downloadVideo: boolean; - - /** AutoDownloadSettings downloadDocuments. */ - public downloadDocuments: boolean; + /** SyncActionMessageRange messages. */ + public messages: proto.ISyncActionMessage[]; /** - * Creates a new AutoDownloadSettings instance using the specified properties. + * Creates a new SyncActionMessageRange instance using the specified properties. * @param [properties] Properties to set - * @returns AutoDownloadSettings instance + * @returns SyncActionMessageRange instance */ - public static create(properties?: proto.IAutoDownloadSettings): proto.AutoDownloadSettings; + public static create(properties?: proto.ISyncActionMessageRange): proto.SyncActionMessageRange; /** - * Encodes the specified AutoDownloadSettings message. Does not implicitly {@link proto.AutoDownloadSettings.verify|verify} messages. - * @param message AutoDownloadSettings message or plain object to encode + * Encodes the specified SyncActionMessageRange message. Does not implicitly {@link proto.SyncActionMessageRange.verify|verify} messages. + * @param message SyncActionMessageRange message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: proto.IAutoDownloadSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: proto.ISyncActionMessageRange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AutoDownloadSettings message, length delimited. Does not implicitly {@link proto.AutoDownloadSettings.verify|verify} messages. - * @param message AutoDownloadSettings message or plain object to encode + * Encodes the specified SyncActionMessageRange message, length delimited. Does not implicitly {@link proto.SyncActionMessageRange.verify|verify} messages. + * @param message SyncActionMessageRange message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: proto.IAutoDownloadSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: proto.ISyncActionMessageRange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AutoDownloadSettings message from the specified reader or buffer. + * Decodes a SyncActionMessageRange message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AutoDownloadSettings + * @returns SyncActionMessageRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.AutoDownloadSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.SyncActionMessageRange; /** - * Decodes an AutoDownloadSettings message from the specified reader or buffer, length delimited. + * Decodes a SyncActionMessageRange message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AutoDownloadSettings + * @returns SyncActionMessageRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.AutoDownloadSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.SyncActionMessageRange; /** - * Verifies an AutoDownloadSettings message. + * Verifies a SyncActionMessageRange message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an AutoDownloadSettings message from a plain object. Also converts values to their respective internal types. + * Creates a SyncActionMessageRange message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AutoDownloadSettings + * @returns SyncActionMessageRange */ - public static fromObject(object: { [k: string]: any }): proto.AutoDownloadSettings; + public static fromObject(object: { [k: string]: any }): proto.SyncActionMessageRange; /** - * Creates a plain object from an AutoDownloadSettings message. Also converts values to other types if specified. - * @param message AutoDownloadSettings + * Creates a plain object from a SyncActionMessageRange message. Also converts values to other types if specified. + * @param message SyncActionMessageRange * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: proto.AutoDownloadSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: proto.SyncActionMessageRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AutoDownloadSettings to JSON. + * Converts this SyncActionMessageRange to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Conversation. */ - interface IConversation { + /** Properties of a SyncActionValue. */ + interface ISyncActionValue { - /** Conversation id */ - id: string; + /** SyncActionValue timestamp */ + timestamp?: (number|Long|null); - /** Conversation messages */ - messages?: (proto.IHistorySyncMsg[]|null); + /** SyncActionValue starAction */ + starAction?: (proto.IStarAction|null); - /** Conversation newJid */ - newJid?: (string|null); + /** SyncActionValue contactAction */ + contactAction?: (proto.IContactAction|null); - /** Conversation oldJid */ - oldJid?: (string|null); + /** SyncActionValue muteAction */ + muteAction?: (proto.IMuteAction|null); - /** Conversation lastMsgTimestamp */ - lastMsgTimestamp?: (number|Long|null); + /** SyncActionValue pinAction */ + pinAction?: (proto.IPinAction|null); - /** Conversation unreadCount */ - unreadCount?: (number|null); + /** SyncActionValue securityNotificationSetting */ + securityNotificationSetting?: (proto.ISecurityNotificationSetting|null); - /** Conversation readOnly */ - readOnly?: (boolean|null); + /** SyncActionValue pushNameSetting */ + pushNameSetting?: (proto.IPushNameSetting|null); - /** Conversation endOfHistoryTransfer */ - endOfHistoryTransfer?: (boolean|null); + /** SyncActionValue quickReplyAction */ + quickReplyAction?: (proto.IQuickReplyAction|null); - /** Conversation ephemeralExpiration */ - ephemeralExpiration?: (number|null); + /** SyncActionValue recentStickerWeightsAction */ + recentStickerWeightsAction?: (proto.IRecentStickerWeightsAction|null); - /** Conversation ephemeralSettingTimestamp */ - ephemeralSettingTimestamp?: (number|Long|null); + /** SyncActionValue recentStickerMetadata */ + recentStickerMetadata?: (proto.IRecentStickerMetadata|null); - /** Conversation endOfHistoryTransferType */ - endOfHistoryTransferType?: (proto.Conversation.ConversationEndOfHistoryTransferType|null); + /** SyncActionValue recentEmojiWeightsAction */ + recentEmojiWeightsAction?: (proto.IRecentEmojiWeightsAction|null); - /** Conversation conversationTimestamp */ - conversationTimestamp?: (number|Long|null); + /** SyncActionValue labelEditAction */ + labelEditAction?: (proto.ILabelEditAction|null); - /** Conversation name */ - name?: (string|null); + /** SyncActionValue labelAssociationAction */ + labelAssociationAction?: (proto.ILabelAssociationAction|null); - /** Conversation pHash */ - pHash?: (string|null); + /** SyncActionValue localeSetting */ + localeSetting?: (proto.ILocaleSetting|null); - /** Conversation notSpam */ - notSpam?: (boolean|null); + /** SyncActionValue archiveChatAction */ + archiveChatAction?: (proto.IArchiveChatAction|null); - /** Conversation archived */ - archived?: (boolean|null); + /** SyncActionValue deleteMessageForMeAction */ + deleteMessageForMeAction?: (proto.IDeleteMessageForMeAction|null); - /** Conversation disappearingMode */ - disappearingMode?: (proto.IDisappearingMode|null); + /** SyncActionValue keyExpiration */ + keyExpiration?: (proto.IKeyExpiration|null); - /** Conversation unreadMentionCount */ - unreadMentionCount?: (number|null); + /** SyncActionValue markChatAsReadAction */ + markChatAsReadAction?: (proto.IMarkChatAsReadAction|null); - /** Conversation markedAsUnread */ - markedAsUnread?: (boolean|null); + /** SyncActionValue clearChatAction */ + clearChatAction?: (proto.IClearChatAction|null); - /** Conversation participant */ - participant?: (proto.IGroupParticipant[]|null); + /** SyncActionValue deleteChatAction */ + deleteChatAction?: (proto.IDeleteChatAction|null); - /** Conversation tcToken */ - tcToken?: (Uint8Array|null); + /** SyncActionValue unarchiveChatsSetting */ + unarchiveChatsSetting?: (proto.IUnarchiveChatsSetting|null); - /** Conversation tcTokenTimestamp */ - tcTokenTimestamp?: (number|Long|null); + /** SyncActionValue primaryFeature */ + primaryFeature?: (proto.IPrimaryFeature|null); - /** Conversation contactPrimaryIdentityKey */ - contactPrimaryIdentityKey?: (Uint8Array|null); + /** SyncActionValue favoriteStickerAction */ + favoriteStickerAction?: (proto.IFavoriteStickerAction|null); - /** Conversation pinned */ - pinned?: (number|null); + /** SyncActionValue androidUnsupportedActions */ + androidUnsupportedActions?: (proto.IAndroidUnsupportedActions|null); - /** Conversation muteEndTime */ - muteEndTime?: (number|Long|null); + /** SyncActionValue agentAction */ + agentAction?: (proto.IAgentAction|null); - /** Conversation wallpaper */ - wallpaper?: (proto.IWallpaperSettings|null); + /** SyncActionValue subscriptionAction */ + subscriptionAction?: (proto.ISubscriptionAction|null); - /** Conversation mediaVisibility */ - mediaVisibility?: (proto.MediaVisibility|null); + /** SyncActionValue userStatusMuteAction */ + userStatusMuteAction?: (proto.IUserStatusMuteAction|null); - /** Conversation tcTokenSenderTimestamp */ - tcTokenSenderTimestamp?: (number|Long|null); - - /** Conversation suspended */ - suspended?: (boolean|null); + /** SyncActionValue timeFormatAction */ + timeFormatAction?: (proto.ITimeFormatAction|null); } - /** Represents a Conversation. */ - class Conversation implements IConversation { + /** Represents a SyncActionValue. */ + class SyncActionValue implements ISyncActionValue { /** - * Constructs a new Conversation. + * Constructs a new SyncActionValue. * @param [properties] Properties to set */ - constructor(properties?: proto.IConversation); + constructor(properties?: proto.ISyncActionValue); - /** Conversation id. */ - public id: string; + /** SyncActionValue timestamp. */ + public timestamp: (number|Long); - /** Conversation messages. */ - public messages: proto.IHistorySyncMsg[]; + /** SyncActionValue starAction. */ + public starAction?: (proto.IStarAction|null); - /** Conversation newJid. */ - public newJid: string; + /** SyncActionValue contactAction. */ + public contactAction?: (proto.IContactAction|null); - /** Conversation oldJid. */ - public oldJid: string; + /** SyncActionValue muteAction. */ + public muteAction?: (proto.IMuteAction|null); - /** Conversation lastMsgTimestamp. */ - public lastMsgTimestamp: (number|Long); + /** SyncActionValue pinAction. */ + public pinAction?: (proto.IPinAction|null); - /** Conversation unreadCount. */ - public unreadCount: number; + /** SyncActionValue securityNotificationSetting. */ + public securityNotificationSetting?: (proto.ISecurityNotificationSetting|null); - /** Conversation readOnly. */ - public readOnly: boolean; + /** SyncActionValue pushNameSetting. */ + public pushNameSetting?: (proto.IPushNameSetting|null); - /** Conversation endOfHistoryTransfer. */ - public endOfHistoryTransfer: boolean; + /** SyncActionValue quickReplyAction. */ + public quickReplyAction?: (proto.IQuickReplyAction|null); - /** Conversation ephemeralExpiration. */ - public ephemeralExpiration: number; + /** SyncActionValue recentStickerWeightsAction. */ + public recentStickerWeightsAction?: (proto.IRecentStickerWeightsAction|null); - /** Conversation ephemeralSettingTimestamp. */ - public ephemeralSettingTimestamp: (number|Long); + /** SyncActionValue recentStickerMetadata. */ + public recentStickerMetadata?: (proto.IRecentStickerMetadata|null); - /** Conversation endOfHistoryTransferType. */ - public endOfHistoryTransferType: proto.Conversation.ConversationEndOfHistoryTransferType; + /** SyncActionValue recentEmojiWeightsAction. */ + public recentEmojiWeightsAction?: (proto.IRecentEmojiWeightsAction|null); - /** Conversation conversationTimestamp. */ - public conversationTimestamp: (number|Long); + /** SyncActionValue labelEditAction. */ + public labelEditAction?: (proto.ILabelEditAction|null); - /** Conversation name. */ - public name: string; + /** SyncActionValue labelAssociationAction. */ + public labelAssociationAction?: (proto.ILabelAssociationAction|null); - /** Conversation pHash. */ - public pHash: string; + /** SyncActionValue localeSetting. */ + public localeSetting?: (proto.ILocaleSetting|null); - /** Conversation notSpam. */ - public notSpam: boolean; + /** SyncActionValue archiveChatAction. */ + public archiveChatAction?: (proto.IArchiveChatAction|null); - /** Conversation archived. */ - public archived: boolean; + /** SyncActionValue deleteMessageForMeAction. */ + public deleteMessageForMeAction?: (proto.IDeleteMessageForMeAction|null); - /** Conversation disappearingMode. */ - public disappearingMode?: (proto.IDisappearingMode|null); + /** SyncActionValue keyExpiration. */ + public keyExpiration?: (proto.IKeyExpiration|null); - /** Conversation unreadMentionCount. */ - public unreadMentionCount: number; + /** SyncActionValue markChatAsReadAction. */ + public markChatAsReadAction?: (proto.IMarkChatAsReadAction|null); - /** Conversation markedAsUnread. */ - public markedAsUnread: boolean; + /** SyncActionValue clearChatAction. */ + public clearChatAction?: (proto.IClearChatAction|null); - /** Conversation participant. */ - public participant: proto.IGroupParticipant[]; + /** SyncActionValue deleteChatAction. */ + public deleteChatAction?: (proto.IDeleteChatAction|null); - /** Conversation tcToken. */ - public tcToken: Uint8Array; + /** SyncActionValue unarchiveChatsSetting. */ + public unarchiveChatsSetting?: (proto.IUnarchiveChatsSetting|null); - /** Conversation tcTokenTimestamp. */ - public tcTokenTimestamp: (number|Long); + /** SyncActionValue primaryFeature. */ + public primaryFeature?: (proto.IPrimaryFeature|null); - /** Conversation contactPrimaryIdentityKey. */ - public contactPrimaryIdentityKey: Uint8Array; + /** SyncActionValue favoriteStickerAction. */ + public favoriteStickerAction?: (proto.IFavoriteStickerAction|null); - /** Conversation pinned. */ - public pinned: number; + /** SyncActionValue androidUnsupportedActions. */ + public androidUnsupportedActions?: (proto.IAndroidUnsupportedActions|null); - /** Conversation muteEndTime. */ - public muteEndTime: (number|Long); + /** SyncActionValue agentAction. */ + public agentAction?: (proto.IAgentAction|null); - /** Conversation wallpaper. */ - public wallpaper?: (proto.IWallpaperSettings|null); + /** SyncActionValue subscriptionAction. */ + public subscriptionAction?: (proto.ISubscriptionAction|null); - /** Conversation mediaVisibility. */ - public mediaVisibility: proto.MediaVisibility; + /** SyncActionValue userStatusMuteAction. */ + public userStatusMuteAction?: (proto.IUserStatusMuteAction|null); - /** Conversation tcTokenSenderTimestamp. */ - public tcTokenSenderTimestamp: (number|Long); - - /** Conversation suspended. */ - public suspended: boolean; + /** SyncActionValue timeFormatAction. */ + public timeFormatAction?: (proto.ITimeFormatAction|null); /** - * Creates a new Conversation instance using the specified properties. + * Creates a new SyncActionValue instance using the specified properties. * @param [properties] Properties to set - * @returns Conversation instance + * @returns SyncActionValue instance */ - public static create(properties?: proto.IConversation): proto.Conversation; + public static create(properties?: proto.ISyncActionValue): proto.SyncActionValue; /** - * Encodes the specified Conversation message. Does not implicitly {@link proto.Conversation.verify|verify} messages. - * @param message Conversation message or plain object to encode + * Encodes the specified SyncActionValue message. Does not implicitly {@link proto.SyncActionValue.verify|verify} messages. + * @param message SyncActionValue message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: proto.IConversation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: proto.ISyncActionValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Conversation message, length delimited. Does not implicitly {@link proto.Conversation.verify|verify} messages. - * @param message Conversation message or plain object to encode + * Encodes the specified SyncActionValue message, length delimited. Does not implicitly {@link proto.SyncActionValue.verify|verify} messages. + * @param message SyncActionValue message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: proto.IConversation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: proto.ISyncActionValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Conversation message from the specified reader or buffer. + * Decodes a SyncActionValue message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Conversation + * @returns SyncActionValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.Conversation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.SyncActionValue; /** - * Decodes a Conversation message from the specified reader or buffer, length delimited. + * Decodes a SyncActionValue message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Conversation + * @returns SyncActionValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.Conversation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.SyncActionValue; /** - * Verifies a Conversation message. + * Verifies a SyncActionValue message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Conversation message from a plain object. Also converts values to their respective internal types. + * Creates a SyncActionValue message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Conversation + * @returns SyncActionValue */ - public static fromObject(object: { [k: string]: any }): proto.Conversation; + public static fromObject(object: { [k: string]: any }): proto.SyncActionValue; /** - * Creates a plain object from a Conversation message. Also converts values to other types if specified. - * @param message Conversation + * Creates a plain object from a SyncActionValue message. Also converts values to other types if specified. + * @param message SyncActionValue * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: proto.Conversation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: proto.SyncActionValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Conversation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace Conversation { - - /** ConversationEndOfHistoryTransferType enum. */ - enum ConversationEndOfHistoryTransferType { - COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY = 0, - COMPLETE_AND_NO_MORE_MESSAGE_REMAIN_ON_PRIMARY = 1 - } - } - - /** Properties of a GlobalSettings. */ - interface IGlobalSettings { - - /** GlobalSettings lightThemeWallpaper */ - lightThemeWallpaper?: (proto.IWallpaperSettings|null); - - /** GlobalSettings mediaVisibility */ - mediaVisibility?: (proto.MediaVisibility|null); - - /** GlobalSettings darkThemeWallpaper */ - darkThemeWallpaper?: (proto.IWallpaperSettings|null); - - /** GlobalSettings autoDownloadWiFi */ - autoDownloadWiFi?: (proto.IAutoDownloadSettings|null); - - /** GlobalSettings autoDownloadCellular */ - autoDownloadCellular?: (proto.IAutoDownloadSettings|null); - - /** GlobalSettings autoDownloadRoaming */ - autoDownloadRoaming?: (proto.IAutoDownloadSettings|null); - - /** GlobalSettings showIndividualNotificationsPreview */ - showIndividualNotificationsPreview?: (boolean|null); - - /** GlobalSettings showGroupNotificationsPreview */ - showGroupNotificationsPreview?: (boolean|null); - } - - /** Represents a GlobalSettings. */ - class GlobalSettings implements IGlobalSettings { - - /** - * Constructs a new GlobalSettings. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IGlobalSettings); - - /** GlobalSettings lightThemeWallpaper. */ - public lightThemeWallpaper?: (proto.IWallpaperSettings|null); - - /** GlobalSettings mediaVisibility. */ - public mediaVisibility: proto.MediaVisibility; - - /** GlobalSettings darkThemeWallpaper. */ - public darkThemeWallpaper?: (proto.IWallpaperSettings|null); - - /** GlobalSettings autoDownloadWiFi. */ - public autoDownloadWiFi?: (proto.IAutoDownloadSettings|null); - - /** GlobalSettings autoDownloadCellular. */ - public autoDownloadCellular?: (proto.IAutoDownloadSettings|null); - - /** GlobalSettings autoDownloadRoaming. */ - public autoDownloadRoaming?: (proto.IAutoDownloadSettings|null); - - /** GlobalSettings showIndividualNotificationsPreview. */ - public showIndividualNotificationsPreview: boolean; - - /** GlobalSettings showGroupNotificationsPreview. */ - public showGroupNotificationsPreview: boolean; - - /** - * Creates a new GlobalSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns GlobalSettings instance - */ - public static create(properties?: proto.IGlobalSettings): proto.GlobalSettings; - - /** - * Encodes the specified GlobalSettings message. Does not implicitly {@link proto.GlobalSettings.verify|verify} messages. - * @param message GlobalSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IGlobalSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GlobalSettings message, length delimited. Does not implicitly {@link proto.GlobalSettings.verify|verify} messages. - * @param message GlobalSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IGlobalSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GlobalSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GlobalSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.GlobalSettings; - - /** - * Decodes a GlobalSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GlobalSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.GlobalSettings; - - /** - * Verifies a GlobalSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GlobalSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GlobalSettings - */ - public static fromObject(object: { [k: string]: any }): proto.GlobalSettings; - - /** - * Creates a plain object from a GlobalSettings message. Also converts values to other types if specified. - * @param message GlobalSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.GlobalSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GlobalSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GroupParticipant. */ - interface IGroupParticipant { - - /** GroupParticipant userJid */ - userJid: string; - - /** GroupParticipant rank */ - rank?: (proto.GroupParticipant.GroupParticipantRank|null); - } - - /** Represents a GroupParticipant. */ - class GroupParticipant implements IGroupParticipant { - - /** - * Constructs a new GroupParticipant. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IGroupParticipant); - - /** GroupParticipant userJid. */ - public userJid: string; - - /** GroupParticipant rank. */ - public rank: proto.GroupParticipant.GroupParticipantRank; - - /** - * Creates a new GroupParticipant instance using the specified properties. - * @param [properties] Properties to set - * @returns GroupParticipant instance - */ - public static create(properties?: proto.IGroupParticipant): proto.GroupParticipant; - - /** - * Encodes the specified GroupParticipant message. Does not implicitly {@link proto.GroupParticipant.verify|verify} messages. - * @param message GroupParticipant message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IGroupParticipant, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GroupParticipant message, length delimited. Does not implicitly {@link proto.GroupParticipant.verify|verify} messages. - * @param message GroupParticipant message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IGroupParticipant, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GroupParticipant message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GroupParticipant - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.GroupParticipant; - - /** - * Decodes a GroupParticipant message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GroupParticipant - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.GroupParticipant; - - /** - * Verifies a GroupParticipant message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GroupParticipant message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GroupParticipant - */ - public static fromObject(object: { [k: string]: any }): proto.GroupParticipant; - - /** - * Creates a plain object from a GroupParticipant message. Also converts values to other types if specified. - * @param message GroupParticipant - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.GroupParticipant, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GroupParticipant to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace GroupParticipant { - - /** GroupParticipantRank enum. */ - enum GroupParticipantRank { - REGULAR = 0, - ADMIN = 1, - SUPERADMIN = 2 - } - } - - /** Properties of a HistorySync. */ - interface IHistorySync { - - /** HistorySync syncType */ - syncType: proto.HistorySync.HistorySyncHistorySyncType; - - /** HistorySync conversations */ - conversations?: (proto.IConversation[]|null); - - /** HistorySync statusV3Messages */ - statusV3Messages?: (proto.IWebMessageInfo[]|null); - - /** HistorySync chunkOrder */ - chunkOrder?: (number|null); - - /** HistorySync progress */ - progress?: (number|null); - - /** HistorySync pushnames */ - pushnames?: (proto.IPushname[]|null); - - /** HistorySync globalSettings */ - globalSettings?: (proto.IGlobalSettings|null); - - /** HistorySync threadIdUserSecret */ - threadIdUserSecret?: (Uint8Array|null); - - /** HistorySync threadDsTimeframeOffset */ - threadDsTimeframeOffset?: (number|null); - } - - /** Represents a HistorySync. */ - class HistorySync implements IHistorySync { - - /** - * Constructs a new HistorySync. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IHistorySync); - - /** HistorySync syncType. */ - public syncType: proto.HistorySync.HistorySyncHistorySyncType; - - /** HistorySync conversations. */ - public conversations: proto.IConversation[]; - - /** HistorySync statusV3Messages. */ - public statusV3Messages: proto.IWebMessageInfo[]; - - /** HistorySync chunkOrder. */ - public chunkOrder: number; - - /** HistorySync progress. */ - public progress: number; - - /** HistorySync pushnames. */ - public pushnames: proto.IPushname[]; - - /** HistorySync globalSettings. */ - public globalSettings?: (proto.IGlobalSettings|null); - - /** HistorySync threadIdUserSecret. */ - public threadIdUserSecret: Uint8Array; - - /** HistorySync threadDsTimeframeOffset. */ - public threadDsTimeframeOffset: number; - - /** - * Creates a new HistorySync instance using the specified properties. - * @param [properties] Properties to set - * @returns HistorySync instance - */ - public static create(properties?: proto.IHistorySync): proto.HistorySync; - - /** - * Encodes the specified HistorySync message. Does not implicitly {@link proto.HistorySync.verify|verify} messages. - * @param message HistorySync message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IHistorySync, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HistorySync message, length delimited. Does not implicitly {@link proto.HistorySync.verify|verify} messages. - * @param message HistorySync message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IHistorySync, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HistorySync message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HistorySync - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.HistorySync; - - /** - * Decodes a HistorySync message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HistorySync - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.HistorySync; - - /** - * Verifies a HistorySync message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HistorySync message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HistorySync - */ - public static fromObject(object: { [k: string]: any }): proto.HistorySync; - - /** - * Creates a plain object from a HistorySync message. Also converts values to other types if specified. - * @param message HistorySync - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.HistorySync, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HistorySync to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace HistorySync { - - /** HistorySyncHistorySyncType enum. */ - enum HistorySyncHistorySyncType { - INITIAL_BOOTSTRAP = 0, - INITIAL_STATUS_V3 = 1, - FULL = 2, - RECENT = 3, - PUSH_NAME = 4 - } - } - - /** Properties of a HistorySyncMsg. */ - interface IHistorySyncMsg { - - /** HistorySyncMsg message */ - message?: (proto.IWebMessageInfo|null); - - /** HistorySyncMsg msgOrderId */ - msgOrderId?: (number|Long|null); - } - - /** Represents a HistorySyncMsg. */ - class HistorySyncMsg implements IHistorySyncMsg { - - /** - * Constructs a new HistorySyncMsg. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IHistorySyncMsg); - - /** HistorySyncMsg message. */ - public message?: (proto.IWebMessageInfo|null); - - /** HistorySyncMsg msgOrderId. */ - public msgOrderId: (number|Long); - - /** - * Creates a new HistorySyncMsg instance using the specified properties. - * @param [properties] Properties to set - * @returns HistorySyncMsg instance - */ - public static create(properties?: proto.IHistorySyncMsg): proto.HistorySyncMsg; - - /** - * Encodes the specified HistorySyncMsg message. Does not implicitly {@link proto.HistorySyncMsg.verify|verify} messages. - * @param message HistorySyncMsg message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IHistorySyncMsg, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HistorySyncMsg message, length delimited. Does not implicitly {@link proto.HistorySyncMsg.verify|verify} messages. - * @param message HistorySyncMsg message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IHistorySyncMsg, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HistorySyncMsg message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HistorySyncMsg - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.HistorySyncMsg; - - /** - * Decodes a HistorySyncMsg message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HistorySyncMsg - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.HistorySyncMsg; - - /** - * Verifies a HistorySyncMsg message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HistorySyncMsg message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HistorySyncMsg - */ - public static fromObject(object: { [k: string]: any }): proto.HistorySyncMsg; - - /** - * Creates a plain object from a HistorySyncMsg message. Also converts values to other types if specified. - * @param message HistorySyncMsg - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.HistorySyncMsg, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HistorySyncMsg to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** MediaVisibility enum. */ - enum MediaVisibility { - DEFAULT = 0, - OFF = 1, - ON = 2 - } - - /** Properties of a Pushname. */ - interface IPushname { - - /** Pushname id */ - id?: (string|null); - - /** Pushname pushname */ - pushname?: (string|null); - } - - /** Represents a Pushname. */ - class Pushname implements IPushname { - - /** - * Constructs a new Pushname. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IPushname); - - /** Pushname id. */ - public id: string; - - /** Pushname pushname. */ - public pushname: string; - - /** - * Creates a new Pushname instance using the specified properties. - * @param [properties] Properties to set - * @returns Pushname instance - */ - public static create(properties?: proto.IPushname): proto.Pushname; - - /** - * Encodes the specified Pushname message. Does not implicitly {@link proto.Pushname.verify|verify} messages. - * @param message Pushname message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IPushname, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Pushname message, length delimited. Does not implicitly {@link proto.Pushname.verify|verify} messages. - * @param message Pushname message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IPushname, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Pushname message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Pushname - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.Pushname; - - /** - * Decodes a Pushname message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Pushname - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.Pushname; - - /** - * Verifies a Pushname message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Pushname message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Pushname - */ - public static fromObject(object: { [k: string]: any }): proto.Pushname; - - /** - * Creates a plain object from a Pushname message. Also converts values to other types if specified. - * @param message Pushname - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.Pushname, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Pushname to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a WallpaperSettings. */ - interface IWallpaperSettings { - - /** WallpaperSettings filename */ - filename?: (string|null); - - /** WallpaperSettings opacity */ - opacity?: (number|null); - } - - /** Represents a WallpaperSettings. */ - class WallpaperSettings implements IWallpaperSettings { - - /** - * Constructs a new WallpaperSettings. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IWallpaperSettings); - - /** WallpaperSettings filename. */ - public filename: string; - - /** WallpaperSettings opacity. */ - public opacity: number; - - /** - * Creates a new WallpaperSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns WallpaperSettings instance - */ - public static create(properties?: proto.IWallpaperSettings): proto.WallpaperSettings; - - /** - * Encodes the specified WallpaperSettings message. Does not implicitly {@link proto.WallpaperSettings.verify|verify} messages. - * @param message WallpaperSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IWallpaperSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WallpaperSettings message, length delimited. Does not implicitly {@link proto.WallpaperSettings.verify|verify} messages. - * @param message WallpaperSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IWallpaperSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WallpaperSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WallpaperSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.WallpaperSettings; - - /** - * Decodes a WallpaperSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WallpaperSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.WallpaperSettings; - - /** - * Verifies a WallpaperSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WallpaperSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WallpaperSettings - */ - public static fromObject(object: { [k: string]: any }): proto.WallpaperSettings; - - /** - * Creates a plain object from a WallpaperSettings message. Also converts values to other types if specified. - * @param message WallpaperSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.WallpaperSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WallpaperSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgOpaqueData. */ - interface IMsgOpaqueData { - - /** MsgOpaqueData body */ - body?: (string|null); - - /** MsgOpaqueData caption */ - caption?: (string|null); - - /** MsgOpaqueData lng */ - lng?: (number|null); - - /** MsgOpaqueData isLive */ - isLive?: (boolean|null); - - /** MsgOpaqueData lat */ - lat?: (number|null); - - /** MsgOpaqueData paymentAmount1000 */ - paymentAmount1000?: (number|null); - - /** MsgOpaqueData paymentNoteMsgBody */ - paymentNoteMsgBody?: (string|null); - - /** MsgOpaqueData canonicalUrl */ - canonicalUrl?: (string|null); - - /** MsgOpaqueData matchedText */ - matchedText?: (string|null); - - /** MsgOpaqueData title */ - title?: (string|null); - - /** MsgOpaqueData description */ - description?: (string|null); - - /** MsgOpaqueData futureproofBuffer */ - futureproofBuffer?: (Uint8Array|null); - - /** MsgOpaqueData clientUrl */ - clientUrl?: (string|null); - - /** MsgOpaqueData loc */ - loc?: (string|null); - - /** MsgOpaqueData pollName */ - pollName?: (string|null); - - /** MsgOpaqueData pollOptions */ - pollOptions?: (proto.IPollOption[]|null); - - /** MsgOpaqueData pollEncKey */ - pollEncKey?: (Uint8Array|null); - - /** MsgOpaqueData pollSelectableOptionsCount */ - pollSelectableOptionsCount?: (number|null); - } - - /** Represents a MsgOpaqueData. */ - class MsgOpaqueData implements IMsgOpaqueData { - - /** - * Constructs a new MsgOpaqueData. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IMsgOpaqueData); - - /** MsgOpaqueData body. */ - public body: string; - - /** MsgOpaqueData caption. */ - public caption: string; - - /** MsgOpaqueData lng. */ - public lng: number; - - /** MsgOpaqueData isLive. */ - public isLive: boolean; - - /** MsgOpaqueData lat. */ - public lat: number; - - /** MsgOpaqueData paymentAmount1000. */ - public paymentAmount1000: number; - - /** MsgOpaqueData paymentNoteMsgBody. */ - public paymentNoteMsgBody: string; - - /** MsgOpaqueData canonicalUrl. */ - public canonicalUrl: string; - - /** MsgOpaqueData matchedText. */ - public matchedText: string; - - /** MsgOpaqueData title. */ - public title: string; - - /** MsgOpaqueData description. */ - public description: string; - - /** MsgOpaqueData futureproofBuffer. */ - public futureproofBuffer: Uint8Array; - - /** MsgOpaqueData clientUrl. */ - public clientUrl: string; - - /** MsgOpaqueData loc. */ - public loc: string; - - /** MsgOpaqueData pollName. */ - public pollName: string; - - /** MsgOpaqueData pollOptions. */ - public pollOptions: proto.IPollOption[]; - - /** MsgOpaqueData pollEncKey. */ - public pollEncKey: Uint8Array; - - /** MsgOpaqueData pollSelectableOptionsCount. */ - public pollSelectableOptionsCount: number; - - /** - * Creates a new MsgOpaqueData instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgOpaqueData instance - */ - public static create(properties?: proto.IMsgOpaqueData): proto.MsgOpaqueData; - - /** - * Encodes the specified MsgOpaqueData message. Does not implicitly {@link proto.MsgOpaqueData.verify|verify} messages. - * @param message MsgOpaqueData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IMsgOpaqueData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgOpaqueData message, length delimited. Does not implicitly {@link proto.MsgOpaqueData.verify|verify} messages. - * @param message MsgOpaqueData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IMsgOpaqueData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgOpaqueData message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgOpaqueData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.MsgOpaqueData; - - /** - * Decodes a MsgOpaqueData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgOpaqueData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.MsgOpaqueData; - - /** - * Verifies a MsgOpaqueData message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgOpaqueData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgOpaqueData - */ - public static fromObject(object: { [k: string]: any }): proto.MsgOpaqueData; - - /** - * Creates a plain object from a MsgOpaqueData message. Also converts values to other types if specified. - * @param message MsgOpaqueData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.MsgOpaqueData, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgOpaqueData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgRowOpaqueData. */ - interface IMsgRowOpaqueData { - - /** MsgRowOpaqueData currentMsg */ - currentMsg?: (proto.IMsgOpaqueData|null); - - /** MsgRowOpaqueData quotedMsg */ - quotedMsg?: (proto.IMsgOpaqueData|null); - } - - /** Represents a MsgRowOpaqueData. */ - class MsgRowOpaqueData implements IMsgRowOpaqueData { - - /** - * Constructs a new MsgRowOpaqueData. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IMsgRowOpaqueData); - - /** MsgRowOpaqueData currentMsg. */ - public currentMsg?: (proto.IMsgOpaqueData|null); - - /** MsgRowOpaqueData quotedMsg. */ - public quotedMsg?: (proto.IMsgOpaqueData|null); - - /** - * Creates a new MsgRowOpaqueData instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgRowOpaqueData instance - */ - public static create(properties?: proto.IMsgRowOpaqueData): proto.MsgRowOpaqueData; - - /** - * Encodes the specified MsgRowOpaqueData message. Does not implicitly {@link proto.MsgRowOpaqueData.verify|verify} messages. - * @param message MsgRowOpaqueData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IMsgRowOpaqueData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgRowOpaqueData message, length delimited. Does not implicitly {@link proto.MsgRowOpaqueData.verify|verify} messages. - * @param message MsgRowOpaqueData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IMsgRowOpaqueData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgRowOpaqueData message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgRowOpaqueData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.MsgRowOpaqueData; - - /** - * Decodes a MsgRowOpaqueData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgRowOpaqueData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.MsgRowOpaqueData; - - /** - * Verifies a MsgRowOpaqueData message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgRowOpaqueData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgRowOpaqueData - */ - public static fromObject(object: { [k: string]: any }): proto.MsgRowOpaqueData; - - /** - * Creates a plain object from a MsgRowOpaqueData message. Also converts values to other types if specified. - * @param message MsgRowOpaqueData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.MsgRowOpaqueData, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgRowOpaqueData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a PollOption. */ - interface IPollOption { - - /** PollOption name */ - name?: (string|null); - } - - /** Represents a PollOption. */ - class PollOption implements IPollOption { - - /** - * Constructs a new PollOption. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IPollOption); - - /** PollOption name. */ - public name: string; - - /** - * Creates a new PollOption instance using the specified properties. - * @param [properties] Properties to set - * @returns PollOption instance - */ - public static create(properties?: proto.IPollOption): proto.PollOption; - - /** - * Encodes the specified PollOption message. Does not implicitly {@link proto.PollOption.verify|verify} messages. - * @param message PollOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IPollOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PollOption message, length delimited. Does not implicitly {@link proto.PollOption.verify|verify} messages. - * @param message PollOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IPollOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PollOption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PollOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.PollOption; - - /** - * Decodes a PollOption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PollOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.PollOption; - - /** - * Verifies a PollOption message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PollOption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PollOption - */ - public static fromObject(object: { [k: string]: any }): proto.PollOption; - - /** - * Creates a plain object from a PollOption message. Also converts values to other types if specified. - * @param message PollOption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.PollOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PollOption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MediaRetryNotification. */ - interface IMediaRetryNotification { - - /** MediaRetryNotification stanzaId */ - stanzaId?: (string|null); - - /** MediaRetryNotification directPath */ - directPath?: (string|null); - - /** MediaRetryNotification result */ - result?: (proto.MediaRetryNotification.MediaRetryNotificationResultType|null); - } - - /** Represents a MediaRetryNotification. */ - class MediaRetryNotification implements IMediaRetryNotification { - - /** - * Constructs a new MediaRetryNotification. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IMediaRetryNotification); - - /** MediaRetryNotification stanzaId. */ - public stanzaId: string; - - /** MediaRetryNotification directPath. */ - public directPath: string; - - /** MediaRetryNotification result. */ - public result: proto.MediaRetryNotification.MediaRetryNotificationResultType; - - /** - * Creates a new MediaRetryNotification instance using the specified properties. - * @param [properties] Properties to set - * @returns MediaRetryNotification instance - */ - public static create(properties?: proto.IMediaRetryNotification): proto.MediaRetryNotification; - - /** - * Encodes the specified MediaRetryNotification message. Does not implicitly {@link proto.MediaRetryNotification.verify|verify} messages. - * @param message MediaRetryNotification message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IMediaRetryNotification, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MediaRetryNotification message, length delimited. Does not implicitly {@link proto.MediaRetryNotification.verify|verify} messages. - * @param message MediaRetryNotification message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IMediaRetryNotification, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MediaRetryNotification message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MediaRetryNotification - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.MediaRetryNotification; - - /** - * Decodes a MediaRetryNotification message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MediaRetryNotification - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.MediaRetryNotification; - - /** - * Verifies a MediaRetryNotification message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MediaRetryNotification message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MediaRetryNotification - */ - public static fromObject(object: { [k: string]: any }): proto.MediaRetryNotification; - - /** - * Creates a plain object from a MediaRetryNotification message. Also converts values to other types if specified. - * @param message MediaRetryNotification - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.MediaRetryNotification, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MediaRetryNotification to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace MediaRetryNotification { - - /** MediaRetryNotificationResultType enum. */ - enum MediaRetryNotificationResultType { - GENERAL_ERROR = 0, - SUCCESS = 1, - NOT_FOUND = 2, - DECRYPTION_ERROR = 3 - } - } - - /** Properties of a ServerErrorReceipt. */ - interface IServerErrorReceipt { - - /** ServerErrorReceipt stanzaId */ - stanzaId?: (string|null); - } - - /** Represents a ServerErrorReceipt. */ - class ServerErrorReceipt implements IServerErrorReceipt { - - /** - * Constructs a new ServerErrorReceipt. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IServerErrorReceipt); - - /** ServerErrorReceipt stanzaId. */ - public stanzaId: string; - - /** - * Creates a new ServerErrorReceipt instance using the specified properties. - * @param [properties] Properties to set - * @returns ServerErrorReceipt instance - */ - public static create(properties?: proto.IServerErrorReceipt): proto.ServerErrorReceipt; - - /** - * Encodes the specified ServerErrorReceipt message. Does not implicitly {@link proto.ServerErrorReceipt.verify|verify} messages. - * @param message ServerErrorReceipt message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IServerErrorReceipt, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServerErrorReceipt message, length delimited. Does not implicitly {@link proto.ServerErrorReceipt.verify|verify} messages. - * @param message ServerErrorReceipt message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IServerErrorReceipt, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServerErrorReceipt message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServerErrorReceipt - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.ServerErrorReceipt; - - /** - * Decodes a ServerErrorReceipt message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServerErrorReceipt - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.ServerErrorReceipt; - - /** - * Verifies a ServerErrorReceipt message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServerErrorReceipt message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServerErrorReceipt - */ - public static fromObject(object: { [k: string]: any }): proto.ServerErrorReceipt; - - /** - * Creates a plain object from a ServerErrorReceipt message. Also converts values to other types if specified. - * @param message ServerErrorReceipt - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.ServerErrorReceipt, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServerErrorReceipt to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MessageKey. */ - interface IMessageKey { - - /** MessageKey remoteJid */ - remoteJid?: (string|null); - - /** MessageKey fromMe */ - fromMe?: (boolean|null); - - /** MessageKey id */ - id?: (string|null); - - /** MessageKey participant */ - participant?: (string|null); - } - - /** Represents a MessageKey. */ - class MessageKey implements IMessageKey { - - /** - * Constructs a new MessageKey. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IMessageKey); - - /** MessageKey remoteJid. */ - public remoteJid: string; - - /** MessageKey fromMe. */ - public fromMe: boolean; - - /** MessageKey id. */ - public id: string; - - /** MessageKey participant. */ - public participant: string; - - /** - * Creates a new MessageKey instance using the specified properties. - * @param [properties] Properties to set - * @returns MessageKey instance - */ - public static create(properties?: proto.IMessageKey): proto.MessageKey; - - /** - * Encodes the specified MessageKey message. Does not implicitly {@link proto.MessageKey.verify|verify} messages. - * @param message MessageKey message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IMessageKey, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MessageKey message, length delimited. Does not implicitly {@link proto.MessageKey.verify|verify} messages. - * @param message MessageKey message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IMessageKey, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MessageKey message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MessageKey - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.MessageKey; - - /** - * Decodes a MessageKey message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MessageKey - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.MessageKey; - - /** - * Verifies a MessageKey message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MessageKey message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MessageKey - */ - public static fromObject(object: { [k: string]: any }): proto.MessageKey; - - /** - * Creates a plain object from a MessageKey message. Also converts values to other types if specified. - * @param message MessageKey - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.MessageKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MessageKey to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an ExitCode. */ - interface IExitCode { - - /** ExitCode code */ - code?: (number|Long|null); - - /** ExitCode text */ - text?: (string|null); - } - - /** Represents an ExitCode. */ - class ExitCode implements IExitCode { - - /** - * Constructs a new ExitCode. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IExitCode); - - /** ExitCode code. */ - public code: (number|Long); - - /** ExitCode text. */ - public text: string; - - /** - * Creates a new ExitCode instance using the specified properties. - * @param [properties] Properties to set - * @returns ExitCode instance - */ - public static create(properties?: proto.IExitCode): proto.ExitCode; - - /** - * Encodes the specified ExitCode message. Does not implicitly {@link proto.ExitCode.verify|verify} messages. - * @param message ExitCode message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IExitCode, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExitCode message, length delimited. Does not implicitly {@link proto.ExitCode.verify|verify} messages. - * @param message ExitCode message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IExitCode, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExitCode message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExitCode - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.ExitCode; - - /** - * Decodes an ExitCode message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExitCode - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.ExitCode; - - /** - * Verifies an ExitCode message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExitCode message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExitCode - */ - public static fromObject(object: { [k: string]: any }): proto.ExitCode; - - /** - * Creates a plain object from an ExitCode message. Also converts values to other types if specified. - * @param message ExitCode - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.ExitCode, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExitCode to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an ExternalBlobReference. */ - interface IExternalBlobReference { - - /** ExternalBlobReference mediaKey */ - mediaKey?: (Uint8Array|null); - - /** ExternalBlobReference directPath */ - directPath?: (string|null); - - /** ExternalBlobReference handle */ - handle?: (string|null); - - /** ExternalBlobReference fileSizeBytes */ - fileSizeBytes?: (number|Long|null); - - /** ExternalBlobReference fileSha256 */ - fileSha256?: (Uint8Array|null); - - /** ExternalBlobReference fileEncSha256 */ - fileEncSha256?: (Uint8Array|null); - } - - /** Represents an ExternalBlobReference. */ - class ExternalBlobReference implements IExternalBlobReference { - - /** - * Constructs a new ExternalBlobReference. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IExternalBlobReference); - - /** ExternalBlobReference mediaKey. */ - public mediaKey: Uint8Array; - - /** ExternalBlobReference directPath. */ - public directPath: string; - - /** ExternalBlobReference handle. */ - public handle: string; - - /** ExternalBlobReference fileSizeBytes. */ - public fileSizeBytes: (number|Long); - - /** ExternalBlobReference fileSha256. */ - public fileSha256: Uint8Array; - - /** ExternalBlobReference fileEncSha256. */ - public fileEncSha256: Uint8Array; - - /** - * Creates a new ExternalBlobReference instance using the specified properties. - * @param [properties] Properties to set - * @returns ExternalBlobReference instance - */ - public static create(properties?: proto.IExternalBlobReference): proto.ExternalBlobReference; - - /** - * Encodes the specified ExternalBlobReference message. Does not implicitly {@link proto.ExternalBlobReference.verify|verify} messages. - * @param message ExternalBlobReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IExternalBlobReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExternalBlobReference message, length delimited. Does not implicitly {@link proto.ExternalBlobReference.verify|verify} messages. - * @param message ExternalBlobReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IExternalBlobReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExternalBlobReference message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExternalBlobReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.ExternalBlobReference; - - /** - * Decodes an ExternalBlobReference message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExternalBlobReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.ExternalBlobReference; - - /** - * Verifies an ExternalBlobReference message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExternalBlobReference message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExternalBlobReference - */ - public static fromObject(object: { [k: string]: any }): proto.ExternalBlobReference; - - /** - * Creates a plain object from an ExternalBlobReference message. Also converts values to other types if specified. - * @param message ExternalBlobReference - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.ExternalBlobReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExternalBlobReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a KeyId. */ - interface IKeyId { - - /** KeyId id */ - id?: (Uint8Array|null); - } - - /** Represents a KeyId. */ - class KeyId implements IKeyId { - - /** - * Constructs a new KeyId. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IKeyId); - - /** KeyId id. */ - public id: Uint8Array; - - /** - * Creates a new KeyId instance using the specified properties. - * @param [properties] Properties to set - * @returns KeyId instance - */ - public static create(properties?: proto.IKeyId): proto.KeyId; - - /** - * Encodes the specified KeyId message. Does not implicitly {@link proto.KeyId.verify|verify} messages. - * @param message KeyId message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IKeyId, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified KeyId message, length delimited. Does not implicitly {@link proto.KeyId.verify|verify} messages. - * @param message KeyId message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IKeyId, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a KeyId message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns KeyId - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.KeyId; - - /** - * Decodes a KeyId message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns KeyId - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.KeyId; - - /** - * Verifies a KeyId message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a KeyId message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns KeyId - */ - public static fromObject(object: { [k: string]: any }): proto.KeyId; - - /** - * Creates a plain object from a KeyId message. Also converts values to other types if specified. - * @param message KeyId - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.KeyId, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this KeyId to JSON. + * Converts this SyncActionValue to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; @@ -15647,3085 +22680,331 @@ export namespace proto { public toJSON(): { [k: string]: any }; } - /** Properties of an AgentAction. */ - interface IAgentAction { + /** Properties of a TemplateButton. */ + interface ITemplateButton { - /** AgentAction name */ - name?: (string|null); + /** TemplateButton index */ + index?: (number|null); - /** AgentAction deviceID */ - deviceID?: (number|null); + /** TemplateButton quickReplyButton */ + quickReplyButton?: (proto.IQuickReplyButton|null); - /** AgentAction isDeleted */ - isDeleted?: (boolean|null); + /** TemplateButton urlButton */ + urlButton?: (proto.IURLButton|null); + + /** TemplateButton callButton */ + callButton?: (proto.ICallButton|null); } - /** Represents an AgentAction. */ - class AgentAction implements IAgentAction { + /** Represents a TemplateButton. */ + class TemplateButton implements ITemplateButton { /** - * Constructs a new AgentAction. + * Constructs a new TemplateButton. * @param [properties] Properties to set */ - constructor(properties?: proto.IAgentAction); + constructor(properties?: proto.ITemplateButton); - /** AgentAction name. */ - public name: string; + /** TemplateButton index. */ + public index: number; - /** AgentAction deviceID. */ - public deviceID: number; + /** TemplateButton quickReplyButton. */ + public quickReplyButton?: (proto.IQuickReplyButton|null); - /** AgentAction isDeleted. */ - public isDeleted: boolean; + /** TemplateButton urlButton. */ + public urlButton?: (proto.IURLButton|null); + + /** TemplateButton callButton. */ + public callButton?: (proto.ICallButton|null); + + /** TemplateButton button. */ + public button?: ("quickReplyButton"|"urlButton"|"callButton"); /** - * Creates a new AgentAction instance using the specified properties. + * Creates a new TemplateButton instance using the specified properties. * @param [properties] Properties to set - * @returns AgentAction instance + * @returns TemplateButton instance */ - public static create(properties?: proto.IAgentAction): proto.AgentAction; + public static create(properties?: proto.ITemplateButton): proto.TemplateButton; /** - * Encodes the specified AgentAction message. Does not implicitly {@link proto.AgentAction.verify|verify} messages. - * @param message AgentAction message or plain object to encode + * Encodes the specified TemplateButton message. Does not implicitly {@link proto.TemplateButton.verify|verify} messages. + * @param message TemplateButton message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: proto.IAgentAction, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: proto.ITemplateButton, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AgentAction message, length delimited. Does not implicitly {@link proto.AgentAction.verify|verify} messages. - * @param message AgentAction message or plain object to encode + * Encodes the specified TemplateButton message, length delimited. Does not implicitly {@link proto.TemplateButton.verify|verify} messages. + * @param message TemplateButton message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: proto.IAgentAction, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: proto.ITemplateButton, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AgentAction message from the specified reader or buffer. + * Decodes a TemplateButton message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AgentAction + * @returns TemplateButton * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.AgentAction; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.TemplateButton; /** - * Decodes an AgentAction message from the specified reader or buffer, length delimited. + * Decodes a TemplateButton message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AgentAction + * @returns TemplateButton * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.AgentAction; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.TemplateButton; /** - * Verifies an AgentAction message. + * Verifies a TemplateButton message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an AgentAction message from a plain object. Also converts values to their respective internal types. + * Creates a TemplateButton message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AgentAction + * @returns TemplateButton */ - public static fromObject(object: { [k: string]: any }): proto.AgentAction; + public static fromObject(object: { [k: string]: any }): proto.TemplateButton; /** - * Creates a plain object from an AgentAction message. Also converts values to other types if specified. - * @param message AgentAction + * Creates a plain object from a TemplateButton message. Also converts values to other types if specified. + * @param message TemplateButton * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: proto.AgentAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: proto.TemplateButton, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AgentAction to JSON. + * Converts this TemplateButton to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an AndroidUnsupportedActions. */ - interface IAndroidUnsupportedActions { + /** Properties of a TemplateButtonReplyMessage. */ + interface ITemplateButtonReplyMessage { - /** AndroidUnsupportedActions allowed */ - allowed?: (boolean|null); + /** TemplateButtonReplyMessage selectedId */ + selectedId?: (string|null); + + /** TemplateButtonReplyMessage selectedDisplayText */ + selectedDisplayText?: (string|null); + + /** TemplateButtonReplyMessage contextInfo */ + contextInfo?: (proto.IContextInfo|null); + + /** TemplateButtonReplyMessage selectedIndex */ + selectedIndex?: (number|null); } - /** Represents an AndroidUnsupportedActions. */ - class AndroidUnsupportedActions implements IAndroidUnsupportedActions { + /** Represents a TemplateButtonReplyMessage. */ + class TemplateButtonReplyMessage implements ITemplateButtonReplyMessage { /** - * Constructs a new AndroidUnsupportedActions. + * Constructs a new TemplateButtonReplyMessage. * @param [properties] Properties to set */ - constructor(properties?: proto.IAndroidUnsupportedActions); + constructor(properties?: proto.ITemplateButtonReplyMessage); - /** AndroidUnsupportedActions allowed. */ - public allowed: boolean; + /** TemplateButtonReplyMessage selectedId. */ + public selectedId: string; + + /** TemplateButtonReplyMessage selectedDisplayText. */ + public selectedDisplayText: string; + + /** TemplateButtonReplyMessage contextInfo. */ + public contextInfo?: (proto.IContextInfo|null); + + /** TemplateButtonReplyMessage selectedIndex. */ + public selectedIndex: number; /** - * Creates a new AndroidUnsupportedActions instance using the specified properties. + * Creates a new TemplateButtonReplyMessage instance using the specified properties. * @param [properties] Properties to set - * @returns AndroidUnsupportedActions instance + * @returns TemplateButtonReplyMessage instance */ - public static create(properties?: proto.IAndroidUnsupportedActions): proto.AndroidUnsupportedActions; + public static create(properties?: proto.ITemplateButtonReplyMessage): proto.TemplateButtonReplyMessage; /** - * Encodes the specified AndroidUnsupportedActions message. Does not implicitly {@link proto.AndroidUnsupportedActions.verify|verify} messages. - * @param message AndroidUnsupportedActions message or plain object to encode + * Encodes the specified TemplateButtonReplyMessage message. Does not implicitly {@link proto.TemplateButtonReplyMessage.verify|verify} messages. + * @param message TemplateButtonReplyMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: proto.IAndroidUnsupportedActions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: proto.ITemplateButtonReplyMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AndroidUnsupportedActions message, length delimited. Does not implicitly {@link proto.AndroidUnsupportedActions.verify|verify} messages. - * @param message AndroidUnsupportedActions message or plain object to encode + * Encodes the specified TemplateButtonReplyMessage message, length delimited. Does not implicitly {@link proto.TemplateButtonReplyMessage.verify|verify} messages. + * @param message TemplateButtonReplyMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: proto.IAndroidUnsupportedActions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: proto.ITemplateButtonReplyMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AndroidUnsupportedActions message from the specified reader or buffer. + * Decodes a TemplateButtonReplyMessage message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AndroidUnsupportedActions + * @returns TemplateButtonReplyMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.AndroidUnsupportedActions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.TemplateButtonReplyMessage; /** - * Decodes an AndroidUnsupportedActions message from the specified reader or buffer, length delimited. + * Decodes a TemplateButtonReplyMessage message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AndroidUnsupportedActions + * @returns TemplateButtonReplyMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.AndroidUnsupportedActions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.TemplateButtonReplyMessage; /** - * Verifies an AndroidUnsupportedActions message. + * Verifies a TemplateButtonReplyMessage message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an AndroidUnsupportedActions message from a plain object. Also converts values to their respective internal types. + * Creates a TemplateButtonReplyMessage message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AndroidUnsupportedActions + * @returns TemplateButtonReplyMessage */ - public static fromObject(object: { [k: string]: any }): proto.AndroidUnsupportedActions; + public static fromObject(object: { [k: string]: any }): proto.TemplateButtonReplyMessage; /** - * Creates a plain object from an AndroidUnsupportedActions message. Also converts values to other types if specified. - * @param message AndroidUnsupportedActions + * Creates a plain object from a TemplateButtonReplyMessage message. Also converts values to other types if specified. + * @param message TemplateButtonReplyMessage * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: proto.AndroidUnsupportedActions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: proto.TemplateButtonReplyMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AndroidUnsupportedActions to JSON. + * Converts this TemplateButtonReplyMessage to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ArchiveChatAction. */ - interface IArchiveChatAction { + /** Properties of a TemplateMessage. */ + interface ITemplateMessage { - /** ArchiveChatAction archived */ - archived?: (boolean|null); + /** TemplateMessage contextInfo */ + contextInfo?: (proto.IContextInfo|null); - /** ArchiveChatAction messageRange */ - messageRange?: (proto.ISyncActionMessageRange|null); + /** TemplateMessage hydratedTemplate */ + hydratedTemplate?: (proto.IHydratedFourRowTemplate|null); + + /** TemplateMessage fourRowTemplate */ + fourRowTemplate?: (proto.IFourRowTemplate|null); + + /** TemplateMessage hydratedFourRowTemplate */ + hydratedFourRowTemplate?: (proto.IHydratedFourRowTemplate|null); } - /** Represents an ArchiveChatAction. */ - class ArchiveChatAction implements IArchiveChatAction { + /** Represents a TemplateMessage. */ + class TemplateMessage implements ITemplateMessage { /** - * Constructs a new ArchiveChatAction. + * Constructs a new TemplateMessage. * @param [properties] Properties to set */ - constructor(properties?: proto.IArchiveChatAction); + constructor(properties?: proto.ITemplateMessage); - /** ArchiveChatAction archived. */ - public archived: boolean; + /** TemplateMessage contextInfo. */ + public contextInfo?: (proto.IContextInfo|null); - /** ArchiveChatAction messageRange. */ - public messageRange?: (proto.ISyncActionMessageRange|null); + /** TemplateMessage hydratedTemplate. */ + public hydratedTemplate?: (proto.IHydratedFourRowTemplate|null); + + /** TemplateMessage fourRowTemplate. */ + public fourRowTemplate?: (proto.IFourRowTemplate|null); + + /** TemplateMessage hydratedFourRowTemplate. */ + public hydratedFourRowTemplate?: (proto.IHydratedFourRowTemplate|null); + + /** TemplateMessage format. */ + public format?: ("fourRowTemplate"|"hydratedFourRowTemplate"); /** - * Creates a new ArchiveChatAction instance using the specified properties. + * Creates a new TemplateMessage instance using the specified properties. * @param [properties] Properties to set - * @returns ArchiveChatAction instance + * @returns TemplateMessage instance */ - public static create(properties?: proto.IArchiveChatAction): proto.ArchiveChatAction; + public static create(properties?: proto.ITemplateMessage): proto.TemplateMessage; /** - * Encodes the specified ArchiveChatAction message. Does not implicitly {@link proto.ArchiveChatAction.verify|verify} messages. - * @param message ArchiveChatAction message or plain object to encode + * Encodes the specified TemplateMessage message. Does not implicitly {@link proto.TemplateMessage.verify|verify} messages. + * @param message TemplateMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: proto.IArchiveChatAction, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: proto.ITemplateMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ArchiveChatAction message, length delimited. Does not implicitly {@link proto.ArchiveChatAction.verify|verify} messages. - * @param message ArchiveChatAction message or plain object to encode + * Encodes the specified TemplateMessage message, length delimited. Does not implicitly {@link proto.TemplateMessage.verify|verify} messages. + * @param message TemplateMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: proto.IArchiveChatAction, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: proto.ITemplateMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ArchiveChatAction message from the specified reader or buffer. + * Decodes a TemplateMessage message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ArchiveChatAction + * @returns TemplateMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.ArchiveChatAction; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.TemplateMessage; /** - * Decodes an ArchiveChatAction message from the specified reader or buffer, length delimited. + * Decodes a TemplateMessage message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ArchiveChatAction + * @returns TemplateMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.ArchiveChatAction; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.TemplateMessage; /** - * Verifies an ArchiveChatAction message. + * Verifies a TemplateMessage message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ArchiveChatAction message from a plain object. Also converts values to their respective internal types. + * Creates a TemplateMessage message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ArchiveChatAction + * @returns TemplateMessage */ - public static fromObject(object: { [k: string]: any }): proto.ArchiveChatAction; + public static fromObject(object: { [k: string]: any }): proto.TemplateMessage; /** - * Creates a plain object from an ArchiveChatAction message. Also converts values to other types if specified. - * @param message ArchiveChatAction + * Creates a plain object from a TemplateMessage message. Also converts values to other types if specified. + * @param message TemplateMessage * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: proto.ArchiveChatAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: proto.TemplateMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ArchiveChatAction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ClearChatAction. */ - interface IClearChatAction { - - /** ClearChatAction messageRange */ - messageRange?: (proto.ISyncActionMessageRange|null); - } - - /** Represents a ClearChatAction. */ - class ClearChatAction implements IClearChatAction { - - /** - * Constructs a new ClearChatAction. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IClearChatAction); - - /** ClearChatAction messageRange. */ - public messageRange?: (proto.ISyncActionMessageRange|null); - - /** - * Creates a new ClearChatAction instance using the specified properties. - * @param [properties] Properties to set - * @returns ClearChatAction instance - */ - public static create(properties?: proto.IClearChatAction): proto.ClearChatAction; - - /** - * Encodes the specified ClearChatAction message. Does not implicitly {@link proto.ClearChatAction.verify|verify} messages. - * @param message ClearChatAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IClearChatAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClearChatAction message, length delimited. Does not implicitly {@link proto.ClearChatAction.verify|verify} messages. - * @param message ClearChatAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IClearChatAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClearChatAction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClearChatAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.ClearChatAction; - - /** - * Decodes a ClearChatAction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClearChatAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.ClearChatAction; - - /** - * Verifies a ClearChatAction message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ClearChatAction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClearChatAction - */ - public static fromObject(object: { [k: string]: any }): proto.ClearChatAction; - - /** - * Creates a plain object from a ClearChatAction message. Also converts values to other types if specified. - * @param message ClearChatAction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.ClearChatAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClearChatAction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ContactAction. */ - interface IContactAction { - - /** ContactAction fullName */ - fullName?: (string|null); - - /** ContactAction firstName */ - firstName?: (string|null); - } - - /** Represents a ContactAction. */ - class ContactAction implements IContactAction { - - /** - * Constructs a new ContactAction. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IContactAction); - - /** ContactAction fullName. */ - public fullName: string; - - /** ContactAction firstName. */ - public firstName: string; - - /** - * Creates a new ContactAction instance using the specified properties. - * @param [properties] Properties to set - * @returns ContactAction instance - */ - public static create(properties?: proto.IContactAction): proto.ContactAction; - - /** - * Encodes the specified ContactAction message. Does not implicitly {@link proto.ContactAction.verify|verify} messages. - * @param message ContactAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IContactAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ContactAction message, length delimited. Does not implicitly {@link proto.ContactAction.verify|verify} messages. - * @param message ContactAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IContactAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ContactAction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ContactAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.ContactAction; - - /** - * Decodes a ContactAction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ContactAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.ContactAction; - - /** - * Verifies a ContactAction message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ContactAction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ContactAction - */ - public static fromObject(object: { [k: string]: any }): proto.ContactAction; - - /** - * Creates a plain object from a ContactAction message. Also converts values to other types if specified. - * @param message ContactAction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.ContactAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ContactAction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DeleteChatAction. */ - interface IDeleteChatAction { - - /** DeleteChatAction messageRange */ - messageRange?: (proto.ISyncActionMessageRange|null); - } - - /** Represents a DeleteChatAction. */ - class DeleteChatAction implements IDeleteChatAction { - - /** - * Constructs a new DeleteChatAction. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IDeleteChatAction); - - /** DeleteChatAction messageRange. */ - public messageRange?: (proto.ISyncActionMessageRange|null); - - /** - * Creates a new DeleteChatAction instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteChatAction instance - */ - public static create(properties?: proto.IDeleteChatAction): proto.DeleteChatAction; - - /** - * Encodes the specified DeleteChatAction message. Does not implicitly {@link proto.DeleteChatAction.verify|verify} messages. - * @param message DeleteChatAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IDeleteChatAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteChatAction message, length delimited. Does not implicitly {@link proto.DeleteChatAction.verify|verify} messages. - * @param message DeleteChatAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IDeleteChatAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteChatAction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteChatAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.DeleteChatAction; - - /** - * Decodes a DeleteChatAction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteChatAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.DeleteChatAction; - - /** - * Verifies a DeleteChatAction message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteChatAction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteChatAction - */ - public static fromObject(object: { [k: string]: any }): proto.DeleteChatAction; - - /** - * Creates a plain object from a DeleteChatAction message. Also converts values to other types if specified. - * @param message DeleteChatAction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.DeleteChatAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteChatAction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DeleteMessageForMeAction. */ - interface IDeleteMessageForMeAction { - - /** DeleteMessageForMeAction deleteMedia */ - deleteMedia?: (boolean|null); - - /** DeleteMessageForMeAction messageTimestamp */ - messageTimestamp?: (number|Long|null); - } - - /** Represents a DeleteMessageForMeAction. */ - class DeleteMessageForMeAction implements IDeleteMessageForMeAction { - - /** - * Constructs a new DeleteMessageForMeAction. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IDeleteMessageForMeAction); - - /** DeleteMessageForMeAction deleteMedia. */ - public deleteMedia: boolean; - - /** DeleteMessageForMeAction messageTimestamp. */ - public messageTimestamp: (number|Long); - - /** - * Creates a new DeleteMessageForMeAction instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteMessageForMeAction instance - */ - public static create(properties?: proto.IDeleteMessageForMeAction): proto.DeleteMessageForMeAction; - - /** - * Encodes the specified DeleteMessageForMeAction message. Does not implicitly {@link proto.DeleteMessageForMeAction.verify|verify} messages. - * @param message DeleteMessageForMeAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IDeleteMessageForMeAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteMessageForMeAction message, length delimited. Does not implicitly {@link proto.DeleteMessageForMeAction.verify|verify} messages. - * @param message DeleteMessageForMeAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IDeleteMessageForMeAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteMessageForMeAction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteMessageForMeAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.DeleteMessageForMeAction; - - /** - * Decodes a DeleteMessageForMeAction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteMessageForMeAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.DeleteMessageForMeAction; - - /** - * Verifies a DeleteMessageForMeAction message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteMessageForMeAction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteMessageForMeAction - */ - public static fromObject(object: { [k: string]: any }): proto.DeleteMessageForMeAction; - - /** - * Creates a plain object from a DeleteMessageForMeAction message. Also converts values to other types if specified. - * @param message DeleteMessageForMeAction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.DeleteMessageForMeAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteMessageForMeAction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a FavoriteStickerAction. */ - interface IFavoriteStickerAction { - - /** FavoriteStickerAction directPath */ - directPath?: (string|null); - - /** FavoriteStickerAction lastUploadTimestamp */ - lastUploadTimestamp?: (string|null); - - /** FavoriteStickerAction handle */ - handle?: (string|null); - - /** FavoriteStickerAction encFilehash */ - encFilehash?: (string|null); - - /** FavoriteStickerAction stickerHashWithoutMeta */ - stickerHashWithoutMeta?: (string|null); - - /** FavoriteStickerAction mediaKey */ - mediaKey?: (string|null); - - /** FavoriteStickerAction mediaKeyTimestamp */ - mediaKeyTimestamp?: (number|Long|null); - - /** FavoriteStickerAction isFavorite */ - isFavorite?: (boolean|null); - } - - /** Represents a FavoriteStickerAction. */ - class FavoriteStickerAction implements IFavoriteStickerAction { - - /** - * Constructs a new FavoriteStickerAction. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IFavoriteStickerAction); - - /** FavoriteStickerAction directPath. */ - public directPath: string; - - /** FavoriteStickerAction lastUploadTimestamp. */ - public lastUploadTimestamp: string; - - /** FavoriteStickerAction handle. */ - public handle: string; - - /** FavoriteStickerAction encFilehash. */ - public encFilehash: string; - - /** FavoriteStickerAction stickerHashWithoutMeta. */ - public stickerHashWithoutMeta: string; - - /** FavoriteStickerAction mediaKey. */ - public mediaKey: string; - - /** FavoriteStickerAction mediaKeyTimestamp. */ - public mediaKeyTimestamp: (number|Long); - - /** FavoriteStickerAction isFavorite. */ - public isFavorite: boolean; - - /** - * Creates a new FavoriteStickerAction instance using the specified properties. - * @param [properties] Properties to set - * @returns FavoriteStickerAction instance - */ - public static create(properties?: proto.IFavoriteStickerAction): proto.FavoriteStickerAction; - - /** - * Encodes the specified FavoriteStickerAction message. Does not implicitly {@link proto.FavoriteStickerAction.verify|verify} messages. - * @param message FavoriteStickerAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IFavoriteStickerAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FavoriteStickerAction message, length delimited. Does not implicitly {@link proto.FavoriteStickerAction.verify|verify} messages. - * @param message FavoriteStickerAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IFavoriteStickerAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FavoriteStickerAction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FavoriteStickerAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.FavoriteStickerAction; - - /** - * Decodes a FavoriteStickerAction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FavoriteStickerAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.FavoriteStickerAction; - - /** - * Verifies a FavoriteStickerAction message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FavoriteStickerAction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FavoriteStickerAction - */ - public static fromObject(object: { [k: string]: any }): proto.FavoriteStickerAction; - - /** - * Creates a plain object from a FavoriteStickerAction message. Also converts values to other types if specified. - * @param message FavoriteStickerAction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.FavoriteStickerAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FavoriteStickerAction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a KeyExpiration. */ - interface IKeyExpiration { - - /** KeyExpiration expiredKeyEpoch */ - expiredKeyEpoch?: (number|null); - } - - /** Represents a KeyExpiration. */ - class KeyExpiration implements IKeyExpiration { - - /** - * Constructs a new KeyExpiration. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IKeyExpiration); - - /** KeyExpiration expiredKeyEpoch. */ - public expiredKeyEpoch: number; - - /** - * Creates a new KeyExpiration instance using the specified properties. - * @param [properties] Properties to set - * @returns KeyExpiration instance - */ - public static create(properties?: proto.IKeyExpiration): proto.KeyExpiration; - - /** - * Encodes the specified KeyExpiration message. Does not implicitly {@link proto.KeyExpiration.verify|verify} messages. - * @param message KeyExpiration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IKeyExpiration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified KeyExpiration message, length delimited. Does not implicitly {@link proto.KeyExpiration.verify|verify} messages. - * @param message KeyExpiration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IKeyExpiration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a KeyExpiration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns KeyExpiration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.KeyExpiration; - - /** - * Decodes a KeyExpiration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns KeyExpiration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.KeyExpiration; - - /** - * Verifies a KeyExpiration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a KeyExpiration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns KeyExpiration - */ - public static fromObject(object: { [k: string]: any }): proto.KeyExpiration; - - /** - * Creates a plain object from a KeyExpiration message. Also converts values to other types if specified. - * @param message KeyExpiration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.KeyExpiration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this KeyExpiration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a LabelAssociationAction. */ - interface ILabelAssociationAction { - - /** LabelAssociationAction labeled */ - labeled?: (boolean|null); - } - - /** Represents a LabelAssociationAction. */ - class LabelAssociationAction implements ILabelAssociationAction { - - /** - * Constructs a new LabelAssociationAction. - * @param [properties] Properties to set - */ - constructor(properties?: proto.ILabelAssociationAction); - - /** LabelAssociationAction labeled. */ - public labeled: boolean; - - /** - * Creates a new LabelAssociationAction instance using the specified properties. - * @param [properties] Properties to set - * @returns LabelAssociationAction instance - */ - public static create(properties?: proto.ILabelAssociationAction): proto.LabelAssociationAction; - - /** - * Encodes the specified LabelAssociationAction message. Does not implicitly {@link proto.LabelAssociationAction.verify|verify} messages. - * @param message LabelAssociationAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.ILabelAssociationAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LabelAssociationAction message, length delimited. Does not implicitly {@link proto.LabelAssociationAction.verify|verify} messages. - * @param message LabelAssociationAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.ILabelAssociationAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LabelAssociationAction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LabelAssociationAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.LabelAssociationAction; - - /** - * Decodes a LabelAssociationAction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LabelAssociationAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.LabelAssociationAction; - - /** - * Verifies a LabelAssociationAction message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LabelAssociationAction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LabelAssociationAction - */ - public static fromObject(object: { [k: string]: any }): proto.LabelAssociationAction; - - /** - * Creates a plain object from a LabelAssociationAction message. Also converts values to other types if specified. - * @param message LabelAssociationAction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.LabelAssociationAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LabelAssociationAction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a LabelEditAction. */ - interface ILabelEditAction { - - /** LabelEditAction name */ - name?: (string|null); - - /** LabelEditAction color */ - color?: (number|null); - - /** LabelEditAction predefinedId */ - predefinedId?: (number|null); - - /** LabelEditAction deleted */ - deleted?: (boolean|null); - } - - /** Represents a LabelEditAction. */ - class LabelEditAction implements ILabelEditAction { - - /** - * Constructs a new LabelEditAction. - * @param [properties] Properties to set - */ - constructor(properties?: proto.ILabelEditAction); - - /** LabelEditAction name. */ - public name: string; - - /** LabelEditAction color. */ - public color: number; - - /** LabelEditAction predefinedId. */ - public predefinedId: number; - - /** LabelEditAction deleted. */ - public deleted: boolean; - - /** - * Creates a new LabelEditAction instance using the specified properties. - * @param [properties] Properties to set - * @returns LabelEditAction instance - */ - public static create(properties?: proto.ILabelEditAction): proto.LabelEditAction; - - /** - * Encodes the specified LabelEditAction message. Does not implicitly {@link proto.LabelEditAction.verify|verify} messages. - * @param message LabelEditAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.ILabelEditAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LabelEditAction message, length delimited. Does not implicitly {@link proto.LabelEditAction.verify|verify} messages. - * @param message LabelEditAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.ILabelEditAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LabelEditAction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LabelEditAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.LabelEditAction; - - /** - * Decodes a LabelEditAction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LabelEditAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.LabelEditAction; - - /** - * Verifies a LabelEditAction message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LabelEditAction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LabelEditAction - */ - public static fromObject(object: { [k: string]: any }): proto.LabelEditAction; - - /** - * Creates a plain object from a LabelEditAction message. Also converts values to other types if specified. - * @param message LabelEditAction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.LabelEditAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LabelEditAction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a LocaleSetting. */ - interface ILocaleSetting { - - /** LocaleSetting locale */ - locale?: (string|null); - } - - /** Represents a LocaleSetting. */ - class LocaleSetting implements ILocaleSetting { - - /** - * Constructs a new LocaleSetting. - * @param [properties] Properties to set - */ - constructor(properties?: proto.ILocaleSetting); - - /** LocaleSetting locale. */ - public locale: string; - - /** - * Creates a new LocaleSetting instance using the specified properties. - * @param [properties] Properties to set - * @returns LocaleSetting instance - */ - public static create(properties?: proto.ILocaleSetting): proto.LocaleSetting; - - /** - * Encodes the specified LocaleSetting message. Does not implicitly {@link proto.LocaleSetting.verify|verify} messages. - * @param message LocaleSetting message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.ILocaleSetting, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LocaleSetting message, length delimited. Does not implicitly {@link proto.LocaleSetting.verify|verify} messages. - * @param message LocaleSetting message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.ILocaleSetting, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LocaleSetting message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LocaleSetting - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.LocaleSetting; - - /** - * Decodes a LocaleSetting message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LocaleSetting - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.LocaleSetting; - - /** - * Verifies a LocaleSetting message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LocaleSetting message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LocaleSetting - */ - public static fromObject(object: { [k: string]: any }): proto.LocaleSetting; - - /** - * Creates a plain object from a LocaleSetting message. Also converts values to other types if specified. - * @param message LocaleSetting - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.LocaleSetting, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LocaleSetting to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MarkChatAsReadAction. */ - interface IMarkChatAsReadAction { - - /** MarkChatAsReadAction read */ - read?: (boolean|null); - - /** MarkChatAsReadAction messageRange */ - messageRange?: (proto.ISyncActionMessageRange|null); - } - - /** Represents a MarkChatAsReadAction. */ - class MarkChatAsReadAction implements IMarkChatAsReadAction { - - /** - * Constructs a new MarkChatAsReadAction. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IMarkChatAsReadAction); - - /** MarkChatAsReadAction read. */ - public read: boolean; - - /** MarkChatAsReadAction messageRange. */ - public messageRange?: (proto.ISyncActionMessageRange|null); - - /** - * Creates a new MarkChatAsReadAction instance using the specified properties. - * @param [properties] Properties to set - * @returns MarkChatAsReadAction instance - */ - public static create(properties?: proto.IMarkChatAsReadAction): proto.MarkChatAsReadAction; - - /** - * Encodes the specified MarkChatAsReadAction message. Does not implicitly {@link proto.MarkChatAsReadAction.verify|verify} messages. - * @param message MarkChatAsReadAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IMarkChatAsReadAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MarkChatAsReadAction message, length delimited. Does not implicitly {@link proto.MarkChatAsReadAction.verify|verify} messages. - * @param message MarkChatAsReadAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IMarkChatAsReadAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MarkChatAsReadAction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MarkChatAsReadAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.MarkChatAsReadAction; - - /** - * Decodes a MarkChatAsReadAction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MarkChatAsReadAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.MarkChatAsReadAction; - - /** - * Verifies a MarkChatAsReadAction message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MarkChatAsReadAction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MarkChatAsReadAction - */ - public static fromObject(object: { [k: string]: any }): proto.MarkChatAsReadAction; - - /** - * Creates a plain object from a MarkChatAsReadAction message. Also converts values to other types if specified. - * @param message MarkChatAsReadAction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.MarkChatAsReadAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MarkChatAsReadAction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MuteAction. */ - interface IMuteAction { - - /** MuteAction muted */ - muted?: (boolean|null); - - /** MuteAction muteEndTimestamp */ - muteEndTimestamp?: (number|Long|null); - } - - /** Represents a MuteAction. */ - class MuteAction implements IMuteAction { - - /** - * Constructs a new MuteAction. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IMuteAction); - - /** MuteAction muted. */ - public muted: boolean; - - /** MuteAction muteEndTimestamp. */ - public muteEndTimestamp: (number|Long); - - /** - * Creates a new MuteAction instance using the specified properties. - * @param [properties] Properties to set - * @returns MuteAction instance - */ - public static create(properties?: proto.IMuteAction): proto.MuteAction; - - /** - * Encodes the specified MuteAction message. Does not implicitly {@link proto.MuteAction.verify|verify} messages. - * @param message MuteAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IMuteAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MuteAction message, length delimited. Does not implicitly {@link proto.MuteAction.verify|verify} messages. - * @param message MuteAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IMuteAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MuteAction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MuteAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.MuteAction; - - /** - * Decodes a MuteAction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MuteAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.MuteAction; - - /** - * Verifies a MuteAction message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MuteAction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MuteAction - */ - public static fromObject(object: { [k: string]: any }): proto.MuteAction; - - /** - * Creates a plain object from a MuteAction message. Also converts values to other types if specified. - * @param message MuteAction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.MuteAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MuteAction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a PinAction. */ - interface IPinAction { - - /** PinAction pinned */ - pinned?: (boolean|null); - } - - /** Represents a PinAction. */ - class PinAction implements IPinAction { - - /** - * Constructs a new PinAction. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IPinAction); - - /** PinAction pinned. */ - public pinned: boolean; - - /** - * Creates a new PinAction instance using the specified properties. - * @param [properties] Properties to set - * @returns PinAction instance - */ - public static create(properties?: proto.IPinAction): proto.PinAction; - - /** - * Encodes the specified PinAction message. Does not implicitly {@link proto.PinAction.verify|verify} messages. - * @param message PinAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IPinAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PinAction message, length delimited. Does not implicitly {@link proto.PinAction.verify|verify} messages. - * @param message PinAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IPinAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PinAction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PinAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.PinAction; - - /** - * Decodes a PinAction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PinAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.PinAction; - - /** - * Verifies a PinAction message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PinAction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PinAction - */ - public static fromObject(object: { [k: string]: any }): proto.PinAction; - - /** - * Creates a plain object from a PinAction message. Also converts values to other types if specified. - * @param message PinAction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.PinAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PinAction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a PrimaryFeature. */ - interface IPrimaryFeature { - - /** PrimaryFeature flags */ - flags?: (string[]|null); - } - - /** Represents a PrimaryFeature. */ - class PrimaryFeature implements IPrimaryFeature { - - /** - * Constructs a new PrimaryFeature. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IPrimaryFeature); - - /** PrimaryFeature flags. */ - public flags: string[]; - - /** - * Creates a new PrimaryFeature instance using the specified properties. - * @param [properties] Properties to set - * @returns PrimaryFeature instance - */ - public static create(properties?: proto.IPrimaryFeature): proto.PrimaryFeature; - - /** - * Encodes the specified PrimaryFeature message. Does not implicitly {@link proto.PrimaryFeature.verify|verify} messages. - * @param message PrimaryFeature message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IPrimaryFeature, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PrimaryFeature message, length delimited. Does not implicitly {@link proto.PrimaryFeature.verify|verify} messages. - * @param message PrimaryFeature message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IPrimaryFeature, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PrimaryFeature message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PrimaryFeature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.PrimaryFeature; - - /** - * Decodes a PrimaryFeature message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PrimaryFeature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.PrimaryFeature; - - /** - * Verifies a PrimaryFeature message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PrimaryFeature message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PrimaryFeature - */ - public static fromObject(object: { [k: string]: any }): proto.PrimaryFeature; - - /** - * Creates a plain object from a PrimaryFeature message. Also converts values to other types if specified. - * @param message PrimaryFeature - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.PrimaryFeature, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PrimaryFeature to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a PushNameSetting. */ - interface IPushNameSetting { - - /** PushNameSetting name */ - name?: (string|null); - } - - /** Represents a PushNameSetting. */ - class PushNameSetting implements IPushNameSetting { - - /** - * Constructs a new PushNameSetting. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IPushNameSetting); - - /** PushNameSetting name. */ - public name: string; - - /** - * Creates a new PushNameSetting instance using the specified properties. - * @param [properties] Properties to set - * @returns PushNameSetting instance - */ - public static create(properties?: proto.IPushNameSetting): proto.PushNameSetting; - - /** - * Encodes the specified PushNameSetting message. Does not implicitly {@link proto.PushNameSetting.verify|verify} messages. - * @param message PushNameSetting message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IPushNameSetting, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PushNameSetting message, length delimited. Does not implicitly {@link proto.PushNameSetting.verify|verify} messages. - * @param message PushNameSetting message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IPushNameSetting, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PushNameSetting message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PushNameSetting - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.PushNameSetting; - - /** - * Decodes a PushNameSetting message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PushNameSetting - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.PushNameSetting; - - /** - * Verifies a PushNameSetting message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PushNameSetting message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PushNameSetting - */ - public static fromObject(object: { [k: string]: any }): proto.PushNameSetting; - - /** - * Creates a plain object from a PushNameSetting message. Also converts values to other types if specified. - * @param message PushNameSetting - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.PushNameSetting, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PushNameSetting to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QuickReplyAction. */ - interface IQuickReplyAction { - - /** QuickReplyAction shortcut */ - shortcut?: (string|null); - - /** QuickReplyAction message */ - message?: (string|null); - - /** QuickReplyAction keywords */ - keywords?: (string[]|null); - - /** QuickReplyAction count */ - count?: (number|null); - - /** QuickReplyAction deleted */ - deleted?: (boolean|null); - } - - /** Represents a QuickReplyAction. */ - class QuickReplyAction implements IQuickReplyAction { - - /** - * Constructs a new QuickReplyAction. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IQuickReplyAction); - - /** QuickReplyAction shortcut. */ - public shortcut: string; - - /** QuickReplyAction message. */ - public message: string; - - /** QuickReplyAction keywords. */ - public keywords: string[]; - - /** QuickReplyAction count. */ - public count: number; - - /** QuickReplyAction deleted. */ - public deleted: boolean; - - /** - * Creates a new QuickReplyAction instance using the specified properties. - * @param [properties] Properties to set - * @returns QuickReplyAction instance - */ - public static create(properties?: proto.IQuickReplyAction): proto.QuickReplyAction; - - /** - * Encodes the specified QuickReplyAction message. Does not implicitly {@link proto.QuickReplyAction.verify|verify} messages. - * @param message QuickReplyAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IQuickReplyAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QuickReplyAction message, length delimited. Does not implicitly {@link proto.QuickReplyAction.verify|verify} messages. - * @param message QuickReplyAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IQuickReplyAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QuickReplyAction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QuickReplyAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.QuickReplyAction; - - /** - * Decodes a QuickReplyAction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QuickReplyAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.QuickReplyAction; - - /** - * Verifies a QuickReplyAction message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QuickReplyAction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QuickReplyAction - */ - public static fromObject(object: { [k: string]: any }): proto.QuickReplyAction; - - /** - * Creates a plain object from a QuickReplyAction message. Also converts values to other types if specified. - * @param message QuickReplyAction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.QuickReplyAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QuickReplyAction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a RecentEmojiWeight. */ - interface IRecentEmojiWeight { - - /** RecentEmojiWeight emoji */ - emoji?: (string|null); - - /** RecentEmojiWeight weight */ - weight?: (number|null); - } - - /** Represents a RecentEmojiWeight. */ - class RecentEmojiWeight implements IRecentEmojiWeight { - - /** - * Constructs a new RecentEmojiWeight. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IRecentEmojiWeight); - - /** RecentEmojiWeight emoji. */ - public emoji: string; - - /** RecentEmojiWeight weight. */ - public weight: number; - - /** - * Creates a new RecentEmojiWeight instance using the specified properties. - * @param [properties] Properties to set - * @returns RecentEmojiWeight instance - */ - public static create(properties?: proto.IRecentEmojiWeight): proto.RecentEmojiWeight; - - /** - * Encodes the specified RecentEmojiWeight message. Does not implicitly {@link proto.RecentEmojiWeight.verify|verify} messages. - * @param message RecentEmojiWeight message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IRecentEmojiWeight, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RecentEmojiWeight message, length delimited. Does not implicitly {@link proto.RecentEmojiWeight.verify|verify} messages. - * @param message RecentEmojiWeight message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IRecentEmojiWeight, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RecentEmojiWeight message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RecentEmojiWeight - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.RecentEmojiWeight; - - /** - * Decodes a RecentEmojiWeight message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RecentEmojiWeight - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.RecentEmojiWeight; - - /** - * Verifies a RecentEmojiWeight message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RecentEmojiWeight message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RecentEmojiWeight - */ - public static fromObject(object: { [k: string]: any }): proto.RecentEmojiWeight; - - /** - * Creates a plain object from a RecentEmojiWeight message. Also converts values to other types if specified. - * @param message RecentEmojiWeight - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.RecentEmojiWeight, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RecentEmojiWeight to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a RecentEmojiWeightsAction. */ - interface IRecentEmojiWeightsAction { - - /** RecentEmojiWeightsAction weights */ - weights?: (proto.IRecentEmojiWeight[]|null); - } - - /** Represents a RecentEmojiWeightsAction. */ - class RecentEmojiWeightsAction implements IRecentEmojiWeightsAction { - - /** - * Constructs a new RecentEmojiWeightsAction. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IRecentEmojiWeightsAction); - - /** RecentEmojiWeightsAction weights. */ - public weights: proto.IRecentEmojiWeight[]; - - /** - * Creates a new RecentEmojiWeightsAction instance using the specified properties. - * @param [properties] Properties to set - * @returns RecentEmojiWeightsAction instance - */ - public static create(properties?: proto.IRecentEmojiWeightsAction): proto.RecentEmojiWeightsAction; - - /** - * Encodes the specified RecentEmojiWeightsAction message. Does not implicitly {@link proto.RecentEmojiWeightsAction.verify|verify} messages. - * @param message RecentEmojiWeightsAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IRecentEmojiWeightsAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RecentEmojiWeightsAction message, length delimited. Does not implicitly {@link proto.RecentEmojiWeightsAction.verify|verify} messages. - * @param message RecentEmojiWeightsAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IRecentEmojiWeightsAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RecentEmojiWeightsAction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RecentEmojiWeightsAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.RecentEmojiWeightsAction; - - /** - * Decodes a RecentEmojiWeightsAction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RecentEmojiWeightsAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.RecentEmojiWeightsAction; - - /** - * Verifies a RecentEmojiWeightsAction message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RecentEmojiWeightsAction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RecentEmojiWeightsAction - */ - public static fromObject(object: { [k: string]: any }): proto.RecentEmojiWeightsAction; - - /** - * Creates a plain object from a RecentEmojiWeightsAction message. Also converts values to other types if specified. - * @param message RecentEmojiWeightsAction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.RecentEmojiWeightsAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RecentEmojiWeightsAction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a RecentStickerMetadata. */ - interface IRecentStickerMetadata { - - /** RecentStickerMetadata directPath */ - directPath?: (string|null); - - /** RecentStickerMetadata encFilehash */ - encFilehash?: (string|null); - - /** RecentStickerMetadata mediaKey */ - mediaKey?: (string|null); - - /** RecentStickerMetadata stanzaId */ - stanzaId?: (string|null); - - /** RecentStickerMetadata chatJid */ - chatJid?: (string|null); - - /** RecentStickerMetadata participant */ - participant?: (string|null); - - /** RecentStickerMetadata isSentByMe */ - isSentByMe?: (boolean|null); - } - - /** Represents a RecentStickerMetadata. */ - class RecentStickerMetadata implements IRecentStickerMetadata { - - /** - * Constructs a new RecentStickerMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IRecentStickerMetadata); - - /** RecentStickerMetadata directPath. */ - public directPath: string; - - /** RecentStickerMetadata encFilehash. */ - public encFilehash: string; - - /** RecentStickerMetadata mediaKey. */ - public mediaKey: string; - - /** RecentStickerMetadata stanzaId. */ - public stanzaId: string; - - /** RecentStickerMetadata chatJid. */ - public chatJid: string; - - /** RecentStickerMetadata participant. */ - public participant: string; - - /** RecentStickerMetadata isSentByMe. */ - public isSentByMe: boolean; - - /** - * Creates a new RecentStickerMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns RecentStickerMetadata instance - */ - public static create(properties?: proto.IRecentStickerMetadata): proto.RecentStickerMetadata; - - /** - * Encodes the specified RecentStickerMetadata message. Does not implicitly {@link proto.RecentStickerMetadata.verify|verify} messages. - * @param message RecentStickerMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IRecentStickerMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RecentStickerMetadata message, length delimited. Does not implicitly {@link proto.RecentStickerMetadata.verify|verify} messages. - * @param message RecentStickerMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IRecentStickerMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RecentStickerMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RecentStickerMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.RecentStickerMetadata; - - /** - * Decodes a RecentStickerMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RecentStickerMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.RecentStickerMetadata; - - /** - * Verifies a RecentStickerMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RecentStickerMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RecentStickerMetadata - */ - public static fromObject(object: { [k: string]: any }): proto.RecentStickerMetadata; - - /** - * Creates a plain object from a RecentStickerMetadata message. Also converts values to other types if specified. - * @param message RecentStickerMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.RecentStickerMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RecentStickerMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a RecentStickerWeight. */ - interface IRecentStickerWeight { - - /** RecentStickerWeight filehash */ - filehash?: (string|null); - - /** RecentStickerWeight weight */ - weight?: (number|null); - } - - /** Represents a RecentStickerWeight. */ - class RecentStickerWeight implements IRecentStickerWeight { - - /** - * Constructs a new RecentStickerWeight. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IRecentStickerWeight); - - /** RecentStickerWeight filehash. */ - public filehash: string; - - /** RecentStickerWeight weight. */ - public weight: number; - - /** - * Creates a new RecentStickerWeight instance using the specified properties. - * @param [properties] Properties to set - * @returns RecentStickerWeight instance - */ - public static create(properties?: proto.IRecentStickerWeight): proto.RecentStickerWeight; - - /** - * Encodes the specified RecentStickerWeight message. Does not implicitly {@link proto.RecentStickerWeight.verify|verify} messages. - * @param message RecentStickerWeight message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IRecentStickerWeight, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RecentStickerWeight message, length delimited. Does not implicitly {@link proto.RecentStickerWeight.verify|verify} messages. - * @param message RecentStickerWeight message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IRecentStickerWeight, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RecentStickerWeight message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RecentStickerWeight - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.RecentStickerWeight; - - /** - * Decodes a RecentStickerWeight message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RecentStickerWeight - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.RecentStickerWeight; - - /** - * Verifies a RecentStickerWeight message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RecentStickerWeight message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RecentStickerWeight - */ - public static fromObject(object: { [k: string]: any }): proto.RecentStickerWeight; - - /** - * Creates a plain object from a RecentStickerWeight message. Also converts values to other types if specified. - * @param message RecentStickerWeight - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.RecentStickerWeight, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RecentStickerWeight to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a RecentStickerWeightsAction. */ - interface IRecentStickerWeightsAction { - - /** RecentStickerWeightsAction weights */ - weights?: (proto.IRecentStickerWeight[]|null); - } - - /** Represents a RecentStickerWeightsAction. */ - class RecentStickerWeightsAction implements IRecentStickerWeightsAction { - - /** - * Constructs a new RecentStickerWeightsAction. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IRecentStickerWeightsAction); - - /** RecentStickerWeightsAction weights. */ - public weights: proto.IRecentStickerWeight[]; - - /** - * Creates a new RecentStickerWeightsAction instance using the specified properties. - * @param [properties] Properties to set - * @returns RecentStickerWeightsAction instance - */ - public static create(properties?: proto.IRecentStickerWeightsAction): proto.RecentStickerWeightsAction; - - /** - * Encodes the specified RecentStickerWeightsAction message. Does not implicitly {@link proto.RecentStickerWeightsAction.verify|verify} messages. - * @param message RecentStickerWeightsAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IRecentStickerWeightsAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RecentStickerWeightsAction message, length delimited. Does not implicitly {@link proto.RecentStickerWeightsAction.verify|verify} messages. - * @param message RecentStickerWeightsAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IRecentStickerWeightsAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RecentStickerWeightsAction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RecentStickerWeightsAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.RecentStickerWeightsAction; - - /** - * Decodes a RecentStickerWeightsAction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RecentStickerWeightsAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.RecentStickerWeightsAction; - - /** - * Verifies a RecentStickerWeightsAction message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RecentStickerWeightsAction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RecentStickerWeightsAction - */ - public static fromObject(object: { [k: string]: any }): proto.RecentStickerWeightsAction; - - /** - * Creates a plain object from a RecentStickerWeightsAction message. Also converts values to other types if specified. - * @param message RecentStickerWeightsAction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.RecentStickerWeightsAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RecentStickerWeightsAction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SecurityNotificationSetting. */ - interface ISecurityNotificationSetting { - - /** SecurityNotificationSetting showNotification */ - showNotification?: (boolean|null); - } - - /** Represents a SecurityNotificationSetting. */ - class SecurityNotificationSetting implements ISecurityNotificationSetting { - - /** - * Constructs a new SecurityNotificationSetting. - * @param [properties] Properties to set - */ - constructor(properties?: proto.ISecurityNotificationSetting); - - /** SecurityNotificationSetting showNotification. */ - public showNotification: boolean; - - /** - * Creates a new SecurityNotificationSetting instance using the specified properties. - * @param [properties] Properties to set - * @returns SecurityNotificationSetting instance - */ - public static create(properties?: proto.ISecurityNotificationSetting): proto.SecurityNotificationSetting; - - /** - * Encodes the specified SecurityNotificationSetting message. Does not implicitly {@link proto.SecurityNotificationSetting.verify|verify} messages. - * @param message SecurityNotificationSetting message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.ISecurityNotificationSetting, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SecurityNotificationSetting message, length delimited. Does not implicitly {@link proto.SecurityNotificationSetting.verify|verify} messages. - * @param message SecurityNotificationSetting message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.ISecurityNotificationSetting, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SecurityNotificationSetting message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SecurityNotificationSetting - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.SecurityNotificationSetting; - - /** - * Decodes a SecurityNotificationSetting message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SecurityNotificationSetting - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.SecurityNotificationSetting; - - /** - * Verifies a SecurityNotificationSetting message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SecurityNotificationSetting message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SecurityNotificationSetting - */ - public static fromObject(object: { [k: string]: any }): proto.SecurityNotificationSetting; - - /** - * Creates a plain object from a SecurityNotificationSetting message. Also converts values to other types if specified. - * @param message SecurityNotificationSetting - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.SecurityNotificationSetting, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SecurityNotificationSetting to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a StarAction. */ - interface IStarAction { - - /** StarAction starred */ - starred?: (boolean|null); - } - - /** Represents a StarAction. */ - class StarAction implements IStarAction { - - /** - * Constructs a new StarAction. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IStarAction); - - /** StarAction starred. */ - public starred: boolean; - - /** - * Creates a new StarAction instance using the specified properties. - * @param [properties] Properties to set - * @returns StarAction instance - */ - public static create(properties?: proto.IStarAction): proto.StarAction; - - /** - * Encodes the specified StarAction message. Does not implicitly {@link proto.StarAction.verify|verify} messages. - * @param message StarAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IStarAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StarAction message, length delimited. Does not implicitly {@link proto.StarAction.verify|verify} messages. - * @param message StarAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IStarAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StarAction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StarAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.StarAction; - - /** - * Decodes a StarAction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StarAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.StarAction; - - /** - * Verifies a StarAction message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StarAction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StarAction - */ - public static fromObject(object: { [k: string]: any }): proto.StarAction; - - /** - * Creates a plain object from a StarAction message. Also converts values to other types if specified. - * @param message StarAction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.StarAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StarAction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SubscriptionAction. */ - interface ISubscriptionAction { - - /** SubscriptionAction isDeactivated */ - isDeactivated?: (boolean|null); - - /** SubscriptionAction isAutoRenewing */ - isAutoRenewing?: (boolean|null); - - /** SubscriptionAction expirationDate */ - expirationDate?: (number|Long|null); - } - - /** Represents a SubscriptionAction. */ - class SubscriptionAction implements ISubscriptionAction { - - /** - * Constructs a new SubscriptionAction. - * @param [properties] Properties to set - */ - constructor(properties?: proto.ISubscriptionAction); - - /** SubscriptionAction isDeactivated. */ - public isDeactivated: boolean; - - /** SubscriptionAction isAutoRenewing. */ - public isAutoRenewing: boolean; - - /** SubscriptionAction expirationDate. */ - public expirationDate: (number|Long); - - /** - * Creates a new SubscriptionAction instance using the specified properties. - * @param [properties] Properties to set - * @returns SubscriptionAction instance - */ - public static create(properties?: proto.ISubscriptionAction): proto.SubscriptionAction; - - /** - * Encodes the specified SubscriptionAction message. Does not implicitly {@link proto.SubscriptionAction.verify|verify} messages. - * @param message SubscriptionAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.ISubscriptionAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SubscriptionAction message, length delimited. Does not implicitly {@link proto.SubscriptionAction.verify|verify} messages. - * @param message SubscriptionAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.ISubscriptionAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SubscriptionAction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SubscriptionAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.SubscriptionAction; - - /** - * Decodes a SubscriptionAction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SubscriptionAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.SubscriptionAction; - - /** - * Verifies a SubscriptionAction message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SubscriptionAction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SubscriptionAction - */ - public static fromObject(object: { [k: string]: any }): proto.SubscriptionAction; - - /** - * Creates a plain object from a SubscriptionAction message. Also converts values to other types if specified. - * @param message SubscriptionAction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.SubscriptionAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SubscriptionAction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SyncActionData. */ - interface ISyncActionData { - - /** SyncActionData index */ - index?: (Uint8Array|null); - - /** SyncActionData value */ - value?: (proto.ISyncActionValue|null); - - /** SyncActionData padding */ - padding?: (Uint8Array|null); - - /** SyncActionData version */ - version?: (number|null); - } - - /** Represents a SyncActionData. */ - class SyncActionData implements ISyncActionData { - - /** - * Constructs a new SyncActionData. - * @param [properties] Properties to set - */ - constructor(properties?: proto.ISyncActionData); - - /** SyncActionData index. */ - public index: Uint8Array; - - /** SyncActionData value. */ - public value?: (proto.ISyncActionValue|null); - - /** SyncActionData padding. */ - public padding: Uint8Array; - - /** SyncActionData version. */ - public version: number; - - /** - * Creates a new SyncActionData instance using the specified properties. - * @param [properties] Properties to set - * @returns SyncActionData instance - */ - public static create(properties?: proto.ISyncActionData): proto.SyncActionData; - - /** - * Encodes the specified SyncActionData message. Does not implicitly {@link proto.SyncActionData.verify|verify} messages. - * @param message SyncActionData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.ISyncActionData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SyncActionData message, length delimited. Does not implicitly {@link proto.SyncActionData.verify|verify} messages. - * @param message SyncActionData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.ISyncActionData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SyncActionData message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SyncActionData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.SyncActionData; - - /** - * Decodes a SyncActionData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SyncActionData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.SyncActionData; - - /** - * Verifies a SyncActionData message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SyncActionData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SyncActionData - */ - public static fromObject(object: { [k: string]: any }): proto.SyncActionData; - - /** - * Creates a plain object from a SyncActionData message. Also converts values to other types if specified. - * @param message SyncActionData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.SyncActionData, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SyncActionData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SyncActionMessage. */ - interface ISyncActionMessage { - - /** SyncActionMessage key */ - key?: (proto.IMessageKey|null); - - /** SyncActionMessage timestamp */ - timestamp?: (number|Long|null); - } - - /** Represents a SyncActionMessage. */ - class SyncActionMessage implements ISyncActionMessage { - - /** - * Constructs a new SyncActionMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.ISyncActionMessage); - - /** SyncActionMessage key. */ - public key?: (proto.IMessageKey|null); - - /** SyncActionMessage timestamp. */ - public timestamp: (number|Long); - - /** - * Creates a new SyncActionMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns SyncActionMessage instance - */ - public static create(properties?: proto.ISyncActionMessage): proto.SyncActionMessage; - - /** - * Encodes the specified SyncActionMessage message. Does not implicitly {@link proto.SyncActionMessage.verify|verify} messages. - * @param message SyncActionMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.ISyncActionMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SyncActionMessage message, length delimited. Does not implicitly {@link proto.SyncActionMessage.verify|verify} messages. - * @param message SyncActionMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.ISyncActionMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SyncActionMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SyncActionMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.SyncActionMessage; - - /** - * Decodes a SyncActionMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SyncActionMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.SyncActionMessage; - - /** - * Verifies a SyncActionMessage message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SyncActionMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SyncActionMessage - */ - public static fromObject(object: { [k: string]: any }): proto.SyncActionMessage; - - /** - * Creates a plain object from a SyncActionMessage message. Also converts values to other types if specified. - * @param message SyncActionMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.SyncActionMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SyncActionMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SyncActionMessageRange. */ - interface ISyncActionMessageRange { - - /** SyncActionMessageRange lastMessageTimestamp */ - lastMessageTimestamp?: (number|Long|null); - - /** SyncActionMessageRange lastSystemMessageTimestamp */ - lastSystemMessageTimestamp?: (number|Long|null); - - /** SyncActionMessageRange messages */ - messages?: (proto.ISyncActionMessage[]|null); - } - - /** Represents a SyncActionMessageRange. */ - class SyncActionMessageRange implements ISyncActionMessageRange { - - /** - * Constructs a new SyncActionMessageRange. - * @param [properties] Properties to set - */ - constructor(properties?: proto.ISyncActionMessageRange); - - /** SyncActionMessageRange lastMessageTimestamp. */ - public lastMessageTimestamp: (number|Long); - - /** SyncActionMessageRange lastSystemMessageTimestamp. */ - public lastSystemMessageTimestamp: (number|Long); - - /** SyncActionMessageRange messages. */ - public messages: proto.ISyncActionMessage[]; - - /** - * Creates a new SyncActionMessageRange instance using the specified properties. - * @param [properties] Properties to set - * @returns SyncActionMessageRange instance - */ - public static create(properties?: proto.ISyncActionMessageRange): proto.SyncActionMessageRange; - - /** - * Encodes the specified SyncActionMessageRange message. Does not implicitly {@link proto.SyncActionMessageRange.verify|verify} messages. - * @param message SyncActionMessageRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.ISyncActionMessageRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SyncActionMessageRange message, length delimited. Does not implicitly {@link proto.SyncActionMessageRange.verify|verify} messages. - * @param message SyncActionMessageRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.ISyncActionMessageRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SyncActionMessageRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SyncActionMessageRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.SyncActionMessageRange; - - /** - * Decodes a SyncActionMessageRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SyncActionMessageRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.SyncActionMessageRange; - - /** - * Verifies a SyncActionMessageRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SyncActionMessageRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SyncActionMessageRange - */ - public static fromObject(object: { [k: string]: any }): proto.SyncActionMessageRange; - - /** - * Creates a plain object from a SyncActionMessageRange message. Also converts values to other types if specified. - * @param message SyncActionMessageRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.SyncActionMessageRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SyncActionMessageRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SyncActionValue. */ - interface ISyncActionValue { - - /** SyncActionValue timestamp */ - timestamp?: (number|Long|null); - - /** SyncActionValue starAction */ - starAction?: (proto.IStarAction|null); - - /** SyncActionValue contactAction */ - contactAction?: (proto.IContactAction|null); - - /** SyncActionValue muteAction */ - muteAction?: (proto.IMuteAction|null); - - /** SyncActionValue pinAction */ - pinAction?: (proto.IPinAction|null); - - /** SyncActionValue securityNotificationSetting */ - securityNotificationSetting?: (proto.ISecurityNotificationSetting|null); - - /** SyncActionValue pushNameSetting */ - pushNameSetting?: (proto.IPushNameSetting|null); - - /** SyncActionValue quickReplyAction */ - quickReplyAction?: (proto.IQuickReplyAction|null); - - /** SyncActionValue recentStickerWeightsAction */ - recentStickerWeightsAction?: (proto.IRecentStickerWeightsAction|null); - - /** SyncActionValue recentStickerMetadata */ - recentStickerMetadata?: (proto.IRecentStickerMetadata|null); - - /** SyncActionValue recentEmojiWeightsAction */ - recentEmojiWeightsAction?: (proto.IRecentEmojiWeightsAction|null); - - /** SyncActionValue labelEditAction */ - labelEditAction?: (proto.ILabelEditAction|null); - - /** SyncActionValue labelAssociationAction */ - labelAssociationAction?: (proto.ILabelAssociationAction|null); - - /** SyncActionValue localeSetting */ - localeSetting?: (proto.ILocaleSetting|null); - - /** SyncActionValue archiveChatAction */ - archiveChatAction?: (proto.IArchiveChatAction|null); - - /** SyncActionValue deleteMessageForMeAction */ - deleteMessageForMeAction?: (proto.IDeleteMessageForMeAction|null); - - /** SyncActionValue keyExpiration */ - keyExpiration?: (proto.IKeyExpiration|null); - - /** SyncActionValue markChatAsReadAction */ - markChatAsReadAction?: (proto.IMarkChatAsReadAction|null); - - /** SyncActionValue clearChatAction */ - clearChatAction?: (proto.IClearChatAction|null); - - /** SyncActionValue deleteChatAction */ - deleteChatAction?: (proto.IDeleteChatAction|null); - - /** SyncActionValue unarchiveChatsSetting */ - unarchiveChatsSetting?: (proto.IUnarchiveChatsSetting|null); - - /** SyncActionValue primaryFeature */ - primaryFeature?: (proto.IPrimaryFeature|null); - - /** SyncActionValue favoriteStickerAction */ - favoriteStickerAction?: (proto.IFavoriteStickerAction|null); - - /** SyncActionValue androidUnsupportedActions */ - androidUnsupportedActions?: (proto.IAndroidUnsupportedActions|null); - - /** SyncActionValue agentAction */ - agentAction?: (proto.IAgentAction|null); - - /** SyncActionValue subscriptionAction */ - subscriptionAction?: (proto.ISubscriptionAction|null); - - /** SyncActionValue userStatusMuteAction */ - userStatusMuteAction?: (proto.IUserStatusMuteAction|null); - - /** SyncActionValue timeFormatAction */ - timeFormatAction?: (proto.ITimeFormatAction|null); - } - - /** Represents a SyncActionValue. */ - class SyncActionValue implements ISyncActionValue { - - /** - * Constructs a new SyncActionValue. - * @param [properties] Properties to set - */ - constructor(properties?: proto.ISyncActionValue); - - /** SyncActionValue timestamp. */ - public timestamp: (number|Long); - - /** SyncActionValue starAction. */ - public starAction?: (proto.IStarAction|null); - - /** SyncActionValue contactAction. */ - public contactAction?: (proto.IContactAction|null); - - /** SyncActionValue muteAction. */ - public muteAction?: (proto.IMuteAction|null); - - /** SyncActionValue pinAction. */ - public pinAction?: (proto.IPinAction|null); - - /** SyncActionValue securityNotificationSetting. */ - public securityNotificationSetting?: (proto.ISecurityNotificationSetting|null); - - /** SyncActionValue pushNameSetting. */ - public pushNameSetting?: (proto.IPushNameSetting|null); - - /** SyncActionValue quickReplyAction. */ - public quickReplyAction?: (proto.IQuickReplyAction|null); - - /** SyncActionValue recentStickerWeightsAction. */ - public recentStickerWeightsAction?: (proto.IRecentStickerWeightsAction|null); - - /** SyncActionValue recentStickerMetadata. */ - public recentStickerMetadata?: (proto.IRecentStickerMetadata|null); - - /** SyncActionValue recentEmojiWeightsAction. */ - public recentEmojiWeightsAction?: (proto.IRecentEmojiWeightsAction|null); - - /** SyncActionValue labelEditAction. */ - public labelEditAction?: (proto.ILabelEditAction|null); - - /** SyncActionValue labelAssociationAction. */ - public labelAssociationAction?: (proto.ILabelAssociationAction|null); - - /** SyncActionValue localeSetting. */ - public localeSetting?: (proto.ILocaleSetting|null); - - /** SyncActionValue archiveChatAction. */ - public archiveChatAction?: (proto.IArchiveChatAction|null); - - /** SyncActionValue deleteMessageForMeAction. */ - public deleteMessageForMeAction?: (proto.IDeleteMessageForMeAction|null); - - /** SyncActionValue keyExpiration. */ - public keyExpiration?: (proto.IKeyExpiration|null); - - /** SyncActionValue markChatAsReadAction. */ - public markChatAsReadAction?: (proto.IMarkChatAsReadAction|null); - - /** SyncActionValue clearChatAction. */ - public clearChatAction?: (proto.IClearChatAction|null); - - /** SyncActionValue deleteChatAction. */ - public deleteChatAction?: (proto.IDeleteChatAction|null); - - /** SyncActionValue unarchiveChatsSetting. */ - public unarchiveChatsSetting?: (proto.IUnarchiveChatsSetting|null); - - /** SyncActionValue primaryFeature. */ - public primaryFeature?: (proto.IPrimaryFeature|null); - - /** SyncActionValue favoriteStickerAction. */ - public favoriteStickerAction?: (proto.IFavoriteStickerAction|null); - - /** SyncActionValue androidUnsupportedActions. */ - public androidUnsupportedActions?: (proto.IAndroidUnsupportedActions|null); - - /** SyncActionValue agentAction. */ - public agentAction?: (proto.IAgentAction|null); - - /** SyncActionValue subscriptionAction. */ - public subscriptionAction?: (proto.ISubscriptionAction|null); - - /** SyncActionValue userStatusMuteAction. */ - public userStatusMuteAction?: (proto.IUserStatusMuteAction|null); - - /** SyncActionValue timeFormatAction. */ - public timeFormatAction?: (proto.ITimeFormatAction|null); - - /** - * Creates a new SyncActionValue instance using the specified properties. - * @param [properties] Properties to set - * @returns SyncActionValue instance - */ - public static create(properties?: proto.ISyncActionValue): proto.SyncActionValue; - - /** - * Encodes the specified SyncActionValue message. Does not implicitly {@link proto.SyncActionValue.verify|verify} messages. - * @param message SyncActionValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.ISyncActionValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SyncActionValue message, length delimited. Does not implicitly {@link proto.SyncActionValue.verify|verify} messages. - * @param message SyncActionValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.ISyncActionValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SyncActionValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SyncActionValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.SyncActionValue; - - /** - * Decodes a SyncActionValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SyncActionValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.SyncActionValue; - - /** - * Verifies a SyncActionValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SyncActionValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SyncActionValue - */ - public static fromObject(object: { [k: string]: any }): proto.SyncActionValue; - - /** - * Creates a plain object from a SyncActionValue message. Also converts values to other types if specified. - * @param message SyncActionValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.SyncActionValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SyncActionValue to JSON. + * Converts this TemplateMessage to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; @@ -18821,6 +23100,102 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a URLButton. */ + interface IURLButton { + + /** URLButton displayText */ + displayText?: (proto.IHighlyStructuredMessage|null); + + /** URLButton url */ + url?: (proto.IHighlyStructuredMessage|null); + } + + /** Represents a URLButton. */ + class URLButton implements IURLButton { + + /** + * Constructs a new URLButton. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IURLButton); + + /** URLButton displayText. */ + public displayText?: (proto.IHighlyStructuredMessage|null); + + /** URLButton url. */ + public url?: (proto.IHighlyStructuredMessage|null); + + /** + * Creates a new URLButton instance using the specified properties. + * @param [properties] Properties to set + * @returns URLButton instance + */ + public static create(properties?: proto.IURLButton): proto.URLButton; + + /** + * Encodes the specified URLButton message. Does not implicitly {@link proto.URLButton.verify|verify} messages. + * @param message URLButton message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IURLButton, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified URLButton message, length delimited. Does not implicitly {@link proto.URLButton.verify|verify} messages. + * @param message URLButton message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IURLButton, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a URLButton message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns URLButton + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.URLButton; + + /** + * Decodes a URLButton message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns URLButton + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.URLButton; + + /** + * Verifies a URLButton message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a URLButton message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns URLButton + */ + public static fromObject(object: { [k: string]: any }): proto.URLButton; + + /** + * Creates a plain object from a URLButton message. Also converts values to other types if specified. + * @param message URLButton + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.URLButton, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this URLButton to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of an UnarchiveChatsSetting. */ interface IUnarchiveChatsSetting { @@ -18911,6 +23286,332 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + /** Properties of a UserAgent. */ + interface IUserAgent { + + /** UserAgent platform */ + platform?: (proto.UserAgent.UserAgentPlatform|null); + + /** UserAgent appVersion */ + appVersion?: (proto.IAppVersion|null); + + /** UserAgent mcc */ + mcc?: (string|null); + + /** UserAgent mnc */ + mnc?: (string|null); + + /** UserAgent osVersion */ + osVersion?: (string|null); + + /** UserAgent manufacturer */ + manufacturer?: (string|null); + + /** UserAgent device */ + device?: (string|null); + + /** UserAgent osBuildNumber */ + osBuildNumber?: (string|null); + + /** UserAgent phoneId */ + phoneId?: (string|null); + + /** UserAgent releaseChannel */ + releaseChannel?: (proto.UserAgent.UserAgentReleaseChannel|null); + + /** UserAgent localeLanguageIso6391 */ + localeLanguageIso6391?: (string|null); + + /** UserAgent localeCountryIso31661Alpha2 */ + localeCountryIso31661Alpha2?: (string|null); + + /** UserAgent deviceBoard */ + deviceBoard?: (string|null); + } + + /** Represents a UserAgent. */ + class UserAgent implements IUserAgent { + + /** + * Constructs a new UserAgent. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IUserAgent); + + /** UserAgent platform. */ + public platform: proto.UserAgent.UserAgentPlatform; + + /** UserAgent appVersion. */ + public appVersion?: (proto.IAppVersion|null); + + /** UserAgent mcc. */ + public mcc: string; + + /** UserAgent mnc. */ + public mnc: string; + + /** UserAgent osVersion. */ + public osVersion: string; + + /** UserAgent manufacturer. */ + public manufacturer: string; + + /** UserAgent device. */ + public device: string; + + /** UserAgent osBuildNumber. */ + public osBuildNumber: string; + + /** UserAgent phoneId. */ + public phoneId: string; + + /** UserAgent releaseChannel. */ + public releaseChannel: proto.UserAgent.UserAgentReleaseChannel; + + /** UserAgent localeLanguageIso6391. */ + public localeLanguageIso6391: string; + + /** UserAgent localeCountryIso31661Alpha2. */ + public localeCountryIso31661Alpha2: string; + + /** UserAgent deviceBoard. */ + public deviceBoard: string; + + /** + * Creates a new UserAgent instance using the specified properties. + * @param [properties] Properties to set + * @returns UserAgent instance + */ + public static create(properties?: proto.IUserAgent): proto.UserAgent; + + /** + * Encodes the specified UserAgent message. Does not implicitly {@link proto.UserAgent.verify|verify} messages. + * @param message UserAgent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IUserAgent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserAgent message, length delimited. Does not implicitly {@link proto.UserAgent.verify|verify} messages. + * @param message UserAgent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IUserAgent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserAgent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserAgent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.UserAgent; + + /** + * Decodes a UserAgent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserAgent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.UserAgent; + + /** + * Verifies a UserAgent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserAgent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserAgent + */ + public static fromObject(object: { [k: string]: any }): proto.UserAgent; + + /** + * Creates a plain object from a UserAgent message. Also converts values to other types if specified. + * @param message UserAgent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.UserAgent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserAgent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace UserAgent { + + /** UserAgentPlatform enum. */ + enum UserAgentPlatform { + ANDROID = 0, + IOS = 1, + WINDOWS_PHONE = 2, + BLACKBERRY = 3, + BLACKBERRYX = 4, + S40 = 5, + S60 = 6, + PYTHON_CLIENT = 7, + TIZEN = 8, + ENTERPRISE = 9, + SMB_ANDROID = 10, + KAIOS = 11, + SMB_IOS = 12, + WINDOWS = 13, + WEB = 14, + PORTAL = 15, + GREEN_ANDROID = 16, + GREEN_IPHONE = 17, + BLUE_ANDROID = 18, + BLUE_IPHONE = 19, + FBLITE_ANDROID = 20, + MLITE_ANDROID = 21, + IGLITE_ANDROID = 22, + PAGE = 23, + MACOS = 24, + OCULUS_MSG = 25, + OCULUS_CALL = 26, + MILAN = 27, + CAPI = 28 + } + + /** UserAgentReleaseChannel enum. */ + enum UserAgentReleaseChannel { + RELEASE = 0, + BETA = 1, + ALPHA = 2, + DEBUG = 3 + } + } + + /** Properties of a UserReceipt. */ + interface IUserReceipt { + + /** UserReceipt userJid */ + userJid: string; + + /** UserReceipt receiptTimestamp */ + receiptTimestamp?: (number|Long|null); + + /** UserReceipt readTimestamp */ + readTimestamp?: (number|Long|null); + + /** UserReceipt playedTimestamp */ + playedTimestamp?: (number|Long|null); + + /** UserReceipt pendingDeviceJid */ + pendingDeviceJid?: (string[]|null); + + /** UserReceipt deliveredDeviceJid */ + deliveredDeviceJid?: (string[]|null); + } + + /** Represents a UserReceipt. */ + class UserReceipt implements IUserReceipt { + + /** + * Constructs a new UserReceipt. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IUserReceipt); + + /** UserReceipt userJid. */ + public userJid: string; + + /** UserReceipt receiptTimestamp. */ + public receiptTimestamp: (number|Long); + + /** UserReceipt readTimestamp. */ + public readTimestamp: (number|Long); + + /** UserReceipt playedTimestamp. */ + public playedTimestamp: (number|Long); + + /** UserReceipt pendingDeviceJid. */ + public pendingDeviceJid: string[]; + + /** UserReceipt deliveredDeviceJid. */ + public deliveredDeviceJid: string[]; + + /** + * Creates a new UserReceipt instance using the specified properties. + * @param [properties] Properties to set + * @returns UserReceipt instance + */ + public static create(properties?: proto.IUserReceipt): proto.UserReceipt; + + /** + * Encodes the specified UserReceipt message. Does not implicitly {@link proto.UserReceipt.verify|verify} messages. + * @param message UserReceipt message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IUserReceipt, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserReceipt message, length delimited. Does not implicitly {@link proto.UserReceipt.verify|verify} messages. + * @param message UserReceipt message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IUserReceipt, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserReceipt message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserReceipt + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.UserReceipt; + + /** + * Decodes a UserReceipt message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserReceipt + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.UserReceipt; + + /** + * Verifies a UserReceipt message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserReceipt message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserReceipt + */ + public static fromObject(object: { [k: string]: any }): proto.UserReceipt; + + /** + * Creates a plain object from a UserReceipt message. Also converts values to other types if specified. + * @param message UserReceipt + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.UserReceipt, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserReceipt to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a UserStatusMuteAction. */ interface IUserStatusMuteAction { @@ -19001,486 +23702,6 @@ export namespace proto { public toJSON(): { [k: string]: any }; } - /** Properties of a BizAccountLinkInfo. */ - interface IBizAccountLinkInfo { - - /** BizAccountLinkInfo whatsappBizAcctFbid */ - whatsappBizAcctFbid?: (number|Long|null); - - /** BizAccountLinkInfo whatsappAcctNumber */ - whatsappAcctNumber?: (string|null); - - /** BizAccountLinkInfo issueTime */ - issueTime?: (number|Long|null); - - /** BizAccountLinkInfo hostStorage */ - hostStorage?: (proto.BizAccountLinkInfo.BizAccountLinkInfoHostStorageType|null); - - /** BizAccountLinkInfo accountType */ - accountType?: (proto.BizAccountLinkInfo.BizAccountLinkInfoAccountType|null); - } - - /** Represents a BizAccountLinkInfo. */ - class BizAccountLinkInfo implements IBizAccountLinkInfo { - - /** - * Constructs a new BizAccountLinkInfo. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IBizAccountLinkInfo); - - /** BizAccountLinkInfo whatsappBizAcctFbid. */ - public whatsappBizAcctFbid: (number|Long); - - /** BizAccountLinkInfo whatsappAcctNumber. */ - public whatsappAcctNumber: string; - - /** BizAccountLinkInfo issueTime. */ - public issueTime: (number|Long); - - /** BizAccountLinkInfo hostStorage. */ - public hostStorage: proto.BizAccountLinkInfo.BizAccountLinkInfoHostStorageType; - - /** BizAccountLinkInfo accountType. */ - public accountType: proto.BizAccountLinkInfo.BizAccountLinkInfoAccountType; - - /** - * Creates a new BizAccountLinkInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns BizAccountLinkInfo instance - */ - public static create(properties?: proto.IBizAccountLinkInfo): proto.BizAccountLinkInfo; - - /** - * Encodes the specified BizAccountLinkInfo message. Does not implicitly {@link proto.BizAccountLinkInfo.verify|verify} messages. - * @param message BizAccountLinkInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IBizAccountLinkInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BizAccountLinkInfo message, length delimited. Does not implicitly {@link proto.BizAccountLinkInfo.verify|verify} messages. - * @param message BizAccountLinkInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IBizAccountLinkInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BizAccountLinkInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BizAccountLinkInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.BizAccountLinkInfo; - - /** - * Decodes a BizAccountLinkInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BizAccountLinkInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.BizAccountLinkInfo; - - /** - * Verifies a BizAccountLinkInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BizAccountLinkInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BizAccountLinkInfo - */ - public static fromObject(object: { [k: string]: any }): proto.BizAccountLinkInfo; - - /** - * Creates a plain object from a BizAccountLinkInfo message. Also converts values to other types if specified. - * @param message BizAccountLinkInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.BizAccountLinkInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BizAccountLinkInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace BizAccountLinkInfo { - - /** BizAccountLinkInfoHostStorageType enum. */ - enum BizAccountLinkInfoHostStorageType { - ON_PREMISE = 0, - FACEBOOK = 1 - } - - /** BizAccountLinkInfoAccountType enum. */ - enum BizAccountLinkInfoAccountType { - ENTERPRISE = 0 - } - } - - /** Properties of a BizAccountPayload. */ - interface IBizAccountPayload { - - /** BizAccountPayload vnameCert */ - vnameCert?: (proto.IVerifiedNameCertificate|null); - - /** BizAccountPayload bizAcctLinkInfo */ - bizAcctLinkInfo?: (Uint8Array|null); - } - - /** Represents a BizAccountPayload. */ - class BizAccountPayload implements IBizAccountPayload { - - /** - * Constructs a new BizAccountPayload. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IBizAccountPayload); - - /** BizAccountPayload vnameCert. */ - public vnameCert?: (proto.IVerifiedNameCertificate|null); - - /** BizAccountPayload bizAcctLinkInfo. */ - public bizAcctLinkInfo: Uint8Array; - - /** - * Creates a new BizAccountPayload instance using the specified properties. - * @param [properties] Properties to set - * @returns BizAccountPayload instance - */ - public static create(properties?: proto.IBizAccountPayload): proto.BizAccountPayload; - - /** - * Encodes the specified BizAccountPayload message. Does not implicitly {@link proto.BizAccountPayload.verify|verify} messages. - * @param message BizAccountPayload message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IBizAccountPayload, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BizAccountPayload message, length delimited. Does not implicitly {@link proto.BizAccountPayload.verify|verify} messages. - * @param message BizAccountPayload message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IBizAccountPayload, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BizAccountPayload message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BizAccountPayload - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.BizAccountPayload; - - /** - * Decodes a BizAccountPayload message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BizAccountPayload - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.BizAccountPayload; - - /** - * Verifies a BizAccountPayload message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BizAccountPayload message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BizAccountPayload - */ - public static fromObject(object: { [k: string]: any }): proto.BizAccountPayload; - - /** - * Creates a plain object from a BizAccountPayload message. Also converts values to other types if specified. - * @param message BizAccountPayload - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.BizAccountPayload, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BizAccountPayload to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a BizIdentityInfo. */ - interface IBizIdentityInfo { - - /** BizIdentityInfo vlevel */ - vlevel?: (proto.BizIdentityInfo.BizIdentityInfoVerifiedLevelValue|null); - - /** BizIdentityInfo vnameCert */ - vnameCert?: (proto.IVerifiedNameCertificate|null); - - /** BizIdentityInfo signed */ - signed?: (boolean|null); - - /** BizIdentityInfo revoked */ - revoked?: (boolean|null); - - /** BizIdentityInfo hostStorage */ - hostStorage?: (proto.BizIdentityInfo.BizIdentityInfoHostStorageType|null); - - /** BizIdentityInfo actualActors */ - actualActors?: (proto.BizIdentityInfo.BizIdentityInfoActualActorsType|null); - - /** BizIdentityInfo privacyModeTs */ - privacyModeTs?: (number|Long|null); - - /** BizIdentityInfo featureControls */ - featureControls?: (number|Long|null); - } - - /** Represents a BizIdentityInfo. */ - class BizIdentityInfo implements IBizIdentityInfo { - - /** - * Constructs a new BizIdentityInfo. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IBizIdentityInfo); - - /** BizIdentityInfo vlevel. */ - public vlevel: proto.BizIdentityInfo.BizIdentityInfoVerifiedLevelValue; - - /** BizIdentityInfo vnameCert. */ - public vnameCert?: (proto.IVerifiedNameCertificate|null); - - /** BizIdentityInfo signed. */ - public signed: boolean; - - /** BizIdentityInfo revoked. */ - public revoked: boolean; - - /** BizIdentityInfo hostStorage. */ - public hostStorage: proto.BizIdentityInfo.BizIdentityInfoHostStorageType; - - /** BizIdentityInfo actualActors. */ - public actualActors: proto.BizIdentityInfo.BizIdentityInfoActualActorsType; - - /** BizIdentityInfo privacyModeTs. */ - public privacyModeTs: (number|Long); - - /** BizIdentityInfo featureControls. */ - public featureControls: (number|Long); - - /** - * Creates a new BizIdentityInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns BizIdentityInfo instance - */ - public static create(properties?: proto.IBizIdentityInfo): proto.BizIdentityInfo; - - /** - * Encodes the specified BizIdentityInfo message. Does not implicitly {@link proto.BizIdentityInfo.verify|verify} messages. - * @param message BizIdentityInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IBizIdentityInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BizIdentityInfo message, length delimited. Does not implicitly {@link proto.BizIdentityInfo.verify|verify} messages. - * @param message BizIdentityInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IBizIdentityInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BizIdentityInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BizIdentityInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.BizIdentityInfo; - - /** - * Decodes a BizIdentityInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BizIdentityInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.BizIdentityInfo; - - /** - * Verifies a BizIdentityInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BizIdentityInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BizIdentityInfo - */ - public static fromObject(object: { [k: string]: any }): proto.BizIdentityInfo; - - /** - * Creates a plain object from a BizIdentityInfo message. Also converts values to other types if specified. - * @param message BizIdentityInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.BizIdentityInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BizIdentityInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace BizIdentityInfo { - - /** BizIdentityInfoVerifiedLevelValue enum. */ - enum BizIdentityInfoVerifiedLevelValue { - UNKNOWN = 0, - LOW = 1, - HIGH = 2 - } - - /** BizIdentityInfoHostStorageType enum. */ - enum BizIdentityInfoHostStorageType { - ON_PREMISE = 0, - FACEBOOK = 1 - } - - /** BizIdentityInfoActualActorsType enum. */ - enum BizIdentityInfoActualActorsType { - SELF = 0, - BSP = 1 - } - } - - /** Properties of a LocalizedName. */ - interface ILocalizedName { - - /** LocalizedName lg */ - lg?: (string|null); - - /** LocalizedName lc */ - lc?: (string|null); - - /** LocalizedName verifiedName */ - verifiedName?: (string|null); - } - - /** Represents a LocalizedName. */ - class LocalizedName implements ILocalizedName { - - /** - * Constructs a new LocalizedName. - * @param [properties] Properties to set - */ - constructor(properties?: proto.ILocalizedName); - - /** LocalizedName lg. */ - public lg: string; - - /** LocalizedName lc. */ - public lc: string; - - /** LocalizedName verifiedName. */ - public verifiedName: string; - - /** - * Creates a new LocalizedName instance using the specified properties. - * @param [properties] Properties to set - * @returns LocalizedName instance - */ - public static create(properties?: proto.ILocalizedName): proto.LocalizedName; - - /** - * Encodes the specified LocalizedName message. Does not implicitly {@link proto.LocalizedName.verify|verify} messages. - * @param message LocalizedName message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.ILocalizedName, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LocalizedName message, length delimited. Does not implicitly {@link proto.LocalizedName.verify|verify} messages. - * @param message LocalizedName message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.ILocalizedName, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LocalizedName message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LocalizedName - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.LocalizedName; - - /** - * Decodes a LocalizedName message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LocalizedName - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.LocalizedName; - - /** - * Verifies a LocalizedName message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LocalizedName message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LocalizedName - */ - public static fromObject(object: { [k: string]: any }): proto.LocalizedName; - - /** - * Creates a plain object from a LocalizedName message. Also converts values to other types if specified. - * @param message LocalizedName - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.LocalizedName, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LocalizedName to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - /** Properties of a VerifiedNameCertificate. */ interface IVerifiedNameCertificate { @@ -19697,2731 +23918,329 @@ export namespace proto { public toJSON(): { [k: string]: any }; } - /** Properties of a CertChain. */ - interface ICertChain { + /** Properties of a VideoMessage. */ + interface IVideoMessage { - /** CertChain leaf */ - leaf?: (proto.INoiseCertificate|null); + /** VideoMessage url */ + url?: (string|null); - /** CertChain intermediate */ - intermediate?: (proto.INoiseCertificate|null); + /** VideoMessage mimetype */ + mimetype?: (string|null); + + /** VideoMessage fileSha256 */ + fileSha256?: (Uint8Array|null); + + /** VideoMessage fileLength */ + fileLength?: (number|Long|null); + + /** VideoMessage seconds */ + seconds?: (number|null); + + /** VideoMessage mediaKey */ + mediaKey?: (Uint8Array|null); + + /** VideoMessage caption */ + caption?: (string|null); + + /** VideoMessage gifPlayback */ + gifPlayback?: (boolean|null); + + /** VideoMessage height */ + height?: (number|null); + + /** VideoMessage width */ + width?: (number|null); + + /** VideoMessage fileEncSha256 */ + fileEncSha256?: (Uint8Array|null); + + /** VideoMessage interactiveAnnotations */ + interactiveAnnotations?: (proto.IInteractiveAnnotation[]|null); + + /** VideoMessage directPath */ + directPath?: (string|null); + + /** VideoMessage mediaKeyTimestamp */ + mediaKeyTimestamp?: (number|Long|null); + + /** VideoMessage jpegThumbnail */ + jpegThumbnail?: (Uint8Array|null); + + /** VideoMessage contextInfo */ + contextInfo?: (proto.IContextInfo|null); + + /** VideoMessage streamingSidecar */ + streamingSidecar?: (Uint8Array|null); + + /** VideoMessage gifAttribution */ + gifAttribution?: (proto.VideoMessage.VideoMessageAttribution|null); + + /** VideoMessage viewOnce */ + viewOnce?: (boolean|null); + + /** VideoMessage thumbnailDirectPath */ + thumbnailDirectPath?: (string|null); + + /** VideoMessage thumbnailSha256 */ + thumbnailSha256?: (Uint8Array|null); + + /** VideoMessage thumbnailEncSha256 */ + thumbnailEncSha256?: (Uint8Array|null); + + /** VideoMessage staticUrl */ + staticUrl?: (string|null); } - /** Represents a CertChain. */ - class CertChain implements ICertChain { + /** Represents a VideoMessage. */ + class VideoMessage implements IVideoMessage { /** - * Constructs a new CertChain. + * Constructs a new VideoMessage. * @param [properties] Properties to set */ - constructor(properties?: proto.ICertChain); + constructor(properties?: proto.IVideoMessage); - /** CertChain leaf. */ - public leaf?: (proto.INoiseCertificate|null); + /** VideoMessage url. */ + public url: string; - /** CertChain intermediate. */ - public intermediate?: (proto.INoiseCertificate|null); + /** VideoMessage mimetype. */ + public mimetype: string; + + /** VideoMessage fileSha256. */ + public fileSha256: Uint8Array; + + /** VideoMessage fileLength. */ + public fileLength: (number|Long); + + /** VideoMessage seconds. */ + public seconds: number; + + /** VideoMessage mediaKey. */ + public mediaKey: Uint8Array; + + /** VideoMessage caption. */ + public caption: string; + + /** VideoMessage gifPlayback. */ + public gifPlayback: boolean; + + /** VideoMessage height. */ + public height: number; + + /** VideoMessage width. */ + public width: number; + + /** VideoMessage fileEncSha256. */ + public fileEncSha256: Uint8Array; + + /** VideoMessage interactiveAnnotations. */ + public interactiveAnnotations: proto.IInteractiveAnnotation[]; + + /** VideoMessage directPath. */ + public directPath: string; + + /** VideoMessage mediaKeyTimestamp. */ + public mediaKeyTimestamp: (number|Long); + + /** VideoMessage jpegThumbnail. */ + public jpegThumbnail: Uint8Array; + + /** VideoMessage contextInfo. */ + public contextInfo?: (proto.IContextInfo|null); + + /** VideoMessage streamingSidecar. */ + public streamingSidecar: Uint8Array; + + /** VideoMessage gifAttribution. */ + public gifAttribution: proto.VideoMessage.VideoMessageAttribution; + + /** VideoMessage viewOnce. */ + public viewOnce: boolean; + + /** VideoMessage thumbnailDirectPath. */ + public thumbnailDirectPath: string; + + /** VideoMessage thumbnailSha256. */ + public thumbnailSha256: Uint8Array; + + /** VideoMessage thumbnailEncSha256. */ + public thumbnailEncSha256: Uint8Array; + + /** VideoMessage staticUrl. */ + public staticUrl: string; /** - * Creates a new CertChain instance using the specified properties. + * Creates a new VideoMessage instance using the specified properties. * @param [properties] Properties to set - * @returns CertChain instance + * @returns VideoMessage instance */ - public static create(properties?: proto.ICertChain): proto.CertChain; + public static create(properties?: proto.IVideoMessage): proto.VideoMessage; /** - * Encodes the specified CertChain message. Does not implicitly {@link proto.CertChain.verify|verify} messages. - * @param message CertChain message or plain object to encode + * Encodes the specified VideoMessage message. Does not implicitly {@link proto.VideoMessage.verify|verify} messages. + * @param message VideoMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: proto.ICertChain, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: proto.IVideoMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CertChain message, length delimited. Does not implicitly {@link proto.CertChain.verify|verify} messages. - * @param message CertChain message or plain object to encode + * Encodes the specified VideoMessage message, length delimited. Does not implicitly {@link proto.VideoMessage.verify|verify} messages. + * @param message VideoMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: proto.ICertChain, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: proto.IVideoMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CertChain message from the specified reader or buffer. + * Decodes a VideoMessage message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CertChain + * @returns VideoMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.CertChain; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.VideoMessage; /** - * Decodes a CertChain message from the specified reader or buffer, length delimited. + * Decodes a VideoMessage message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CertChain + * @returns VideoMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.CertChain; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.VideoMessage; /** - * Verifies a CertChain message. + * Verifies a VideoMessage message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CertChain message from a plain object. Also converts values to their respective internal types. + * Creates a VideoMessage message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CertChain + * @returns VideoMessage */ - public static fromObject(object: { [k: string]: any }): proto.CertChain; + public static fromObject(object: { [k: string]: any }): proto.VideoMessage; /** - * Creates a plain object from a CertChain message. Also converts values to other types if specified. - * @param message CertChain + * Creates a plain object from a VideoMessage message. Also converts values to other types if specified. + * @param message VideoMessage * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: proto.CertChain, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: proto.VideoMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CertChain to JSON. + * Converts this VideoMessage to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ClientFinish. */ - interface IClientFinish { + namespace VideoMessage { - /** ClientFinish static */ - "static"?: (Uint8Array|null); - - /** ClientFinish payload */ - payload?: (Uint8Array|null); - } - - /** Represents a ClientFinish. */ - class ClientFinish implements IClientFinish { - - /** - * Constructs a new ClientFinish. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IClientFinish); - - /** ClientFinish static. */ - public static: Uint8Array; - - /** ClientFinish payload. */ - public payload: Uint8Array; - - /** - * Creates a new ClientFinish instance using the specified properties. - * @param [properties] Properties to set - * @returns ClientFinish instance - */ - public static create(properties?: proto.IClientFinish): proto.ClientFinish; - - /** - * Encodes the specified ClientFinish message. Does not implicitly {@link proto.ClientFinish.verify|verify} messages. - * @param message ClientFinish message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IClientFinish, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClientFinish message, length delimited. Does not implicitly {@link proto.ClientFinish.verify|verify} messages. - * @param message ClientFinish message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IClientFinish, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClientFinish message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClientFinish - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.ClientFinish; - - /** - * Decodes a ClientFinish message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClientFinish - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.ClientFinish; - - /** - * Verifies a ClientFinish message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ClientFinish message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClientFinish - */ - public static fromObject(object: { [k: string]: any }): proto.ClientFinish; - - /** - * Creates a plain object from a ClientFinish message. Also converts values to other types if specified. - * @param message ClientFinish - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.ClientFinish, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClientFinish to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ClientHello. */ - interface IClientHello { - - /** ClientHello ephemeral */ - ephemeral?: (Uint8Array|null); - - /** ClientHello static */ - "static"?: (Uint8Array|null); - - /** ClientHello payload */ - payload?: (Uint8Array|null); - } - - /** Represents a ClientHello. */ - class ClientHello implements IClientHello { - - /** - * Constructs a new ClientHello. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IClientHello); - - /** ClientHello ephemeral. */ - public ephemeral: Uint8Array; - - /** ClientHello static. */ - public static: Uint8Array; - - /** ClientHello payload. */ - public payload: Uint8Array; - - /** - * Creates a new ClientHello instance using the specified properties. - * @param [properties] Properties to set - * @returns ClientHello instance - */ - public static create(properties?: proto.IClientHello): proto.ClientHello; - - /** - * Encodes the specified ClientHello message. Does not implicitly {@link proto.ClientHello.verify|verify} messages. - * @param message ClientHello message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IClientHello, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClientHello message, length delimited. Does not implicitly {@link proto.ClientHello.verify|verify} messages. - * @param message ClientHello message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IClientHello, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClientHello message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClientHello - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.ClientHello; - - /** - * Decodes a ClientHello message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClientHello - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.ClientHello; - - /** - * Verifies a ClientHello message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ClientHello message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClientHello - */ - public static fromObject(object: { [k: string]: any }): proto.ClientHello; - - /** - * Creates a plain object from a ClientHello message. Also converts values to other types if specified. - * @param message ClientHello - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.ClientHello, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClientHello to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ClientPayload. */ - interface IClientPayload { - - /** ClientPayload username */ - username?: (number|Long|null); - - /** ClientPayload passive */ - passive?: (boolean|null); - - /** ClientPayload userAgent */ - userAgent?: (proto.IUserAgent|null); - - /** ClientPayload webInfo */ - webInfo?: (proto.IWebInfo|null); - - /** ClientPayload pushName */ - pushName?: (string|null); - - /** ClientPayload sessionId */ - sessionId?: (number|null); - - /** ClientPayload shortConnect */ - shortConnect?: (boolean|null); - - /** ClientPayload connectType */ - connectType?: (proto.ClientPayload.ClientPayloadConnectType|null); - - /** ClientPayload connectReason */ - connectReason?: (proto.ClientPayload.ClientPayloadConnectReason|null); - - /** ClientPayload shards */ - shards?: (number[]|null); - - /** ClientPayload dnsSource */ - dnsSource?: (proto.IDNSSource|null); - - /** ClientPayload connectAttemptCount */ - connectAttemptCount?: (number|null); - - /** ClientPayload device */ - device?: (number|null); - - /** ClientPayload regData */ - regData?: (proto.ICompanionRegData|null); - - /** ClientPayload product */ - product?: (proto.ClientPayload.ClientPayloadProduct|null); - - /** ClientPayload fbCat */ - fbCat?: (Uint8Array|null); - - /** ClientPayload fbUserAgent */ - fbUserAgent?: (Uint8Array|null); - - /** ClientPayload oc */ - oc?: (boolean|null); - - /** ClientPayload lc */ - lc?: (number|null); - - /** ClientPayload iosAppExtension */ - iosAppExtension?: (proto.ClientPayload.ClientPayloadIOSAppExtension|null); - - /** ClientPayload fbAppId */ - fbAppId?: (number|Long|null); - - /** ClientPayload fbDeviceId */ - fbDeviceId?: (Uint8Array|null); - - /** ClientPayload pull */ - pull?: (boolean|null); - } - - /** Represents a ClientPayload. */ - class ClientPayload implements IClientPayload { - - /** - * Constructs a new ClientPayload. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IClientPayload); - - /** ClientPayload username. */ - public username: (number|Long); - - /** ClientPayload passive. */ - public passive: boolean; - - /** ClientPayload userAgent. */ - public userAgent?: (proto.IUserAgent|null); - - /** ClientPayload webInfo. */ - public webInfo?: (proto.IWebInfo|null); - - /** ClientPayload pushName. */ - public pushName: string; - - /** ClientPayload sessionId. */ - public sessionId: number; - - /** ClientPayload shortConnect. */ - public shortConnect: boolean; - - /** ClientPayload connectType. */ - public connectType: proto.ClientPayload.ClientPayloadConnectType; - - /** ClientPayload connectReason. */ - public connectReason: proto.ClientPayload.ClientPayloadConnectReason; - - /** ClientPayload shards. */ - public shards: number[]; - - /** ClientPayload dnsSource. */ - public dnsSource?: (proto.IDNSSource|null); - - /** ClientPayload connectAttemptCount. */ - public connectAttemptCount: number; - - /** ClientPayload device. */ - public device: number; - - /** ClientPayload regData. */ - public regData?: (proto.ICompanionRegData|null); - - /** ClientPayload product. */ - public product: proto.ClientPayload.ClientPayloadProduct; - - /** ClientPayload fbCat. */ - public fbCat: Uint8Array; - - /** ClientPayload fbUserAgent. */ - public fbUserAgent: Uint8Array; - - /** ClientPayload oc. */ - public oc: boolean; - - /** ClientPayload lc. */ - public lc: number; - - /** ClientPayload iosAppExtension. */ - public iosAppExtension: proto.ClientPayload.ClientPayloadIOSAppExtension; - - /** ClientPayload fbAppId. */ - public fbAppId: (number|Long); - - /** ClientPayload fbDeviceId. */ - public fbDeviceId: Uint8Array; - - /** ClientPayload pull. */ - public pull: boolean; - - /** - * Creates a new ClientPayload instance using the specified properties. - * @param [properties] Properties to set - * @returns ClientPayload instance - */ - public static create(properties?: proto.IClientPayload): proto.ClientPayload; - - /** - * Encodes the specified ClientPayload message. Does not implicitly {@link proto.ClientPayload.verify|verify} messages. - * @param message ClientPayload message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IClientPayload, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClientPayload message, length delimited. Does not implicitly {@link proto.ClientPayload.verify|verify} messages. - * @param message ClientPayload message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IClientPayload, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClientPayload message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClientPayload - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.ClientPayload; - - /** - * Decodes a ClientPayload message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClientPayload - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.ClientPayload; - - /** - * Verifies a ClientPayload message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ClientPayload message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClientPayload - */ - public static fromObject(object: { [k: string]: any }): proto.ClientPayload; - - /** - * Creates a plain object from a ClientPayload message. Also converts values to other types if specified. - * @param message ClientPayload - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.ClientPayload, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClientPayload to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace ClientPayload { - - /** ClientPayloadConnectType enum. */ - enum ClientPayloadConnectType { - CELLULAR_UNKNOWN = 0, - WIFI_UNKNOWN = 1, - CELLULAR_EDGE = 100, - CELLULAR_IDEN = 101, - CELLULAR_UMTS = 102, - CELLULAR_EVDO = 103, - CELLULAR_GPRS = 104, - CELLULAR_HSDPA = 105, - CELLULAR_HSUPA = 106, - CELLULAR_HSPA = 107, - CELLULAR_CDMA = 108, - CELLULAR_1XRTT = 109, - CELLULAR_EHRPD = 110, - CELLULAR_LTE = 111, - CELLULAR_HSPAP = 112 - } - - /** ClientPayloadConnectReason enum. */ - enum ClientPayloadConnectReason { - PUSH = 0, - USER_ACTIVATED = 1, - SCHEDULED = 2, - ERROR_RECONNECT = 3, - NETWORK_SWITCH = 4, - PING_RECONNECT = 5 - } - - /** ClientPayloadProduct enum. */ - enum ClientPayloadProduct { - WHATSAPP = 0, - MESSENGER = 1 - } - - /** ClientPayloadIOSAppExtension enum. */ - enum ClientPayloadIOSAppExtension { - SHARE_EXTENSION = 0, - SERVICE_EXTENSION = 1, - INTENTS_EXTENSION = 2 + /** VideoMessageAttribution enum. */ + enum VideoMessageAttribution { + NONE = 0, + GIPHY = 1, + TENOR = 2 } } - /** Properties of a CompanionRegData. */ - interface ICompanionRegData { + /** Properties of a WallpaperSettings. */ + interface IWallpaperSettings { - /** CompanionRegData eRegid */ - eRegid?: (Uint8Array|null); + /** WallpaperSettings filename */ + filename?: (string|null); - /** CompanionRegData eKeytype */ - eKeytype?: (Uint8Array|null); - - /** CompanionRegData eIdent */ - eIdent?: (Uint8Array|null); - - /** CompanionRegData eSkeyId */ - eSkeyId?: (Uint8Array|null); - - /** CompanionRegData eSkeyVal */ - eSkeyVal?: (Uint8Array|null); - - /** CompanionRegData eSkeySig */ - eSkeySig?: (Uint8Array|null); - - /** CompanionRegData buildHash */ - buildHash?: (Uint8Array|null); - - /** CompanionRegData companionProps */ - companionProps?: (Uint8Array|null); + /** WallpaperSettings opacity */ + opacity?: (number|null); } - /** Represents a CompanionRegData. */ - class CompanionRegData implements ICompanionRegData { + /** Represents a WallpaperSettings. */ + class WallpaperSettings implements IWallpaperSettings { /** - * Constructs a new CompanionRegData. + * Constructs a new WallpaperSettings. * @param [properties] Properties to set */ - constructor(properties?: proto.ICompanionRegData); + constructor(properties?: proto.IWallpaperSettings); - /** CompanionRegData eRegid. */ - public eRegid: Uint8Array; + /** WallpaperSettings filename. */ + public filename: string; - /** CompanionRegData eKeytype. */ - public eKeytype: Uint8Array; - - /** CompanionRegData eIdent. */ - public eIdent: Uint8Array; - - /** CompanionRegData eSkeyId. */ - public eSkeyId: Uint8Array; - - /** CompanionRegData eSkeyVal. */ - public eSkeyVal: Uint8Array; - - /** CompanionRegData eSkeySig. */ - public eSkeySig: Uint8Array; - - /** CompanionRegData buildHash. */ - public buildHash: Uint8Array; - - /** CompanionRegData companionProps. */ - public companionProps: Uint8Array; + /** WallpaperSettings opacity. */ + public opacity: number; /** - * Creates a new CompanionRegData instance using the specified properties. + * Creates a new WallpaperSettings instance using the specified properties. * @param [properties] Properties to set - * @returns CompanionRegData instance + * @returns WallpaperSettings instance */ - public static create(properties?: proto.ICompanionRegData): proto.CompanionRegData; + public static create(properties?: proto.IWallpaperSettings): proto.WallpaperSettings; /** - * Encodes the specified CompanionRegData message. Does not implicitly {@link proto.CompanionRegData.verify|verify} messages. - * @param message CompanionRegData message or plain object to encode + * Encodes the specified WallpaperSettings message. Does not implicitly {@link proto.WallpaperSettings.verify|verify} messages. + * @param message WallpaperSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: proto.ICompanionRegData, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: proto.IWallpaperSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CompanionRegData message, length delimited. Does not implicitly {@link proto.CompanionRegData.verify|verify} messages. - * @param message CompanionRegData message or plain object to encode + * Encodes the specified WallpaperSettings message, length delimited. Does not implicitly {@link proto.WallpaperSettings.verify|verify} messages. + * @param message WallpaperSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: proto.ICompanionRegData, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: proto.IWallpaperSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CompanionRegData message from the specified reader or buffer. + * Decodes a WallpaperSettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CompanionRegData + * @returns WallpaperSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.CompanionRegData; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.WallpaperSettings; /** - * Decodes a CompanionRegData message from the specified reader or buffer, length delimited. + * Decodes a WallpaperSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CompanionRegData + * @returns WallpaperSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.CompanionRegData; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.WallpaperSettings; /** - * Verifies a CompanionRegData message. + * Verifies a WallpaperSettings message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CompanionRegData message from a plain object. Also converts values to their respective internal types. + * Creates a WallpaperSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CompanionRegData + * @returns WallpaperSettings */ - public static fromObject(object: { [k: string]: any }): proto.CompanionRegData; + public static fromObject(object: { [k: string]: any }): proto.WallpaperSettings; /** - * Creates a plain object from a CompanionRegData message. Also converts values to other types if specified. - * @param message CompanionRegData + * Creates a plain object from a WallpaperSettings message. Also converts values to other types if specified. + * @param message WallpaperSettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: proto.CompanionRegData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: proto.WallpaperSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CompanionRegData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Details. */ - interface IDetails { - - /** Details serial */ - serial?: (number|null); - - /** Details issuerSerial */ - issuerSerial?: (number|null); - - /** Details key */ - key?: (Uint8Array|null); - - /** Details notBefore */ - notBefore?: (number|Long|null); - - /** Details notAfter */ - notAfter?: (number|Long|null); - } - - /** Represents a Details. */ - class Details implements IDetails { - - /** - * Constructs a new Details. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IDetails); - - /** Details serial. */ - public serial: number; - - /** Details issuerSerial. */ - public issuerSerial: number; - - /** Details key. */ - public key: Uint8Array; - - /** Details notBefore. */ - public notBefore: (number|Long); - - /** Details notAfter. */ - public notAfter: (number|Long); - - /** - * Creates a new Details instance using the specified properties. - * @param [properties] Properties to set - * @returns Details instance - */ - public static create(properties?: proto.IDetails): proto.Details; - - /** - * Encodes the specified Details message. Does not implicitly {@link proto.Details.verify|verify} messages. - * @param message Details message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Details message, length delimited. Does not implicitly {@link proto.Details.verify|verify} messages. - * @param message Details message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Details message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Details - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.Details; - - /** - * Decodes a Details message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Details - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.Details; - - /** - * Verifies a Details message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Details message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Details - */ - public static fromObject(object: { [k: string]: any }): proto.Details; - - /** - * Creates a plain object from a Details message. Also converts values to other types if specified. - * @param message Details - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.Details, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Details to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DNSSource. */ - interface IDNSSource { - - /** DNSSource dnsMethod */ - dnsMethod?: (proto.DNSSource.DNSSourceDNSResolutionMethod|null); - - /** DNSSource appCached */ - appCached?: (boolean|null); - } - - /** Represents a DNSSource. */ - class DNSSource implements IDNSSource { - - /** - * Constructs a new DNSSource. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IDNSSource); - - /** DNSSource dnsMethod. */ - public dnsMethod: proto.DNSSource.DNSSourceDNSResolutionMethod; - - /** DNSSource appCached. */ - public appCached: boolean; - - /** - * Creates a new DNSSource instance using the specified properties. - * @param [properties] Properties to set - * @returns DNSSource instance - */ - public static create(properties?: proto.IDNSSource): proto.DNSSource; - - /** - * Encodes the specified DNSSource message. Does not implicitly {@link proto.DNSSource.verify|verify} messages. - * @param message DNSSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IDNSSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DNSSource message, length delimited. Does not implicitly {@link proto.DNSSource.verify|verify} messages. - * @param message DNSSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IDNSSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DNSSource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DNSSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.DNSSource; - - /** - * Decodes a DNSSource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DNSSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.DNSSource; - - /** - * Verifies a DNSSource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DNSSource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DNSSource - */ - public static fromObject(object: { [k: string]: any }): proto.DNSSource; - - /** - * Creates a plain object from a DNSSource message. Also converts values to other types if specified. - * @param message DNSSource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.DNSSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DNSSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace DNSSource { - - /** DNSSourceDNSResolutionMethod enum. */ - enum DNSSourceDNSResolutionMethod { - SYSTEM = 0, - GOOGLE = 1, - HARDCODED = 2, - OVERRIDE = 3, - FALLBACK = 4 - } - } - - /** Properties of a HandshakeMessage. */ - interface IHandshakeMessage { - - /** HandshakeMessage clientHello */ - clientHello?: (proto.IClientHello|null); - - /** HandshakeMessage serverHello */ - serverHello?: (proto.IServerHello|null); - - /** HandshakeMessage clientFinish */ - clientFinish?: (proto.IClientFinish|null); - } - - /** Represents a HandshakeMessage. */ - class HandshakeMessage implements IHandshakeMessage { - - /** - * Constructs a new HandshakeMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IHandshakeMessage); - - /** HandshakeMessage clientHello. */ - public clientHello?: (proto.IClientHello|null); - - /** HandshakeMessage serverHello. */ - public serverHello?: (proto.IServerHello|null); - - /** HandshakeMessage clientFinish. */ - public clientFinish?: (proto.IClientFinish|null); - - /** - * Creates a new HandshakeMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns HandshakeMessage instance - */ - public static create(properties?: proto.IHandshakeMessage): proto.HandshakeMessage; - - /** - * Encodes the specified HandshakeMessage message. Does not implicitly {@link proto.HandshakeMessage.verify|verify} messages. - * @param message HandshakeMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IHandshakeMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HandshakeMessage message, length delimited. Does not implicitly {@link proto.HandshakeMessage.verify|verify} messages. - * @param message HandshakeMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IHandshakeMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HandshakeMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HandshakeMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.HandshakeMessage; - - /** - * Decodes a HandshakeMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HandshakeMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.HandshakeMessage; - - /** - * Verifies a HandshakeMessage message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HandshakeMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HandshakeMessage - */ - public static fromObject(object: { [k: string]: any }): proto.HandshakeMessage; - - /** - * Creates a plain object from a HandshakeMessage message. Also converts values to other types if specified. - * @param message HandshakeMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.HandshakeMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HandshakeMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a NoiseCertificate. */ - interface INoiseCertificate { - - /** NoiseCertificate details */ - details?: (Uint8Array|null); - - /** NoiseCertificate signature */ - signature?: (Uint8Array|null); - } - - /** Represents a NoiseCertificate. */ - class NoiseCertificate implements INoiseCertificate { - - /** - * Constructs a new NoiseCertificate. - * @param [properties] Properties to set - */ - constructor(properties?: proto.INoiseCertificate); - - /** NoiseCertificate details. */ - public details: Uint8Array; - - /** NoiseCertificate signature. */ - public signature: Uint8Array; - - /** - * Creates a new NoiseCertificate instance using the specified properties. - * @param [properties] Properties to set - * @returns NoiseCertificate instance - */ - public static create(properties?: proto.INoiseCertificate): proto.NoiseCertificate; - - /** - * Encodes the specified NoiseCertificate message. Does not implicitly {@link proto.NoiseCertificate.verify|verify} messages. - * @param message NoiseCertificate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.INoiseCertificate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NoiseCertificate message, length delimited. Does not implicitly {@link proto.NoiseCertificate.verify|verify} messages. - * @param message NoiseCertificate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.INoiseCertificate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NoiseCertificate message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NoiseCertificate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.NoiseCertificate; - - /** - * Decodes a NoiseCertificate message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NoiseCertificate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.NoiseCertificate; - - /** - * Verifies a NoiseCertificate message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NoiseCertificate message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NoiseCertificate - */ - public static fromObject(object: { [k: string]: any }): proto.NoiseCertificate; - - /** - * Creates a plain object from a NoiseCertificate message. Also converts values to other types if specified. - * @param message NoiseCertificate - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.NoiseCertificate, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NoiseCertificate to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ServerHello. */ - interface IServerHello { - - /** ServerHello ephemeral */ - ephemeral?: (Uint8Array|null); - - /** ServerHello static */ - "static"?: (Uint8Array|null); - - /** ServerHello payload */ - payload?: (Uint8Array|null); - } - - /** Represents a ServerHello. */ - class ServerHello implements IServerHello { - - /** - * Constructs a new ServerHello. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IServerHello); - - /** ServerHello ephemeral. */ - public ephemeral: Uint8Array; - - /** ServerHello static. */ - public static: Uint8Array; - - /** ServerHello payload. */ - public payload: Uint8Array; - - /** - * Creates a new ServerHello instance using the specified properties. - * @param [properties] Properties to set - * @returns ServerHello instance - */ - public static create(properties?: proto.IServerHello): proto.ServerHello; - - /** - * Encodes the specified ServerHello message. Does not implicitly {@link proto.ServerHello.verify|verify} messages. - * @param message ServerHello message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IServerHello, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServerHello message, length delimited. Does not implicitly {@link proto.ServerHello.verify|verify} messages. - * @param message ServerHello message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IServerHello, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServerHello message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServerHello - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.ServerHello; - - /** - * Decodes a ServerHello message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServerHello - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.ServerHello; - - /** - * Verifies a ServerHello message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServerHello message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServerHello - */ - public static fromObject(object: { [k: string]: any }): proto.ServerHello; - - /** - * Creates a plain object from a ServerHello message. Also converts values to other types if specified. - * @param message ServerHello - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.ServerHello, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServerHello to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a UserAgent. */ - interface IUserAgent { - - /** UserAgent platform */ - platform?: (proto.UserAgent.UserAgentPlatform|null); - - /** UserAgent appVersion */ - appVersion?: (proto.IAppVersion|null); - - /** UserAgent mcc */ - mcc?: (string|null); - - /** UserAgent mnc */ - mnc?: (string|null); - - /** UserAgent osVersion */ - osVersion?: (string|null); - - /** UserAgent manufacturer */ - manufacturer?: (string|null); - - /** UserAgent device */ - device?: (string|null); - - /** UserAgent osBuildNumber */ - osBuildNumber?: (string|null); - - /** UserAgent phoneId */ - phoneId?: (string|null); - - /** UserAgent releaseChannel */ - releaseChannel?: (proto.UserAgent.UserAgentReleaseChannel|null); - - /** UserAgent localeLanguageIso6391 */ - localeLanguageIso6391?: (string|null); - - /** UserAgent localeCountryIso31661Alpha2 */ - localeCountryIso31661Alpha2?: (string|null); - - /** UserAgent deviceBoard */ - deviceBoard?: (string|null); - } - - /** Represents a UserAgent. */ - class UserAgent implements IUserAgent { - - /** - * Constructs a new UserAgent. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IUserAgent); - - /** UserAgent platform. */ - public platform: proto.UserAgent.UserAgentPlatform; - - /** UserAgent appVersion. */ - public appVersion?: (proto.IAppVersion|null); - - /** UserAgent mcc. */ - public mcc: string; - - /** UserAgent mnc. */ - public mnc: string; - - /** UserAgent osVersion. */ - public osVersion: string; - - /** UserAgent manufacturer. */ - public manufacturer: string; - - /** UserAgent device. */ - public device: string; - - /** UserAgent osBuildNumber. */ - public osBuildNumber: string; - - /** UserAgent phoneId. */ - public phoneId: string; - - /** UserAgent releaseChannel. */ - public releaseChannel: proto.UserAgent.UserAgentReleaseChannel; - - /** UserAgent localeLanguageIso6391. */ - public localeLanguageIso6391: string; - - /** UserAgent localeCountryIso31661Alpha2. */ - public localeCountryIso31661Alpha2: string; - - /** UserAgent deviceBoard. */ - public deviceBoard: string; - - /** - * Creates a new UserAgent instance using the specified properties. - * @param [properties] Properties to set - * @returns UserAgent instance - */ - public static create(properties?: proto.IUserAgent): proto.UserAgent; - - /** - * Encodes the specified UserAgent message. Does not implicitly {@link proto.UserAgent.verify|verify} messages. - * @param message UserAgent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IUserAgent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UserAgent message, length delimited. Does not implicitly {@link proto.UserAgent.verify|verify} messages. - * @param message UserAgent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IUserAgent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UserAgent message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UserAgent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.UserAgent; - - /** - * Decodes a UserAgent message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UserAgent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.UserAgent; - - /** - * Verifies a UserAgent message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UserAgent message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UserAgent - */ - public static fromObject(object: { [k: string]: any }): proto.UserAgent; - - /** - * Creates a plain object from a UserAgent message. Also converts values to other types if specified. - * @param message UserAgent - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.UserAgent, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UserAgent to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace UserAgent { - - /** UserAgentPlatform enum. */ - enum UserAgentPlatform { - ANDROID = 0, - IOS = 1, - WINDOWS_PHONE = 2, - BLACKBERRY = 3, - BLACKBERRYX = 4, - S40 = 5, - S60 = 6, - PYTHON_CLIENT = 7, - TIZEN = 8, - ENTERPRISE = 9, - SMB_ANDROID = 10, - KAIOS = 11, - SMB_IOS = 12, - WINDOWS = 13, - WEB = 14, - PORTAL = 15, - GREEN_ANDROID = 16, - GREEN_IPHONE = 17, - BLUE_ANDROID = 18, - BLUE_IPHONE = 19, - FBLITE_ANDROID = 20, - MLITE_ANDROID = 21, - IGLITE_ANDROID = 22, - PAGE = 23, - MACOS = 24, - OCULUS_MSG = 25, - OCULUS_CALL = 26, - MILAN = 27, - CAPI = 28 - } - - /** UserAgentReleaseChannel enum. */ - enum UserAgentReleaseChannel { - RELEASE = 0, - BETA = 1, - ALPHA = 2, - DEBUG = 3 - } - } - - /** Properties of a WebdPayload. */ - interface IWebdPayload { - - /** WebdPayload usesParticipantInKey */ - usesParticipantInKey?: (boolean|null); - - /** WebdPayload supportsStarredMessages */ - supportsStarredMessages?: (boolean|null); - - /** WebdPayload supportsDocumentMessages */ - supportsDocumentMessages?: (boolean|null); - - /** WebdPayload supportsUrlMessages */ - supportsUrlMessages?: (boolean|null); - - /** WebdPayload supportsMediaRetry */ - supportsMediaRetry?: (boolean|null); - - /** WebdPayload supportsE2EImage */ - supportsE2EImage?: (boolean|null); - - /** WebdPayload supportsE2EVideo */ - supportsE2EVideo?: (boolean|null); - - /** WebdPayload supportsE2EAudio */ - supportsE2EAudio?: (boolean|null); - - /** WebdPayload supportsE2EDocument */ - supportsE2EDocument?: (boolean|null); - - /** WebdPayload documentTypes */ - documentTypes?: (string|null); - - /** WebdPayload features */ - features?: (Uint8Array|null); - } - - /** Represents a WebdPayload. */ - class WebdPayload implements IWebdPayload { - - /** - * Constructs a new WebdPayload. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IWebdPayload); - - /** WebdPayload usesParticipantInKey. */ - public usesParticipantInKey: boolean; - - /** WebdPayload supportsStarredMessages. */ - public supportsStarredMessages: boolean; - - /** WebdPayload supportsDocumentMessages. */ - public supportsDocumentMessages: boolean; - - /** WebdPayload supportsUrlMessages. */ - public supportsUrlMessages: boolean; - - /** WebdPayload supportsMediaRetry. */ - public supportsMediaRetry: boolean; - - /** WebdPayload supportsE2EImage. */ - public supportsE2EImage: boolean; - - /** WebdPayload supportsE2EVideo. */ - public supportsE2EVideo: boolean; - - /** WebdPayload supportsE2EAudio. */ - public supportsE2EAudio: boolean; - - /** WebdPayload supportsE2EDocument. */ - public supportsE2EDocument: boolean; - - /** WebdPayload documentTypes. */ - public documentTypes: string; - - /** WebdPayload features. */ - public features: Uint8Array; - - /** - * Creates a new WebdPayload instance using the specified properties. - * @param [properties] Properties to set - * @returns WebdPayload instance - */ - public static create(properties?: proto.IWebdPayload): proto.WebdPayload; - - /** - * Encodes the specified WebdPayload message. Does not implicitly {@link proto.WebdPayload.verify|verify} messages. - * @param message WebdPayload message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IWebdPayload, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WebdPayload message, length delimited. Does not implicitly {@link proto.WebdPayload.verify|verify} messages. - * @param message WebdPayload message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IWebdPayload, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WebdPayload message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WebdPayload - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.WebdPayload; - - /** - * Decodes a WebdPayload message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WebdPayload - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.WebdPayload; - - /** - * Verifies a WebdPayload message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WebdPayload message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WebdPayload - */ - public static fromObject(object: { [k: string]: any }): proto.WebdPayload; - - /** - * Creates a plain object from a WebdPayload message. Also converts values to other types if specified. - * @param message WebdPayload - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.WebdPayload, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WebdPayload to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a WebInfo. */ - interface IWebInfo { - - /** WebInfo refToken */ - refToken?: (string|null); - - /** WebInfo version */ - version?: (string|null); - - /** WebInfo webdPayload */ - webdPayload?: (proto.IWebdPayload|null); - - /** WebInfo webSubPlatform */ - webSubPlatform?: (proto.WebInfo.WebInfoWebSubPlatform|null); - } - - /** Represents a WebInfo. */ - class WebInfo implements IWebInfo { - - /** - * Constructs a new WebInfo. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IWebInfo); - - /** WebInfo refToken. */ - public refToken: string; - - /** WebInfo version. */ - public version: string; - - /** WebInfo webdPayload. */ - public webdPayload?: (proto.IWebdPayload|null); - - /** WebInfo webSubPlatform. */ - public webSubPlatform: proto.WebInfo.WebInfoWebSubPlatform; - - /** - * Creates a new WebInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns WebInfo instance - */ - public static create(properties?: proto.IWebInfo): proto.WebInfo; - - /** - * Encodes the specified WebInfo message. Does not implicitly {@link proto.WebInfo.verify|verify} messages. - * @param message WebInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IWebInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WebInfo message, length delimited. Does not implicitly {@link proto.WebInfo.verify|verify} messages. - * @param message WebInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IWebInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WebInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WebInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.WebInfo; - - /** - * Decodes a WebInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WebInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.WebInfo; - - /** - * Verifies a WebInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WebInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WebInfo - */ - public static fromObject(object: { [k: string]: any }): proto.WebInfo; - - /** - * Creates a plain object from a WebInfo message. Also converts values to other types if specified. - * @param message WebInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.WebInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WebInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace WebInfo { - - /** WebInfoWebSubPlatform enum. */ - enum WebInfoWebSubPlatform { - WEB_BROWSER = 0, - APP_STORE = 1, - WIN_STORE = 2, - DARWIN = 3, - WIN32 = 4 - } - } - - /** Properties of a MediaData. */ - interface IMediaData { - - /** MediaData localPath */ - localPath?: (string|null); - } - - /** Represents a MediaData. */ - class MediaData implements IMediaData { - - /** - * Constructs a new MediaData. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IMediaData); - - /** MediaData localPath. */ - public localPath: string; - - /** - * Creates a new MediaData instance using the specified properties. - * @param [properties] Properties to set - * @returns MediaData instance - */ - public static create(properties?: proto.IMediaData): proto.MediaData; - - /** - * Encodes the specified MediaData message. Does not implicitly {@link proto.MediaData.verify|verify} messages. - * @param message MediaData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IMediaData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MediaData message, length delimited. Does not implicitly {@link proto.MediaData.verify|verify} messages. - * @param message MediaData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IMediaData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MediaData message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MediaData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.MediaData; - - /** - * Decodes a MediaData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MediaData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.MediaData; - - /** - * Verifies a MediaData message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MediaData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MediaData - */ - public static fromObject(object: { [k: string]: any }): proto.MediaData; - - /** - * Creates a plain object from a MediaData message. Also converts values to other types if specified. - * @param message MediaData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.MediaData, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MediaData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a NotificationMessageInfo. */ - interface INotificationMessageInfo { - - /** NotificationMessageInfo key */ - key?: (proto.IMessageKey|null); - - /** NotificationMessageInfo message */ - message?: (proto.IMessage|null); - - /** NotificationMessageInfo messageTimestamp */ - messageTimestamp?: (number|Long|null); - - /** NotificationMessageInfo participant */ - participant?: (string|null); - } - - /** Represents a NotificationMessageInfo. */ - class NotificationMessageInfo implements INotificationMessageInfo { - - /** - * Constructs a new NotificationMessageInfo. - * @param [properties] Properties to set - */ - constructor(properties?: proto.INotificationMessageInfo); - - /** NotificationMessageInfo key. */ - public key?: (proto.IMessageKey|null); - - /** NotificationMessageInfo message. */ - public message?: (proto.IMessage|null); - - /** NotificationMessageInfo messageTimestamp. */ - public messageTimestamp: (number|Long); - - /** NotificationMessageInfo participant. */ - public participant: string; - - /** - * Creates a new NotificationMessageInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns NotificationMessageInfo instance - */ - public static create(properties?: proto.INotificationMessageInfo): proto.NotificationMessageInfo; - - /** - * Encodes the specified NotificationMessageInfo message. Does not implicitly {@link proto.NotificationMessageInfo.verify|verify} messages. - * @param message NotificationMessageInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.INotificationMessageInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NotificationMessageInfo message, length delimited. Does not implicitly {@link proto.NotificationMessageInfo.verify|verify} messages. - * @param message NotificationMessageInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.INotificationMessageInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NotificationMessageInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NotificationMessageInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.NotificationMessageInfo; - - /** - * Decodes a NotificationMessageInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NotificationMessageInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.NotificationMessageInfo; - - /** - * Verifies a NotificationMessageInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NotificationMessageInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NotificationMessageInfo - */ - public static fromObject(object: { [k: string]: any }): proto.NotificationMessageInfo; - - /** - * Creates a plain object from a NotificationMessageInfo message. Also converts values to other types if specified. - * @param message NotificationMessageInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.NotificationMessageInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NotificationMessageInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a PaymentInfo. */ - interface IPaymentInfo { - - /** PaymentInfo currencyDeprecated */ - currencyDeprecated?: (proto.PaymentInfo.PaymentInfoCurrency|null); - - /** PaymentInfo amount1000 */ - amount1000?: (number|Long|null); - - /** PaymentInfo receiverJid */ - receiverJid?: (string|null); - - /** PaymentInfo status */ - status?: (proto.PaymentInfo.PaymentInfoStatus|null); - - /** PaymentInfo transactionTimestamp */ - transactionTimestamp?: (number|Long|null); - - /** PaymentInfo requestMessageKey */ - requestMessageKey?: (proto.IMessageKey|null); - - /** PaymentInfo expiryTimestamp */ - expiryTimestamp?: (number|Long|null); - - /** PaymentInfo futureproofed */ - futureproofed?: (boolean|null); - - /** PaymentInfo currency */ - currency?: (string|null); - - /** PaymentInfo txnStatus */ - txnStatus?: (proto.PaymentInfo.PaymentInfoTxnStatus|null); - - /** PaymentInfo useNoviFiatFormat */ - useNoviFiatFormat?: (boolean|null); - - /** PaymentInfo primaryAmount */ - primaryAmount?: (proto.IMoney|null); - - /** PaymentInfo exchangeAmount */ - exchangeAmount?: (proto.IMoney|null); - } - - /** Represents a PaymentInfo. */ - class PaymentInfo implements IPaymentInfo { - - /** - * Constructs a new PaymentInfo. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IPaymentInfo); - - /** PaymentInfo currencyDeprecated. */ - public currencyDeprecated: proto.PaymentInfo.PaymentInfoCurrency; - - /** PaymentInfo amount1000. */ - public amount1000: (number|Long); - - /** PaymentInfo receiverJid. */ - public receiverJid: string; - - /** PaymentInfo status. */ - public status: proto.PaymentInfo.PaymentInfoStatus; - - /** PaymentInfo transactionTimestamp. */ - public transactionTimestamp: (number|Long); - - /** PaymentInfo requestMessageKey. */ - public requestMessageKey?: (proto.IMessageKey|null); - - /** PaymentInfo expiryTimestamp. */ - public expiryTimestamp: (number|Long); - - /** PaymentInfo futureproofed. */ - public futureproofed: boolean; - - /** PaymentInfo currency. */ - public currency: string; - - /** PaymentInfo txnStatus. */ - public txnStatus: proto.PaymentInfo.PaymentInfoTxnStatus; - - /** PaymentInfo useNoviFiatFormat. */ - public useNoviFiatFormat: boolean; - - /** PaymentInfo primaryAmount. */ - public primaryAmount?: (proto.IMoney|null); - - /** PaymentInfo exchangeAmount. */ - public exchangeAmount?: (proto.IMoney|null); - - /** - * Creates a new PaymentInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns PaymentInfo instance - */ - public static create(properties?: proto.IPaymentInfo): proto.PaymentInfo; - - /** - * Encodes the specified PaymentInfo message. Does not implicitly {@link proto.PaymentInfo.verify|verify} messages. - * @param message PaymentInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IPaymentInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PaymentInfo message, length delimited. Does not implicitly {@link proto.PaymentInfo.verify|verify} messages. - * @param message PaymentInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IPaymentInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PaymentInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PaymentInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.PaymentInfo; - - /** - * Decodes a PaymentInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PaymentInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.PaymentInfo; - - /** - * Verifies a PaymentInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PaymentInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PaymentInfo - */ - public static fromObject(object: { [k: string]: any }): proto.PaymentInfo; - - /** - * Creates a plain object from a PaymentInfo message. Also converts values to other types if specified. - * @param message PaymentInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.PaymentInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PaymentInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace PaymentInfo { - - /** PaymentInfoCurrency enum. */ - enum PaymentInfoCurrency { - UNKNOWN_CURRENCY = 0, - INR = 1 - } - - /** PaymentInfoStatus enum. */ - enum PaymentInfoStatus { - UNKNOWN_STATUS = 0, - PROCESSING = 1, - SENT = 2, - NEED_TO_ACCEPT = 3, - COMPLETE = 4, - COULD_NOT_COMPLETE = 5, - REFUNDED = 6, - EXPIRED = 7, - REJECTED = 8, - CANCELLED = 9, - WAITING_FOR_PAYER = 10, - WAITING = 11 - } - - /** PaymentInfoTxnStatus enum. */ - enum PaymentInfoTxnStatus { - UNKNOWN = 0, - PENDING_SETUP = 1, - PENDING_RECEIVER_SETUP = 2, - INIT = 3, - SUCCESS = 4, - COMPLETED = 5, - FAILED = 6, - FAILED_RISK = 7, - FAILED_PROCESSING = 8, - FAILED_RECEIVER_PROCESSING = 9, - FAILED_DA = 10, - FAILED_DA_FINAL = 11, - REFUNDED_TXN = 12, - REFUND_FAILED = 13, - REFUND_FAILED_PROCESSING = 14, - REFUND_FAILED_DA = 15, - EXPIRED_TXN = 16, - AUTH_CANCELED = 17, - AUTH_CANCEL_FAILED_PROCESSING = 18, - AUTH_CANCEL_FAILED = 19, - COLLECT_INIT = 20, - COLLECT_SUCCESS = 21, - COLLECT_FAILED = 22, - COLLECT_FAILED_RISK = 23, - COLLECT_REJECTED = 24, - COLLECT_EXPIRED = 25, - COLLECT_CANCELED = 26, - COLLECT_CANCELLING = 27, - IN_REVIEW = 28, - REVERSAL_SUCCESS = 29, - REVERSAL_PENDING = 30, - REFUND_PENDING = 31 - } - } - - /** Properties of a PhotoChange. */ - interface IPhotoChange { - - /** PhotoChange oldPhoto */ - oldPhoto?: (Uint8Array|null); - - /** PhotoChange newPhoto */ - newPhoto?: (Uint8Array|null); - - /** PhotoChange newPhotoId */ - newPhotoId?: (number|null); - } - - /** Represents a PhotoChange. */ - class PhotoChange implements IPhotoChange { - - /** - * Constructs a new PhotoChange. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IPhotoChange); - - /** PhotoChange oldPhoto. */ - public oldPhoto: Uint8Array; - - /** PhotoChange newPhoto. */ - public newPhoto: Uint8Array; - - /** PhotoChange newPhotoId. */ - public newPhotoId: number; - - /** - * Creates a new PhotoChange instance using the specified properties. - * @param [properties] Properties to set - * @returns PhotoChange instance - */ - public static create(properties?: proto.IPhotoChange): proto.PhotoChange; - - /** - * Encodes the specified PhotoChange message. Does not implicitly {@link proto.PhotoChange.verify|verify} messages. - * @param message PhotoChange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IPhotoChange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PhotoChange message, length delimited. Does not implicitly {@link proto.PhotoChange.verify|verify} messages. - * @param message PhotoChange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IPhotoChange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PhotoChange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PhotoChange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.PhotoChange; - - /** - * Decodes a PhotoChange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PhotoChange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.PhotoChange; - - /** - * Verifies a PhotoChange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PhotoChange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PhotoChange - */ - public static fromObject(object: { [k: string]: any }): proto.PhotoChange; - - /** - * Creates a plain object from a PhotoChange message. Also converts values to other types if specified. - * @param message PhotoChange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.PhotoChange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PhotoChange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a PollAdditionalMetadata. */ - interface IPollAdditionalMetadata { - - /** PollAdditionalMetadata pollInvalidated */ - pollInvalidated?: (boolean|null); - } - - /** Represents a PollAdditionalMetadata. */ - class PollAdditionalMetadata implements IPollAdditionalMetadata { - - /** - * Constructs a new PollAdditionalMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IPollAdditionalMetadata); - - /** PollAdditionalMetadata pollInvalidated. */ - public pollInvalidated: boolean; - - /** - * Creates a new PollAdditionalMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns PollAdditionalMetadata instance - */ - public static create(properties?: proto.IPollAdditionalMetadata): proto.PollAdditionalMetadata; - - /** - * Encodes the specified PollAdditionalMetadata message. Does not implicitly {@link proto.PollAdditionalMetadata.verify|verify} messages. - * @param message PollAdditionalMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IPollAdditionalMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PollAdditionalMetadata message, length delimited. Does not implicitly {@link proto.PollAdditionalMetadata.verify|verify} messages. - * @param message PollAdditionalMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IPollAdditionalMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PollAdditionalMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PollAdditionalMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.PollAdditionalMetadata; - - /** - * Decodes a PollAdditionalMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PollAdditionalMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.PollAdditionalMetadata; - - /** - * Verifies a PollAdditionalMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PollAdditionalMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PollAdditionalMetadata - */ - public static fromObject(object: { [k: string]: any }): proto.PollAdditionalMetadata; - - /** - * Creates a plain object from a PollAdditionalMetadata message. Also converts values to other types if specified. - * @param message PollAdditionalMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.PollAdditionalMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PollAdditionalMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a PollUpdate. */ - interface IPollUpdate { - - /** PollUpdate pollUpdateMessageKey */ - pollUpdateMessageKey?: (proto.IMessageKey|null); - - /** PollUpdate vote */ - vote?: (proto.IPollVoteMessage|null); - } - - /** Represents a PollUpdate. */ - class PollUpdate implements IPollUpdate { - - /** - * Constructs a new PollUpdate. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IPollUpdate); - - /** PollUpdate pollUpdateMessageKey. */ - public pollUpdateMessageKey?: (proto.IMessageKey|null); - - /** PollUpdate vote. */ - public vote?: (proto.IPollVoteMessage|null); - - /** - * Creates a new PollUpdate instance using the specified properties. - * @param [properties] Properties to set - * @returns PollUpdate instance - */ - public static create(properties?: proto.IPollUpdate): proto.PollUpdate; - - /** - * Encodes the specified PollUpdate message. Does not implicitly {@link proto.PollUpdate.verify|verify} messages. - * @param message PollUpdate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IPollUpdate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PollUpdate message, length delimited. Does not implicitly {@link proto.PollUpdate.verify|verify} messages. - * @param message PollUpdate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IPollUpdate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PollUpdate message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PollUpdate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.PollUpdate; - - /** - * Decodes a PollUpdate message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PollUpdate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.PollUpdate; - - /** - * Verifies a PollUpdate message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PollUpdate message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PollUpdate - */ - public static fromObject(object: { [k: string]: any }): proto.PollUpdate; - - /** - * Creates a plain object from a PollUpdate message. Also converts values to other types if specified. - * @param message PollUpdate - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.PollUpdate, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PollUpdate to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Reaction. */ - interface IReaction { - - /** Reaction key */ - key?: (proto.IMessageKey|null); - - /** Reaction text */ - text?: (string|null); - - /** Reaction groupingKey */ - groupingKey?: (string|null); - - /** Reaction senderTimestampMs */ - senderTimestampMs?: (number|Long|null); - - /** Reaction unread */ - unread?: (boolean|null); - } - - /** Represents a Reaction. */ - class Reaction implements IReaction { - - /** - * Constructs a new Reaction. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IReaction); - - /** Reaction key. */ - public key?: (proto.IMessageKey|null); - - /** Reaction text. */ - public text: string; - - /** Reaction groupingKey. */ - public groupingKey: string; - - /** Reaction senderTimestampMs. */ - public senderTimestampMs: (number|Long); - - /** Reaction unread. */ - public unread: boolean; - - /** - * Creates a new Reaction instance using the specified properties. - * @param [properties] Properties to set - * @returns Reaction instance - */ - public static create(properties?: proto.IReaction): proto.Reaction; - - /** - * Encodes the specified Reaction message. Does not implicitly {@link proto.Reaction.verify|verify} messages. - * @param message Reaction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IReaction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Reaction message, length delimited. Does not implicitly {@link proto.Reaction.verify|verify} messages. - * @param message Reaction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IReaction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Reaction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Reaction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.Reaction; - - /** - * Decodes a Reaction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Reaction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.Reaction; - - /** - * Verifies a Reaction message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Reaction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Reaction - */ - public static fromObject(object: { [k: string]: any }): proto.Reaction; - - /** - * Creates a plain object from a Reaction message. Also converts values to other types if specified. - * @param message Reaction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.Reaction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Reaction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a StatusPSA. */ - interface IStatusPSA { - - /** StatusPSA campaignId */ - campaignId: (number|Long); - - /** StatusPSA campaignExpirationTimestamp */ - campaignExpirationTimestamp?: (number|Long|null); - } - - /** Represents a StatusPSA. */ - class StatusPSA implements IStatusPSA { - - /** - * Constructs a new StatusPSA. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IStatusPSA); - - /** StatusPSA campaignId. */ - public campaignId: (number|Long); - - /** StatusPSA campaignExpirationTimestamp. */ - public campaignExpirationTimestamp: (number|Long); - - /** - * Creates a new StatusPSA instance using the specified properties. - * @param [properties] Properties to set - * @returns StatusPSA instance - */ - public static create(properties?: proto.IStatusPSA): proto.StatusPSA; - - /** - * Encodes the specified StatusPSA message. Does not implicitly {@link proto.StatusPSA.verify|verify} messages. - * @param message StatusPSA message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IStatusPSA, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StatusPSA message, length delimited. Does not implicitly {@link proto.StatusPSA.verify|verify} messages. - * @param message StatusPSA message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IStatusPSA, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StatusPSA message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StatusPSA - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.StatusPSA; - - /** - * Decodes a StatusPSA message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StatusPSA - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.StatusPSA; - - /** - * Verifies a StatusPSA message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StatusPSA message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StatusPSA - */ - public static fromObject(object: { [k: string]: any }): proto.StatusPSA; - - /** - * Creates a plain object from a StatusPSA message. Also converts values to other types if specified. - * @param message StatusPSA - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.StatusPSA, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StatusPSA to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a UserReceipt. */ - interface IUserReceipt { - - /** UserReceipt userJid */ - userJid: string; - - /** UserReceipt receiptTimestamp */ - receiptTimestamp?: (number|Long|null); - - /** UserReceipt readTimestamp */ - readTimestamp?: (number|Long|null); - - /** UserReceipt playedTimestamp */ - playedTimestamp?: (number|Long|null); - - /** UserReceipt pendingDeviceJid */ - pendingDeviceJid?: (string[]|null); - - /** UserReceipt deliveredDeviceJid */ - deliveredDeviceJid?: (string[]|null); - } - - /** Represents a UserReceipt. */ - class UserReceipt implements IUserReceipt { - - /** - * Constructs a new UserReceipt. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IUserReceipt); - - /** UserReceipt userJid. */ - public userJid: string; - - /** UserReceipt receiptTimestamp. */ - public receiptTimestamp: (number|Long); - - /** UserReceipt readTimestamp. */ - public readTimestamp: (number|Long); - - /** UserReceipt playedTimestamp. */ - public playedTimestamp: (number|Long); - - /** UserReceipt pendingDeviceJid. */ - public pendingDeviceJid: string[]; - - /** UserReceipt deliveredDeviceJid. */ - public deliveredDeviceJid: string[]; - - /** - * Creates a new UserReceipt instance using the specified properties. - * @param [properties] Properties to set - * @returns UserReceipt instance - */ - public static create(properties?: proto.IUserReceipt): proto.UserReceipt; - - /** - * Encodes the specified UserReceipt message. Does not implicitly {@link proto.UserReceipt.verify|verify} messages. - * @param message UserReceipt message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IUserReceipt, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UserReceipt message, length delimited. Does not implicitly {@link proto.UserReceipt.verify|verify} messages. - * @param message UserReceipt message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IUserReceipt, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UserReceipt message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UserReceipt - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.UserReceipt; - - /** - * Decodes a UserReceipt message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UserReceipt - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.UserReceipt; - - /** - * Verifies a UserReceipt message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UserReceipt message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UserReceipt - */ - public static fromObject(object: { [k: string]: any }): proto.UserReceipt; - - /** - * Creates a plain object from a UserReceipt message. Also converts values to other types if specified. - * @param message UserReceipt - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.UserReceipt, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UserReceipt to JSON. + * Converts this WallpaperSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; @@ -22792,6 +24611,126 @@ export namespace proto { } } + /** Properties of a WebInfo. */ + interface IWebInfo { + + /** WebInfo refToken */ + refToken?: (string|null); + + /** WebInfo version */ + version?: (string|null); + + /** WebInfo webdPayload */ + webdPayload?: (proto.IWebdPayload|null); + + /** WebInfo webSubPlatform */ + webSubPlatform?: (proto.WebInfo.WebInfoWebSubPlatform|null); + } + + /** Represents a WebInfo. */ + class WebInfo implements IWebInfo { + + /** + * Constructs a new WebInfo. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IWebInfo); + + /** WebInfo refToken. */ + public refToken: string; + + /** WebInfo version. */ + public version: string; + + /** WebInfo webdPayload. */ + public webdPayload?: (proto.IWebdPayload|null); + + /** WebInfo webSubPlatform. */ + public webSubPlatform: proto.WebInfo.WebInfoWebSubPlatform; + + /** + * Creates a new WebInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns WebInfo instance + */ + public static create(properties?: proto.IWebInfo): proto.WebInfo; + + /** + * Encodes the specified WebInfo message. Does not implicitly {@link proto.WebInfo.verify|verify} messages. + * @param message WebInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IWebInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WebInfo message, length delimited. Does not implicitly {@link proto.WebInfo.verify|verify} messages. + * @param message WebInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IWebInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WebInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WebInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.WebInfo; + + /** + * Decodes a WebInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WebInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.WebInfo; + + /** + * Verifies a WebInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WebInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WebInfo + */ + public static fromObject(object: { [k: string]: any }): proto.WebInfo; + + /** + * Creates a plain object from a WebInfo message. Also converts values to other types if specified. + * @param message WebInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.WebInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WebInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace WebInfo { + + /** WebInfoWebSubPlatform enum. */ + enum WebInfoWebSubPlatform { + WEB_BROWSER = 0, + APP_STORE = 1, + WIN_STORE = 2, + DARWIN = 3, + WIN32 = 4 + } + } + /** Properties of a WebMessageInfo. */ interface IWebMessageInfo { @@ -22914,6 +24853,9 @@ export namespace proto { /** WebMessageInfo messageSecret */ messageSecret?: (Uint8Array|null); + + /** WebMessageInfo keepInChat */ + keepInChat?: (proto.IKeepInChat|null); } /** Represents a WebMessageInfo. */ @@ -23045,6 +24987,9 @@ export namespace proto { /** WebMessageInfo messageSecret. */ public messageSecret: Uint8Array; + /** WebMessageInfo keepInChat. */ + public keepInChat?: (proto.IKeepInChat|null); + /** * Creates a new WebMessageInfo instance using the specified properties. * @param [properties] Properties to set @@ -23272,7 +25217,8 @@ export namespace proto { COMMUNITY_UNLINK_SUB_GROUP = 139, GROUP_PARTICIPANT_ACCEPT = 140, GROUP_PARTICIPANT_LINKED_GROUP_JOIN = 141, - COMMUNITY_CREATE = 142 + COMMUNITY_CREATE = 142, + EPHEMERAL_KEEP_IN_CHAT = 143 } /** WebMessageInfoBizPrivacyStatus enum. */ @@ -23391,4 +25337,154 @@ export namespace proto { */ public toJSON(): { [k: string]: any }; } + + /** Properties of a WebdPayload. */ + interface IWebdPayload { + + /** WebdPayload usesParticipantInKey */ + usesParticipantInKey?: (boolean|null); + + /** WebdPayload supportsStarredMessages */ + supportsStarredMessages?: (boolean|null); + + /** WebdPayload supportsDocumentMessages */ + supportsDocumentMessages?: (boolean|null); + + /** WebdPayload supportsUrlMessages */ + supportsUrlMessages?: (boolean|null); + + /** WebdPayload supportsMediaRetry */ + supportsMediaRetry?: (boolean|null); + + /** WebdPayload supportsE2EImage */ + supportsE2EImage?: (boolean|null); + + /** WebdPayload supportsE2EVideo */ + supportsE2EVideo?: (boolean|null); + + /** WebdPayload supportsE2EAudio */ + supportsE2EAudio?: (boolean|null); + + /** WebdPayload supportsE2EDocument */ + supportsE2EDocument?: (boolean|null); + + /** WebdPayload documentTypes */ + documentTypes?: (string|null); + + /** WebdPayload features */ + features?: (Uint8Array|null); + } + + /** Represents a WebdPayload. */ + class WebdPayload implements IWebdPayload { + + /** + * Constructs a new WebdPayload. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IWebdPayload); + + /** WebdPayload usesParticipantInKey. */ + public usesParticipantInKey: boolean; + + /** WebdPayload supportsStarredMessages. */ + public supportsStarredMessages: boolean; + + /** WebdPayload supportsDocumentMessages. */ + public supportsDocumentMessages: boolean; + + /** WebdPayload supportsUrlMessages. */ + public supportsUrlMessages: boolean; + + /** WebdPayload supportsMediaRetry. */ + public supportsMediaRetry: boolean; + + /** WebdPayload supportsE2EImage. */ + public supportsE2EImage: boolean; + + /** WebdPayload supportsE2EVideo. */ + public supportsE2EVideo: boolean; + + /** WebdPayload supportsE2EAudio. */ + public supportsE2EAudio: boolean; + + /** WebdPayload supportsE2EDocument. */ + public supportsE2EDocument: boolean; + + /** WebdPayload documentTypes. */ + public documentTypes: string; + + /** WebdPayload features. */ + public features: Uint8Array; + + /** + * Creates a new WebdPayload instance using the specified properties. + * @param [properties] Properties to set + * @returns WebdPayload instance + */ + public static create(properties?: proto.IWebdPayload): proto.WebdPayload; + + /** + * Encodes the specified WebdPayload message. Does not implicitly {@link proto.WebdPayload.verify|verify} messages. + * @param message WebdPayload message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IWebdPayload, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WebdPayload message, length delimited. Does not implicitly {@link proto.WebdPayload.verify|verify} messages. + * @param message WebdPayload message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IWebdPayload, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WebdPayload message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WebdPayload + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.WebdPayload; + + /** + * Decodes a WebdPayload message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WebdPayload + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.WebdPayload; + + /** + * Verifies a WebdPayload message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WebdPayload message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WebdPayload + */ + public static fromObject(object: { [k: string]: any }): proto.WebdPayload; + + /** + * Creates a plain object from a WebdPayload message. Also converts values to other types if specified. + * @param message WebdPayload + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.WebdPayload, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WebdPayload to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } diff --git a/WAProto/index.js b/WAProto/index.js index 843b87a..f3b9152 100644 --- a/WAProto/index.js +++ b/WAProto/index.js @@ -1303,652 +1303,6 @@ $root.proto = (function() { return ADVSignedKeyIndexList; })(); - proto.AppVersion = (function() { - - /** - * Properties of an AppVersion. - * @memberof proto - * @interface IAppVersion - * @property {number|null} [primary] AppVersion primary - * @property {number|null} [secondary] AppVersion secondary - * @property {number|null} [tertiary] AppVersion tertiary - * @property {number|null} [quaternary] AppVersion quaternary - * @property {number|null} [quinary] AppVersion quinary - */ - - /** - * Constructs a new AppVersion. - * @memberof proto - * @classdesc Represents an AppVersion. - * @implements IAppVersion - * @constructor - * @param {proto.IAppVersion=} [properties] Properties to set - */ - function AppVersion(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AppVersion primary. - * @member {number} primary - * @memberof proto.AppVersion - * @instance - */ - AppVersion.prototype.primary = 0; - - /** - * AppVersion secondary. - * @member {number} secondary - * @memberof proto.AppVersion - * @instance - */ - AppVersion.prototype.secondary = 0; - - /** - * AppVersion tertiary. - * @member {number} tertiary - * @memberof proto.AppVersion - * @instance - */ - AppVersion.prototype.tertiary = 0; - - /** - * AppVersion quaternary. - * @member {number} quaternary - * @memberof proto.AppVersion - * @instance - */ - AppVersion.prototype.quaternary = 0; - - /** - * AppVersion quinary. - * @member {number} quinary - * @memberof proto.AppVersion - * @instance - */ - AppVersion.prototype.quinary = 0; - - /** - * Creates a new AppVersion instance using the specified properties. - * @function create - * @memberof proto.AppVersion - * @static - * @param {proto.IAppVersion=} [properties] Properties to set - * @returns {proto.AppVersion} AppVersion instance - */ - AppVersion.create = function create(properties) { - return new AppVersion(properties); - }; - - /** - * Encodes the specified AppVersion message. Does not implicitly {@link proto.AppVersion.verify|verify} messages. - * @function encode - * @memberof proto.AppVersion - * @static - * @param {proto.IAppVersion} message AppVersion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppVersion.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.primary != null && Object.hasOwnProperty.call(message, "primary")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.primary); - if (message.secondary != null && Object.hasOwnProperty.call(message, "secondary")) - writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.secondary); - if (message.tertiary != null && Object.hasOwnProperty.call(message, "tertiary")) - writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.tertiary); - if (message.quaternary != null && Object.hasOwnProperty.call(message, "quaternary")) - writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.quaternary); - if (message.quinary != null && Object.hasOwnProperty.call(message, "quinary")) - writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.quinary); - return writer; - }; - - /** - * Encodes the specified AppVersion message, length delimited. Does not implicitly {@link proto.AppVersion.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.AppVersion - * @static - * @param {proto.IAppVersion} message AppVersion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppVersion.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AppVersion message from the specified reader or buffer. - * @function decode - * @memberof proto.AppVersion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.AppVersion} AppVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppVersion.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.AppVersion(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.primary = reader.uint32(); - break; - case 2: - message.secondary = reader.uint32(); - break; - case 3: - message.tertiary = reader.uint32(); - break; - case 4: - message.quaternary = reader.uint32(); - break; - case 5: - message.quinary = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AppVersion message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.AppVersion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.AppVersion} AppVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppVersion.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AppVersion message. - * @function verify - * @memberof proto.AppVersion - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AppVersion.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.primary != null && message.hasOwnProperty("primary")) - if (!$util.isInteger(message.primary)) - return "primary: integer expected"; - if (message.secondary != null && message.hasOwnProperty("secondary")) - if (!$util.isInteger(message.secondary)) - return "secondary: integer expected"; - if (message.tertiary != null && message.hasOwnProperty("tertiary")) - if (!$util.isInteger(message.tertiary)) - return "tertiary: integer expected"; - if (message.quaternary != null && message.hasOwnProperty("quaternary")) - if (!$util.isInteger(message.quaternary)) - return "quaternary: integer expected"; - if (message.quinary != null && message.hasOwnProperty("quinary")) - if (!$util.isInteger(message.quinary)) - return "quinary: integer expected"; - return null; - }; - - /** - * Creates an AppVersion message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.AppVersion - * @static - * @param {Object.} object Plain object - * @returns {proto.AppVersion} AppVersion - */ - AppVersion.fromObject = function fromObject(object) { - if (object instanceof $root.proto.AppVersion) - return object; - var message = new $root.proto.AppVersion(); - if (object.primary != null) - message.primary = object.primary >>> 0; - if (object.secondary != null) - message.secondary = object.secondary >>> 0; - if (object.tertiary != null) - message.tertiary = object.tertiary >>> 0; - if (object.quaternary != null) - message.quaternary = object.quaternary >>> 0; - if (object.quinary != null) - message.quinary = object.quinary >>> 0; - return message; - }; - - /** - * Creates a plain object from an AppVersion message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.AppVersion - * @static - * @param {proto.AppVersion} message AppVersion - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AppVersion.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.primary = 0; - object.secondary = 0; - object.tertiary = 0; - object.quaternary = 0; - object.quinary = 0; - } - if (message.primary != null && message.hasOwnProperty("primary")) - object.primary = message.primary; - if (message.secondary != null && message.hasOwnProperty("secondary")) - object.secondary = message.secondary; - if (message.tertiary != null && message.hasOwnProperty("tertiary")) - object.tertiary = message.tertiary; - if (message.quaternary != null && message.hasOwnProperty("quaternary")) - object.quaternary = message.quaternary; - if (message.quinary != null && message.hasOwnProperty("quinary")) - object.quinary = message.quinary; - return object; - }; - - /** - * Converts this AppVersion to JSON. - * @function toJSON - * @memberof proto.AppVersion - * @instance - * @returns {Object.} JSON object - */ - AppVersion.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return AppVersion; - })(); - - proto.CompanionProps = (function() { - - /** - * Properties of a CompanionProps. - * @memberof proto - * @interface ICompanionProps - * @property {string|null} [os] CompanionProps os - * @property {proto.IAppVersion|null} [version] CompanionProps version - * @property {proto.CompanionProps.CompanionPropsPlatformType|null} [platformType] CompanionProps platformType - * @property {boolean|null} [requireFullSync] CompanionProps requireFullSync - */ - - /** - * Constructs a new CompanionProps. - * @memberof proto - * @classdesc Represents a CompanionProps. - * @implements ICompanionProps - * @constructor - * @param {proto.ICompanionProps=} [properties] Properties to set - */ - function CompanionProps(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CompanionProps os. - * @member {string} os - * @memberof proto.CompanionProps - * @instance - */ - CompanionProps.prototype.os = ""; - - /** - * CompanionProps version. - * @member {proto.IAppVersion|null|undefined} version - * @memberof proto.CompanionProps - * @instance - */ - CompanionProps.prototype.version = null; - - /** - * CompanionProps platformType. - * @member {proto.CompanionProps.CompanionPropsPlatformType} platformType - * @memberof proto.CompanionProps - * @instance - */ - CompanionProps.prototype.platformType = 0; - - /** - * CompanionProps requireFullSync. - * @member {boolean} requireFullSync - * @memberof proto.CompanionProps - * @instance - */ - CompanionProps.prototype.requireFullSync = false; - - /** - * Creates a new CompanionProps instance using the specified properties. - * @function create - * @memberof proto.CompanionProps - * @static - * @param {proto.ICompanionProps=} [properties] Properties to set - * @returns {proto.CompanionProps} CompanionProps instance - */ - CompanionProps.create = function create(properties) { - return new CompanionProps(properties); - }; - - /** - * Encodes the specified CompanionProps message. Does not implicitly {@link proto.CompanionProps.verify|verify} messages. - * @function encode - * @memberof proto.CompanionProps - * @static - * @param {proto.ICompanionProps} message CompanionProps message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompanionProps.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.os != null && Object.hasOwnProperty.call(message, "os")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.os); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - $root.proto.AppVersion.encode(message.version, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.platformType != null && Object.hasOwnProperty.call(message, "platformType")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.platformType); - if (message.requireFullSync != null && Object.hasOwnProperty.call(message, "requireFullSync")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.requireFullSync); - return writer; - }; - - /** - * Encodes the specified CompanionProps message, length delimited. Does not implicitly {@link proto.CompanionProps.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.CompanionProps - * @static - * @param {proto.ICompanionProps} message CompanionProps message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompanionProps.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CompanionProps message from the specified reader or buffer. - * @function decode - * @memberof proto.CompanionProps - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.CompanionProps} CompanionProps - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompanionProps.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.CompanionProps(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.os = reader.string(); - break; - case 2: - message.version = $root.proto.AppVersion.decode(reader, reader.uint32()); - break; - case 3: - message.platformType = reader.int32(); - break; - case 4: - message.requireFullSync = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CompanionProps message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.CompanionProps - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.CompanionProps} CompanionProps - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompanionProps.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CompanionProps message. - * @function verify - * @memberof proto.CompanionProps - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CompanionProps.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.os != null && message.hasOwnProperty("os")) - if (!$util.isString(message.os)) - return "os: string expected"; - if (message.version != null && message.hasOwnProperty("version")) { - var error = $root.proto.AppVersion.verify(message.version); - if (error) - return "version." + error; - } - if (message.platformType != null && message.hasOwnProperty("platformType")) - switch (message.platformType) { - default: - return "platformType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - break; - } - if (message.requireFullSync != null && message.hasOwnProperty("requireFullSync")) - if (typeof message.requireFullSync !== "boolean") - return "requireFullSync: boolean expected"; - return null; - }; - - /** - * Creates a CompanionProps message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.CompanionProps - * @static - * @param {Object.} object Plain object - * @returns {proto.CompanionProps} CompanionProps - */ - CompanionProps.fromObject = function fromObject(object) { - if (object instanceof $root.proto.CompanionProps) - return object; - var message = new $root.proto.CompanionProps(); - if (object.os != null) - message.os = String(object.os); - if (object.version != null) { - if (typeof object.version !== "object") - throw TypeError(".proto.CompanionProps.version: object expected"); - message.version = $root.proto.AppVersion.fromObject(object.version); - } - switch (object.platformType) { - case "UNKNOWN": - case 0: - message.platformType = 0; - break; - case "CHROME": - case 1: - message.platformType = 1; - break; - case "FIREFOX": - case 2: - message.platformType = 2; - break; - case "IE": - case 3: - message.platformType = 3; - break; - case "OPERA": - case 4: - message.platformType = 4; - break; - case "SAFARI": - case 5: - message.platformType = 5; - break; - case "EDGE": - case 6: - message.platformType = 6; - break; - case "DESKTOP": - case 7: - message.platformType = 7; - break; - case "IPAD": - case 8: - message.platformType = 8; - break; - case "ANDROID_TABLET": - case 9: - message.platformType = 9; - break; - case "OHANA": - case 10: - message.platformType = 10; - break; - case "ALOHA": - case 11: - message.platformType = 11; - break; - case "CATALINA": - case 12: - message.platformType = 12; - break; - case "TCL_TV": - case 13: - message.platformType = 13; - break; - } - if (object.requireFullSync != null) - message.requireFullSync = Boolean(object.requireFullSync); - return message; - }; - - /** - * Creates a plain object from a CompanionProps message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.CompanionProps - * @static - * @param {proto.CompanionProps} message CompanionProps - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CompanionProps.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.os = ""; - object.version = null; - object.platformType = options.enums === String ? "UNKNOWN" : 0; - object.requireFullSync = false; - } - if (message.os != null && message.hasOwnProperty("os")) - object.os = message.os; - if (message.version != null && message.hasOwnProperty("version")) - object.version = $root.proto.AppVersion.toObject(message.version, options); - if (message.platformType != null && message.hasOwnProperty("platformType")) - object.platformType = options.enums === String ? $root.proto.CompanionProps.CompanionPropsPlatformType[message.platformType] : message.platformType; - if (message.requireFullSync != null && message.hasOwnProperty("requireFullSync")) - object.requireFullSync = message.requireFullSync; - return object; - }; - - /** - * Converts this CompanionProps to JSON. - * @function toJSON - * @memberof proto.CompanionProps - * @instance - * @returns {Object.} JSON object - */ - CompanionProps.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * CompanionPropsPlatformType enum. - * @name proto.CompanionProps.CompanionPropsPlatformType - * @enum {number} - * @property {number} UNKNOWN=0 UNKNOWN value - * @property {number} CHROME=1 CHROME value - * @property {number} FIREFOX=2 FIREFOX value - * @property {number} IE=3 IE value - * @property {number} OPERA=4 OPERA value - * @property {number} SAFARI=5 SAFARI value - * @property {number} EDGE=6 EDGE value - * @property {number} DESKTOP=7 DESKTOP value - * @property {number} IPAD=8 IPAD value - * @property {number} ANDROID_TABLET=9 ANDROID_TABLET value - * @property {number} OHANA=10 OHANA value - * @property {number} ALOHA=11 ALOHA value - * @property {number} CATALINA=12 CATALINA value - * @property {number} TCL_TV=13 TCL_TV value - */ - CompanionProps.CompanionPropsPlatformType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN"] = 0; - values[valuesById[1] = "CHROME"] = 1; - values[valuesById[2] = "FIREFOX"] = 2; - values[valuesById[3] = "IE"] = 3; - values[valuesById[4] = "OPERA"] = 4; - values[valuesById[5] = "SAFARI"] = 5; - values[valuesById[6] = "EDGE"] = 6; - values[valuesById[7] = "DESKTOP"] = 7; - values[valuesById[8] = "IPAD"] = 8; - values[valuesById[9] = "ANDROID_TABLET"] = 9; - values[valuesById[10] = "OHANA"] = 10; - values[valuesById[11] = "ALOHA"] = 11; - values[valuesById[12] = "CATALINA"] = 12; - values[valuesById[13] = "TCL_TV"] = 13; - return values; - })(); - - return CompanionProps; - })(); - proto.ActionLink = (function() { /** @@ -2456,6 +1810,425 @@ $root.proto = (function() { return AdReplyInfo; })(); + proto.AgentAction = (function() { + + /** + * Properties of an AgentAction. + * @memberof proto + * @interface IAgentAction + * @property {string|null} [name] AgentAction name + * @property {number|null} [deviceID] AgentAction deviceID + * @property {boolean|null} [isDeleted] AgentAction isDeleted + */ + + /** + * Constructs a new AgentAction. + * @memberof proto + * @classdesc Represents an AgentAction. + * @implements IAgentAction + * @constructor + * @param {proto.IAgentAction=} [properties] Properties to set + */ + function AgentAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AgentAction name. + * @member {string} name + * @memberof proto.AgentAction + * @instance + */ + AgentAction.prototype.name = ""; + + /** + * AgentAction deviceID. + * @member {number} deviceID + * @memberof proto.AgentAction + * @instance + */ + AgentAction.prototype.deviceID = 0; + + /** + * AgentAction isDeleted. + * @member {boolean} isDeleted + * @memberof proto.AgentAction + * @instance + */ + AgentAction.prototype.isDeleted = false; + + /** + * Creates a new AgentAction instance using the specified properties. + * @function create + * @memberof proto.AgentAction + * @static + * @param {proto.IAgentAction=} [properties] Properties to set + * @returns {proto.AgentAction} AgentAction instance + */ + AgentAction.create = function create(properties) { + return new AgentAction(properties); + }; + + /** + * Encodes the specified AgentAction message. Does not implicitly {@link proto.AgentAction.verify|verify} messages. + * @function encode + * @memberof proto.AgentAction + * @static + * @param {proto.IAgentAction} message AgentAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AgentAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.deviceID != null && Object.hasOwnProperty.call(message, "deviceID")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.deviceID); + if (message.isDeleted != null && Object.hasOwnProperty.call(message, "isDeleted")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.isDeleted); + return writer; + }; + + /** + * Encodes the specified AgentAction message, length delimited. Does not implicitly {@link proto.AgentAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.AgentAction + * @static + * @param {proto.IAgentAction} message AgentAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AgentAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AgentAction message from the specified reader or buffer. + * @function decode + * @memberof proto.AgentAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.AgentAction} AgentAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AgentAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.AgentAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.deviceID = reader.int32(); + break; + case 3: + message.isDeleted = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AgentAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.AgentAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.AgentAction} AgentAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AgentAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AgentAction message. + * @function verify + * @memberof proto.AgentAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AgentAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.deviceID != null && message.hasOwnProperty("deviceID")) + if (!$util.isInteger(message.deviceID)) + return "deviceID: integer expected"; + if (message.isDeleted != null && message.hasOwnProperty("isDeleted")) + if (typeof message.isDeleted !== "boolean") + return "isDeleted: boolean expected"; + return null; + }; + + /** + * Creates an AgentAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.AgentAction + * @static + * @param {Object.} object Plain object + * @returns {proto.AgentAction} AgentAction + */ + AgentAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.AgentAction) + return object; + var message = new $root.proto.AgentAction(); + if (object.name != null) + message.name = String(object.name); + if (object.deviceID != null) + message.deviceID = object.deviceID | 0; + if (object.isDeleted != null) + message.isDeleted = Boolean(object.isDeleted); + return message; + }; + + /** + * Creates a plain object from an AgentAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.AgentAction + * @static + * @param {proto.AgentAction} message AgentAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AgentAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.deviceID = 0; + object.isDeleted = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.deviceID != null && message.hasOwnProperty("deviceID")) + object.deviceID = message.deviceID; + if (message.isDeleted != null && message.hasOwnProperty("isDeleted")) + object.isDeleted = message.isDeleted; + return object; + }; + + /** + * Converts this AgentAction to JSON. + * @function toJSON + * @memberof proto.AgentAction + * @instance + * @returns {Object.} JSON object + */ + AgentAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AgentAction; + })(); + + proto.AndroidUnsupportedActions = (function() { + + /** + * Properties of an AndroidUnsupportedActions. + * @memberof proto + * @interface IAndroidUnsupportedActions + * @property {boolean|null} [allowed] AndroidUnsupportedActions allowed + */ + + /** + * Constructs a new AndroidUnsupportedActions. + * @memberof proto + * @classdesc Represents an AndroidUnsupportedActions. + * @implements IAndroidUnsupportedActions + * @constructor + * @param {proto.IAndroidUnsupportedActions=} [properties] Properties to set + */ + function AndroidUnsupportedActions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AndroidUnsupportedActions allowed. + * @member {boolean} allowed + * @memberof proto.AndroidUnsupportedActions + * @instance + */ + AndroidUnsupportedActions.prototype.allowed = false; + + /** + * Creates a new AndroidUnsupportedActions instance using the specified properties. + * @function create + * @memberof proto.AndroidUnsupportedActions + * @static + * @param {proto.IAndroidUnsupportedActions=} [properties] Properties to set + * @returns {proto.AndroidUnsupportedActions} AndroidUnsupportedActions instance + */ + AndroidUnsupportedActions.create = function create(properties) { + return new AndroidUnsupportedActions(properties); + }; + + /** + * Encodes the specified AndroidUnsupportedActions message. Does not implicitly {@link proto.AndroidUnsupportedActions.verify|verify} messages. + * @function encode + * @memberof proto.AndroidUnsupportedActions + * @static + * @param {proto.IAndroidUnsupportedActions} message AndroidUnsupportedActions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AndroidUnsupportedActions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowed != null && Object.hasOwnProperty.call(message, "allowed")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.allowed); + return writer; + }; + + /** + * Encodes the specified AndroidUnsupportedActions message, length delimited. Does not implicitly {@link proto.AndroidUnsupportedActions.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.AndroidUnsupportedActions + * @static + * @param {proto.IAndroidUnsupportedActions} message AndroidUnsupportedActions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AndroidUnsupportedActions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AndroidUnsupportedActions message from the specified reader or buffer. + * @function decode + * @memberof proto.AndroidUnsupportedActions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.AndroidUnsupportedActions} AndroidUnsupportedActions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AndroidUnsupportedActions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.AndroidUnsupportedActions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.allowed = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AndroidUnsupportedActions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.AndroidUnsupportedActions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.AndroidUnsupportedActions} AndroidUnsupportedActions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AndroidUnsupportedActions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AndroidUnsupportedActions message. + * @function verify + * @memberof proto.AndroidUnsupportedActions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AndroidUnsupportedActions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowed != null && message.hasOwnProperty("allowed")) + if (typeof message.allowed !== "boolean") + return "allowed: boolean expected"; + return null; + }; + + /** + * Creates an AndroidUnsupportedActions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.AndroidUnsupportedActions + * @static + * @param {Object.} object Plain object + * @returns {proto.AndroidUnsupportedActions} AndroidUnsupportedActions + */ + AndroidUnsupportedActions.fromObject = function fromObject(object) { + if (object instanceof $root.proto.AndroidUnsupportedActions) + return object; + var message = new $root.proto.AndroidUnsupportedActions(); + if (object.allowed != null) + message.allowed = Boolean(object.allowed); + return message; + }; + + /** + * Creates a plain object from an AndroidUnsupportedActions message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.AndroidUnsupportedActions + * @static + * @param {proto.AndroidUnsupportedActions} message AndroidUnsupportedActions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AndroidUnsupportedActions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.allowed = false; + if (message.allowed != null && message.hasOwnProperty("allowed")) + object.allowed = message.allowed; + return object; + }; + + /** + * Converts this AndroidUnsupportedActions to JSON. + * @function toJSON + * @memberof proto.AndroidUnsupportedActions + * @instance + * @returns {Object.} JSON object + */ + AndroidUnsupportedActions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AndroidUnsupportedActions; + })(); + proto.AppStateFatalExceptionNotification = (function() { /** @@ -4045,6 +3818,497 @@ $root.proto = (function() { return AppStateSyncKeyShare; })(); + proto.AppVersion = (function() { + + /** + * Properties of an AppVersion. + * @memberof proto + * @interface IAppVersion + * @property {number|null} [primary] AppVersion primary + * @property {number|null} [secondary] AppVersion secondary + * @property {number|null} [tertiary] AppVersion tertiary + * @property {number|null} [quaternary] AppVersion quaternary + * @property {number|null} [quinary] AppVersion quinary + */ + + /** + * Constructs a new AppVersion. + * @memberof proto + * @classdesc Represents an AppVersion. + * @implements IAppVersion + * @constructor + * @param {proto.IAppVersion=} [properties] Properties to set + */ + function AppVersion(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AppVersion primary. + * @member {number} primary + * @memberof proto.AppVersion + * @instance + */ + AppVersion.prototype.primary = 0; + + /** + * AppVersion secondary. + * @member {number} secondary + * @memberof proto.AppVersion + * @instance + */ + AppVersion.prototype.secondary = 0; + + /** + * AppVersion tertiary. + * @member {number} tertiary + * @memberof proto.AppVersion + * @instance + */ + AppVersion.prototype.tertiary = 0; + + /** + * AppVersion quaternary. + * @member {number} quaternary + * @memberof proto.AppVersion + * @instance + */ + AppVersion.prototype.quaternary = 0; + + /** + * AppVersion quinary. + * @member {number} quinary + * @memberof proto.AppVersion + * @instance + */ + AppVersion.prototype.quinary = 0; + + /** + * Creates a new AppVersion instance using the specified properties. + * @function create + * @memberof proto.AppVersion + * @static + * @param {proto.IAppVersion=} [properties] Properties to set + * @returns {proto.AppVersion} AppVersion instance + */ + AppVersion.create = function create(properties) { + return new AppVersion(properties); + }; + + /** + * Encodes the specified AppVersion message. Does not implicitly {@link proto.AppVersion.verify|verify} messages. + * @function encode + * @memberof proto.AppVersion + * @static + * @param {proto.IAppVersion} message AppVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppVersion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.primary != null && Object.hasOwnProperty.call(message, "primary")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.primary); + if (message.secondary != null && Object.hasOwnProperty.call(message, "secondary")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.secondary); + if (message.tertiary != null && Object.hasOwnProperty.call(message, "tertiary")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.tertiary); + if (message.quaternary != null && Object.hasOwnProperty.call(message, "quaternary")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.quaternary); + if (message.quinary != null && Object.hasOwnProperty.call(message, "quinary")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.quinary); + return writer; + }; + + /** + * Encodes the specified AppVersion message, length delimited. Does not implicitly {@link proto.AppVersion.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.AppVersion + * @static + * @param {proto.IAppVersion} message AppVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppVersion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AppVersion message from the specified reader or buffer. + * @function decode + * @memberof proto.AppVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.AppVersion} AppVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppVersion.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.AppVersion(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.primary = reader.uint32(); + break; + case 2: + message.secondary = reader.uint32(); + break; + case 3: + message.tertiary = reader.uint32(); + break; + case 4: + message.quaternary = reader.uint32(); + break; + case 5: + message.quinary = reader.uint32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AppVersion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.AppVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.AppVersion} AppVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppVersion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AppVersion message. + * @function verify + * @memberof proto.AppVersion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AppVersion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.primary != null && message.hasOwnProperty("primary")) + if (!$util.isInteger(message.primary)) + return "primary: integer expected"; + if (message.secondary != null && message.hasOwnProperty("secondary")) + if (!$util.isInteger(message.secondary)) + return "secondary: integer expected"; + if (message.tertiary != null && message.hasOwnProperty("tertiary")) + if (!$util.isInteger(message.tertiary)) + return "tertiary: integer expected"; + if (message.quaternary != null && message.hasOwnProperty("quaternary")) + if (!$util.isInteger(message.quaternary)) + return "quaternary: integer expected"; + if (message.quinary != null && message.hasOwnProperty("quinary")) + if (!$util.isInteger(message.quinary)) + return "quinary: integer expected"; + return null; + }; + + /** + * Creates an AppVersion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.AppVersion + * @static + * @param {Object.} object Plain object + * @returns {proto.AppVersion} AppVersion + */ + AppVersion.fromObject = function fromObject(object) { + if (object instanceof $root.proto.AppVersion) + return object; + var message = new $root.proto.AppVersion(); + if (object.primary != null) + message.primary = object.primary >>> 0; + if (object.secondary != null) + message.secondary = object.secondary >>> 0; + if (object.tertiary != null) + message.tertiary = object.tertiary >>> 0; + if (object.quaternary != null) + message.quaternary = object.quaternary >>> 0; + if (object.quinary != null) + message.quinary = object.quinary >>> 0; + return message; + }; + + /** + * Creates a plain object from an AppVersion message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.AppVersion + * @static + * @param {proto.AppVersion} message AppVersion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AppVersion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.primary = 0; + object.secondary = 0; + object.tertiary = 0; + object.quaternary = 0; + object.quinary = 0; + } + if (message.primary != null && message.hasOwnProperty("primary")) + object.primary = message.primary; + if (message.secondary != null && message.hasOwnProperty("secondary")) + object.secondary = message.secondary; + if (message.tertiary != null && message.hasOwnProperty("tertiary")) + object.tertiary = message.tertiary; + if (message.quaternary != null && message.hasOwnProperty("quaternary")) + object.quaternary = message.quaternary; + if (message.quinary != null && message.hasOwnProperty("quinary")) + object.quinary = message.quinary; + return object; + }; + + /** + * Converts this AppVersion to JSON. + * @function toJSON + * @memberof proto.AppVersion + * @instance + * @returns {Object.} JSON object + */ + AppVersion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AppVersion; + })(); + + proto.ArchiveChatAction = (function() { + + /** + * Properties of an ArchiveChatAction. + * @memberof proto + * @interface IArchiveChatAction + * @property {boolean|null} [archived] ArchiveChatAction archived + * @property {proto.ISyncActionMessageRange|null} [messageRange] ArchiveChatAction messageRange + */ + + /** + * Constructs a new ArchiveChatAction. + * @memberof proto + * @classdesc Represents an ArchiveChatAction. + * @implements IArchiveChatAction + * @constructor + * @param {proto.IArchiveChatAction=} [properties] Properties to set + */ + function ArchiveChatAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ArchiveChatAction archived. + * @member {boolean} archived + * @memberof proto.ArchiveChatAction + * @instance + */ + ArchiveChatAction.prototype.archived = false; + + /** + * ArchiveChatAction messageRange. + * @member {proto.ISyncActionMessageRange|null|undefined} messageRange + * @memberof proto.ArchiveChatAction + * @instance + */ + ArchiveChatAction.prototype.messageRange = null; + + /** + * Creates a new ArchiveChatAction instance using the specified properties. + * @function create + * @memberof proto.ArchiveChatAction + * @static + * @param {proto.IArchiveChatAction=} [properties] Properties to set + * @returns {proto.ArchiveChatAction} ArchiveChatAction instance + */ + ArchiveChatAction.create = function create(properties) { + return new ArchiveChatAction(properties); + }; + + /** + * Encodes the specified ArchiveChatAction message. Does not implicitly {@link proto.ArchiveChatAction.verify|verify} messages. + * @function encode + * @memberof proto.ArchiveChatAction + * @static + * @param {proto.IArchiveChatAction} message ArchiveChatAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ArchiveChatAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.archived != null && Object.hasOwnProperty.call(message, "archived")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.archived); + if (message.messageRange != null && Object.hasOwnProperty.call(message, "messageRange")) + $root.proto.SyncActionMessageRange.encode(message.messageRange, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ArchiveChatAction message, length delimited. Does not implicitly {@link proto.ArchiveChatAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ArchiveChatAction + * @static + * @param {proto.IArchiveChatAction} message ArchiveChatAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ArchiveChatAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ArchiveChatAction message from the specified reader or buffer. + * @function decode + * @memberof proto.ArchiveChatAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ArchiveChatAction} ArchiveChatAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ArchiveChatAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ArchiveChatAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.archived = reader.bool(); + break; + case 2: + message.messageRange = $root.proto.SyncActionMessageRange.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ArchiveChatAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ArchiveChatAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ArchiveChatAction} ArchiveChatAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ArchiveChatAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ArchiveChatAction message. + * @function verify + * @memberof proto.ArchiveChatAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ArchiveChatAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.archived != null && message.hasOwnProperty("archived")) + if (typeof message.archived !== "boolean") + return "archived: boolean expected"; + if (message.messageRange != null && message.hasOwnProperty("messageRange")) { + var error = $root.proto.SyncActionMessageRange.verify(message.messageRange); + if (error) + return "messageRange." + error; + } + return null; + }; + + /** + * Creates an ArchiveChatAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ArchiveChatAction + * @static + * @param {Object.} object Plain object + * @returns {proto.ArchiveChatAction} ArchiveChatAction + */ + ArchiveChatAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ArchiveChatAction) + return object; + var message = new $root.proto.ArchiveChatAction(); + if (object.archived != null) + message.archived = Boolean(object.archived); + if (object.messageRange != null) { + if (typeof object.messageRange !== "object") + throw TypeError(".proto.ArchiveChatAction.messageRange: object expected"); + message.messageRange = $root.proto.SyncActionMessageRange.fromObject(object.messageRange); + } + return message; + }; + + /** + * Creates a plain object from an ArchiveChatAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ArchiveChatAction + * @static + * @param {proto.ArchiveChatAction} message ArchiveChatAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ArchiveChatAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.archived = false; + object.messageRange = null; + } + if (message.archived != null && message.hasOwnProperty("archived")) + object.archived = message.archived; + if (message.messageRange != null && message.hasOwnProperty("messageRange")) + object.messageRange = $root.proto.SyncActionMessageRange.toObject(message.messageRange, options); + return object; + }; + + /** + * Converts this ArchiveChatAction to JSON. + * @function toJSON + * @memberof proto.ArchiveChatAction + * @instance + * @returns {Object.} JSON object + */ + ArchiveChatAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ArchiveChatAction; + })(); + proto.AudioMessage = (function() { /** @@ -4575,6 +4839,1298 @@ $root.proto = (function() { return AudioMessage; })(); + proto.AutoDownloadSettings = (function() { + + /** + * Properties of an AutoDownloadSettings. + * @memberof proto + * @interface IAutoDownloadSettings + * @property {boolean|null} [downloadImages] AutoDownloadSettings downloadImages + * @property {boolean|null} [downloadAudio] AutoDownloadSettings downloadAudio + * @property {boolean|null} [downloadVideo] AutoDownloadSettings downloadVideo + * @property {boolean|null} [downloadDocuments] AutoDownloadSettings downloadDocuments + */ + + /** + * Constructs a new AutoDownloadSettings. + * @memberof proto + * @classdesc Represents an AutoDownloadSettings. + * @implements IAutoDownloadSettings + * @constructor + * @param {proto.IAutoDownloadSettings=} [properties] Properties to set + */ + function AutoDownloadSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AutoDownloadSettings downloadImages. + * @member {boolean} downloadImages + * @memberof proto.AutoDownloadSettings + * @instance + */ + AutoDownloadSettings.prototype.downloadImages = false; + + /** + * AutoDownloadSettings downloadAudio. + * @member {boolean} downloadAudio + * @memberof proto.AutoDownloadSettings + * @instance + */ + AutoDownloadSettings.prototype.downloadAudio = false; + + /** + * AutoDownloadSettings downloadVideo. + * @member {boolean} downloadVideo + * @memberof proto.AutoDownloadSettings + * @instance + */ + AutoDownloadSettings.prototype.downloadVideo = false; + + /** + * AutoDownloadSettings downloadDocuments. + * @member {boolean} downloadDocuments + * @memberof proto.AutoDownloadSettings + * @instance + */ + AutoDownloadSettings.prototype.downloadDocuments = false; + + /** + * Creates a new AutoDownloadSettings instance using the specified properties. + * @function create + * @memberof proto.AutoDownloadSettings + * @static + * @param {proto.IAutoDownloadSettings=} [properties] Properties to set + * @returns {proto.AutoDownloadSettings} AutoDownloadSettings instance + */ + AutoDownloadSettings.create = function create(properties) { + return new AutoDownloadSettings(properties); + }; + + /** + * Encodes the specified AutoDownloadSettings message. Does not implicitly {@link proto.AutoDownloadSettings.verify|verify} messages. + * @function encode + * @memberof proto.AutoDownloadSettings + * @static + * @param {proto.IAutoDownloadSettings} message AutoDownloadSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutoDownloadSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.downloadImages != null && Object.hasOwnProperty.call(message, "downloadImages")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.downloadImages); + if (message.downloadAudio != null && Object.hasOwnProperty.call(message, "downloadAudio")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.downloadAudio); + if (message.downloadVideo != null && Object.hasOwnProperty.call(message, "downloadVideo")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.downloadVideo); + if (message.downloadDocuments != null && Object.hasOwnProperty.call(message, "downloadDocuments")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.downloadDocuments); + return writer; + }; + + /** + * Encodes the specified AutoDownloadSettings message, length delimited. Does not implicitly {@link proto.AutoDownloadSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.AutoDownloadSettings + * @static + * @param {proto.IAutoDownloadSettings} message AutoDownloadSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutoDownloadSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AutoDownloadSettings message from the specified reader or buffer. + * @function decode + * @memberof proto.AutoDownloadSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.AutoDownloadSettings} AutoDownloadSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutoDownloadSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.AutoDownloadSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.downloadImages = reader.bool(); + break; + case 2: + message.downloadAudio = reader.bool(); + break; + case 3: + message.downloadVideo = reader.bool(); + break; + case 4: + message.downloadDocuments = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AutoDownloadSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.AutoDownloadSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.AutoDownloadSettings} AutoDownloadSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutoDownloadSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AutoDownloadSettings message. + * @function verify + * @memberof proto.AutoDownloadSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AutoDownloadSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.downloadImages != null && message.hasOwnProperty("downloadImages")) + if (typeof message.downloadImages !== "boolean") + return "downloadImages: boolean expected"; + if (message.downloadAudio != null && message.hasOwnProperty("downloadAudio")) + if (typeof message.downloadAudio !== "boolean") + return "downloadAudio: boolean expected"; + if (message.downloadVideo != null && message.hasOwnProperty("downloadVideo")) + if (typeof message.downloadVideo !== "boolean") + return "downloadVideo: boolean expected"; + if (message.downloadDocuments != null && message.hasOwnProperty("downloadDocuments")) + if (typeof message.downloadDocuments !== "boolean") + return "downloadDocuments: boolean expected"; + return null; + }; + + /** + * Creates an AutoDownloadSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.AutoDownloadSettings + * @static + * @param {Object.} object Plain object + * @returns {proto.AutoDownloadSettings} AutoDownloadSettings + */ + AutoDownloadSettings.fromObject = function fromObject(object) { + if (object instanceof $root.proto.AutoDownloadSettings) + return object; + var message = new $root.proto.AutoDownloadSettings(); + if (object.downloadImages != null) + message.downloadImages = Boolean(object.downloadImages); + if (object.downloadAudio != null) + message.downloadAudio = Boolean(object.downloadAudio); + if (object.downloadVideo != null) + message.downloadVideo = Boolean(object.downloadVideo); + if (object.downloadDocuments != null) + message.downloadDocuments = Boolean(object.downloadDocuments); + return message; + }; + + /** + * Creates a plain object from an AutoDownloadSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.AutoDownloadSettings + * @static + * @param {proto.AutoDownloadSettings} message AutoDownloadSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AutoDownloadSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.downloadImages = false; + object.downloadAudio = false; + object.downloadVideo = false; + object.downloadDocuments = false; + } + if (message.downloadImages != null && message.hasOwnProperty("downloadImages")) + object.downloadImages = message.downloadImages; + if (message.downloadAudio != null && message.hasOwnProperty("downloadAudio")) + object.downloadAudio = message.downloadAudio; + if (message.downloadVideo != null && message.hasOwnProperty("downloadVideo")) + object.downloadVideo = message.downloadVideo; + if (message.downloadDocuments != null && message.hasOwnProperty("downloadDocuments")) + object.downloadDocuments = message.downloadDocuments; + return object; + }; + + /** + * Converts this AutoDownloadSettings to JSON. + * @function toJSON + * @memberof proto.AutoDownloadSettings + * @instance + * @returns {Object.} JSON object + */ + AutoDownloadSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AutoDownloadSettings; + })(); + + proto.BizAccountLinkInfo = (function() { + + /** + * Properties of a BizAccountLinkInfo. + * @memberof proto + * @interface IBizAccountLinkInfo + * @property {number|Long|null} [whatsappBizAcctFbid] BizAccountLinkInfo whatsappBizAcctFbid + * @property {string|null} [whatsappAcctNumber] BizAccountLinkInfo whatsappAcctNumber + * @property {number|Long|null} [issueTime] BizAccountLinkInfo issueTime + * @property {proto.BizAccountLinkInfo.BizAccountLinkInfoHostStorageType|null} [hostStorage] BizAccountLinkInfo hostStorage + * @property {proto.BizAccountLinkInfo.BizAccountLinkInfoAccountType|null} [accountType] BizAccountLinkInfo accountType + */ + + /** + * Constructs a new BizAccountLinkInfo. + * @memberof proto + * @classdesc Represents a BizAccountLinkInfo. + * @implements IBizAccountLinkInfo + * @constructor + * @param {proto.IBizAccountLinkInfo=} [properties] Properties to set + */ + function BizAccountLinkInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BizAccountLinkInfo whatsappBizAcctFbid. + * @member {number|Long} whatsappBizAcctFbid + * @memberof proto.BizAccountLinkInfo + * @instance + */ + BizAccountLinkInfo.prototype.whatsappBizAcctFbid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * BizAccountLinkInfo whatsappAcctNumber. + * @member {string} whatsappAcctNumber + * @memberof proto.BizAccountLinkInfo + * @instance + */ + BizAccountLinkInfo.prototype.whatsappAcctNumber = ""; + + /** + * BizAccountLinkInfo issueTime. + * @member {number|Long} issueTime + * @memberof proto.BizAccountLinkInfo + * @instance + */ + BizAccountLinkInfo.prototype.issueTime = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * BizAccountLinkInfo hostStorage. + * @member {proto.BizAccountLinkInfo.BizAccountLinkInfoHostStorageType} hostStorage + * @memberof proto.BizAccountLinkInfo + * @instance + */ + BizAccountLinkInfo.prototype.hostStorage = 0; + + /** + * BizAccountLinkInfo accountType. + * @member {proto.BizAccountLinkInfo.BizAccountLinkInfoAccountType} accountType + * @memberof proto.BizAccountLinkInfo + * @instance + */ + BizAccountLinkInfo.prototype.accountType = 0; + + /** + * Creates a new BizAccountLinkInfo instance using the specified properties. + * @function create + * @memberof proto.BizAccountLinkInfo + * @static + * @param {proto.IBizAccountLinkInfo=} [properties] Properties to set + * @returns {proto.BizAccountLinkInfo} BizAccountLinkInfo instance + */ + BizAccountLinkInfo.create = function create(properties) { + return new BizAccountLinkInfo(properties); + }; + + /** + * Encodes the specified BizAccountLinkInfo message. Does not implicitly {@link proto.BizAccountLinkInfo.verify|verify} messages. + * @function encode + * @memberof proto.BizAccountLinkInfo + * @static + * @param {proto.IBizAccountLinkInfo} message BizAccountLinkInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BizAccountLinkInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.whatsappBizAcctFbid != null && Object.hasOwnProperty.call(message, "whatsappBizAcctFbid")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.whatsappBizAcctFbid); + if (message.whatsappAcctNumber != null && Object.hasOwnProperty.call(message, "whatsappAcctNumber")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.whatsappAcctNumber); + if (message.issueTime != null && Object.hasOwnProperty.call(message, "issueTime")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.issueTime); + if (message.hostStorage != null && Object.hasOwnProperty.call(message, "hostStorage")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.hostStorage); + if (message.accountType != null && Object.hasOwnProperty.call(message, "accountType")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.accountType); + return writer; + }; + + /** + * Encodes the specified BizAccountLinkInfo message, length delimited. Does not implicitly {@link proto.BizAccountLinkInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.BizAccountLinkInfo + * @static + * @param {proto.IBizAccountLinkInfo} message BizAccountLinkInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BizAccountLinkInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BizAccountLinkInfo message from the specified reader or buffer. + * @function decode + * @memberof proto.BizAccountLinkInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.BizAccountLinkInfo} BizAccountLinkInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BizAccountLinkInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.BizAccountLinkInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.whatsappBizAcctFbid = reader.uint64(); + break; + case 2: + message.whatsappAcctNumber = reader.string(); + break; + case 3: + message.issueTime = reader.uint64(); + break; + case 4: + message.hostStorage = reader.int32(); + break; + case 5: + message.accountType = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BizAccountLinkInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.BizAccountLinkInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.BizAccountLinkInfo} BizAccountLinkInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BizAccountLinkInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BizAccountLinkInfo message. + * @function verify + * @memberof proto.BizAccountLinkInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BizAccountLinkInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.whatsappBizAcctFbid != null && message.hasOwnProperty("whatsappBizAcctFbid")) + if (!$util.isInteger(message.whatsappBizAcctFbid) && !(message.whatsappBizAcctFbid && $util.isInteger(message.whatsappBizAcctFbid.low) && $util.isInteger(message.whatsappBizAcctFbid.high))) + return "whatsappBizAcctFbid: integer|Long expected"; + if (message.whatsappAcctNumber != null && message.hasOwnProperty("whatsappAcctNumber")) + if (!$util.isString(message.whatsappAcctNumber)) + return "whatsappAcctNumber: string expected"; + if (message.issueTime != null && message.hasOwnProperty("issueTime")) + if (!$util.isInteger(message.issueTime) && !(message.issueTime && $util.isInteger(message.issueTime.low) && $util.isInteger(message.issueTime.high))) + return "issueTime: integer|Long expected"; + if (message.hostStorage != null && message.hasOwnProperty("hostStorage")) + switch (message.hostStorage) { + default: + return "hostStorage: enum value expected"; + case 0: + case 1: + break; + } + if (message.accountType != null && message.hasOwnProperty("accountType")) + switch (message.accountType) { + default: + return "accountType: enum value expected"; + case 0: + break; + } + return null; + }; + + /** + * Creates a BizAccountLinkInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.BizAccountLinkInfo + * @static + * @param {Object.} object Plain object + * @returns {proto.BizAccountLinkInfo} BizAccountLinkInfo + */ + BizAccountLinkInfo.fromObject = function fromObject(object) { + if (object instanceof $root.proto.BizAccountLinkInfo) + return object; + var message = new $root.proto.BizAccountLinkInfo(); + if (object.whatsappBizAcctFbid != null) + if ($util.Long) + (message.whatsappBizAcctFbid = $util.Long.fromValue(object.whatsappBizAcctFbid)).unsigned = true; + else if (typeof object.whatsappBizAcctFbid === "string") + message.whatsappBizAcctFbid = parseInt(object.whatsappBizAcctFbid, 10); + else if (typeof object.whatsappBizAcctFbid === "number") + message.whatsappBizAcctFbid = object.whatsappBizAcctFbid; + else if (typeof object.whatsappBizAcctFbid === "object") + message.whatsappBizAcctFbid = new $util.LongBits(object.whatsappBizAcctFbid.low >>> 0, object.whatsappBizAcctFbid.high >>> 0).toNumber(true); + if (object.whatsappAcctNumber != null) + message.whatsappAcctNumber = String(object.whatsappAcctNumber); + if (object.issueTime != null) + if ($util.Long) + (message.issueTime = $util.Long.fromValue(object.issueTime)).unsigned = true; + else if (typeof object.issueTime === "string") + message.issueTime = parseInt(object.issueTime, 10); + else if (typeof object.issueTime === "number") + message.issueTime = object.issueTime; + else if (typeof object.issueTime === "object") + message.issueTime = new $util.LongBits(object.issueTime.low >>> 0, object.issueTime.high >>> 0).toNumber(true); + switch (object.hostStorage) { + case "ON_PREMISE": + case 0: + message.hostStorage = 0; + break; + case "FACEBOOK": + case 1: + message.hostStorage = 1; + break; + } + switch (object.accountType) { + case "ENTERPRISE": + case 0: + message.accountType = 0; + break; + } + return message; + }; + + /** + * Creates a plain object from a BizAccountLinkInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.BizAccountLinkInfo + * @static + * @param {proto.BizAccountLinkInfo} message BizAccountLinkInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BizAccountLinkInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.whatsappBizAcctFbid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.whatsappBizAcctFbid = options.longs === String ? "0" : 0; + object.whatsappAcctNumber = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.issueTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.issueTime = options.longs === String ? "0" : 0; + object.hostStorage = options.enums === String ? "ON_PREMISE" : 0; + object.accountType = options.enums === String ? "ENTERPRISE" : 0; + } + if (message.whatsappBizAcctFbid != null && message.hasOwnProperty("whatsappBizAcctFbid")) + if (typeof message.whatsappBizAcctFbid === "number") + object.whatsappBizAcctFbid = options.longs === String ? String(message.whatsappBizAcctFbid) : message.whatsappBizAcctFbid; + else + object.whatsappBizAcctFbid = options.longs === String ? $util.Long.prototype.toString.call(message.whatsappBizAcctFbid) : options.longs === Number ? new $util.LongBits(message.whatsappBizAcctFbid.low >>> 0, message.whatsappBizAcctFbid.high >>> 0).toNumber(true) : message.whatsappBizAcctFbid; + if (message.whatsappAcctNumber != null && message.hasOwnProperty("whatsappAcctNumber")) + object.whatsappAcctNumber = message.whatsappAcctNumber; + if (message.issueTime != null && message.hasOwnProperty("issueTime")) + if (typeof message.issueTime === "number") + object.issueTime = options.longs === String ? String(message.issueTime) : message.issueTime; + else + object.issueTime = options.longs === String ? $util.Long.prototype.toString.call(message.issueTime) : options.longs === Number ? new $util.LongBits(message.issueTime.low >>> 0, message.issueTime.high >>> 0).toNumber(true) : message.issueTime; + if (message.hostStorage != null && message.hasOwnProperty("hostStorage")) + object.hostStorage = options.enums === String ? $root.proto.BizAccountLinkInfo.BizAccountLinkInfoHostStorageType[message.hostStorage] : message.hostStorage; + if (message.accountType != null && message.hasOwnProperty("accountType")) + object.accountType = options.enums === String ? $root.proto.BizAccountLinkInfo.BizAccountLinkInfoAccountType[message.accountType] : message.accountType; + return object; + }; + + /** + * Converts this BizAccountLinkInfo to JSON. + * @function toJSON + * @memberof proto.BizAccountLinkInfo + * @instance + * @returns {Object.} JSON object + */ + BizAccountLinkInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * BizAccountLinkInfoHostStorageType enum. + * @name proto.BizAccountLinkInfo.BizAccountLinkInfoHostStorageType + * @enum {number} + * @property {number} ON_PREMISE=0 ON_PREMISE value + * @property {number} FACEBOOK=1 FACEBOOK value + */ + BizAccountLinkInfo.BizAccountLinkInfoHostStorageType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ON_PREMISE"] = 0; + values[valuesById[1] = "FACEBOOK"] = 1; + return values; + })(); + + /** + * BizAccountLinkInfoAccountType enum. + * @name proto.BizAccountLinkInfo.BizAccountLinkInfoAccountType + * @enum {number} + * @property {number} ENTERPRISE=0 ENTERPRISE value + */ + BizAccountLinkInfo.BizAccountLinkInfoAccountType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENTERPRISE"] = 0; + return values; + })(); + + return BizAccountLinkInfo; + })(); + + proto.BizAccountPayload = (function() { + + /** + * Properties of a BizAccountPayload. + * @memberof proto + * @interface IBizAccountPayload + * @property {proto.IVerifiedNameCertificate|null} [vnameCert] BizAccountPayload vnameCert + * @property {Uint8Array|null} [bizAcctLinkInfo] BizAccountPayload bizAcctLinkInfo + */ + + /** + * Constructs a new BizAccountPayload. + * @memberof proto + * @classdesc Represents a BizAccountPayload. + * @implements IBizAccountPayload + * @constructor + * @param {proto.IBizAccountPayload=} [properties] Properties to set + */ + function BizAccountPayload(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BizAccountPayload vnameCert. + * @member {proto.IVerifiedNameCertificate|null|undefined} vnameCert + * @memberof proto.BizAccountPayload + * @instance + */ + BizAccountPayload.prototype.vnameCert = null; + + /** + * BizAccountPayload bizAcctLinkInfo. + * @member {Uint8Array} bizAcctLinkInfo + * @memberof proto.BizAccountPayload + * @instance + */ + BizAccountPayload.prototype.bizAcctLinkInfo = $util.newBuffer([]); + + /** + * Creates a new BizAccountPayload instance using the specified properties. + * @function create + * @memberof proto.BizAccountPayload + * @static + * @param {proto.IBizAccountPayload=} [properties] Properties to set + * @returns {proto.BizAccountPayload} BizAccountPayload instance + */ + BizAccountPayload.create = function create(properties) { + return new BizAccountPayload(properties); + }; + + /** + * Encodes the specified BizAccountPayload message. Does not implicitly {@link proto.BizAccountPayload.verify|verify} messages. + * @function encode + * @memberof proto.BizAccountPayload + * @static + * @param {proto.IBizAccountPayload} message BizAccountPayload message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BizAccountPayload.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.vnameCert != null && Object.hasOwnProperty.call(message, "vnameCert")) + $root.proto.VerifiedNameCertificate.encode(message.vnameCert, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.bizAcctLinkInfo != null && Object.hasOwnProperty.call(message, "bizAcctLinkInfo")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.bizAcctLinkInfo); + return writer; + }; + + /** + * Encodes the specified BizAccountPayload message, length delimited. Does not implicitly {@link proto.BizAccountPayload.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.BizAccountPayload + * @static + * @param {proto.IBizAccountPayload} message BizAccountPayload message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BizAccountPayload.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BizAccountPayload message from the specified reader or buffer. + * @function decode + * @memberof proto.BizAccountPayload + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.BizAccountPayload} BizAccountPayload + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BizAccountPayload.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.BizAccountPayload(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.vnameCert = $root.proto.VerifiedNameCertificate.decode(reader, reader.uint32()); + break; + case 2: + message.bizAcctLinkInfo = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BizAccountPayload message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.BizAccountPayload + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.BizAccountPayload} BizAccountPayload + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BizAccountPayload.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BizAccountPayload message. + * @function verify + * @memberof proto.BizAccountPayload + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BizAccountPayload.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.vnameCert != null && message.hasOwnProperty("vnameCert")) { + var error = $root.proto.VerifiedNameCertificate.verify(message.vnameCert); + if (error) + return "vnameCert." + error; + } + if (message.bizAcctLinkInfo != null && message.hasOwnProperty("bizAcctLinkInfo")) + if (!(message.bizAcctLinkInfo && typeof message.bizAcctLinkInfo.length === "number" || $util.isString(message.bizAcctLinkInfo))) + return "bizAcctLinkInfo: buffer expected"; + return null; + }; + + /** + * Creates a BizAccountPayload message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.BizAccountPayload + * @static + * @param {Object.} object Plain object + * @returns {proto.BizAccountPayload} BizAccountPayload + */ + BizAccountPayload.fromObject = function fromObject(object) { + if (object instanceof $root.proto.BizAccountPayload) + return object; + var message = new $root.proto.BizAccountPayload(); + if (object.vnameCert != null) { + if (typeof object.vnameCert !== "object") + throw TypeError(".proto.BizAccountPayload.vnameCert: object expected"); + message.vnameCert = $root.proto.VerifiedNameCertificate.fromObject(object.vnameCert); + } + if (object.bizAcctLinkInfo != null) + if (typeof object.bizAcctLinkInfo === "string") + $util.base64.decode(object.bizAcctLinkInfo, message.bizAcctLinkInfo = $util.newBuffer($util.base64.length(object.bizAcctLinkInfo)), 0); + else if (object.bizAcctLinkInfo.length) + message.bizAcctLinkInfo = object.bizAcctLinkInfo; + return message; + }; + + /** + * Creates a plain object from a BizAccountPayload message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.BizAccountPayload + * @static + * @param {proto.BizAccountPayload} message BizAccountPayload + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BizAccountPayload.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.vnameCert = null; + if (options.bytes === String) + object.bizAcctLinkInfo = ""; + else { + object.bizAcctLinkInfo = []; + if (options.bytes !== Array) + object.bizAcctLinkInfo = $util.newBuffer(object.bizAcctLinkInfo); + } + } + if (message.vnameCert != null && message.hasOwnProperty("vnameCert")) + object.vnameCert = $root.proto.VerifiedNameCertificate.toObject(message.vnameCert, options); + if (message.bizAcctLinkInfo != null && message.hasOwnProperty("bizAcctLinkInfo")) + object.bizAcctLinkInfo = options.bytes === String ? $util.base64.encode(message.bizAcctLinkInfo, 0, message.bizAcctLinkInfo.length) : options.bytes === Array ? Array.prototype.slice.call(message.bizAcctLinkInfo) : message.bizAcctLinkInfo; + return object; + }; + + /** + * Converts this BizAccountPayload to JSON. + * @function toJSON + * @memberof proto.BizAccountPayload + * @instance + * @returns {Object.} JSON object + */ + BizAccountPayload.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BizAccountPayload; + })(); + + proto.BizIdentityInfo = (function() { + + /** + * Properties of a BizIdentityInfo. + * @memberof proto + * @interface IBizIdentityInfo + * @property {proto.BizIdentityInfo.BizIdentityInfoVerifiedLevelValue|null} [vlevel] BizIdentityInfo vlevel + * @property {proto.IVerifiedNameCertificate|null} [vnameCert] BizIdentityInfo vnameCert + * @property {boolean|null} [signed] BizIdentityInfo signed + * @property {boolean|null} [revoked] BizIdentityInfo revoked + * @property {proto.BizIdentityInfo.BizIdentityInfoHostStorageType|null} [hostStorage] BizIdentityInfo hostStorage + * @property {proto.BizIdentityInfo.BizIdentityInfoActualActorsType|null} [actualActors] BizIdentityInfo actualActors + * @property {number|Long|null} [privacyModeTs] BizIdentityInfo privacyModeTs + * @property {number|Long|null} [featureControls] BizIdentityInfo featureControls + */ + + /** + * Constructs a new BizIdentityInfo. + * @memberof proto + * @classdesc Represents a BizIdentityInfo. + * @implements IBizIdentityInfo + * @constructor + * @param {proto.IBizIdentityInfo=} [properties] Properties to set + */ + function BizIdentityInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BizIdentityInfo vlevel. + * @member {proto.BizIdentityInfo.BizIdentityInfoVerifiedLevelValue} vlevel + * @memberof proto.BizIdentityInfo + * @instance + */ + BizIdentityInfo.prototype.vlevel = 0; + + /** + * BizIdentityInfo vnameCert. + * @member {proto.IVerifiedNameCertificate|null|undefined} vnameCert + * @memberof proto.BizIdentityInfo + * @instance + */ + BizIdentityInfo.prototype.vnameCert = null; + + /** + * BizIdentityInfo signed. + * @member {boolean} signed + * @memberof proto.BizIdentityInfo + * @instance + */ + BizIdentityInfo.prototype.signed = false; + + /** + * BizIdentityInfo revoked. + * @member {boolean} revoked + * @memberof proto.BizIdentityInfo + * @instance + */ + BizIdentityInfo.prototype.revoked = false; + + /** + * BizIdentityInfo hostStorage. + * @member {proto.BizIdentityInfo.BizIdentityInfoHostStorageType} hostStorage + * @memberof proto.BizIdentityInfo + * @instance + */ + BizIdentityInfo.prototype.hostStorage = 0; + + /** + * BizIdentityInfo actualActors. + * @member {proto.BizIdentityInfo.BizIdentityInfoActualActorsType} actualActors + * @memberof proto.BizIdentityInfo + * @instance + */ + BizIdentityInfo.prototype.actualActors = 0; + + /** + * BizIdentityInfo privacyModeTs. + * @member {number|Long} privacyModeTs + * @memberof proto.BizIdentityInfo + * @instance + */ + BizIdentityInfo.prototype.privacyModeTs = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * BizIdentityInfo featureControls. + * @member {number|Long} featureControls + * @memberof proto.BizIdentityInfo + * @instance + */ + BizIdentityInfo.prototype.featureControls = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new BizIdentityInfo instance using the specified properties. + * @function create + * @memberof proto.BizIdentityInfo + * @static + * @param {proto.IBizIdentityInfo=} [properties] Properties to set + * @returns {proto.BizIdentityInfo} BizIdentityInfo instance + */ + BizIdentityInfo.create = function create(properties) { + return new BizIdentityInfo(properties); + }; + + /** + * Encodes the specified BizIdentityInfo message. Does not implicitly {@link proto.BizIdentityInfo.verify|verify} messages. + * @function encode + * @memberof proto.BizIdentityInfo + * @static + * @param {proto.IBizIdentityInfo} message BizIdentityInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BizIdentityInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.vlevel != null && Object.hasOwnProperty.call(message, "vlevel")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.vlevel); + if (message.vnameCert != null && Object.hasOwnProperty.call(message, "vnameCert")) + $root.proto.VerifiedNameCertificate.encode(message.vnameCert, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.signed != null && Object.hasOwnProperty.call(message, "signed")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.signed); + if (message.revoked != null && Object.hasOwnProperty.call(message, "revoked")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.revoked); + if (message.hostStorage != null && Object.hasOwnProperty.call(message, "hostStorage")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.hostStorage); + if (message.actualActors != null && Object.hasOwnProperty.call(message, "actualActors")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.actualActors); + if (message.privacyModeTs != null && Object.hasOwnProperty.call(message, "privacyModeTs")) + writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.privacyModeTs); + if (message.featureControls != null && Object.hasOwnProperty.call(message, "featureControls")) + writer.uint32(/* id 8, wireType 0 =*/64).uint64(message.featureControls); + return writer; + }; + + /** + * Encodes the specified BizIdentityInfo message, length delimited. Does not implicitly {@link proto.BizIdentityInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.BizIdentityInfo + * @static + * @param {proto.IBizIdentityInfo} message BizIdentityInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BizIdentityInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BizIdentityInfo message from the specified reader or buffer. + * @function decode + * @memberof proto.BizIdentityInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.BizIdentityInfo} BizIdentityInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BizIdentityInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.BizIdentityInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.vlevel = reader.int32(); + break; + case 2: + message.vnameCert = $root.proto.VerifiedNameCertificate.decode(reader, reader.uint32()); + break; + case 3: + message.signed = reader.bool(); + break; + case 4: + message.revoked = reader.bool(); + break; + case 5: + message.hostStorage = reader.int32(); + break; + case 6: + message.actualActors = reader.int32(); + break; + case 7: + message.privacyModeTs = reader.uint64(); + break; + case 8: + message.featureControls = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BizIdentityInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.BizIdentityInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.BizIdentityInfo} BizIdentityInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BizIdentityInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BizIdentityInfo message. + * @function verify + * @memberof proto.BizIdentityInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BizIdentityInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.vlevel != null && message.hasOwnProperty("vlevel")) + switch (message.vlevel) { + default: + return "vlevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.vnameCert != null && message.hasOwnProperty("vnameCert")) { + var error = $root.proto.VerifiedNameCertificate.verify(message.vnameCert); + if (error) + return "vnameCert." + error; + } + if (message.signed != null && message.hasOwnProperty("signed")) + if (typeof message.signed !== "boolean") + return "signed: boolean expected"; + if (message.revoked != null && message.hasOwnProperty("revoked")) + if (typeof message.revoked !== "boolean") + return "revoked: boolean expected"; + if (message.hostStorage != null && message.hasOwnProperty("hostStorage")) + switch (message.hostStorage) { + default: + return "hostStorage: enum value expected"; + case 0: + case 1: + break; + } + if (message.actualActors != null && message.hasOwnProperty("actualActors")) + switch (message.actualActors) { + default: + return "actualActors: enum value expected"; + case 0: + case 1: + break; + } + if (message.privacyModeTs != null && message.hasOwnProperty("privacyModeTs")) + if (!$util.isInteger(message.privacyModeTs) && !(message.privacyModeTs && $util.isInteger(message.privacyModeTs.low) && $util.isInteger(message.privacyModeTs.high))) + return "privacyModeTs: integer|Long expected"; + if (message.featureControls != null && message.hasOwnProperty("featureControls")) + if (!$util.isInteger(message.featureControls) && !(message.featureControls && $util.isInteger(message.featureControls.low) && $util.isInteger(message.featureControls.high))) + return "featureControls: integer|Long expected"; + return null; + }; + + /** + * Creates a BizIdentityInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.BizIdentityInfo + * @static + * @param {Object.} object Plain object + * @returns {proto.BizIdentityInfo} BizIdentityInfo + */ + BizIdentityInfo.fromObject = function fromObject(object) { + if (object instanceof $root.proto.BizIdentityInfo) + return object; + var message = new $root.proto.BizIdentityInfo(); + switch (object.vlevel) { + case "UNKNOWN": + case 0: + message.vlevel = 0; + break; + case "LOW": + case 1: + message.vlevel = 1; + break; + case "HIGH": + case 2: + message.vlevel = 2; + break; + } + if (object.vnameCert != null) { + if (typeof object.vnameCert !== "object") + throw TypeError(".proto.BizIdentityInfo.vnameCert: object expected"); + message.vnameCert = $root.proto.VerifiedNameCertificate.fromObject(object.vnameCert); + } + if (object.signed != null) + message.signed = Boolean(object.signed); + if (object.revoked != null) + message.revoked = Boolean(object.revoked); + switch (object.hostStorage) { + case "ON_PREMISE": + case 0: + message.hostStorage = 0; + break; + case "FACEBOOK": + case 1: + message.hostStorage = 1; + break; + } + switch (object.actualActors) { + case "SELF": + case 0: + message.actualActors = 0; + break; + case "BSP": + case 1: + message.actualActors = 1; + break; + } + if (object.privacyModeTs != null) + if ($util.Long) + (message.privacyModeTs = $util.Long.fromValue(object.privacyModeTs)).unsigned = true; + else if (typeof object.privacyModeTs === "string") + message.privacyModeTs = parseInt(object.privacyModeTs, 10); + else if (typeof object.privacyModeTs === "number") + message.privacyModeTs = object.privacyModeTs; + else if (typeof object.privacyModeTs === "object") + message.privacyModeTs = new $util.LongBits(object.privacyModeTs.low >>> 0, object.privacyModeTs.high >>> 0).toNumber(true); + if (object.featureControls != null) + if ($util.Long) + (message.featureControls = $util.Long.fromValue(object.featureControls)).unsigned = true; + else if (typeof object.featureControls === "string") + message.featureControls = parseInt(object.featureControls, 10); + else if (typeof object.featureControls === "number") + message.featureControls = object.featureControls; + else if (typeof object.featureControls === "object") + message.featureControls = new $util.LongBits(object.featureControls.low >>> 0, object.featureControls.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a BizIdentityInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.BizIdentityInfo + * @static + * @param {proto.BizIdentityInfo} message BizIdentityInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BizIdentityInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.vlevel = options.enums === String ? "UNKNOWN" : 0; + object.vnameCert = null; + object.signed = false; + object.revoked = false; + object.hostStorage = options.enums === String ? "ON_PREMISE" : 0; + object.actualActors = options.enums === String ? "SELF" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.privacyModeTs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.privacyModeTs = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.featureControls = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.featureControls = options.longs === String ? "0" : 0; + } + if (message.vlevel != null && message.hasOwnProperty("vlevel")) + object.vlevel = options.enums === String ? $root.proto.BizIdentityInfo.BizIdentityInfoVerifiedLevelValue[message.vlevel] : message.vlevel; + if (message.vnameCert != null && message.hasOwnProperty("vnameCert")) + object.vnameCert = $root.proto.VerifiedNameCertificate.toObject(message.vnameCert, options); + if (message.signed != null && message.hasOwnProperty("signed")) + object.signed = message.signed; + if (message.revoked != null && message.hasOwnProperty("revoked")) + object.revoked = message.revoked; + if (message.hostStorage != null && message.hasOwnProperty("hostStorage")) + object.hostStorage = options.enums === String ? $root.proto.BizIdentityInfo.BizIdentityInfoHostStorageType[message.hostStorage] : message.hostStorage; + if (message.actualActors != null && message.hasOwnProperty("actualActors")) + object.actualActors = options.enums === String ? $root.proto.BizIdentityInfo.BizIdentityInfoActualActorsType[message.actualActors] : message.actualActors; + if (message.privacyModeTs != null && message.hasOwnProperty("privacyModeTs")) + if (typeof message.privacyModeTs === "number") + object.privacyModeTs = options.longs === String ? String(message.privacyModeTs) : message.privacyModeTs; + else + object.privacyModeTs = options.longs === String ? $util.Long.prototype.toString.call(message.privacyModeTs) : options.longs === Number ? new $util.LongBits(message.privacyModeTs.low >>> 0, message.privacyModeTs.high >>> 0).toNumber(true) : message.privacyModeTs; + if (message.featureControls != null && message.hasOwnProperty("featureControls")) + if (typeof message.featureControls === "number") + object.featureControls = options.longs === String ? String(message.featureControls) : message.featureControls; + else + object.featureControls = options.longs === String ? $util.Long.prototype.toString.call(message.featureControls) : options.longs === Number ? new $util.LongBits(message.featureControls.low >>> 0, message.featureControls.high >>> 0).toNumber(true) : message.featureControls; + return object; + }; + + /** + * Converts this BizIdentityInfo to JSON. + * @function toJSON + * @memberof proto.BizIdentityInfo + * @instance + * @returns {Object.} JSON object + */ + BizIdentityInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * BizIdentityInfoVerifiedLevelValue enum. + * @name proto.BizIdentityInfo.BizIdentityInfoVerifiedLevelValue + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} LOW=1 LOW value + * @property {number} HIGH=2 HIGH value + */ + BizIdentityInfo.BizIdentityInfoVerifiedLevelValue = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "LOW"] = 1; + values[valuesById[2] = "HIGH"] = 2; + return values; + })(); + + /** + * BizIdentityInfoHostStorageType enum. + * @name proto.BizIdentityInfo.BizIdentityInfoHostStorageType + * @enum {number} + * @property {number} ON_PREMISE=0 ON_PREMISE value + * @property {number} FACEBOOK=1 FACEBOOK value + */ + BizIdentityInfo.BizIdentityInfoHostStorageType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ON_PREMISE"] = 0; + values[valuesById[1] = "FACEBOOK"] = 1; + return values; + })(); + + /** + * BizIdentityInfoActualActorsType enum. + * @name proto.BizIdentityInfo.BizIdentityInfoActualActorsType + * @enum {number} + * @property {number} SELF=0 SELF value + * @property {number} BSP=1 BSP value + */ + BizIdentityInfo.BizIdentityInfoActualActorsType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SELF"] = 0; + values[valuesById[1] = "BSP"] = 1; + return values; + })(); + + return BizIdentityInfo; + })(); + proto.Button = (function() { /** @@ -4873,6 +6429,193 @@ $root.proto = (function() { return Button; })(); + proto.ButtonText = (function() { + + /** + * Properties of a ButtonText. + * @memberof proto + * @interface IButtonText + * @property {string|null} [displayText] ButtonText displayText + */ + + /** + * Constructs a new ButtonText. + * @memberof proto + * @classdesc Represents a ButtonText. + * @implements IButtonText + * @constructor + * @param {proto.IButtonText=} [properties] Properties to set + */ + function ButtonText(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ButtonText displayText. + * @member {string} displayText + * @memberof proto.ButtonText + * @instance + */ + ButtonText.prototype.displayText = ""; + + /** + * Creates a new ButtonText instance using the specified properties. + * @function create + * @memberof proto.ButtonText + * @static + * @param {proto.IButtonText=} [properties] Properties to set + * @returns {proto.ButtonText} ButtonText instance + */ + ButtonText.create = function create(properties) { + return new ButtonText(properties); + }; + + /** + * Encodes the specified ButtonText message. Does not implicitly {@link proto.ButtonText.verify|verify} messages. + * @function encode + * @memberof proto.ButtonText + * @static + * @param {proto.IButtonText} message ButtonText message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ButtonText.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayText != null && Object.hasOwnProperty.call(message, "displayText")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayText); + return writer; + }; + + /** + * Encodes the specified ButtonText message, length delimited. Does not implicitly {@link proto.ButtonText.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ButtonText + * @static + * @param {proto.IButtonText} message ButtonText message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ButtonText.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ButtonText message from the specified reader or buffer. + * @function decode + * @memberof proto.ButtonText + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ButtonText} ButtonText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ButtonText.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ButtonText(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.displayText = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ButtonText message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ButtonText + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ButtonText} ButtonText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ButtonText.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ButtonText message. + * @function verify + * @memberof proto.ButtonText + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ButtonText.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayText != null && message.hasOwnProperty("displayText")) + if (!$util.isString(message.displayText)) + return "displayText: string expected"; + return null; + }; + + /** + * Creates a ButtonText message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ButtonText + * @static + * @param {Object.} object Plain object + * @returns {proto.ButtonText} ButtonText + */ + ButtonText.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ButtonText) + return object; + var message = new $root.proto.ButtonText(); + if (object.displayText != null) + message.displayText = String(object.displayText); + return message; + }; + + /** + * Creates a plain object from a ButtonText message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ButtonText + * @static + * @param {proto.ButtonText} message ButtonText + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ButtonText.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.displayText = ""; + if (message.displayText != null && message.hasOwnProperty("displayText")) + object.displayText = message.displayText; + return object; + }; + + /** + * Converts this ButtonText to JSON. + * @function toJSON + * @memberof proto.ButtonText + * @instance + * @returns {Object.} JSON object + */ + ButtonText.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ButtonText; + })(); + proto.ButtonsMessage = (function() { /** @@ -5720,193 +7463,6 @@ $root.proto = (function() { return ButtonsResponseMessage; })(); - proto.ButtonText = (function() { - - /** - * Properties of a ButtonText. - * @memberof proto - * @interface IButtonText - * @property {string|null} [displayText] ButtonText displayText - */ - - /** - * Constructs a new ButtonText. - * @memberof proto - * @classdesc Represents a ButtonText. - * @implements IButtonText - * @constructor - * @param {proto.IButtonText=} [properties] Properties to set - */ - function ButtonText(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ButtonText displayText. - * @member {string} displayText - * @memberof proto.ButtonText - * @instance - */ - ButtonText.prototype.displayText = ""; - - /** - * Creates a new ButtonText instance using the specified properties. - * @function create - * @memberof proto.ButtonText - * @static - * @param {proto.IButtonText=} [properties] Properties to set - * @returns {proto.ButtonText} ButtonText instance - */ - ButtonText.create = function create(properties) { - return new ButtonText(properties); - }; - - /** - * Encodes the specified ButtonText message. Does not implicitly {@link proto.ButtonText.verify|verify} messages. - * @function encode - * @memberof proto.ButtonText - * @static - * @param {proto.IButtonText} message ButtonText message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ButtonText.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayText != null && Object.hasOwnProperty.call(message, "displayText")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayText); - return writer; - }; - - /** - * Encodes the specified ButtonText message, length delimited. Does not implicitly {@link proto.ButtonText.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.ButtonText - * @static - * @param {proto.IButtonText} message ButtonText message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ButtonText.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ButtonText message from the specified reader or buffer. - * @function decode - * @memberof proto.ButtonText - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.ButtonText} ButtonText - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ButtonText.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ButtonText(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.displayText = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ButtonText message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.ButtonText - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ButtonText} ButtonText - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ButtonText.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ButtonText message. - * @function verify - * @memberof proto.ButtonText - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ButtonText.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayText != null && message.hasOwnProperty("displayText")) - if (!$util.isString(message.displayText)) - return "displayText: string expected"; - return null; - }; - - /** - * Creates a ButtonText message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.ButtonText - * @static - * @param {Object.} object Plain object - * @returns {proto.ButtonText} ButtonText - */ - ButtonText.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ButtonText) - return object; - var message = new $root.proto.ButtonText(); - if (object.displayText != null) - message.displayText = String(object.displayText); - return message; - }; - - /** - * Creates a plain object from a ButtonText message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.ButtonText - * @static - * @param {proto.ButtonText} message ButtonText - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ButtonText.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.displayText = ""; - if (message.displayText != null && message.hasOwnProperty("displayText")) - object.displayText = message.displayText; - return object; - }; - - /** - * Converts this ButtonText to JSON. - * @function toJSON - * @memberof proto.ButtonText - * @instance - * @returns {Object.} JSON object - */ - ButtonText.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ButtonText; - })(); - proto.Call = (function() { /** @@ -6828,6 +8384,1285 @@ $root.proto = (function() { return CatalogSnapshot; })(); + proto.CertChain = (function() { + + /** + * Properties of a CertChain. + * @memberof proto + * @interface ICertChain + * @property {proto.ICertChainNoiseCertificate|null} [leaf] CertChain leaf + * @property {proto.ICertChainNoiseCertificate|null} [intermediate] CertChain intermediate + */ + + /** + * Constructs a new CertChain. + * @memberof proto + * @classdesc Represents a CertChain. + * @implements ICertChain + * @constructor + * @param {proto.ICertChain=} [properties] Properties to set + */ + function CertChain(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CertChain leaf. + * @member {proto.ICertChainNoiseCertificate|null|undefined} leaf + * @memberof proto.CertChain + * @instance + */ + CertChain.prototype.leaf = null; + + /** + * CertChain intermediate. + * @member {proto.ICertChainNoiseCertificate|null|undefined} intermediate + * @memberof proto.CertChain + * @instance + */ + CertChain.prototype.intermediate = null; + + /** + * Creates a new CertChain instance using the specified properties. + * @function create + * @memberof proto.CertChain + * @static + * @param {proto.ICertChain=} [properties] Properties to set + * @returns {proto.CertChain} CertChain instance + */ + CertChain.create = function create(properties) { + return new CertChain(properties); + }; + + /** + * Encodes the specified CertChain message. Does not implicitly {@link proto.CertChain.verify|verify} messages. + * @function encode + * @memberof proto.CertChain + * @static + * @param {proto.ICertChain} message CertChain message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertChain.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.leaf != null && Object.hasOwnProperty.call(message, "leaf")) + $root.proto.CertChainNoiseCertificate.encode(message.leaf, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.intermediate != null && Object.hasOwnProperty.call(message, "intermediate")) + $root.proto.CertChainNoiseCertificate.encode(message.intermediate, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CertChain message, length delimited. Does not implicitly {@link proto.CertChain.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.CertChain + * @static + * @param {proto.ICertChain} message CertChain message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertChain.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CertChain message from the specified reader or buffer. + * @function decode + * @memberof proto.CertChain + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.CertChain} CertChain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertChain.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.CertChain(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.leaf = $root.proto.CertChainNoiseCertificate.decode(reader, reader.uint32()); + break; + case 2: + message.intermediate = $root.proto.CertChainNoiseCertificate.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CertChain message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.CertChain + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.CertChain} CertChain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertChain.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CertChain message. + * @function verify + * @memberof proto.CertChain + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CertChain.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.leaf != null && message.hasOwnProperty("leaf")) { + var error = $root.proto.CertChainNoiseCertificate.verify(message.leaf); + if (error) + return "leaf." + error; + } + if (message.intermediate != null && message.hasOwnProperty("intermediate")) { + var error = $root.proto.CertChainNoiseCertificate.verify(message.intermediate); + if (error) + return "intermediate." + error; + } + return null; + }; + + /** + * Creates a CertChain message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.CertChain + * @static + * @param {Object.} object Plain object + * @returns {proto.CertChain} CertChain + */ + CertChain.fromObject = function fromObject(object) { + if (object instanceof $root.proto.CertChain) + return object; + var message = new $root.proto.CertChain(); + if (object.leaf != null) { + if (typeof object.leaf !== "object") + throw TypeError(".proto.CertChain.leaf: object expected"); + message.leaf = $root.proto.CertChainNoiseCertificate.fromObject(object.leaf); + } + if (object.intermediate != null) { + if (typeof object.intermediate !== "object") + throw TypeError(".proto.CertChain.intermediate: object expected"); + message.intermediate = $root.proto.CertChainNoiseCertificate.fromObject(object.intermediate); + } + return message; + }; + + /** + * Creates a plain object from a CertChain message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.CertChain + * @static + * @param {proto.CertChain} message CertChain + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CertChain.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.leaf = null; + object.intermediate = null; + } + if (message.leaf != null && message.hasOwnProperty("leaf")) + object.leaf = $root.proto.CertChainNoiseCertificate.toObject(message.leaf, options); + if (message.intermediate != null && message.hasOwnProperty("intermediate")) + object.intermediate = $root.proto.CertChainNoiseCertificate.toObject(message.intermediate, options); + return object; + }; + + /** + * Converts this CertChain to JSON. + * @function toJSON + * @memberof proto.CertChain + * @instance + * @returns {Object.} JSON object + */ + CertChain.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CertChain; + })(); + + proto.CertChainNoiseCertificate = (function() { + + /** + * Properties of a CertChainNoiseCertificate. + * @memberof proto + * @interface ICertChainNoiseCertificate + * @property {Uint8Array|null} [details] CertChainNoiseCertificate details + * @property {Uint8Array|null} [signature] CertChainNoiseCertificate signature + */ + + /** + * Constructs a new CertChainNoiseCertificate. + * @memberof proto + * @classdesc Represents a CertChainNoiseCertificate. + * @implements ICertChainNoiseCertificate + * @constructor + * @param {proto.ICertChainNoiseCertificate=} [properties] Properties to set + */ + function CertChainNoiseCertificate(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CertChainNoiseCertificate details. + * @member {Uint8Array} details + * @memberof proto.CertChainNoiseCertificate + * @instance + */ + CertChainNoiseCertificate.prototype.details = $util.newBuffer([]); + + /** + * CertChainNoiseCertificate signature. + * @member {Uint8Array} signature + * @memberof proto.CertChainNoiseCertificate + * @instance + */ + CertChainNoiseCertificate.prototype.signature = $util.newBuffer([]); + + /** + * Creates a new CertChainNoiseCertificate instance using the specified properties. + * @function create + * @memberof proto.CertChainNoiseCertificate + * @static + * @param {proto.ICertChainNoiseCertificate=} [properties] Properties to set + * @returns {proto.CertChainNoiseCertificate} CertChainNoiseCertificate instance + */ + CertChainNoiseCertificate.create = function create(properties) { + return new CertChainNoiseCertificate(properties); + }; + + /** + * Encodes the specified CertChainNoiseCertificate message. Does not implicitly {@link proto.CertChainNoiseCertificate.verify|verify} messages. + * @function encode + * @memberof proto.CertChainNoiseCertificate + * @static + * @param {proto.ICertChainNoiseCertificate} message CertChainNoiseCertificate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertChainNoiseCertificate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.details != null && Object.hasOwnProperty.call(message, "details")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.details); + if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.signature); + return writer; + }; + + /** + * Encodes the specified CertChainNoiseCertificate message, length delimited. Does not implicitly {@link proto.CertChainNoiseCertificate.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.CertChainNoiseCertificate + * @static + * @param {proto.ICertChainNoiseCertificate} message CertChainNoiseCertificate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertChainNoiseCertificate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CertChainNoiseCertificate message from the specified reader or buffer. + * @function decode + * @memberof proto.CertChainNoiseCertificate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.CertChainNoiseCertificate} CertChainNoiseCertificate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertChainNoiseCertificate.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.CertChainNoiseCertificate(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.details = reader.bytes(); + break; + case 2: + message.signature = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CertChainNoiseCertificate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.CertChainNoiseCertificate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.CertChainNoiseCertificate} CertChainNoiseCertificate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertChainNoiseCertificate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CertChainNoiseCertificate message. + * @function verify + * @memberof proto.CertChainNoiseCertificate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CertChainNoiseCertificate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.details != null && message.hasOwnProperty("details")) + if (!(message.details && typeof message.details.length === "number" || $util.isString(message.details))) + return "details: buffer expected"; + if (message.signature != null && message.hasOwnProperty("signature")) + if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) + return "signature: buffer expected"; + return null; + }; + + /** + * Creates a CertChainNoiseCertificate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.CertChainNoiseCertificate + * @static + * @param {Object.} object Plain object + * @returns {proto.CertChainNoiseCertificate} CertChainNoiseCertificate + */ + CertChainNoiseCertificate.fromObject = function fromObject(object) { + if (object instanceof $root.proto.CertChainNoiseCertificate) + return object; + var message = new $root.proto.CertChainNoiseCertificate(); + if (object.details != null) + if (typeof object.details === "string") + $util.base64.decode(object.details, message.details = $util.newBuffer($util.base64.length(object.details)), 0); + else if (object.details.length) + message.details = object.details; + if (object.signature != null) + if (typeof object.signature === "string") + $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); + else if (object.signature.length) + message.signature = object.signature; + return message; + }; + + /** + * Creates a plain object from a CertChainNoiseCertificate message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.CertChainNoiseCertificate + * @static + * @param {proto.CertChainNoiseCertificate} message CertChainNoiseCertificate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CertChainNoiseCertificate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.details = ""; + else { + object.details = []; + if (options.bytes !== Array) + object.details = $util.newBuffer(object.details); + } + if (options.bytes === String) + object.signature = ""; + else { + object.signature = []; + if (options.bytes !== Array) + object.signature = $util.newBuffer(object.signature); + } + } + if (message.details != null && message.hasOwnProperty("details")) + object.details = options.bytes === String ? $util.base64.encode(message.details, 0, message.details.length) : options.bytes === Array ? Array.prototype.slice.call(message.details) : message.details; + if (message.signature != null && message.hasOwnProperty("signature")) + object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; + return object; + }; + + /** + * Converts this CertChainNoiseCertificate to JSON. + * @function toJSON + * @memberof proto.CertChainNoiseCertificate + * @instance + * @returns {Object.} JSON object + */ + CertChainNoiseCertificate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CertChainNoiseCertificate; + })(); + + proto.CertChainNoiseCertificateDetails = (function() { + + /** + * Properties of a CertChainNoiseCertificateDetails. + * @memberof proto + * @interface ICertChainNoiseCertificateDetails + * @property {number|null} [serial] CertChainNoiseCertificateDetails serial + * @property {number|null} [issuerSerial] CertChainNoiseCertificateDetails issuerSerial + * @property {Uint8Array|null} [key] CertChainNoiseCertificateDetails key + * @property {number|Long|null} [notBefore] CertChainNoiseCertificateDetails notBefore + * @property {number|Long|null} [notAfter] CertChainNoiseCertificateDetails notAfter + */ + + /** + * Constructs a new CertChainNoiseCertificateDetails. + * @memberof proto + * @classdesc Represents a CertChainNoiseCertificateDetails. + * @implements ICertChainNoiseCertificateDetails + * @constructor + * @param {proto.ICertChainNoiseCertificateDetails=} [properties] Properties to set + */ + function CertChainNoiseCertificateDetails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CertChainNoiseCertificateDetails serial. + * @member {number} serial + * @memberof proto.CertChainNoiseCertificateDetails + * @instance + */ + CertChainNoiseCertificateDetails.prototype.serial = 0; + + /** + * CertChainNoiseCertificateDetails issuerSerial. + * @member {number} issuerSerial + * @memberof proto.CertChainNoiseCertificateDetails + * @instance + */ + CertChainNoiseCertificateDetails.prototype.issuerSerial = 0; + + /** + * CertChainNoiseCertificateDetails key. + * @member {Uint8Array} key + * @memberof proto.CertChainNoiseCertificateDetails + * @instance + */ + CertChainNoiseCertificateDetails.prototype.key = $util.newBuffer([]); + + /** + * CertChainNoiseCertificateDetails notBefore. + * @member {number|Long} notBefore + * @memberof proto.CertChainNoiseCertificateDetails + * @instance + */ + CertChainNoiseCertificateDetails.prototype.notBefore = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * CertChainNoiseCertificateDetails notAfter. + * @member {number|Long} notAfter + * @memberof proto.CertChainNoiseCertificateDetails + * @instance + */ + CertChainNoiseCertificateDetails.prototype.notAfter = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new CertChainNoiseCertificateDetails instance using the specified properties. + * @function create + * @memberof proto.CertChainNoiseCertificateDetails + * @static + * @param {proto.ICertChainNoiseCertificateDetails=} [properties] Properties to set + * @returns {proto.CertChainNoiseCertificateDetails} CertChainNoiseCertificateDetails instance + */ + CertChainNoiseCertificateDetails.create = function create(properties) { + return new CertChainNoiseCertificateDetails(properties); + }; + + /** + * Encodes the specified CertChainNoiseCertificateDetails message. Does not implicitly {@link proto.CertChainNoiseCertificateDetails.verify|verify} messages. + * @function encode + * @memberof proto.CertChainNoiseCertificateDetails + * @static + * @param {proto.ICertChainNoiseCertificateDetails} message CertChainNoiseCertificateDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertChainNoiseCertificateDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.serial != null && Object.hasOwnProperty.call(message, "serial")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.serial); + if (message.issuerSerial != null && Object.hasOwnProperty.call(message, "issuerSerial")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.issuerSerial); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.key); + if (message.notBefore != null && Object.hasOwnProperty.call(message, "notBefore")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.notBefore); + if (message.notAfter != null && Object.hasOwnProperty.call(message, "notAfter")) + writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.notAfter); + return writer; + }; + + /** + * Encodes the specified CertChainNoiseCertificateDetails message, length delimited. Does not implicitly {@link proto.CertChainNoiseCertificateDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.CertChainNoiseCertificateDetails + * @static + * @param {proto.ICertChainNoiseCertificateDetails} message CertChainNoiseCertificateDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertChainNoiseCertificateDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CertChainNoiseCertificateDetails message from the specified reader or buffer. + * @function decode + * @memberof proto.CertChainNoiseCertificateDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.CertChainNoiseCertificateDetails} CertChainNoiseCertificateDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertChainNoiseCertificateDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.CertChainNoiseCertificateDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.serial = reader.uint32(); + break; + case 2: + message.issuerSerial = reader.uint32(); + break; + case 3: + message.key = reader.bytes(); + break; + case 4: + message.notBefore = reader.uint64(); + break; + case 5: + message.notAfter = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CertChainNoiseCertificateDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.CertChainNoiseCertificateDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.CertChainNoiseCertificateDetails} CertChainNoiseCertificateDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertChainNoiseCertificateDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CertChainNoiseCertificateDetails message. + * @function verify + * @memberof proto.CertChainNoiseCertificateDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CertChainNoiseCertificateDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.serial != null && message.hasOwnProperty("serial")) + if (!$util.isInteger(message.serial)) + return "serial: integer expected"; + if (message.issuerSerial != null && message.hasOwnProperty("issuerSerial")) + if (!$util.isInteger(message.issuerSerial)) + return "issuerSerial: integer expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + if (message.notBefore != null && message.hasOwnProperty("notBefore")) + if (!$util.isInteger(message.notBefore) && !(message.notBefore && $util.isInteger(message.notBefore.low) && $util.isInteger(message.notBefore.high))) + return "notBefore: integer|Long expected"; + if (message.notAfter != null && message.hasOwnProperty("notAfter")) + if (!$util.isInteger(message.notAfter) && !(message.notAfter && $util.isInteger(message.notAfter.low) && $util.isInteger(message.notAfter.high))) + return "notAfter: integer|Long expected"; + return null; + }; + + /** + * Creates a CertChainNoiseCertificateDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.CertChainNoiseCertificateDetails + * @static + * @param {Object.} object Plain object + * @returns {proto.CertChainNoiseCertificateDetails} CertChainNoiseCertificateDetails + */ + CertChainNoiseCertificateDetails.fromObject = function fromObject(object) { + if (object instanceof $root.proto.CertChainNoiseCertificateDetails) + return object; + var message = new $root.proto.CertChainNoiseCertificateDetails(); + if (object.serial != null) + message.serial = object.serial >>> 0; + if (object.issuerSerial != null) + message.issuerSerial = object.issuerSerial >>> 0; + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length) + message.key = object.key; + if (object.notBefore != null) + if ($util.Long) + (message.notBefore = $util.Long.fromValue(object.notBefore)).unsigned = true; + else if (typeof object.notBefore === "string") + message.notBefore = parseInt(object.notBefore, 10); + else if (typeof object.notBefore === "number") + message.notBefore = object.notBefore; + else if (typeof object.notBefore === "object") + message.notBefore = new $util.LongBits(object.notBefore.low >>> 0, object.notBefore.high >>> 0).toNumber(true); + if (object.notAfter != null) + if ($util.Long) + (message.notAfter = $util.Long.fromValue(object.notAfter)).unsigned = true; + else if (typeof object.notAfter === "string") + message.notAfter = parseInt(object.notAfter, 10); + else if (typeof object.notAfter === "number") + message.notAfter = object.notAfter; + else if (typeof object.notAfter === "object") + message.notAfter = new $util.LongBits(object.notAfter.low >>> 0, object.notAfter.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a CertChainNoiseCertificateDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.CertChainNoiseCertificateDetails + * @static + * @param {proto.CertChainNoiseCertificateDetails} message CertChainNoiseCertificateDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CertChainNoiseCertificateDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.serial = 0; + object.issuerSerial = 0; + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.notBefore = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.notBefore = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.notAfter = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.notAfter = options.longs === String ? "0" : 0; + } + if (message.serial != null && message.hasOwnProperty("serial")) + object.serial = message.serial; + if (message.issuerSerial != null && message.hasOwnProperty("issuerSerial")) + object.issuerSerial = message.issuerSerial; + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + if (message.notBefore != null && message.hasOwnProperty("notBefore")) + if (typeof message.notBefore === "number") + object.notBefore = options.longs === String ? String(message.notBefore) : message.notBefore; + else + object.notBefore = options.longs === String ? $util.Long.prototype.toString.call(message.notBefore) : options.longs === Number ? new $util.LongBits(message.notBefore.low >>> 0, message.notBefore.high >>> 0).toNumber(true) : message.notBefore; + if (message.notAfter != null && message.hasOwnProperty("notAfter")) + if (typeof message.notAfter === "number") + object.notAfter = options.longs === String ? String(message.notAfter) : message.notAfter; + else + object.notAfter = options.longs === String ? $util.Long.prototype.toString.call(message.notAfter) : options.longs === Number ? new $util.LongBits(message.notAfter.low >>> 0, message.notAfter.high >>> 0).toNumber(true) : message.notAfter; + return object; + }; + + /** + * Converts this CertChainNoiseCertificateDetails to JSON. + * @function toJSON + * @memberof proto.CertChainNoiseCertificateDetails + * @instance + * @returns {Object.} JSON object + */ + CertChainNoiseCertificateDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CertChainNoiseCertificateDetails; + })(); + + proto.Chain = (function() { + + /** + * Properties of a Chain. + * @memberof proto + * @interface IChain + * @property {Uint8Array|null} [senderRatchetKey] Chain senderRatchetKey + * @property {Uint8Array|null} [senderRatchetKeyPrivate] Chain senderRatchetKeyPrivate + * @property {proto.IChainKey|null} [chainKey] Chain chainKey + * @property {Array.|null} [messageKeys] Chain messageKeys + */ + + /** + * Constructs a new Chain. + * @memberof proto + * @classdesc Represents a Chain. + * @implements IChain + * @constructor + * @param {proto.IChain=} [properties] Properties to set + */ + function Chain(properties) { + this.messageKeys = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Chain senderRatchetKey. + * @member {Uint8Array} senderRatchetKey + * @memberof proto.Chain + * @instance + */ + Chain.prototype.senderRatchetKey = $util.newBuffer([]); + + /** + * Chain senderRatchetKeyPrivate. + * @member {Uint8Array} senderRatchetKeyPrivate + * @memberof proto.Chain + * @instance + */ + Chain.prototype.senderRatchetKeyPrivate = $util.newBuffer([]); + + /** + * Chain chainKey. + * @member {proto.IChainKey|null|undefined} chainKey + * @memberof proto.Chain + * @instance + */ + Chain.prototype.chainKey = null; + + /** + * Chain messageKeys. + * @member {Array.} messageKeys + * @memberof proto.Chain + * @instance + */ + Chain.prototype.messageKeys = $util.emptyArray; + + /** + * Creates a new Chain instance using the specified properties. + * @function create + * @memberof proto.Chain + * @static + * @param {proto.IChain=} [properties] Properties to set + * @returns {proto.Chain} Chain instance + */ + Chain.create = function create(properties) { + return new Chain(properties); + }; + + /** + * Encodes the specified Chain message. Does not implicitly {@link proto.Chain.verify|verify} messages. + * @function encode + * @memberof proto.Chain + * @static + * @param {proto.IChain} message Chain message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Chain.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.senderRatchetKey != null && Object.hasOwnProperty.call(message, "senderRatchetKey")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.senderRatchetKey); + if (message.senderRatchetKeyPrivate != null && Object.hasOwnProperty.call(message, "senderRatchetKeyPrivate")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.senderRatchetKeyPrivate); + if (message.chainKey != null && Object.hasOwnProperty.call(message, "chainKey")) + $root.proto.ChainKey.encode(message.chainKey, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.messageKeys != null && message.messageKeys.length) + for (var i = 0; i < message.messageKeys.length; ++i) + $root.proto.MessageKey.encode(message.messageKeys[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Chain message, length delimited. Does not implicitly {@link proto.Chain.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Chain + * @static + * @param {proto.IChain} message Chain message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Chain.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Chain message from the specified reader or buffer. + * @function decode + * @memberof proto.Chain + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Chain} Chain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Chain.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Chain(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.senderRatchetKey = reader.bytes(); + break; + case 2: + message.senderRatchetKeyPrivate = reader.bytes(); + break; + case 3: + message.chainKey = $root.proto.ChainKey.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.messageKeys && message.messageKeys.length)) + message.messageKeys = []; + message.messageKeys.push($root.proto.MessageKey.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Chain message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Chain + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Chain} Chain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Chain.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Chain message. + * @function verify + * @memberof proto.Chain + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Chain.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.senderRatchetKey != null && message.hasOwnProperty("senderRatchetKey")) + if (!(message.senderRatchetKey && typeof message.senderRatchetKey.length === "number" || $util.isString(message.senderRatchetKey))) + return "senderRatchetKey: buffer expected"; + if (message.senderRatchetKeyPrivate != null && message.hasOwnProperty("senderRatchetKeyPrivate")) + if (!(message.senderRatchetKeyPrivate && typeof message.senderRatchetKeyPrivate.length === "number" || $util.isString(message.senderRatchetKeyPrivate))) + return "senderRatchetKeyPrivate: buffer expected"; + if (message.chainKey != null && message.hasOwnProperty("chainKey")) { + var error = $root.proto.ChainKey.verify(message.chainKey); + if (error) + return "chainKey." + error; + } + if (message.messageKeys != null && message.hasOwnProperty("messageKeys")) { + if (!Array.isArray(message.messageKeys)) + return "messageKeys: array expected"; + for (var i = 0; i < message.messageKeys.length; ++i) { + var error = $root.proto.MessageKey.verify(message.messageKeys[i]); + if (error) + return "messageKeys." + error; + } + } + return null; + }; + + /** + * Creates a Chain message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Chain + * @static + * @param {Object.} object Plain object + * @returns {proto.Chain} Chain + */ + Chain.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Chain) + return object; + var message = new $root.proto.Chain(); + if (object.senderRatchetKey != null) + if (typeof object.senderRatchetKey === "string") + $util.base64.decode(object.senderRatchetKey, message.senderRatchetKey = $util.newBuffer($util.base64.length(object.senderRatchetKey)), 0); + else if (object.senderRatchetKey.length) + message.senderRatchetKey = object.senderRatchetKey; + if (object.senderRatchetKeyPrivate != null) + if (typeof object.senderRatchetKeyPrivate === "string") + $util.base64.decode(object.senderRatchetKeyPrivate, message.senderRatchetKeyPrivate = $util.newBuffer($util.base64.length(object.senderRatchetKeyPrivate)), 0); + else if (object.senderRatchetKeyPrivate.length) + message.senderRatchetKeyPrivate = object.senderRatchetKeyPrivate; + if (object.chainKey != null) { + if (typeof object.chainKey !== "object") + throw TypeError(".proto.Chain.chainKey: object expected"); + message.chainKey = $root.proto.ChainKey.fromObject(object.chainKey); + } + if (object.messageKeys) { + if (!Array.isArray(object.messageKeys)) + throw TypeError(".proto.Chain.messageKeys: array expected"); + message.messageKeys = []; + for (var i = 0; i < object.messageKeys.length; ++i) { + if (typeof object.messageKeys[i] !== "object") + throw TypeError(".proto.Chain.messageKeys: object expected"); + message.messageKeys[i] = $root.proto.MessageKey.fromObject(object.messageKeys[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Chain message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Chain + * @static + * @param {proto.Chain} message Chain + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Chain.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.messageKeys = []; + if (options.defaults) { + if (options.bytes === String) + object.senderRatchetKey = ""; + else { + object.senderRatchetKey = []; + if (options.bytes !== Array) + object.senderRatchetKey = $util.newBuffer(object.senderRatchetKey); + } + if (options.bytes === String) + object.senderRatchetKeyPrivate = ""; + else { + object.senderRatchetKeyPrivate = []; + if (options.bytes !== Array) + object.senderRatchetKeyPrivate = $util.newBuffer(object.senderRatchetKeyPrivate); + } + object.chainKey = null; + } + if (message.senderRatchetKey != null && message.hasOwnProperty("senderRatchetKey")) + object.senderRatchetKey = options.bytes === String ? $util.base64.encode(message.senderRatchetKey, 0, message.senderRatchetKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.senderRatchetKey) : message.senderRatchetKey; + if (message.senderRatchetKeyPrivate != null && message.hasOwnProperty("senderRatchetKeyPrivate")) + object.senderRatchetKeyPrivate = options.bytes === String ? $util.base64.encode(message.senderRatchetKeyPrivate, 0, message.senderRatchetKeyPrivate.length) : options.bytes === Array ? Array.prototype.slice.call(message.senderRatchetKeyPrivate) : message.senderRatchetKeyPrivate; + if (message.chainKey != null && message.hasOwnProperty("chainKey")) + object.chainKey = $root.proto.ChainKey.toObject(message.chainKey, options); + if (message.messageKeys && message.messageKeys.length) { + object.messageKeys = []; + for (var j = 0; j < message.messageKeys.length; ++j) + object.messageKeys[j] = $root.proto.MessageKey.toObject(message.messageKeys[j], options); + } + return object; + }; + + /** + * Converts this Chain to JSON. + * @function toJSON + * @memberof proto.Chain + * @instance + * @returns {Object.} JSON object + */ + Chain.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Chain; + })(); + + proto.ChainKey = (function() { + + /** + * Properties of a ChainKey. + * @memberof proto + * @interface IChainKey + * @property {number|null} [index] ChainKey index + * @property {Uint8Array|null} [key] ChainKey key + */ + + /** + * Constructs a new ChainKey. + * @memberof proto + * @classdesc Represents a ChainKey. + * @implements IChainKey + * @constructor + * @param {proto.IChainKey=} [properties] Properties to set + */ + function ChainKey(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChainKey index. + * @member {number} index + * @memberof proto.ChainKey + * @instance + */ + ChainKey.prototype.index = 0; + + /** + * ChainKey key. + * @member {Uint8Array} key + * @memberof proto.ChainKey + * @instance + */ + ChainKey.prototype.key = $util.newBuffer([]); + + /** + * Creates a new ChainKey instance using the specified properties. + * @function create + * @memberof proto.ChainKey + * @static + * @param {proto.IChainKey=} [properties] Properties to set + * @returns {proto.ChainKey} ChainKey instance + */ + ChainKey.create = function create(properties) { + return new ChainKey(properties); + }; + + /** + * Encodes the specified ChainKey message. Does not implicitly {@link proto.ChainKey.verify|verify} messages. + * @function encode + * @memberof proto.ChainKey + * @static + * @param {proto.IChainKey} message ChainKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChainKey.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.index); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.key); + return writer; + }; + + /** + * Encodes the specified ChainKey message, length delimited. Does not implicitly {@link proto.ChainKey.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ChainKey + * @static + * @param {proto.IChainKey} message ChainKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChainKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChainKey message from the specified reader or buffer. + * @function decode + * @memberof proto.ChainKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ChainKey} ChainKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChainKey.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ChainKey(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.index = reader.uint32(); + break; + case 2: + message.key = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ChainKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ChainKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ChainKey} ChainKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChainKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChainKey message. + * @function verify + * @memberof proto.ChainKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChainKey.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.index != null && message.hasOwnProperty("index")) + if (!$util.isInteger(message.index)) + return "index: integer expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + return null; + }; + + /** + * Creates a ChainKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ChainKey + * @static + * @param {Object.} object Plain object + * @returns {proto.ChainKey} ChainKey + */ + ChainKey.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ChainKey) + return object; + var message = new $root.proto.ChainKey(); + if (object.index != null) + message.index = object.index >>> 0; + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length) + message.key = object.key; + return message; + }; + + /** + * Creates a plain object from a ChainKey message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ChainKey + * @static + * @param {proto.ChainKey} message ChainKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChainKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.index = 0; + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + } + if (message.index != null && message.hasOwnProperty("index")) + object.index = message.index; + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + return object; + }; + + /** + * Converts this ChainKey to JSON. + * @function toJSON + * @memberof proto.ChainKey + * @instance + * @returns {Object.} JSON object + */ + ChainKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ChainKey; + })(); + proto.Chat = (function() { /** @@ -7038,6 +9873,1688 @@ $root.proto = (function() { return Chat; })(); + proto.ClearChatAction = (function() { + + /** + * Properties of a ClearChatAction. + * @memberof proto + * @interface IClearChatAction + * @property {proto.ISyncActionMessageRange|null} [messageRange] ClearChatAction messageRange + */ + + /** + * Constructs a new ClearChatAction. + * @memberof proto + * @classdesc Represents a ClearChatAction. + * @implements IClearChatAction + * @constructor + * @param {proto.IClearChatAction=} [properties] Properties to set + */ + function ClearChatAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClearChatAction messageRange. + * @member {proto.ISyncActionMessageRange|null|undefined} messageRange + * @memberof proto.ClearChatAction + * @instance + */ + ClearChatAction.prototype.messageRange = null; + + /** + * Creates a new ClearChatAction instance using the specified properties. + * @function create + * @memberof proto.ClearChatAction + * @static + * @param {proto.IClearChatAction=} [properties] Properties to set + * @returns {proto.ClearChatAction} ClearChatAction instance + */ + ClearChatAction.create = function create(properties) { + return new ClearChatAction(properties); + }; + + /** + * Encodes the specified ClearChatAction message. Does not implicitly {@link proto.ClearChatAction.verify|verify} messages. + * @function encode + * @memberof proto.ClearChatAction + * @static + * @param {proto.IClearChatAction} message ClearChatAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClearChatAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageRange != null && Object.hasOwnProperty.call(message, "messageRange")) + $root.proto.SyncActionMessageRange.encode(message.messageRange, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClearChatAction message, length delimited. Does not implicitly {@link proto.ClearChatAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ClearChatAction + * @static + * @param {proto.IClearChatAction} message ClearChatAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClearChatAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClearChatAction message from the specified reader or buffer. + * @function decode + * @memberof proto.ClearChatAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ClearChatAction} ClearChatAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClearChatAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ClearChatAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.messageRange = $root.proto.SyncActionMessageRange.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClearChatAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ClearChatAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ClearChatAction} ClearChatAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClearChatAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClearChatAction message. + * @function verify + * @memberof proto.ClearChatAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClearChatAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageRange != null && message.hasOwnProperty("messageRange")) { + var error = $root.proto.SyncActionMessageRange.verify(message.messageRange); + if (error) + return "messageRange." + error; + } + return null; + }; + + /** + * Creates a ClearChatAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ClearChatAction + * @static + * @param {Object.} object Plain object + * @returns {proto.ClearChatAction} ClearChatAction + */ + ClearChatAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ClearChatAction) + return object; + var message = new $root.proto.ClearChatAction(); + if (object.messageRange != null) { + if (typeof object.messageRange !== "object") + throw TypeError(".proto.ClearChatAction.messageRange: object expected"); + message.messageRange = $root.proto.SyncActionMessageRange.fromObject(object.messageRange); + } + return message; + }; + + /** + * Creates a plain object from a ClearChatAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ClearChatAction + * @static + * @param {proto.ClearChatAction} message ClearChatAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClearChatAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.messageRange = null; + if (message.messageRange != null && message.hasOwnProperty("messageRange")) + object.messageRange = $root.proto.SyncActionMessageRange.toObject(message.messageRange, options); + return object; + }; + + /** + * Converts this ClearChatAction to JSON. + * @function toJSON + * @memberof proto.ClearChatAction + * @instance + * @returns {Object.} JSON object + */ + ClearChatAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ClearChatAction; + })(); + + proto.ClientFinish = (function() { + + /** + * Properties of a ClientFinish. + * @memberof proto + * @interface IClientFinish + * @property {Uint8Array|null} ["static"] ClientFinish static + * @property {Uint8Array|null} [payload] ClientFinish payload + */ + + /** + * Constructs a new ClientFinish. + * @memberof proto + * @classdesc Represents a ClientFinish. + * @implements IClientFinish + * @constructor + * @param {proto.IClientFinish=} [properties] Properties to set + */ + function ClientFinish(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClientFinish static. + * @member {Uint8Array} static + * @memberof proto.ClientFinish + * @instance + */ + ClientFinish.prototype["static"] = $util.newBuffer([]); + + /** + * ClientFinish payload. + * @member {Uint8Array} payload + * @memberof proto.ClientFinish + * @instance + */ + ClientFinish.prototype.payload = $util.newBuffer([]); + + /** + * Creates a new ClientFinish instance using the specified properties. + * @function create + * @memberof proto.ClientFinish + * @static + * @param {proto.IClientFinish=} [properties] Properties to set + * @returns {proto.ClientFinish} ClientFinish instance + */ + ClientFinish.create = function create(properties) { + return new ClientFinish(properties); + }; + + /** + * Encodes the specified ClientFinish message. Does not implicitly {@link proto.ClientFinish.verify|verify} messages. + * @function encode + * @memberof proto.ClientFinish + * @static + * @param {proto.IClientFinish} message ClientFinish message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientFinish.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message["static"] != null && Object.hasOwnProperty.call(message, "static")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message["static"]); + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.payload); + return writer; + }; + + /** + * Encodes the specified ClientFinish message, length delimited. Does not implicitly {@link proto.ClientFinish.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ClientFinish + * @static + * @param {proto.IClientFinish} message ClientFinish message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientFinish.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientFinish message from the specified reader or buffer. + * @function decode + * @memberof proto.ClientFinish + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ClientFinish} ClientFinish + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientFinish.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ClientFinish(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message["static"] = reader.bytes(); + break; + case 2: + message.payload = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientFinish message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ClientFinish + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ClientFinish} ClientFinish + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientFinish.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientFinish message. + * @function verify + * @memberof proto.ClientFinish + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientFinish.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message["static"] != null && message.hasOwnProperty("static")) + if (!(message["static"] && typeof message["static"].length === "number" || $util.isString(message["static"]))) + return "static: buffer expected"; + if (message.payload != null && message.hasOwnProperty("payload")) + if (!(message.payload && typeof message.payload.length === "number" || $util.isString(message.payload))) + return "payload: buffer expected"; + return null; + }; + + /** + * Creates a ClientFinish message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ClientFinish + * @static + * @param {Object.} object Plain object + * @returns {proto.ClientFinish} ClientFinish + */ + ClientFinish.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ClientFinish) + return object; + var message = new $root.proto.ClientFinish(); + if (object["static"] != null) + if (typeof object["static"] === "string") + $util.base64.decode(object["static"], message["static"] = $util.newBuffer($util.base64.length(object["static"])), 0); + else if (object["static"].length) + message["static"] = object["static"]; + if (object.payload != null) + if (typeof object.payload === "string") + $util.base64.decode(object.payload, message.payload = $util.newBuffer($util.base64.length(object.payload)), 0); + else if (object.payload.length) + message.payload = object.payload; + return message; + }; + + /** + * Creates a plain object from a ClientFinish message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ClientFinish + * @static + * @param {proto.ClientFinish} message ClientFinish + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientFinish.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object["static"] = ""; + else { + object["static"] = []; + if (options.bytes !== Array) + object["static"] = $util.newBuffer(object["static"]); + } + if (options.bytes === String) + object.payload = ""; + else { + object.payload = []; + if (options.bytes !== Array) + object.payload = $util.newBuffer(object.payload); + } + } + if (message["static"] != null && message.hasOwnProperty("static")) + object["static"] = options.bytes === String ? $util.base64.encode(message["static"], 0, message["static"].length) : options.bytes === Array ? Array.prototype.slice.call(message["static"]) : message["static"]; + if (message.payload != null && message.hasOwnProperty("payload")) + object.payload = options.bytes === String ? $util.base64.encode(message.payload, 0, message.payload.length) : options.bytes === Array ? Array.prototype.slice.call(message.payload) : message.payload; + return object; + }; + + /** + * Converts this ClientFinish to JSON. + * @function toJSON + * @memberof proto.ClientFinish + * @instance + * @returns {Object.} JSON object + */ + ClientFinish.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ClientFinish; + })(); + + proto.ClientHello = (function() { + + /** + * Properties of a ClientHello. + * @memberof proto + * @interface IClientHello + * @property {Uint8Array|null} [ephemeral] ClientHello ephemeral + * @property {Uint8Array|null} ["static"] ClientHello static + * @property {Uint8Array|null} [payload] ClientHello payload + */ + + /** + * Constructs a new ClientHello. + * @memberof proto + * @classdesc Represents a ClientHello. + * @implements IClientHello + * @constructor + * @param {proto.IClientHello=} [properties] Properties to set + */ + function ClientHello(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClientHello ephemeral. + * @member {Uint8Array} ephemeral + * @memberof proto.ClientHello + * @instance + */ + ClientHello.prototype.ephemeral = $util.newBuffer([]); + + /** + * ClientHello static. + * @member {Uint8Array} static + * @memberof proto.ClientHello + * @instance + */ + ClientHello.prototype["static"] = $util.newBuffer([]); + + /** + * ClientHello payload. + * @member {Uint8Array} payload + * @memberof proto.ClientHello + * @instance + */ + ClientHello.prototype.payload = $util.newBuffer([]); + + /** + * Creates a new ClientHello instance using the specified properties. + * @function create + * @memberof proto.ClientHello + * @static + * @param {proto.IClientHello=} [properties] Properties to set + * @returns {proto.ClientHello} ClientHello instance + */ + ClientHello.create = function create(properties) { + return new ClientHello(properties); + }; + + /** + * Encodes the specified ClientHello message. Does not implicitly {@link proto.ClientHello.verify|verify} messages. + * @function encode + * @memberof proto.ClientHello + * @static + * @param {proto.IClientHello} message ClientHello message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientHello.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ephemeral != null && Object.hasOwnProperty.call(message, "ephemeral")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.ephemeral); + if (message["static"] != null && Object.hasOwnProperty.call(message, "static")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message["static"]); + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.payload); + return writer; + }; + + /** + * Encodes the specified ClientHello message, length delimited. Does not implicitly {@link proto.ClientHello.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ClientHello + * @static + * @param {proto.IClientHello} message ClientHello message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientHello.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientHello message from the specified reader or buffer. + * @function decode + * @memberof proto.ClientHello + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ClientHello} ClientHello + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientHello.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ClientHello(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.ephemeral = reader.bytes(); + break; + case 2: + message["static"] = reader.bytes(); + break; + case 3: + message.payload = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientHello message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ClientHello + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ClientHello} ClientHello + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientHello.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientHello message. + * @function verify + * @memberof proto.ClientHello + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientHello.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ephemeral != null && message.hasOwnProperty("ephemeral")) + if (!(message.ephemeral && typeof message.ephemeral.length === "number" || $util.isString(message.ephemeral))) + return "ephemeral: buffer expected"; + if (message["static"] != null && message.hasOwnProperty("static")) + if (!(message["static"] && typeof message["static"].length === "number" || $util.isString(message["static"]))) + return "static: buffer expected"; + if (message.payload != null && message.hasOwnProperty("payload")) + if (!(message.payload && typeof message.payload.length === "number" || $util.isString(message.payload))) + return "payload: buffer expected"; + return null; + }; + + /** + * Creates a ClientHello message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ClientHello + * @static + * @param {Object.} object Plain object + * @returns {proto.ClientHello} ClientHello + */ + ClientHello.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ClientHello) + return object; + var message = new $root.proto.ClientHello(); + if (object.ephemeral != null) + if (typeof object.ephemeral === "string") + $util.base64.decode(object.ephemeral, message.ephemeral = $util.newBuffer($util.base64.length(object.ephemeral)), 0); + else if (object.ephemeral.length) + message.ephemeral = object.ephemeral; + if (object["static"] != null) + if (typeof object["static"] === "string") + $util.base64.decode(object["static"], message["static"] = $util.newBuffer($util.base64.length(object["static"])), 0); + else if (object["static"].length) + message["static"] = object["static"]; + if (object.payload != null) + if (typeof object.payload === "string") + $util.base64.decode(object.payload, message.payload = $util.newBuffer($util.base64.length(object.payload)), 0); + else if (object.payload.length) + message.payload = object.payload; + return message; + }; + + /** + * Creates a plain object from a ClientHello message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ClientHello + * @static + * @param {proto.ClientHello} message ClientHello + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientHello.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.ephemeral = ""; + else { + object.ephemeral = []; + if (options.bytes !== Array) + object.ephemeral = $util.newBuffer(object.ephemeral); + } + if (options.bytes === String) + object["static"] = ""; + else { + object["static"] = []; + if (options.bytes !== Array) + object["static"] = $util.newBuffer(object["static"]); + } + if (options.bytes === String) + object.payload = ""; + else { + object.payload = []; + if (options.bytes !== Array) + object.payload = $util.newBuffer(object.payload); + } + } + if (message.ephemeral != null && message.hasOwnProperty("ephemeral")) + object.ephemeral = options.bytes === String ? $util.base64.encode(message.ephemeral, 0, message.ephemeral.length) : options.bytes === Array ? Array.prototype.slice.call(message.ephemeral) : message.ephemeral; + if (message["static"] != null && message.hasOwnProperty("static")) + object["static"] = options.bytes === String ? $util.base64.encode(message["static"], 0, message["static"].length) : options.bytes === Array ? Array.prototype.slice.call(message["static"]) : message["static"]; + if (message.payload != null && message.hasOwnProperty("payload")) + object.payload = options.bytes === String ? $util.base64.encode(message.payload, 0, message.payload.length) : options.bytes === Array ? Array.prototype.slice.call(message.payload) : message.payload; + return object; + }; + + /** + * Converts this ClientHello to JSON. + * @function toJSON + * @memberof proto.ClientHello + * @instance + * @returns {Object.} JSON object + */ + ClientHello.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ClientHello; + })(); + + proto.ClientPayload = (function() { + + /** + * Properties of a ClientPayload. + * @memberof proto + * @interface IClientPayload + * @property {number|Long|null} [username] ClientPayload username + * @property {boolean|null} [passive] ClientPayload passive + * @property {proto.IUserAgent|null} [userAgent] ClientPayload userAgent + * @property {proto.IWebInfo|null} [webInfo] ClientPayload webInfo + * @property {string|null} [pushName] ClientPayload pushName + * @property {number|null} [sessionId] ClientPayload sessionId + * @property {boolean|null} [shortConnect] ClientPayload shortConnect + * @property {proto.ClientPayload.ClientPayloadConnectType|null} [connectType] ClientPayload connectType + * @property {proto.ClientPayload.ClientPayloadConnectReason|null} [connectReason] ClientPayload connectReason + * @property {Array.|null} [shards] ClientPayload shards + * @property {proto.IDNSSource|null} [dnsSource] ClientPayload dnsSource + * @property {number|null} [connectAttemptCount] ClientPayload connectAttemptCount + * @property {number|null} [device] ClientPayload device + * @property {proto.IDevicePairingRegistrationData|null} [devicePairingData] ClientPayload devicePairingData + * @property {proto.ClientPayload.ClientPayloadProduct|null} [product] ClientPayload product + * @property {Uint8Array|null} [fbCat] ClientPayload fbCat + * @property {Uint8Array|null} [fbUserAgent] ClientPayload fbUserAgent + * @property {boolean|null} [oc] ClientPayload oc + * @property {number|null} [lc] ClientPayload lc + * @property {proto.ClientPayload.ClientPayloadIOSAppExtension|null} [iosAppExtension] ClientPayload iosAppExtension + * @property {number|Long|null} [fbAppId] ClientPayload fbAppId + * @property {Uint8Array|null} [fbDeviceId] ClientPayload fbDeviceId + * @property {boolean|null} [pull] ClientPayload pull + */ + + /** + * Constructs a new ClientPayload. + * @memberof proto + * @classdesc Represents a ClientPayload. + * @implements IClientPayload + * @constructor + * @param {proto.IClientPayload=} [properties] Properties to set + */ + function ClientPayload(properties) { + this.shards = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClientPayload username. + * @member {number|Long} username + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.username = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * ClientPayload passive. + * @member {boolean} passive + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.passive = false; + + /** + * ClientPayload userAgent. + * @member {proto.IUserAgent|null|undefined} userAgent + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.userAgent = null; + + /** + * ClientPayload webInfo. + * @member {proto.IWebInfo|null|undefined} webInfo + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.webInfo = null; + + /** + * ClientPayload pushName. + * @member {string} pushName + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.pushName = ""; + + /** + * ClientPayload sessionId. + * @member {number} sessionId + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.sessionId = 0; + + /** + * ClientPayload shortConnect. + * @member {boolean} shortConnect + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.shortConnect = false; + + /** + * ClientPayload connectType. + * @member {proto.ClientPayload.ClientPayloadConnectType} connectType + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.connectType = 0; + + /** + * ClientPayload connectReason. + * @member {proto.ClientPayload.ClientPayloadConnectReason} connectReason + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.connectReason = 0; + + /** + * ClientPayload shards. + * @member {Array.} shards + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.shards = $util.emptyArray; + + /** + * ClientPayload dnsSource. + * @member {proto.IDNSSource|null|undefined} dnsSource + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.dnsSource = null; + + /** + * ClientPayload connectAttemptCount. + * @member {number} connectAttemptCount + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.connectAttemptCount = 0; + + /** + * ClientPayload device. + * @member {number} device + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.device = 0; + + /** + * ClientPayload devicePairingData. + * @member {proto.IDevicePairingRegistrationData|null|undefined} devicePairingData + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.devicePairingData = null; + + /** + * ClientPayload product. + * @member {proto.ClientPayload.ClientPayloadProduct} product + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.product = 0; + + /** + * ClientPayload fbCat. + * @member {Uint8Array} fbCat + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.fbCat = $util.newBuffer([]); + + /** + * ClientPayload fbUserAgent. + * @member {Uint8Array} fbUserAgent + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.fbUserAgent = $util.newBuffer([]); + + /** + * ClientPayload oc. + * @member {boolean} oc + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.oc = false; + + /** + * ClientPayload lc. + * @member {number} lc + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.lc = 0; + + /** + * ClientPayload iosAppExtension. + * @member {proto.ClientPayload.ClientPayloadIOSAppExtension} iosAppExtension + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.iosAppExtension = 0; + + /** + * ClientPayload fbAppId. + * @member {number|Long} fbAppId + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.fbAppId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * ClientPayload fbDeviceId. + * @member {Uint8Array} fbDeviceId + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.fbDeviceId = $util.newBuffer([]); + + /** + * ClientPayload pull. + * @member {boolean} pull + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.pull = false; + + /** + * Creates a new ClientPayload instance using the specified properties. + * @function create + * @memberof proto.ClientPayload + * @static + * @param {proto.IClientPayload=} [properties] Properties to set + * @returns {proto.ClientPayload} ClientPayload instance + */ + ClientPayload.create = function create(properties) { + return new ClientPayload(properties); + }; + + /** + * Encodes the specified ClientPayload message. Does not implicitly {@link proto.ClientPayload.verify|verify} messages. + * @function encode + * @memberof proto.ClientPayload + * @static + * @param {proto.IClientPayload} message ClientPayload message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientPayload.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.username != null && Object.hasOwnProperty.call(message, "username")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.username); + if (message.passive != null && Object.hasOwnProperty.call(message, "passive")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.passive); + if (message.userAgent != null && Object.hasOwnProperty.call(message, "userAgent")) + $root.proto.UserAgent.encode(message.userAgent, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.webInfo != null && Object.hasOwnProperty.call(message, "webInfo")) + $root.proto.WebInfo.encode(message.webInfo, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.pushName != null && Object.hasOwnProperty.call(message, "pushName")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.pushName); + if (message.sessionId != null && Object.hasOwnProperty.call(message, "sessionId")) + writer.uint32(/* id 9, wireType 5 =*/77).sfixed32(message.sessionId); + if (message.shortConnect != null && Object.hasOwnProperty.call(message, "shortConnect")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.shortConnect); + if (message.connectType != null && Object.hasOwnProperty.call(message, "connectType")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.connectType); + if (message.connectReason != null && Object.hasOwnProperty.call(message, "connectReason")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.connectReason); + if (message.shards != null && message.shards.length) + for (var i = 0; i < message.shards.length; ++i) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.shards[i]); + if (message.dnsSource != null && Object.hasOwnProperty.call(message, "dnsSource")) + $root.proto.DNSSource.encode(message.dnsSource, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.connectAttemptCount != null && Object.hasOwnProperty.call(message, "connectAttemptCount")) + writer.uint32(/* id 16, wireType 0 =*/128).uint32(message.connectAttemptCount); + if (message.device != null && Object.hasOwnProperty.call(message, "device")) + writer.uint32(/* id 18, wireType 0 =*/144).uint32(message.device); + if (message.devicePairingData != null && Object.hasOwnProperty.call(message, "devicePairingData")) + $root.proto.DevicePairingRegistrationData.encode(message.devicePairingData, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.product != null && Object.hasOwnProperty.call(message, "product")) + writer.uint32(/* id 20, wireType 0 =*/160).int32(message.product); + if (message.fbCat != null && Object.hasOwnProperty.call(message, "fbCat")) + writer.uint32(/* id 21, wireType 2 =*/170).bytes(message.fbCat); + if (message.fbUserAgent != null && Object.hasOwnProperty.call(message, "fbUserAgent")) + writer.uint32(/* id 22, wireType 2 =*/178).bytes(message.fbUserAgent); + if (message.oc != null && Object.hasOwnProperty.call(message, "oc")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.oc); + if (message.lc != null && Object.hasOwnProperty.call(message, "lc")) + writer.uint32(/* id 24, wireType 0 =*/192).int32(message.lc); + if (message.iosAppExtension != null && Object.hasOwnProperty.call(message, "iosAppExtension")) + writer.uint32(/* id 30, wireType 0 =*/240).int32(message.iosAppExtension); + if (message.fbAppId != null && Object.hasOwnProperty.call(message, "fbAppId")) + writer.uint32(/* id 31, wireType 0 =*/248).uint64(message.fbAppId); + if (message.fbDeviceId != null && Object.hasOwnProperty.call(message, "fbDeviceId")) + writer.uint32(/* id 32, wireType 2 =*/258).bytes(message.fbDeviceId); + if (message.pull != null && Object.hasOwnProperty.call(message, "pull")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.pull); + return writer; + }; + + /** + * Encodes the specified ClientPayload message, length delimited. Does not implicitly {@link proto.ClientPayload.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ClientPayload + * @static + * @param {proto.IClientPayload} message ClientPayload message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientPayload.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientPayload message from the specified reader or buffer. + * @function decode + * @memberof proto.ClientPayload + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ClientPayload} ClientPayload + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientPayload.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ClientPayload(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.username = reader.uint64(); + break; + case 3: + message.passive = reader.bool(); + break; + case 5: + message.userAgent = $root.proto.UserAgent.decode(reader, reader.uint32()); + break; + case 6: + message.webInfo = $root.proto.WebInfo.decode(reader, reader.uint32()); + break; + case 7: + message.pushName = reader.string(); + break; + case 9: + message.sessionId = reader.sfixed32(); + break; + case 10: + message.shortConnect = reader.bool(); + break; + case 12: + message.connectType = reader.int32(); + break; + case 13: + message.connectReason = reader.int32(); + break; + case 14: + if (!(message.shards && message.shards.length)) + message.shards = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.shards.push(reader.int32()); + } else + message.shards.push(reader.int32()); + break; + case 15: + message.dnsSource = $root.proto.DNSSource.decode(reader, reader.uint32()); + break; + case 16: + message.connectAttemptCount = reader.uint32(); + break; + case 18: + message.device = reader.uint32(); + break; + case 19: + message.devicePairingData = $root.proto.DevicePairingRegistrationData.decode(reader, reader.uint32()); + break; + case 20: + message.product = reader.int32(); + break; + case 21: + message.fbCat = reader.bytes(); + break; + case 22: + message.fbUserAgent = reader.bytes(); + break; + case 23: + message.oc = reader.bool(); + break; + case 24: + message.lc = reader.int32(); + break; + case 30: + message.iosAppExtension = reader.int32(); + break; + case 31: + message.fbAppId = reader.uint64(); + break; + case 32: + message.fbDeviceId = reader.bytes(); + break; + case 33: + message.pull = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientPayload message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ClientPayload + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ClientPayload} ClientPayload + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientPayload.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientPayload message. + * @function verify + * @memberof proto.ClientPayload + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientPayload.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.username != null && message.hasOwnProperty("username")) + if (!$util.isInteger(message.username) && !(message.username && $util.isInteger(message.username.low) && $util.isInteger(message.username.high))) + return "username: integer|Long expected"; + if (message.passive != null && message.hasOwnProperty("passive")) + if (typeof message.passive !== "boolean") + return "passive: boolean expected"; + if (message.userAgent != null && message.hasOwnProperty("userAgent")) { + var error = $root.proto.UserAgent.verify(message.userAgent); + if (error) + return "userAgent." + error; + } + if (message.webInfo != null && message.hasOwnProperty("webInfo")) { + var error = $root.proto.WebInfo.verify(message.webInfo); + if (error) + return "webInfo." + error; + } + if (message.pushName != null && message.hasOwnProperty("pushName")) + if (!$util.isString(message.pushName)) + return "pushName: string expected"; + if (message.sessionId != null && message.hasOwnProperty("sessionId")) + if (!$util.isInteger(message.sessionId)) + return "sessionId: integer expected"; + if (message.shortConnect != null && message.hasOwnProperty("shortConnect")) + if (typeof message.shortConnect !== "boolean") + return "shortConnect: boolean expected"; + if (message.connectType != null && message.hasOwnProperty("connectType")) + switch (message.connectType) { + default: + return "connectType: enum value expected"; + case 0: + case 1: + case 100: + case 101: + case 102: + case 103: + case 104: + case 105: + case 106: + case 107: + case 108: + case 109: + case 110: + case 111: + case 112: + break; + } + if (message.connectReason != null && message.hasOwnProperty("connectReason")) + switch (message.connectReason) { + default: + return "connectReason: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.shards != null && message.hasOwnProperty("shards")) { + if (!Array.isArray(message.shards)) + return "shards: array expected"; + for (var i = 0; i < message.shards.length; ++i) + if (!$util.isInteger(message.shards[i])) + return "shards: integer[] expected"; + } + if (message.dnsSource != null && message.hasOwnProperty("dnsSource")) { + var error = $root.proto.DNSSource.verify(message.dnsSource); + if (error) + return "dnsSource." + error; + } + if (message.connectAttemptCount != null && message.hasOwnProperty("connectAttemptCount")) + if (!$util.isInteger(message.connectAttemptCount)) + return "connectAttemptCount: integer expected"; + if (message.device != null && message.hasOwnProperty("device")) + if (!$util.isInteger(message.device)) + return "device: integer expected"; + if (message.devicePairingData != null && message.hasOwnProperty("devicePairingData")) { + var error = $root.proto.DevicePairingRegistrationData.verify(message.devicePairingData); + if (error) + return "devicePairingData." + error; + } + if (message.product != null && message.hasOwnProperty("product")) + switch (message.product) { + default: + return "product: enum value expected"; + case 0: + case 1: + break; + } + if (message.fbCat != null && message.hasOwnProperty("fbCat")) + if (!(message.fbCat && typeof message.fbCat.length === "number" || $util.isString(message.fbCat))) + return "fbCat: buffer expected"; + if (message.fbUserAgent != null && message.hasOwnProperty("fbUserAgent")) + if (!(message.fbUserAgent && typeof message.fbUserAgent.length === "number" || $util.isString(message.fbUserAgent))) + return "fbUserAgent: buffer expected"; + if (message.oc != null && message.hasOwnProperty("oc")) + if (typeof message.oc !== "boolean") + return "oc: boolean expected"; + if (message.lc != null && message.hasOwnProperty("lc")) + if (!$util.isInteger(message.lc)) + return "lc: integer expected"; + if (message.iosAppExtension != null && message.hasOwnProperty("iosAppExtension")) + switch (message.iosAppExtension) { + default: + return "iosAppExtension: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.fbAppId != null && message.hasOwnProperty("fbAppId")) + if (!$util.isInteger(message.fbAppId) && !(message.fbAppId && $util.isInteger(message.fbAppId.low) && $util.isInteger(message.fbAppId.high))) + return "fbAppId: integer|Long expected"; + if (message.fbDeviceId != null && message.hasOwnProperty("fbDeviceId")) + if (!(message.fbDeviceId && typeof message.fbDeviceId.length === "number" || $util.isString(message.fbDeviceId))) + return "fbDeviceId: buffer expected"; + if (message.pull != null && message.hasOwnProperty("pull")) + if (typeof message.pull !== "boolean") + return "pull: boolean expected"; + return null; + }; + + /** + * Creates a ClientPayload message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ClientPayload + * @static + * @param {Object.} object Plain object + * @returns {proto.ClientPayload} ClientPayload + */ + ClientPayload.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ClientPayload) + return object; + var message = new $root.proto.ClientPayload(); + if (object.username != null) + if ($util.Long) + (message.username = $util.Long.fromValue(object.username)).unsigned = true; + else if (typeof object.username === "string") + message.username = parseInt(object.username, 10); + else if (typeof object.username === "number") + message.username = object.username; + else if (typeof object.username === "object") + message.username = new $util.LongBits(object.username.low >>> 0, object.username.high >>> 0).toNumber(true); + if (object.passive != null) + message.passive = Boolean(object.passive); + if (object.userAgent != null) { + if (typeof object.userAgent !== "object") + throw TypeError(".proto.ClientPayload.userAgent: object expected"); + message.userAgent = $root.proto.UserAgent.fromObject(object.userAgent); + } + if (object.webInfo != null) { + if (typeof object.webInfo !== "object") + throw TypeError(".proto.ClientPayload.webInfo: object expected"); + message.webInfo = $root.proto.WebInfo.fromObject(object.webInfo); + } + if (object.pushName != null) + message.pushName = String(object.pushName); + if (object.sessionId != null) + message.sessionId = object.sessionId | 0; + if (object.shortConnect != null) + message.shortConnect = Boolean(object.shortConnect); + switch (object.connectType) { + case "CELLULAR_UNKNOWN": + case 0: + message.connectType = 0; + break; + case "WIFI_UNKNOWN": + case 1: + message.connectType = 1; + break; + case "CELLULAR_EDGE": + case 100: + message.connectType = 100; + break; + case "CELLULAR_IDEN": + case 101: + message.connectType = 101; + break; + case "CELLULAR_UMTS": + case 102: + message.connectType = 102; + break; + case "CELLULAR_EVDO": + case 103: + message.connectType = 103; + break; + case "CELLULAR_GPRS": + case 104: + message.connectType = 104; + break; + case "CELLULAR_HSDPA": + case 105: + message.connectType = 105; + break; + case "CELLULAR_HSUPA": + case 106: + message.connectType = 106; + break; + case "CELLULAR_HSPA": + case 107: + message.connectType = 107; + break; + case "CELLULAR_CDMA": + case 108: + message.connectType = 108; + break; + case "CELLULAR_1XRTT": + case 109: + message.connectType = 109; + break; + case "CELLULAR_EHRPD": + case 110: + message.connectType = 110; + break; + case "CELLULAR_LTE": + case 111: + message.connectType = 111; + break; + case "CELLULAR_HSPAP": + case 112: + message.connectType = 112; + break; + } + switch (object.connectReason) { + case "PUSH": + case 0: + message.connectReason = 0; + break; + case "USER_ACTIVATED": + case 1: + message.connectReason = 1; + break; + case "SCHEDULED": + case 2: + message.connectReason = 2; + break; + case "ERROR_RECONNECT": + case 3: + message.connectReason = 3; + break; + case "NETWORK_SWITCH": + case 4: + message.connectReason = 4; + break; + case "PING_RECONNECT": + case 5: + message.connectReason = 5; + break; + } + if (object.shards) { + if (!Array.isArray(object.shards)) + throw TypeError(".proto.ClientPayload.shards: array expected"); + message.shards = []; + for (var i = 0; i < object.shards.length; ++i) + message.shards[i] = object.shards[i] | 0; + } + if (object.dnsSource != null) { + if (typeof object.dnsSource !== "object") + throw TypeError(".proto.ClientPayload.dnsSource: object expected"); + message.dnsSource = $root.proto.DNSSource.fromObject(object.dnsSource); + } + if (object.connectAttemptCount != null) + message.connectAttemptCount = object.connectAttemptCount >>> 0; + if (object.device != null) + message.device = object.device >>> 0; + if (object.devicePairingData != null) { + if (typeof object.devicePairingData !== "object") + throw TypeError(".proto.ClientPayload.devicePairingData: object expected"); + message.devicePairingData = $root.proto.DevicePairingRegistrationData.fromObject(object.devicePairingData); + } + switch (object.product) { + case "WHATSAPP": + case 0: + message.product = 0; + break; + case "MESSENGER": + case 1: + message.product = 1; + break; + } + if (object.fbCat != null) + if (typeof object.fbCat === "string") + $util.base64.decode(object.fbCat, message.fbCat = $util.newBuffer($util.base64.length(object.fbCat)), 0); + else if (object.fbCat.length) + message.fbCat = object.fbCat; + if (object.fbUserAgent != null) + if (typeof object.fbUserAgent === "string") + $util.base64.decode(object.fbUserAgent, message.fbUserAgent = $util.newBuffer($util.base64.length(object.fbUserAgent)), 0); + else if (object.fbUserAgent.length) + message.fbUserAgent = object.fbUserAgent; + if (object.oc != null) + message.oc = Boolean(object.oc); + if (object.lc != null) + message.lc = object.lc | 0; + switch (object.iosAppExtension) { + case "SHARE_EXTENSION": + case 0: + message.iosAppExtension = 0; + break; + case "SERVICE_EXTENSION": + case 1: + message.iosAppExtension = 1; + break; + case "INTENTS_EXTENSION": + case 2: + message.iosAppExtension = 2; + break; + } + if (object.fbAppId != null) + if ($util.Long) + (message.fbAppId = $util.Long.fromValue(object.fbAppId)).unsigned = true; + else if (typeof object.fbAppId === "string") + message.fbAppId = parseInt(object.fbAppId, 10); + else if (typeof object.fbAppId === "number") + message.fbAppId = object.fbAppId; + else if (typeof object.fbAppId === "object") + message.fbAppId = new $util.LongBits(object.fbAppId.low >>> 0, object.fbAppId.high >>> 0).toNumber(true); + if (object.fbDeviceId != null) + if (typeof object.fbDeviceId === "string") + $util.base64.decode(object.fbDeviceId, message.fbDeviceId = $util.newBuffer($util.base64.length(object.fbDeviceId)), 0); + else if (object.fbDeviceId.length) + message.fbDeviceId = object.fbDeviceId; + if (object.pull != null) + message.pull = Boolean(object.pull); + return message; + }; + + /** + * Creates a plain object from a ClientPayload message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ClientPayload + * @static + * @param {proto.ClientPayload} message ClientPayload + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientPayload.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.shards = []; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.username = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.username = options.longs === String ? "0" : 0; + object.passive = false; + object.userAgent = null; + object.webInfo = null; + object.pushName = ""; + object.sessionId = 0; + object.shortConnect = false; + object.connectType = options.enums === String ? "CELLULAR_UNKNOWN" : 0; + object.connectReason = options.enums === String ? "PUSH" : 0; + object.dnsSource = null; + object.connectAttemptCount = 0; + object.device = 0; + object.devicePairingData = null; + object.product = options.enums === String ? "WHATSAPP" : 0; + if (options.bytes === String) + object.fbCat = ""; + else { + object.fbCat = []; + if (options.bytes !== Array) + object.fbCat = $util.newBuffer(object.fbCat); + } + if (options.bytes === String) + object.fbUserAgent = ""; + else { + object.fbUserAgent = []; + if (options.bytes !== Array) + object.fbUserAgent = $util.newBuffer(object.fbUserAgent); + } + object.oc = false; + object.lc = 0; + object.iosAppExtension = options.enums === String ? "SHARE_EXTENSION" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.fbAppId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.fbAppId = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.fbDeviceId = ""; + else { + object.fbDeviceId = []; + if (options.bytes !== Array) + object.fbDeviceId = $util.newBuffer(object.fbDeviceId); + } + object.pull = false; + } + if (message.username != null && message.hasOwnProperty("username")) + if (typeof message.username === "number") + object.username = options.longs === String ? String(message.username) : message.username; + else + object.username = options.longs === String ? $util.Long.prototype.toString.call(message.username) : options.longs === Number ? new $util.LongBits(message.username.low >>> 0, message.username.high >>> 0).toNumber(true) : message.username; + if (message.passive != null && message.hasOwnProperty("passive")) + object.passive = message.passive; + if (message.userAgent != null && message.hasOwnProperty("userAgent")) + object.userAgent = $root.proto.UserAgent.toObject(message.userAgent, options); + if (message.webInfo != null && message.hasOwnProperty("webInfo")) + object.webInfo = $root.proto.WebInfo.toObject(message.webInfo, options); + if (message.pushName != null && message.hasOwnProperty("pushName")) + object.pushName = message.pushName; + if (message.sessionId != null && message.hasOwnProperty("sessionId")) + object.sessionId = message.sessionId; + if (message.shortConnect != null && message.hasOwnProperty("shortConnect")) + object.shortConnect = message.shortConnect; + if (message.connectType != null && message.hasOwnProperty("connectType")) + object.connectType = options.enums === String ? $root.proto.ClientPayload.ClientPayloadConnectType[message.connectType] : message.connectType; + if (message.connectReason != null && message.hasOwnProperty("connectReason")) + object.connectReason = options.enums === String ? $root.proto.ClientPayload.ClientPayloadConnectReason[message.connectReason] : message.connectReason; + if (message.shards && message.shards.length) { + object.shards = []; + for (var j = 0; j < message.shards.length; ++j) + object.shards[j] = message.shards[j]; + } + if (message.dnsSource != null && message.hasOwnProperty("dnsSource")) + object.dnsSource = $root.proto.DNSSource.toObject(message.dnsSource, options); + if (message.connectAttemptCount != null && message.hasOwnProperty("connectAttemptCount")) + object.connectAttemptCount = message.connectAttemptCount; + if (message.device != null && message.hasOwnProperty("device")) + object.device = message.device; + if (message.devicePairingData != null && message.hasOwnProperty("devicePairingData")) + object.devicePairingData = $root.proto.DevicePairingRegistrationData.toObject(message.devicePairingData, options); + if (message.product != null && message.hasOwnProperty("product")) + object.product = options.enums === String ? $root.proto.ClientPayload.ClientPayloadProduct[message.product] : message.product; + if (message.fbCat != null && message.hasOwnProperty("fbCat")) + object.fbCat = options.bytes === String ? $util.base64.encode(message.fbCat, 0, message.fbCat.length) : options.bytes === Array ? Array.prototype.slice.call(message.fbCat) : message.fbCat; + if (message.fbUserAgent != null && message.hasOwnProperty("fbUserAgent")) + object.fbUserAgent = options.bytes === String ? $util.base64.encode(message.fbUserAgent, 0, message.fbUserAgent.length) : options.bytes === Array ? Array.prototype.slice.call(message.fbUserAgent) : message.fbUserAgent; + if (message.oc != null && message.hasOwnProperty("oc")) + object.oc = message.oc; + if (message.lc != null && message.hasOwnProperty("lc")) + object.lc = message.lc; + if (message.iosAppExtension != null && message.hasOwnProperty("iosAppExtension")) + object.iosAppExtension = options.enums === String ? $root.proto.ClientPayload.ClientPayloadIOSAppExtension[message.iosAppExtension] : message.iosAppExtension; + if (message.fbAppId != null && message.hasOwnProperty("fbAppId")) + if (typeof message.fbAppId === "number") + object.fbAppId = options.longs === String ? String(message.fbAppId) : message.fbAppId; + else + object.fbAppId = options.longs === String ? $util.Long.prototype.toString.call(message.fbAppId) : options.longs === Number ? new $util.LongBits(message.fbAppId.low >>> 0, message.fbAppId.high >>> 0).toNumber(true) : message.fbAppId; + if (message.fbDeviceId != null && message.hasOwnProperty("fbDeviceId")) + object.fbDeviceId = options.bytes === String ? $util.base64.encode(message.fbDeviceId, 0, message.fbDeviceId.length) : options.bytes === Array ? Array.prototype.slice.call(message.fbDeviceId) : message.fbDeviceId; + if (message.pull != null && message.hasOwnProperty("pull")) + object.pull = message.pull; + return object; + }; + + /** + * Converts this ClientPayload to JSON. + * @function toJSON + * @memberof proto.ClientPayload + * @instance + * @returns {Object.} JSON object + */ + ClientPayload.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * ClientPayloadConnectType enum. + * @name proto.ClientPayload.ClientPayloadConnectType + * @enum {number} + * @property {number} CELLULAR_UNKNOWN=0 CELLULAR_UNKNOWN value + * @property {number} WIFI_UNKNOWN=1 WIFI_UNKNOWN value + * @property {number} CELLULAR_EDGE=100 CELLULAR_EDGE value + * @property {number} CELLULAR_IDEN=101 CELLULAR_IDEN value + * @property {number} CELLULAR_UMTS=102 CELLULAR_UMTS value + * @property {number} CELLULAR_EVDO=103 CELLULAR_EVDO value + * @property {number} CELLULAR_GPRS=104 CELLULAR_GPRS value + * @property {number} CELLULAR_HSDPA=105 CELLULAR_HSDPA value + * @property {number} CELLULAR_HSUPA=106 CELLULAR_HSUPA value + * @property {number} CELLULAR_HSPA=107 CELLULAR_HSPA value + * @property {number} CELLULAR_CDMA=108 CELLULAR_CDMA value + * @property {number} CELLULAR_1XRTT=109 CELLULAR_1XRTT value + * @property {number} CELLULAR_EHRPD=110 CELLULAR_EHRPD value + * @property {number} CELLULAR_LTE=111 CELLULAR_LTE value + * @property {number} CELLULAR_HSPAP=112 CELLULAR_HSPAP value + */ + ClientPayload.ClientPayloadConnectType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CELLULAR_UNKNOWN"] = 0; + values[valuesById[1] = "WIFI_UNKNOWN"] = 1; + values[valuesById[100] = "CELLULAR_EDGE"] = 100; + values[valuesById[101] = "CELLULAR_IDEN"] = 101; + values[valuesById[102] = "CELLULAR_UMTS"] = 102; + values[valuesById[103] = "CELLULAR_EVDO"] = 103; + values[valuesById[104] = "CELLULAR_GPRS"] = 104; + values[valuesById[105] = "CELLULAR_HSDPA"] = 105; + values[valuesById[106] = "CELLULAR_HSUPA"] = 106; + values[valuesById[107] = "CELLULAR_HSPA"] = 107; + values[valuesById[108] = "CELLULAR_CDMA"] = 108; + values[valuesById[109] = "CELLULAR_1XRTT"] = 109; + values[valuesById[110] = "CELLULAR_EHRPD"] = 110; + values[valuesById[111] = "CELLULAR_LTE"] = 111; + values[valuesById[112] = "CELLULAR_HSPAP"] = 112; + return values; + })(); + + /** + * ClientPayloadConnectReason enum. + * @name proto.ClientPayload.ClientPayloadConnectReason + * @enum {number} + * @property {number} PUSH=0 PUSH value + * @property {number} USER_ACTIVATED=1 USER_ACTIVATED value + * @property {number} SCHEDULED=2 SCHEDULED value + * @property {number} ERROR_RECONNECT=3 ERROR_RECONNECT value + * @property {number} NETWORK_SWITCH=4 NETWORK_SWITCH value + * @property {number} PING_RECONNECT=5 PING_RECONNECT value + */ + ClientPayload.ClientPayloadConnectReason = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PUSH"] = 0; + values[valuesById[1] = "USER_ACTIVATED"] = 1; + values[valuesById[2] = "SCHEDULED"] = 2; + values[valuesById[3] = "ERROR_RECONNECT"] = 3; + values[valuesById[4] = "NETWORK_SWITCH"] = 4; + values[valuesById[5] = "PING_RECONNECT"] = 5; + return values; + })(); + + /** + * ClientPayloadProduct enum. + * @name proto.ClientPayload.ClientPayloadProduct + * @enum {number} + * @property {number} WHATSAPP=0 WHATSAPP value + * @property {number} MESSENGER=1 MESSENGER value + */ + ClientPayload.ClientPayloadProduct = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "WHATSAPP"] = 0; + values[valuesById[1] = "MESSENGER"] = 1; + return values; + })(); + + /** + * ClientPayloadIOSAppExtension enum. + * @name proto.ClientPayload.ClientPayloadIOSAppExtension + * @enum {number} + * @property {number} SHARE_EXTENSION=0 SHARE_EXTENSION value + * @property {number} SERVICE_EXTENSION=1 SERVICE_EXTENSION value + * @property {number} INTENTS_EXTENSION=2 INTENTS_EXTENSION value + */ + ClientPayload.ClientPayloadIOSAppExtension = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SHARE_EXTENSION"] = 0; + values[valuesById[1] = "SERVICE_EXTENSION"] = 1; + values[valuesById[2] = "INTENTS_EXTENSION"] = 2; + return values; + })(); + + return ClientPayload; + })(); + proto.CollectionMessage = (function() { /** @@ -7270,6 +11787,216 @@ $root.proto = (function() { return CollectionMessage; })(); + proto.ContactAction = (function() { + + /** + * Properties of a ContactAction. + * @memberof proto + * @interface IContactAction + * @property {string|null} [fullName] ContactAction fullName + * @property {string|null} [firstName] ContactAction firstName + */ + + /** + * Constructs a new ContactAction. + * @memberof proto + * @classdesc Represents a ContactAction. + * @implements IContactAction + * @constructor + * @param {proto.IContactAction=} [properties] Properties to set + */ + function ContactAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ContactAction fullName. + * @member {string} fullName + * @memberof proto.ContactAction + * @instance + */ + ContactAction.prototype.fullName = ""; + + /** + * ContactAction firstName. + * @member {string} firstName + * @memberof proto.ContactAction + * @instance + */ + ContactAction.prototype.firstName = ""; + + /** + * Creates a new ContactAction instance using the specified properties. + * @function create + * @memberof proto.ContactAction + * @static + * @param {proto.IContactAction=} [properties] Properties to set + * @returns {proto.ContactAction} ContactAction instance + */ + ContactAction.create = function create(properties) { + return new ContactAction(properties); + }; + + /** + * Encodes the specified ContactAction message. Does not implicitly {@link proto.ContactAction.verify|verify} messages. + * @function encode + * @memberof proto.ContactAction + * @static + * @param {proto.IContactAction} message ContactAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContactAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fullName); + if (message.firstName != null && Object.hasOwnProperty.call(message, "firstName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.firstName); + return writer; + }; + + /** + * Encodes the specified ContactAction message, length delimited. Does not implicitly {@link proto.ContactAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ContactAction + * @static + * @param {proto.IContactAction} message ContactAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContactAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ContactAction message from the specified reader or buffer. + * @function decode + * @memberof proto.ContactAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ContactAction} ContactAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContactAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ContactAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.fullName = reader.string(); + break; + case 2: + message.firstName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ContactAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ContactAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ContactAction} ContactAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContactAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ContactAction message. + * @function verify + * @memberof proto.ContactAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ContactAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fullName != null && message.hasOwnProperty("fullName")) + if (!$util.isString(message.fullName)) + return "fullName: string expected"; + if (message.firstName != null && message.hasOwnProperty("firstName")) + if (!$util.isString(message.firstName)) + return "firstName: string expected"; + return null; + }; + + /** + * Creates a ContactAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ContactAction + * @static + * @param {Object.} object Plain object + * @returns {proto.ContactAction} ContactAction + */ + ContactAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ContactAction) + return object; + var message = new $root.proto.ContactAction(); + if (object.fullName != null) + message.fullName = String(object.fullName); + if (object.firstName != null) + message.firstName = String(object.firstName); + return message; + }; + + /** + * Creates a plain object from a ContactAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ContactAction + * @static + * @param {proto.ContactAction} message ContactAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ContactAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fullName = ""; + object.firstName = ""; + } + if (message.fullName != null && message.hasOwnProperty("fullName")) + object.fullName = message.fullName; + if (message.firstName != null && message.hasOwnProperty("firstName")) + object.firstName = message.firstName; + return object; + }; + + /** + * Converts this ContactAction to JSON. + * @function toJSON + * @memberof proto.ContactAction + * @instance + * @returns {Object.} JSON object + */ + ContactAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ContactAction; + })(); + proto.ContactMessage = (function() { /** @@ -7795,7 +12522,6 @@ $root.proto = (function() { * @property {proto.IActionLink|null} [actionLink] ContextInfo actionLink * @property {string|null} [groupSubject] ContextInfo groupSubject * @property {string|null} [parentGroupJid] ContextInfo parentGroupJid - * @property {Uint8Array|null} [messageSecret] ContextInfo messageSecret */ /** @@ -7998,14 +12724,6 @@ $root.proto = (function() { */ ContextInfo.prototype.parentGroupJid = ""; - /** - * ContextInfo messageSecret. - * @member {Uint8Array} messageSecret - * @memberof proto.ContextInfo - * @instance - */ - ContextInfo.prototype.messageSecret = $util.newBuffer([]); - /** * Creates a new ContextInfo instance using the specified properties. * @function create @@ -8077,8 +12795,6 @@ $root.proto = (function() { writer.uint32(/* id 34, wireType 2 =*/274).string(message.groupSubject); if (message.parentGroupJid != null && Object.hasOwnProperty.call(message, "parentGroupJid")) writer.uint32(/* id 35, wireType 2 =*/282).string(message.parentGroupJid); - if (message.messageSecret != null && Object.hasOwnProperty.call(message, "messageSecret")) - writer.uint32(/* id 36, wireType 2 =*/290).bytes(message.messageSecret); return writer; }; @@ -8184,9 +12900,6 @@ $root.proto = (function() { case 35: message.parentGroupJid = reader.string(); break; - case 36: - message.messageSecret = reader.bytes(); - break; default: reader.skipType(tag & 7); break; @@ -8307,9 +13020,6 @@ $root.proto = (function() { if (message.parentGroupJid != null && message.hasOwnProperty("parentGroupJid")) if (!$util.isString(message.parentGroupJid)) return "parentGroupJid: string expected"; - if (message.messageSecret != null && message.hasOwnProperty("messageSecret")) - if (!(message.messageSecret && typeof message.messageSecret.length === "number" || $util.isString(message.messageSecret))) - return "messageSecret: buffer expected"; return null; }; @@ -8407,11 +13117,6 @@ $root.proto = (function() { message.groupSubject = String(object.groupSubject); if (object.parentGroupJid != null) message.parentGroupJid = String(object.parentGroupJid); - if (object.messageSecret != null) - if (typeof object.messageSecret === "string") - $util.base64.decode(object.messageSecret, message.messageSecret = $util.newBuffer($util.base64.length(object.messageSecret)), 0); - else if (object.messageSecret.length) - message.messageSecret = object.messageSecret; return message; }; @@ -8469,13 +13174,6 @@ $root.proto = (function() { object.actionLink = null; object.groupSubject = ""; object.parentGroupJid = ""; - if (options.bytes === String) - object.messageSecret = ""; - else { - object.messageSecret = []; - if (options.bytes !== Array) - object.messageSecret = $util.newBuffer(object.messageSecret); - } } if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) object.stanzaId = message.stanzaId; @@ -8529,8 +13227,6 @@ $root.proto = (function() { object.groupSubject = message.groupSubject; if (message.parentGroupJid != null && message.hasOwnProperty("parentGroupJid")) object.parentGroupJid = message.parentGroupJid; - if (message.messageSecret != null && message.hasOwnProperty("messageSecret")) - object.messageSecret = options.bytes === String ? $util.base64.encode(message.messageSecret, 0, message.messageSecret.length) : options.bytes === Array ? Array.prototype.slice.call(message.messageSecret) : message.messageSecret; return object; }; @@ -8548,6 +13244,1525 @@ $root.proto = (function() { return ContextInfo; })(); + proto.Conversation = (function() { + + /** + * Properties of a Conversation. + * @memberof proto + * @interface IConversation + * @property {string} id Conversation id + * @property {Array.|null} [messages] Conversation messages + * @property {string|null} [newJid] Conversation newJid + * @property {string|null} [oldJid] Conversation oldJid + * @property {number|Long|null} [lastMsgTimestamp] Conversation lastMsgTimestamp + * @property {number|null} [unreadCount] Conversation unreadCount + * @property {boolean|null} [readOnly] Conversation readOnly + * @property {boolean|null} [endOfHistoryTransfer] Conversation endOfHistoryTransfer + * @property {number|null} [ephemeralExpiration] Conversation ephemeralExpiration + * @property {number|Long|null} [ephemeralSettingTimestamp] Conversation ephemeralSettingTimestamp + * @property {proto.Conversation.ConversationEndOfHistoryTransferType|null} [endOfHistoryTransferType] Conversation endOfHistoryTransferType + * @property {number|Long|null} [conversationTimestamp] Conversation conversationTimestamp + * @property {string|null} [name] Conversation name + * @property {string|null} [pHash] Conversation pHash + * @property {boolean|null} [notSpam] Conversation notSpam + * @property {boolean|null} [archived] Conversation archived + * @property {proto.IDisappearingMode|null} [disappearingMode] Conversation disappearingMode + * @property {number|null} [unreadMentionCount] Conversation unreadMentionCount + * @property {boolean|null} [markedAsUnread] Conversation markedAsUnread + * @property {Array.|null} [participant] Conversation participant + * @property {Uint8Array|null} [tcToken] Conversation tcToken + * @property {number|Long|null} [tcTokenTimestamp] Conversation tcTokenTimestamp + * @property {Uint8Array|null} [contactPrimaryIdentityKey] Conversation contactPrimaryIdentityKey + * @property {number|null} [pinned] Conversation pinned + * @property {number|Long|null} [muteEndTime] Conversation muteEndTime + * @property {proto.IWallpaperSettings|null} [wallpaper] Conversation wallpaper + * @property {proto.MediaVisibility|null} [mediaVisibility] Conversation mediaVisibility + * @property {number|Long|null} [tcTokenSenderTimestamp] Conversation tcTokenSenderTimestamp + * @property {boolean|null} [suspended] Conversation suspended + * @property {boolean|null} [terminated] Conversation terminated + * @property {number|Long|null} [createdAt] Conversation createdAt + * @property {string|null} [createdBy] Conversation createdBy + * @property {string|null} [description] Conversation description + * @property {boolean|null} [support] Conversation support + * @property {boolean|null} [isParentGroup] Conversation isParentGroup + * @property {boolean|null} [isDefaultSubgroup] Conversation isDefaultSubgroup + * @property {string|null} [parentGroupId] Conversation parentGroupId + * @property {string|null} [displayName] Conversation displayName + * @property {string|null} [pnJid] Conversation pnJid + * @property {boolean|null} [selfMasked] Conversation selfMasked + */ + + /** + * Constructs a new Conversation. + * @memberof proto + * @classdesc Represents a Conversation. + * @implements IConversation + * @constructor + * @param {proto.IConversation=} [properties] Properties to set + */ + function Conversation(properties) { + this.messages = []; + this.participant = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Conversation id. + * @member {string} id + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.id = ""; + + /** + * Conversation messages. + * @member {Array.} messages + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.messages = $util.emptyArray; + + /** + * Conversation newJid. + * @member {string} newJid + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.newJid = ""; + + /** + * Conversation oldJid. + * @member {string} oldJid + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.oldJid = ""; + + /** + * Conversation lastMsgTimestamp. + * @member {number|Long} lastMsgTimestamp + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.lastMsgTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Conversation unreadCount. + * @member {number} unreadCount + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.unreadCount = 0; + + /** + * Conversation readOnly. + * @member {boolean} readOnly + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.readOnly = false; + + /** + * Conversation endOfHistoryTransfer. + * @member {boolean} endOfHistoryTransfer + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.endOfHistoryTransfer = false; + + /** + * Conversation ephemeralExpiration. + * @member {number} ephemeralExpiration + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.ephemeralExpiration = 0; + + /** + * Conversation ephemeralSettingTimestamp. + * @member {number|Long} ephemeralSettingTimestamp + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.ephemeralSettingTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Conversation endOfHistoryTransferType. + * @member {proto.Conversation.ConversationEndOfHistoryTransferType} endOfHistoryTransferType + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.endOfHistoryTransferType = 0; + + /** + * Conversation conversationTimestamp. + * @member {number|Long} conversationTimestamp + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.conversationTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Conversation name. + * @member {string} name + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.name = ""; + + /** + * Conversation pHash. + * @member {string} pHash + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.pHash = ""; + + /** + * Conversation notSpam. + * @member {boolean} notSpam + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.notSpam = false; + + /** + * Conversation archived. + * @member {boolean} archived + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.archived = false; + + /** + * Conversation disappearingMode. + * @member {proto.IDisappearingMode|null|undefined} disappearingMode + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.disappearingMode = null; + + /** + * Conversation unreadMentionCount. + * @member {number} unreadMentionCount + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.unreadMentionCount = 0; + + /** + * Conversation markedAsUnread. + * @member {boolean} markedAsUnread + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.markedAsUnread = false; + + /** + * Conversation participant. + * @member {Array.} participant + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.participant = $util.emptyArray; + + /** + * Conversation tcToken. + * @member {Uint8Array} tcToken + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.tcToken = $util.newBuffer([]); + + /** + * Conversation tcTokenTimestamp. + * @member {number|Long} tcTokenTimestamp + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.tcTokenTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Conversation contactPrimaryIdentityKey. + * @member {Uint8Array} contactPrimaryIdentityKey + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.contactPrimaryIdentityKey = $util.newBuffer([]); + + /** + * Conversation pinned. + * @member {number} pinned + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.pinned = 0; + + /** + * Conversation muteEndTime. + * @member {number|Long} muteEndTime + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.muteEndTime = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Conversation wallpaper. + * @member {proto.IWallpaperSettings|null|undefined} wallpaper + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.wallpaper = null; + + /** + * Conversation mediaVisibility. + * @member {proto.MediaVisibility} mediaVisibility + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.mediaVisibility = 0; + + /** + * Conversation tcTokenSenderTimestamp. + * @member {number|Long} tcTokenSenderTimestamp + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.tcTokenSenderTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Conversation suspended. + * @member {boolean} suspended + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.suspended = false; + + /** + * Conversation terminated. + * @member {boolean} terminated + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.terminated = false; + + /** + * Conversation createdAt. + * @member {number|Long} createdAt + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.createdAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Conversation createdBy. + * @member {string} createdBy + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.createdBy = ""; + + /** + * Conversation description. + * @member {string} description + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.description = ""; + + /** + * Conversation support. + * @member {boolean} support + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.support = false; + + /** + * Conversation isParentGroup. + * @member {boolean} isParentGroup + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.isParentGroup = false; + + /** + * Conversation isDefaultSubgroup. + * @member {boolean} isDefaultSubgroup + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.isDefaultSubgroup = false; + + /** + * Conversation parentGroupId. + * @member {string} parentGroupId + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.parentGroupId = ""; + + /** + * Conversation displayName. + * @member {string} displayName + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.displayName = ""; + + /** + * Conversation pnJid. + * @member {string} pnJid + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.pnJid = ""; + + /** + * Conversation selfMasked. + * @member {boolean} selfMasked + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.selfMasked = false; + + /** + * Creates a new Conversation instance using the specified properties. + * @function create + * @memberof proto.Conversation + * @static + * @param {proto.IConversation=} [properties] Properties to set + * @returns {proto.Conversation} Conversation instance + */ + Conversation.create = function create(properties) { + return new Conversation(properties); + }; + + /** + * Encodes the specified Conversation message. Does not implicitly {@link proto.Conversation.verify|verify} messages. + * @function encode + * @memberof proto.Conversation + * @static + * @param {proto.IConversation} message Conversation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Conversation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.messages != null && message.messages.length) + for (var i = 0; i < message.messages.length; ++i) + $root.proto.HistorySyncMsg.encode(message.messages[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.newJid != null && Object.hasOwnProperty.call(message, "newJid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.newJid); + if (message.oldJid != null && Object.hasOwnProperty.call(message, "oldJid")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.oldJid); + if (message.lastMsgTimestamp != null && Object.hasOwnProperty.call(message, "lastMsgTimestamp")) + writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.lastMsgTimestamp); + if (message.unreadCount != null && Object.hasOwnProperty.call(message, "unreadCount")) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.unreadCount); + if (message.readOnly != null && Object.hasOwnProperty.call(message, "readOnly")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.readOnly); + if (message.endOfHistoryTransfer != null && Object.hasOwnProperty.call(message, "endOfHistoryTransfer")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.endOfHistoryTransfer); + if (message.ephemeralExpiration != null && Object.hasOwnProperty.call(message, "ephemeralExpiration")) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.ephemeralExpiration); + if (message.ephemeralSettingTimestamp != null && Object.hasOwnProperty.call(message, "ephemeralSettingTimestamp")) + writer.uint32(/* id 10, wireType 0 =*/80).int64(message.ephemeralSettingTimestamp); + if (message.endOfHistoryTransferType != null && Object.hasOwnProperty.call(message, "endOfHistoryTransferType")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.endOfHistoryTransferType); + if (message.conversationTimestamp != null && Object.hasOwnProperty.call(message, "conversationTimestamp")) + writer.uint32(/* id 12, wireType 0 =*/96).uint64(message.conversationTimestamp); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.name); + if (message.pHash != null && Object.hasOwnProperty.call(message, "pHash")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.pHash); + if (message.notSpam != null && Object.hasOwnProperty.call(message, "notSpam")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.notSpam); + if (message.archived != null && Object.hasOwnProperty.call(message, "archived")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.archived); + if (message.disappearingMode != null && Object.hasOwnProperty.call(message, "disappearingMode")) + $root.proto.DisappearingMode.encode(message.disappearingMode, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.unreadMentionCount != null && Object.hasOwnProperty.call(message, "unreadMentionCount")) + writer.uint32(/* id 18, wireType 0 =*/144).uint32(message.unreadMentionCount); + if (message.markedAsUnread != null && Object.hasOwnProperty.call(message, "markedAsUnread")) + writer.uint32(/* id 19, wireType 0 =*/152).bool(message.markedAsUnread); + if (message.participant != null && message.participant.length) + for (var i = 0; i < message.participant.length; ++i) + $root.proto.GroupParticipant.encode(message.participant[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.tcToken != null && Object.hasOwnProperty.call(message, "tcToken")) + writer.uint32(/* id 21, wireType 2 =*/170).bytes(message.tcToken); + if (message.tcTokenTimestamp != null && Object.hasOwnProperty.call(message, "tcTokenTimestamp")) + writer.uint32(/* id 22, wireType 0 =*/176).uint64(message.tcTokenTimestamp); + if (message.contactPrimaryIdentityKey != null && Object.hasOwnProperty.call(message, "contactPrimaryIdentityKey")) + writer.uint32(/* id 23, wireType 2 =*/186).bytes(message.contactPrimaryIdentityKey); + if (message.pinned != null && Object.hasOwnProperty.call(message, "pinned")) + writer.uint32(/* id 24, wireType 0 =*/192).uint32(message.pinned); + if (message.muteEndTime != null && Object.hasOwnProperty.call(message, "muteEndTime")) + writer.uint32(/* id 25, wireType 0 =*/200).uint64(message.muteEndTime); + if (message.wallpaper != null && Object.hasOwnProperty.call(message, "wallpaper")) + $root.proto.WallpaperSettings.encode(message.wallpaper, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.mediaVisibility != null && Object.hasOwnProperty.call(message, "mediaVisibility")) + writer.uint32(/* id 27, wireType 0 =*/216).int32(message.mediaVisibility); + if (message.tcTokenSenderTimestamp != null && Object.hasOwnProperty.call(message, "tcTokenSenderTimestamp")) + writer.uint32(/* id 28, wireType 0 =*/224).uint64(message.tcTokenSenderTimestamp); + if (message.suspended != null && Object.hasOwnProperty.call(message, "suspended")) + writer.uint32(/* id 29, wireType 0 =*/232).bool(message.suspended); + if (message.terminated != null && Object.hasOwnProperty.call(message, "terminated")) + writer.uint32(/* id 30, wireType 0 =*/240).bool(message.terminated); + if (message.createdAt != null && Object.hasOwnProperty.call(message, "createdAt")) + writer.uint32(/* id 31, wireType 0 =*/248).uint64(message.createdAt); + if (message.createdBy != null && Object.hasOwnProperty.call(message, "createdBy")) + writer.uint32(/* id 32, wireType 2 =*/258).string(message.createdBy); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 33, wireType 2 =*/266).string(message.description); + if (message.support != null && Object.hasOwnProperty.call(message, "support")) + writer.uint32(/* id 34, wireType 0 =*/272).bool(message.support); + if (message.isParentGroup != null && Object.hasOwnProperty.call(message, "isParentGroup")) + writer.uint32(/* id 35, wireType 0 =*/280).bool(message.isParentGroup); + if (message.isDefaultSubgroup != null && Object.hasOwnProperty.call(message, "isDefaultSubgroup")) + writer.uint32(/* id 36, wireType 0 =*/288).bool(message.isDefaultSubgroup); + if (message.parentGroupId != null && Object.hasOwnProperty.call(message, "parentGroupId")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.parentGroupId); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 38, wireType 2 =*/306).string(message.displayName); + if (message.pnJid != null && Object.hasOwnProperty.call(message, "pnJid")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.pnJid); + if (message.selfMasked != null && Object.hasOwnProperty.call(message, "selfMasked")) + writer.uint32(/* id 40, wireType 0 =*/320).bool(message.selfMasked); + return writer; + }; + + /** + * Encodes the specified Conversation message, length delimited. Does not implicitly {@link proto.Conversation.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Conversation + * @static + * @param {proto.IConversation} message Conversation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Conversation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Conversation message from the specified reader or buffer. + * @function decode + * @memberof proto.Conversation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Conversation} Conversation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Conversation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Conversation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + if (!(message.messages && message.messages.length)) + message.messages = []; + message.messages.push($root.proto.HistorySyncMsg.decode(reader, reader.uint32())); + break; + case 3: + message.newJid = reader.string(); + break; + case 4: + message.oldJid = reader.string(); + break; + case 5: + message.lastMsgTimestamp = reader.uint64(); + break; + case 6: + message.unreadCount = reader.uint32(); + break; + case 7: + message.readOnly = reader.bool(); + break; + case 8: + message.endOfHistoryTransfer = reader.bool(); + break; + case 9: + message.ephemeralExpiration = reader.uint32(); + break; + case 10: + message.ephemeralSettingTimestamp = reader.int64(); + break; + case 11: + message.endOfHistoryTransferType = reader.int32(); + break; + case 12: + message.conversationTimestamp = reader.uint64(); + break; + case 13: + message.name = reader.string(); + break; + case 14: + message.pHash = reader.string(); + break; + case 15: + message.notSpam = reader.bool(); + break; + case 16: + message.archived = reader.bool(); + break; + case 17: + message.disappearingMode = $root.proto.DisappearingMode.decode(reader, reader.uint32()); + break; + case 18: + message.unreadMentionCount = reader.uint32(); + break; + case 19: + message.markedAsUnread = reader.bool(); + break; + case 20: + if (!(message.participant && message.participant.length)) + message.participant = []; + message.participant.push($root.proto.GroupParticipant.decode(reader, reader.uint32())); + break; + case 21: + message.tcToken = reader.bytes(); + break; + case 22: + message.tcTokenTimestamp = reader.uint64(); + break; + case 23: + message.contactPrimaryIdentityKey = reader.bytes(); + break; + case 24: + message.pinned = reader.uint32(); + break; + case 25: + message.muteEndTime = reader.uint64(); + break; + case 26: + message.wallpaper = $root.proto.WallpaperSettings.decode(reader, reader.uint32()); + break; + case 27: + message.mediaVisibility = reader.int32(); + break; + case 28: + message.tcTokenSenderTimestamp = reader.uint64(); + break; + case 29: + message.suspended = reader.bool(); + break; + case 30: + message.terminated = reader.bool(); + break; + case 31: + message.createdAt = reader.uint64(); + break; + case 32: + message.createdBy = reader.string(); + break; + case 33: + message.description = reader.string(); + break; + case 34: + message.support = reader.bool(); + break; + case 35: + message.isParentGroup = reader.bool(); + break; + case 36: + message.isDefaultSubgroup = reader.bool(); + break; + case 37: + message.parentGroupId = reader.string(); + break; + case 38: + message.displayName = reader.string(); + break; + case 39: + message.pnJid = reader.string(); + break; + case 40: + message.selfMasked = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("id")) + throw $util.ProtocolError("missing required 'id'", { instance: message }); + return message; + }; + + /** + * Decodes a Conversation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Conversation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Conversation} Conversation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Conversation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Conversation message. + * @function verify + * @memberof proto.Conversation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Conversation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.messages != null && message.hasOwnProperty("messages")) { + if (!Array.isArray(message.messages)) + return "messages: array expected"; + for (var i = 0; i < message.messages.length; ++i) { + var error = $root.proto.HistorySyncMsg.verify(message.messages[i]); + if (error) + return "messages." + error; + } + } + if (message.newJid != null && message.hasOwnProperty("newJid")) + if (!$util.isString(message.newJid)) + return "newJid: string expected"; + if (message.oldJid != null && message.hasOwnProperty("oldJid")) + if (!$util.isString(message.oldJid)) + return "oldJid: string expected"; + if (message.lastMsgTimestamp != null && message.hasOwnProperty("lastMsgTimestamp")) + if (!$util.isInteger(message.lastMsgTimestamp) && !(message.lastMsgTimestamp && $util.isInteger(message.lastMsgTimestamp.low) && $util.isInteger(message.lastMsgTimestamp.high))) + return "lastMsgTimestamp: integer|Long expected"; + if (message.unreadCount != null && message.hasOwnProperty("unreadCount")) + if (!$util.isInteger(message.unreadCount)) + return "unreadCount: integer expected"; + if (message.readOnly != null && message.hasOwnProperty("readOnly")) + if (typeof message.readOnly !== "boolean") + return "readOnly: boolean expected"; + if (message.endOfHistoryTransfer != null && message.hasOwnProperty("endOfHistoryTransfer")) + if (typeof message.endOfHistoryTransfer !== "boolean") + return "endOfHistoryTransfer: boolean expected"; + if (message.ephemeralExpiration != null && message.hasOwnProperty("ephemeralExpiration")) + if (!$util.isInteger(message.ephemeralExpiration)) + return "ephemeralExpiration: integer expected"; + if (message.ephemeralSettingTimestamp != null && message.hasOwnProperty("ephemeralSettingTimestamp")) + if (!$util.isInteger(message.ephemeralSettingTimestamp) && !(message.ephemeralSettingTimestamp && $util.isInteger(message.ephemeralSettingTimestamp.low) && $util.isInteger(message.ephemeralSettingTimestamp.high))) + return "ephemeralSettingTimestamp: integer|Long expected"; + if (message.endOfHistoryTransferType != null && message.hasOwnProperty("endOfHistoryTransferType")) + switch (message.endOfHistoryTransferType) { + default: + return "endOfHistoryTransferType: enum value expected"; + case 0: + case 1: + break; + } + if (message.conversationTimestamp != null && message.hasOwnProperty("conversationTimestamp")) + if (!$util.isInteger(message.conversationTimestamp) && !(message.conversationTimestamp && $util.isInteger(message.conversationTimestamp.low) && $util.isInteger(message.conversationTimestamp.high))) + return "conversationTimestamp: integer|Long expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.pHash != null && message.hasOwnProperty("pHash")) + if (!$util.isString(message.pHash)) + return "pHash: string expected"; + if (message.notSpam != null && message.hasOwnProperty("notSpam")) + if (typeof message.notSpam !== "boolean") + return "notSpam: boolean expected"; + if (message.archived != null && message.hasOwnProperty("archived")) + if (typeof message.archived !== "boolean") + return "archived: boolean expected"; + if (message.disappearingMode != null && message.hasOwnProperty("disappearingMode")) { + var error = $root.proto.DisappearingMode.verify(message.disappearingMode); + if (error) + return "disappearingMode." + error; + } + if (message.unreadMentionCount != null && message.hasOwnProperty("unreadMentionCount")) + if (!$util.isInteger(message.unreadMentionCount)) + return "unreadMentionCount: integer expected"; + if (message.markedAsUnread != null && message.hasOwnProperty("markedAsUnread")) + if (typeof message.markedAsUnread !== "boolean") + return "markedAsUnread: boolean expected"; + if (message.participant != null && message.hasOwnProperty("participant")) { + if (!Array.isArray(message.participant)) + return "participant: array expected"; + for (var i = 0; i < message.participant.length; ++i) { + var error = $root.proto.GroupParticipant.verify(message.participant[i]); + if (error) + return "participant." + error; + } + } + if (message.tcToken != null && message.hasOwnProperty("tcToken")) + if (!(message.tcToken && typeof message.tcToken.length === "number" || $util.isString(message.tcToken))) + return "tcToken: buffer expected"; + if (message.tcTokenTimestamp != null && message.hasOwnProperty("tcTokenTimestamp")) + if (!$util.isInteger(message.tcTokenTimestamp) && !(message.tcTokenTimestamp && $util.isInteger(message.tcTokenTimestamp.low) && $util.isInteger(message.tcTokenTimestamp.high))) + return "tcTokenTimestamp: integer|Long expected"; + if (message.contactPrimaryIdentityKey != null && message.hasOwnProperty("contactPrimaryIdentityKey")) + if (!(message.contactPrimaryIdentityKey && typeof message.contactPrimaryIdentityKey.length === "number" || $util.isString(message.contactPrimaryIdentityKey))) + return "contactPrimaryIdentityKey: buffer expected"; + if (message.pinned != null && message.hasOwnProperty("pinned")) + if (!$util.isInteger(message.pinned)) + return "pinned: integer expected"; + if (message.muteEndTime != null && message.hasOwnProperty("muteEndTime")) + if (!$util.isInteger(message.muteEndTime) && !(message.muteEndTime && $util.isInteger(message.muteEndTime.low) && $util.isInteger(message.muteEndTime.high))) + return "muteEndTime: integer|Long expected"; + if (message.wallpaper != null && message.hasOwnProperty("wallpaper")) { + var error = $root.proto.WallpaperSettings.verify(message.wallpaper); + if (error) + return "wallpaper." + error; + } + if (message.mediaVisibility != null && message.hasOwnProperty("mediaVisibility")) + switch (message.mediaVisibility) { + default: + return "mediaVisibility: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.tcTokenSenderTimestamp != null && message.hasOwnProperty("tcTokenSenderTimestamp")) + if (!$util.isInteger(message.tcTokenSenderTimestamp) && !(message.tcTokenSenderTimestamp && $util.isInteger(message.tcTokenSenderTimestamp.low) && $util.isInteger(message.tcTokenSenderTimestamp.high))) + return "tcTokenSenderTimestamp: integer|Long expected"; + if (message.suspended != null && message.hasOwnProperty("suspended")) + if (typeof message.suspended !== "boolean") + return "suspended: boolean expected"; + if (message.terminated != null && message.hasOwnProperty("terminated")) + if (typeof message.terminated !== "boolean") + return "terminated: boolean expected"; + if (message.createdAt != null && message.hasOwnProperty("createdAt")) + if (!$util.isInteger(message.createdAt) && !(message.createdAt && $util.isInteger(message.createdAt.low) && $util.isInteger(message.createdAt.high))) + return "createdAt: integer|Long expected"; + if (message.createdBy != null && message.hasOwnProperty("createdBy")) + if (!$util.isString(message.createdBy)) + return "createdBy: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.support != null && message.hasOwnProperty("support")) + if (typeof message.support !== "boolean") + return "support: boolean expected"; + if (message.isParentGroup != null && message.hasOwnProperty("isParentGroup")) + if (typeof message.isParentGroup !== "boolean") + return "isParentGroup: boolean expected"; + if (message.isDefaultSubgroup != null && message.hasOwnProperty("isDefaultSubgroup")) + if (typeof message.isDefaultSubgroup !== "boolean") + return "isDefaultSubgroup: boolean expected"; + if (message.parentGroupId != null && message.hasOwnProperty("parentGroupId")) + if (!$util.isString(message.parentGroupId)) + return "parentGroupId: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.pnJid != null && message.hasOwnProperty("pnJid")) + if (!$util.isString(message.pnJid)) + return "pnJid: string expected"; + if (message.selfMasked != null && message.hasOwnProperty("selfMasked")) + if (typeof message.selfMasked !== "boolean") + return "selfMasked: boolean expected"; + return null; + }; + + /** + * Creates a Conversation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Conversation + * @static + * @param {Object.} object Plain object + * @returns {proto.Conversation} Conversation + */ + Conversation.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Conversation) + return object; + var message = new $root.proto.Conversation(); + if (object.id != null) + message.id = String(object.id); + if (object.messages) { + if (!Array.isArray(object.messages)) + throw TypeError(".proto.Conversation.messages: array expected"); + message.messages = []; + for (var i = 0; i < object.messages.length; ++i) { + if (typeof object.messages[i] !== "object") + throw TypeError(".proto.Conversation.messages: object expected"); + message.messages[i] = $root.proto.HistorySyncMsg.fromObject(object.messages[i]); + } + } + if (object.newJid != null) + message.newJid = String(object.newJid); + if (object.oldJid != null) + message.oldJid = String(object.oldJid); + if (object.lastMsgTimestamp != null) + if ($util.Long) + (message.lastMsgTimestamp = $util.Long.fromValue(object.lastMsgTimestamp)).unsigned = true; + else if (typeof object.lastMsgTimestamp === "string") + message.lastMsgTimestamp = parseInt(object.lastMsgTimestamp, 10); + else if (typeof object.lastMsgTimestamp === "number") + message.lastMsgTimestamp = object.lastMsgTimestamp; + else if (typeof object.lastMsgTimestamp === "object") + message.lastMsgTimestamp = new $util.LongBits(object.lastMsgTimestamp.low >>> 0, object.lastMsgTimestamp.high >>> 0).toNumber(true); + if (object.unreadCount != null) + message.unreadCount = object.unreadCount >>> 0; + if (object.readOnly != null) + message.readOnly = Boolean(object.readOnly); + if (object.endOfHistoryTransfer != null) + message.endOfHistoryTransfer = Boolean(object.endOfHistoryTransfer); + if (object.ephemeralExpiration != null) + message.ephemeralExpiration = object.ephemeralExpiration >>> 0; + if (object.ephemeralSettingTimestamp != null) + if ($util.Long) + (message.ephemeralSettingTimestamp = $util.Long.fromValue(object.ephemeralSettingTimestamp)).unsigned = false; + else if (typeof object.ephemeralSettingTimestamp === "string") + message.ephemeralSettingTimestamp = parseInt(object.ephemeralSettingTimestamp, 10); + else if (typeof object.ephemeralSettingTimestamp === "number") + message.ephemeralSettingTimestamp = object.ephemeralSettingTimestamp; + else if (typeof object.ephemeralSettingTimestamp === "object") + message.ephemeralSettingTimestamp = new $util.LongBits(object.ephemeralSettingTimestamp.low >>> 0, object.ephemeralSettingTimestamp.high >>> 0).toNumber(); + switch (object.endOfHistoryTransferType) { + case "COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY": + case 0: + message.endOfHistoryTransferType = 0; + break; + case "COMPLETE_AND_NO_MORE_MESSAGE_REMAIN_ON_PRIMARY": + case 1: + message.endOfHistoryTransferType = 1; + break; + } + if (object.conversationTimestamp != null) + if ($util.Long) + (message.conversationTimestamp = $util.Long.fromValue(object.conversationTimestamp)).unsigned = true; + else if (typeof object.conversationTimestamp === "string") + message.conversationTimestamp = parseInt(object.conversationTimestamp, 10); + else if (typeof object.conversationTimestamp === "number") + message.conversationTimestamp = object.conversationTimestamp; + else if (typeof object.conversationTimestamp === "object") + message.conversationTimestamp = new $util.LongBits(object.conversationTimestamp.low >>> 0, object.conversationTimestamp.high >>> 0).toNumber(true); + if (object.name != null) + message.name = String(object.name); + if (object.pHash != null) + message.pHash = String(object.pHash); + if (object.notSpam != null) + message.notSpam = Boolean(object.notSpam); + if (object.archived != null) + message.archived = Boolean(object.archived); + if (object.disappearingMode != null) { + if (typeof object.disappearingMode !== "object") + throw TypeError(".proto.Conversation.disappearingMode: object expected"); + message.disappearingMode = $root.proto.DisappearingMode.fromObject(object.disappearingMode); + } + if (object.unreadMentionCount != null) + message.unreadMentionCount = object.unreadMentionCount >>> 0; + if (object.markedAsUnread != null) + message.markedAsUnread = Boolean(object.markedAsUnread); + if (object.participant) { + if (!Array.isArray(object.participant)) + throw TypeError(".proto.Conversation.participant: array expected"); + message.participant = []; + for (var i = 0; i < object.participant.length; ++i) { + if (typeof object.participant[i] !== "object") + throw TypeError(".proto.Conversation.participant: object expected"); + message.participant[i] = $root.proto.GroupParticipant.fromObject(object.participant[i]); + } + } + if (object.tcToken != null) + if (typeof object.tcToken === "string") + $util.base64.decode(object.tcToken, message.tcToken = $util.newBuffer($util.base64.length(object.tcToken)), 0); + else if (object.tcToken.length) + message.tcToken = object.tcToken; + if (object.tcTokenTimestamp != null) + if ($util.Long) + (message.tcTokenTimestamp = $util.Long.fromValue(object.tcTokenTimestamp)).unsigned = true; + else if (typeof object.tcTokenTimestamp === "string") + message.tcTokenTimestamp = parseInt(object.tcTokenTimestamp, 10); + else if (typeof object.tcTokenTimestamp === "number") + message.tcTokenTimestamp = object.tcTokenTimestamp; + else if (typeof object.tcTokenTimestamp === "object") + message.tcTokenTimestamp = new $util.LongBits(object.tcTokenTimestamp.low >>> 0, object.tcTokenTimestamp.high >>> 0).toNumber(true); + if (object.contactPrimaryIdentityKey != null) + if (typeof object.contactPrimaryIdentityKey === "string") + $util.base64.decode(object.contactPrimaryIdentityKey, message.contactPrimaryIdentityKey = $util.newBuffer($util.base64.length(object.contactPrimaryIdentityKey)), 0); + else if (object.contactPrimaryIdentityKey.length) + message.contactPrimaryIdentityKey = object.contactPrimaryIdentityKey; + if (object.pinned != null) + message.pinned = object.pinned >>> 0; + if (object.muteEndTime != null) + if ($util.Long) + (message.muteEndTime = $util.Long.fromValue(object.muteEndTime)).unsigned = true; + else if (typeof object.muteEndTime === "string") + message.muteEndTime = parseInt(object.muteEndTime, 10); + else if (typeof object.muteEndTime === "number") + message.muteEndTime = object.muteEndTime; + else if (typeof object.muteEndTime === "object") + message.muteEndTime = new $util.LongBits(object.muteEndTime.low >>> 0, object.muteEndTime.high >>> 0).toNumber(true); + if (object.wallpaper != null) { + if (typeof object.wallpaper !== "object") + throw TypeError(".proto.Conversation.wallpaper: object expected"); + message.wallpaper = $root.proto.WallpaperSettings.fromObject(object.wallpaper); + } + switch (object.mediaVisibility) { + case "DEFAULT": + case 0: + message.mediaVisibility = 0; + break; + case "OFF": + case 1: + message.mediaVisibility = 1; + break; + case "ON": + case 2: + message.mediaVisibility = 2; + break; + } + if (object.tcTokenSenderTimestamp != null) + if ($util.Long) + (message.tcTokenSenderTimestamp = $util.Long.fromValue(object.tcTokenSenderTimestamp)).unsigned = true; + else if (typeof object.tcTokenSenderTimestamp === "string") + message.tcTokenSenderTimestamp = parseInt(object.tcTokenSenderTimestamp, 10); + else if (typeof object.tcTokenSenderTimestamp === "number") + message.tcTokenSenderTimestamp = object.tcTokenSenderTimestamp; + else if (typeof object.tcTokenSenderTimestamp === "object") + message.tcTokenSenderTimestamp = new $util.LongBits(object.tcTokenSenderTimestamp.low >>> 0, object.tcTokenSenderTimestamp.high >>> 0).toNumber(true); + if (object.suspended != null) + message.suspended = Boolean(object.suspended); + if (object.terminated != null) + message.terminated = Boolean(object.terminated); + if (object.createdAt != null) + if ($util.Long) + (message.createdAt = $util.Long.fromValue(object.createdAt)).unsigned = true; + else if (typeof object.createdAt === "string") + message.createdAt = parseInt(object.createdAt, 10); + else if (typeof object.createdAt === "number") + message.createdAt = object.createdAt; + else if (typeof object.createdAt === "object") + message.createdAt = new $util.LongBits(object.createdAt.low >>> 0, object.createdAt.high >>> 0).toNumber(true); + if (object.createdBy != null) + message.createdBy = String(object.createdBy); + if (object.description != null) + message.description = String(object.description); + if (object.support != null) + message.support = Boolean(object.support); + if (object.isParentGroup != null) + message.isParentGroup = Boolean(object.isParentGroup); + if (object.isDefaultSubgroup != null) + message.isDefaultSubgroup = Boolean(object.isDefaultSubgroup); + if (object.parentGroupId != null) + message.parentGroupId = String(object.parentGroupId); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.pnJid != null) + message.pnJid = String(object.pnJid); + if (object.selfMasked != null) + message.selfMasked = Boolean(object.selfMasked); + return message; + }; + + /** + * Creates a plain object from a Conversation message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Conversation + * @static + * @param {proto.Conversation} message Conversation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Conversation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.messages = []; + object.participant = []; + } + if (options.defaults) { + object.id = ""; + object.newJid = ""; + object.oldJid = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.lastMsgTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.lastMsgTimestamp = options.longs === String ? "0" : 0; + object.unreadCount = 0; + object.readOnly = false; + object.endOfHistoryTransfer = false; + object.ephemeralExpiration = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.ephemeralSettingTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.ephemeralSettingTimestamp = options.longs === String ? "0" : 0; + object.endOfHistoryTransferType = options.enums === String ? "COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.conversationTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.conversationTimestamp = options.longs === String ? "0" : 0; + object.name = ""; + object.pHash = ""; + object.notSpam = false; + object.archived = false; + object.disappearingMode = null; + object.unreadMentionCount = 0; + object.markedAsUnread = false; + if (options.bytes === String) + object.tcToken = ""; + else { + object.tcToken = []; + if (options.bytes !== Array) + object.tcToken = $util.newBuffer(object.tcToken); + } + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.tcTokenTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.tcTokenTimestamp = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.contactPrimaryIdentityKey = ""; + else { + object.contactPrimaryIdentityKey = []; + if (options.bytes !== Array) + object.contactPrimaryIdentityKey = $util.newBuffer(object.contactPrimaryIdentityKey); + } + object.pinned = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.muteEndTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.muteEndTime = options.longs === String ? "0" : 0; + object.wallpaper = null; + object.mediaVisibility = options.enums === String ? "DEFAULT" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.tcTokenSenderTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.tcTokenSenderTimestamp = options.longs === String ? "0" : 0; + object.suspended = false; + object.terminated = false; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.createdAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.createdAt = options.longs === String ? "0" : 0; + object.createdBy = ""; + object.description = ""; + object.support = false; + object.isParentGroup = false; + object.isDefaultSubgroup = false; + object.parentGroupId = ""; + object.displayName = ""; + object.pnJid = ""; + object.selfMasked = false; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.messages && message.messages.length) { + object.messages = []; + for (var j = 0; j < message.messages.length; ++j) + object.messages[j] = $root.proto.HistorySyncMsg.toObject(message.messages[j], options); + } + if (message.newJid != null && message.hasOwnProperty("newJid")) + object.newJid = message.newJid; + if (message.oldJid != null && message.hasOwnProperty("oldJid")) + object.oldJid = message.oldJid; + if (message.lastMsgTimestamp != null && message.hasOwnProperty("lastMsgTimestamp")) + if (typeof message.lastMsgTimestamp === "number") + object.lastMsgTimestamp = options.longs === String ? String(message.lastMsgTimestamp) : message.lastMsgTimestamp; + else + object.lastMsgTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.lastMsgTimestamp) : options.longs === Number ? new $util.LongBits(message.lastMsgTimestamp.low >>> 0, message.lastMsgTimestamp.high >>> 0).toNumber(true) : message.lastMsgTimestamp; + if (message.unreadCount != null && message.hasOwnProperty("unreadCount")) + object.unreadCount = message.unreadCount; + if (message.readOnly != null && message.hasOwnProperty("readOnly")) + object.readOnly = message.readOnly; + if (message.endOfHistoryTransfer != null && message.hasOwnProperty("endOfHistoryTransfer")) + object.endOfHistoryTransfer = message.endOfHistoryTransfer; + if (message.ephemeralExpiration != null && message.hasOwnProperty("ephemeralExpiration")) + object.ephemeralExpiration = message.ephemeralExpiration; + if (message.ephemeralSettingTimestamp != null && message.hasOwnProperty("ephemeralSettingTimestamp")) + if (typeof message.ephemeralSettingTimestamp === "number") + object.ephemeralSettingTimestamp = options.longs === String ? String(message.ephemeralSettingTimestamp) : message.ephemeralSettingTimestamp; + else + object.ephemeralSettingTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.ephemeralSettingTimestamp) : options.longs === Number ? new $util.LongBits(message.ephemeralSettingTimestamp.low >>> 0, message.ephemeralSettingTimestamp.high >>> 0).toNumber() : message.ephemeralSettingTimestamp; + if (message.endOfHistoryTransferType != null && message.hasOwnProperty("endOfHistoryTransferType")) + object.endOfHistoryTransferType = options.enums === String ? $root.proto.Conversation.ConversationEndOfHistoryTransferType[message.endOfHistoryTransferType] : message.endOfHistoryTransferType; + if (message.conversationTimestamp != null && message.hasOwnProperty("conversationTimestamp")) + if (typeof message.conversationTimestamp === "number") + object.conversationTimestamp = options.longs === String ? String(message.conversationTimestamp) : message.conversationTimestamp; + else + object.conversationTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.conversationTimestamp) : options.longs === Number ? new $util.LongBits(message.conversationTimestamp.low >>> 0, message.conversationTimestamp.high >>> 0).toNumber(true) : message.conversationTimestamp; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.pHash != null && message.hasOwnProperty("pHash")) + object.pHash = message.pHash; + if (message.notSpam != null && message.hasOwnProperty("notSpam")) + object.notSpam = message.notSpam; + if (message.archived != null && message.hasOwnProperty("archived")) + object.archived = message.archived; + if (message.disappearingMode != null && message.hasOwnProperty("disappearingMode")) + object.disappearingMode = $root.proto.DisappearingMode.toObject(message.disappearingMode, options); + if (message.unreadMentionCount != null && message.hasOwnProperty("unreadMentionCount")) + object.unreadMentionCount = message.unreadMentionCount; + if (message.markedAsUnread != null && message.hasOwnProperty("markedAsUnread")) + object.markedAsUnread = message.markedAsUnread; + if (message.participant && message.participant.length) { + object.participant = []; + for (var j = 0; j < message.participant.length; ++j) + object.participant[j] = $root.proto.GroupParticipant.toObject(message.participant[j], options); + } + if (message.tcToken != null && message.hasOwnProperty("tcToken")) + object.tcToken = options.bytes === String ? $util.base64.encode(message.tcToken, 0, message.tcToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.tcToken) : message.tcToken; + if (message.tcTokenTimestamp != null && message.hasOwnProperty("tcTokenTimestamp")) + if (typeof message.tcTokenTimestamp === "number") + object.tcTokenTimestamp = options.longs === String ? String(message.tcTokenTimestamp) : message.tcTokenTimestamp; + else + object.tcTokenTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.tcTokenTimestamp) : options.longs === Number ? new $util.LongBits(message.tcTokenTimestamp.low >>> 0, message.tcTokenTimestamp.high >>> 0).toNumber(true) : message.tcTokenTimestamp; + if (message.contactPrimaryIdentityKey != null && message.hasOwnProperty("contactPrimaryIdentityKey")) + object.contactPrimaryIdentityKey = options.bytes === String ? $util.base64.encode(message.contactPrimaryIdentityKey, 0, message.contactPrimaryIdentityKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.contactPrimaryIdentityKey) : message.contactPrimaryIdentityKey; + if (message.pinned != null && message.hasOwnProperty("pinned")) + object.pinned = message.pinned; + if (message.muteEndTime != null && message.hasOwnProperty("muteEndTime")) + if (typeof message.muteEndTime === "number") + object.muteEndTime = options.longs === String ? String(message.muteEndTime) : message.muteEndTime; + else + object.muteEndTime = options.longs === String ? $util.Long.prototype.toString.call(message.muteEndTime) : options.longs === Number ? new $util.LongBits(message.muteEndTime.low >>> 0, message.muteEndTime.high >>> 0).toNumber(true) : message.muteEndTime; + if (message.wallpaper != null && message.hasOwnProperty("wallpaper")) + object.wallpaper = $root.proto.WallpaperSettings.toObject(message.wallpaper, options); + if (message.mediaVisibility != null && message.hasOwnProperty("mediaVisibility")) + object.mediaVisibility = options.enums === String ? $root.proto.MediaVisibility[message.mediaVisibility] : message.mediaVisibility; + if (message.tcTokenSenderTimestamp != null && message.hasOwnProperty("tcTokenSenderTimestamp")) + if (typeof message.tcTokenSenderTimestamp === "number") + object.tcTokenSenderTimestamp = options.longs === String ? String(message.tcTokenSenderTimestamp) : message.tcTokenSenderTimestamp; + else + object.tcTokenSenderTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.tcTokenSenderTimestamp) : options.longs === Number ? new $util.LongBits(message.tcTokenSenderTimestamp.low >>> 0, message.tcTokenSenderTimestamp.high >>> 0).toNumber(true) : message.tcTokenSenderTimestamp; + if (message.suspended != null && message.hasOwnProperty("suspended")) + object.suspended = message.suspended; + if (message.terminated != null && message.hasOwnProperty("terminated")) + object.terminated = message.terminated; + if (message.createdAt != null && message.hasOwnProperty("createdAt")) + if (typeof message.createdAt === "number") + object.createdAt = options.longs === String ? String(message.createdAt) : message.createdAt; + else + object.createdAt = options.longs === String ? $util.Long.prototype.toString.call(message.createdAt) : options.longs === Number ? new $util.LongBits(message.createdAt.low >>> 0, message.createdAt.high >>> 0).toNumber(true) : message.createdAt; + if (message.createdBy != null && message.hasOwnProperty("createdBy")) + object.createdBy = message.createdBy; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.support != null && message.hasOwnProperty("support")) + object.support = message.support; + if (message.isParentGroup != null && message.hasOwnProperty("isParentGroup")) + object.isParentGroup = message.isParentGroup; + if (message.isDefaultSubgroup != null && message.hasOwnProperty("isDefaultSubgroup")) + object.isDefaultSubgroup = message.isDefaultSubgroup; + if (message.parentGroupId != null && message.hasOwnProperty("parentGroupId")) + object.parentGroupId = message.parentGroupId; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.pnJid != null && message.hasOwnProperty("pnJid")) + object.pnJid = message.pnJid; + if (message.selfMasked != null && message.hasOwnProperty("selfMasked")) + object.selfMasked = message.selfMasked; + return object; + }; + + /** + * Converts this Conversation to JSON. + * @function toJSON + * @memberof proto.Conversation + * @instance + * @returns {Object.} JSON object + */ + Conversation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * ConversationEndOfHistoryTransferType enum. + * @name proto.Conversation.ConversationEndOfHistoryTransferType + * @enum {number} + * @property {number} COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY=0 COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY value + * @property {number} COMPLETE_AND_NO_MORE_MESSAGE_REMAIN_ON_PRIMARY=1 COMPLETE_AND_NO_MORE_MESSAGE_REMAIN_ON_PRIMARY value + */ + Conversation.ConversationEndOfHistoryTransferType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY"] = 0; + values[valuesById[1] = "COMPLETE_AND_NO_MORE_MESSAGE_REMAIN_ON_PRIMARY"] = 1; + return values; + })(); + + return Conversation; + })(); + + proto.DNSSource = (function() { + + /** + * Properties of a DNSSource. + * @memberof proto + * @interface IDNSSource + * @property {proto.DNSSource.DNSSourceDNSResolutionMethod|null} [dnsMethod] DNSSource dnsMethod + * @property {boolean|null} [appCached] DNSSource appCached + */ + + /** + * Constructs a new DNSSource. + * @memberof proto + * @classdesc Represents a DNSSource. + * @implements IDNSSource + * @constructor + * @param {proto.IDNSSource=} [properties] Properties to set + */ + function DNSSource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DNSSource dnsMethod. + * @member {proto.DNSSource.DNSSourceDNSResolutionMethod} dnsMethod + * @memberof proto.DNSSource + * @instance + */ + DNSSource.prototype.dnsMethod = 0; + + /** + * DNSSource appCached. + * @member {boolean} appCached + * @memberof proto.DNSSource + * @instance + */ + DNSSource.prototype.appCached = false; + + /** + * Creates a new DNSSource instance using the specified properties. + * @function create + * @memberof proto.DNSSource + * @static + * @param {proto.IDNSSource=} [properties] Properties to set + * @returns {proto.DNSSource} DNSSource instance + */ + DNSSource.create = function create(properties) { + return new DNSSource(properties); + }; + + /** + * Encodes the specified DNSSource message. Does not implicitly {@link proto.DNSSource.verify|verify} messages. + * @function encode + * @memberof proto.DNSSource + * @static + * @param {proto.IDNSSource} message DNSSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DNSSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dnsMethod != null && Object.hasOwnProperty.call(message, "dnsMethod")) + writer.uint32(/* id 15, wireType 0 =*/120).int32(message.dnsMethod); + if (message.appCached != null && Object.hasOwnProperty.call(message, "appCached")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.appCached); + return writer; + }; + + /** + * Encodes the specified DNSSource message, length delimited. Does not implicitly {@link proto.DNSSource.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.DNSSource + * @static + * @param {proto.IDNSSource} message DNSSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DNSSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DNSSource message from the specified reader or buffer. + * @function decode + * @memberof proto.DNSSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.DNSSource} DNSSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DNSSource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.DNSSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 15: + message.dnsMethod = reader.int32(); + break; + case 16: + message.appCached = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DNSSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.DNSSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.DNSSource} DNSSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DNSSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DNSSource message. + * @function verify + * @memberof proto.DNSSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DNSSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dnsMethod != null && message.hasOwnProperty("dnsMethod")) + switch (message.dnsMethod) { + default: + return "dnsMethod: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.appCached != null && message.hasOwnProperty("appCached")) + if (typeof message.appCached !== "boolean") + return "appCached: boolean expected"; + return null; + }; + + /** + * Creates a DNSSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.DNSSource + * @static + * @param {Object.} object Plain object + * @returns {proto.DNSSource} DNSSource + */ + DNSSource.fromObject = function fromObject(object) { + if (object instanceof $root.proto.DNSSource) + return object; + var message = new $root.proto.DNSSource(); + switch (object.dnsMethod) { + case "SYSTEM": + case 0: + message.dnsMethod = 0; + break; + case "GOOGLE": + case 1: + message.dnsMethod = 1; + break; + case "HARDCODED": + case 2: + message.dnsMethod = 2; + break; + case "OVERRIDE": + case 3: + message.dnsMethod = 3; + break; + case "FALLBACK": + case 4: + message.dnsMethod = 4; + break; + } + if (object.appCached != null) + message.appCached = Boolean(object.appCached); + return message; + }; + + /** + * Creates a plain object from a DNSSource message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.DNSSource + * @static + * @param {proto.DNSSource} message DNSSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DNSSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dnsMethod = options.enums === String ? "SYSTEM" : 0; + object.appCached = false; + } + if (message.dnsMethod != null && message.hasOwnProperty("dnsMethod")) + object.dnsMethod = options.enums === String ? $root.proto.DNSSource.DNSSourceDNSResolutionMethod[message.dnsMethod] : message.dnsMethod; + if (message.appCached != null && message.hasOwnProperty("appCached")) + object.appCached = message.appCached; + return object; + }; + + /** + * Converts this DNSSource to JSON. + * @function toJSON + * @memberof proto.DNSSource + * @instance + * @returns {Object.} JSON object + */ + DNSSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * DNSSourceDNSResolutionMethod enum. + * @name proto.DNSSource.DNSSourceDNSResolutionMethod + * @enum {number} + * @property {number} SYSTEM=0 SYSTEM value + * @property {number} GOOGLE=1 GOOGLE value + * @property {number} HARDCODED=2 HARDCODED value + * @property {number} OVERRIDE=3 OVERRIDE value + * @property {number} FALLBACK=4 FALLBACK value + */ + DNSSource.DNSSourceDNSResolutionMethod = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SYSTEM"] = 0; + values[valuesById[1] = "GOOGLE"] = 1; + values[valuesById[2] = "HARDCODED"] = 2; + values[valuesById[3] = "OVERRIDE"] = 3; + values[valuesById[4] = "FALLBACK"] = 4; + return values; + })(); + + return DNSSource; + })(); + proto.DeclinePaymentRequestMessage = (function() { /** @@ -8740,6 +14955,422 @@ $root.proto = (function() { return DeclinePaymentRequestMessage; })(); + proto.DeleteChatAction = (function() { + + /** + * Properties of a DeleteChatAction. + * @memberof proto + * @interface IDeleteChatAction + * @property {proto.ISyncActionMessageRange|null} [messageRange] DeleteChatAction messageRange + */ + + /** + * Constructs a new DeleteChatAction. + * @memberof proto + * @classdesc Represents a DeleteChatAction. + * @implements IDeleteChatAction + * @constructor + * @param {proto.IDeleteChatAction=} [properties] Properties to set + */ + function DeleteChatAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteChatAction messageRange. + * @member {proto.ISyncActionMessageRange|null|undefined} messageRange + * @memberof proto.DeleteChatAction + * @instance + */ + DeleteChatAction.prototype.messageRange = null; + + /** + * Creates a new DeleteChatAction instance using the specified properties. + * @function create + * @memberof proto.DeleteChatAction + * @static + * @param {proto.IDeleteChatAction=} [properties] Properties to set + * @returns {proto.DeleteChatAction} DeleteChatAction instance + */ + DeleteChatAction.create = function create(properties) { + return new DeleteChatAction(properties); + }; + + /** + * Encodes the specified DeleteChatAction message. Does not implicitly {@link proto.DeleteChatAction.verify|verify} messages. + * @function encode + * @memberof proto.DeleteChatAction + * @static + * @param {proto.IDeleteChatAction} message DeleteChatAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteChatAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageRange != null && Object.hasOwnProperty.call(message, "messageRange")) + $root.proto.SyncActionMessageRange.encode(message.messageRange, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DeleteChatAction message, length delimited. Does not implicitly {@link proto.DeleteChatAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.DeleteChatAction + * @static + * @param {proto.IDeleteChatAction} message DeleteChatAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteChatAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteChatAction message from the specified reader or buffer. + * @function decode + * @memberof proto.DeleteChatAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.DeleteChatAction} DeleteChatAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteChatAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.DeleteChatAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.messageRange = $root.proto.SyncActionMessageRange.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteChatAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.DeleteChatAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.DeleteChatAction} DeleteChatAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteChatAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteChatAction message. + * @function verify + * @memberof proto.DeleteChatAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteChatAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageRange != null && message.hasOwnProperty("messageRange")) { + var error = $root.proto.SyncActionMessageRange.verify(message.messageRange); + if (error) + return "messageRange." + error; + } + return null; + }; + + /** + * Creates a DeleteChatAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.DeleteChatAction + * @static + * @param {Object.} object Plain object + * @returns {proto.DeleteChatAction} DeleteChatAction + */ + DeleteChatAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.DeleteChatAction) + return object; + var message = new $root.proto.DeleteChatAction(); + if (object.messageRange != null) { + if (typeof object.messageRange !== "object") + throw TypeError(".proto.DeleteChatAction.messageRange: object expected"); + message.messageRange = $root.proto.SyncActionMessageRange.fromObject(object.messageRange); + } + return message; + }; + + /** + * Creates a plain object from a DeleteChatAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.DeleteChatAction + * @static + * @param {proto.DeleteChatAction} message DeleteChatAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteChatAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.messageRange = null; + if (message.messageRange != null && message.hasOwnProperty("messageRange")) + object.messageRange = $root.proto.SyncActionMessageRange.toObject(message.messageRange, options); + return object; + }; + + /** + * Converts this DeleteChatAction to JSON. + * @function toJSON + * @memberof proto.DeleteChatAction + * @instance + * @returns {Object.} JSON object + */ + DeleteChatAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteChatAction; + })(); + + proto.DeleteMessageForMeAction = (function() { + + /** + * Properties of a DeleteMessageForMeAction. + * @memberof proto + * @interface IDeleteMessageForMeAction + * @property {boolean|null} [deleteMedia] DeleteMessageForMeAction deleteMedia + * @property {number|Long|null} [messageTimestamp] DeleteMessageForMeAction messageTimestamp + */ + + /** + * Constructs a new DeleteMessageForMeAction. + * @memberof proto + * @classdesc Represents a DeleteMessageForMeAction. + * @implements IDeleteMessageForMeAction + * @constructor + * @param {proto.IDeleteMessageForMeAction=} [properties] Properties to set + */ + function DeleteMessageForMeAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteMessageForMeAction deleteMedia. + * @member {boolean} deleteMedia + * @memberof proto.DeleteMessageForMeAction + * @instance + */ + DeleteMessageForMeAction.prototype.deleteMedia = false; + + /** + * DeleteMessageForMeAction messageTimestamp. + * @member {number|Long} messageTimestamp + * @memberof proto.DeleteMessageForMeAction + * @instance + */ + DeleteMessageForMeAction.prototype.messageTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new DeleteMessageForMeAction instance using the specified properties. + * @function create + * @memberof proto.DeleteMessageForMeAction + * @static + * @param {proto.IDeleteMessageForMeAction=} [properties] Properties to set + * @returns {proto.DeleteMessageForMeAction} DeleteMessageForMeAction instance + */ + DeleteMessageForMeAction.create = function create(properties) { + return new DeleteMessageForMeAction(properties); + }; + + /** + * Encodes the specified DeleteMessageForMeAction message. Does not implicitly {@link proto.DeleteMessageForMeAction.verify|verify} messages. + * @function encode + * @memberof proto.DeleteMessageForMeAction + * @static + * @param {proto.IDeleteMessageForMeAction} message DeleteMessageForMeAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteMessageForMeAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deleteMedia != null && Object.hasOwnProperty.call(message, "deleteMedia")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deleteMedia); + if (message.messageTimestamp != null && Object.hasOwnProperty.call(message, "messageTimestamp")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.messageTimestamp); + return writer; + }; + + /** + * Encodes the specified DeleteMessageForMeAction message, length delimited. Does not implicitly {@link proto.DeleteMessageForMeAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.DeleteMessageForMeAction + * @static + * @param {proto.IDeleteMessageForMeAction} message DeleteMessageForMeAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteMessageForMeAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteMessageForMeAction message from the specified reader or buffer. + * @function decode + * @memberof proto.DeleteMessageForMeAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.DeleteMessageForMeAction} DeleteMessageForMeAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteMessageForMeAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.DeleteMessageForMeAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.deleteMedia = reader.bool(); + break; + case 2: + message.messageTimestamp = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteMessageForMeAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.DeleteMessageForMeAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.DeleteMessageForMeAction} DeleteMessageForMeAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteMessageForMeAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteMessageForMeAction message. + * @function verify + * @memberof proto.DeleteMessageForMeAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteMessageForMeAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deleteMedia != null && message.hasOwnProperty("deleteMedia")) + if (typeof message.deleteMedia !== "boolean") + return "deleteMedia: boolean expected"; + if (message.messageTimestamp != null && message.hasOwnProperty("messageTimestamp")) + if (!$util.isInteger(message.messageTimestamp) && !(message.messageTimestamp && $util.isInteger(message.messageTimestamp.low) && $util.isInteger(message.messageTimestamp.high))) + return "messageTimestamp: integer|Long expected"; + return null; + }; + + /** + * Creates a DeleteMessageForMeAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.DeleteMessageForMeAction + * @static + * @param {Object.} object Plain object + * @returns {proto.DeleteMessageForMeAction} DeleteMessageForMeAction + */ + DeleteMessageForMeAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.DeleteMessageForMeAction) + return object; + var message = new $root.proto.DeleteMessageForMeAction(); + if (object.deleteMedia != null) + message.deleteMedia = Boolean(object.deleteMedia); + if (object.messageTimestamp != null) + if ($util.Long) + (message.messageTimestamp = $util.Long.fromValue(object.messageTimestamp)).unsigned = false; + else if (typeof object.messageTimestamp === "string") + message.messageTimestamp = parseInt(object.messageTimestamp, 10); + else if (typeof object.messageTimestamp === "number") + message.messageTimestamp = object.messageTimestamp; + else if (typeof object.messageTimestamp === "object") + message.messageTimestamp = new $util.LongBits(object.messageTimestamp.low >>> 0, object.messageTimestamp.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a DeleteMessageForMeAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.DeleteMessageForMeAction + * @static + * @param {proto.DeleteMessageForMeAction} message DeleteMessageForMeAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteMessageForMeAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.deleteMedia = false; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.messageTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.messageTimestamp = options.longs === String ? "0" : 0; + } + if (message.deleteMedia != null && message.hasOwnProperty("deleteMedia")) + object.deleteMedia = message.deleteMedia; + if (message.messageTimestamp != null && message.hasOwnProperty("messageTimestamp")) + if (typeof message.messageTimestamp === "number") + object.messageTimestamp = options.longs === String ? String(message.messageTimestamp) : message.messageTimestamp; + else + object.messageTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.messageTimestamp) : options.longs === Number ? new $util.LongBits(message.messageTimestamp.low >>> 0, message.messageTimestamp.high >>> 0).toNumber() : message.messageTimestamp; + return object; + }; + + /** + * Converts this DeleteMessageForMeAction to JSON. + * @function toJSON + * @memberof proto.DeleteMessageForMeAction + * @instance + * @returns {Object.} JSON object + */ + DeleteMessageForMeAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteMessageForMeAction; + })(); + proto.DeviceListMetadata = (function() { /** @@ -9134,6 +15765,790 @@ $root.proto = (function() { return DeviceListMetadata; })(); + proto.DevicePairingRegistrationData = (function() { + + /** + * Properties of a DevicePairingRegistrationData. + * @memberof proto + * @interface IDevicePairingRegistrationData + * @property {Uint8Array|null} [eRegid] DevicePairingRegistrationData eRegid + * @property {Uint8Array|null} [eKeytype] DevicePairingRegistrationData eKeytype + * @property {Uint8Array|null} [eIdent] DevicePairingRegistrationData eIdent + * @property {Uint8Array|null} [eSkeyId] DevicePairingRegistrationData eSkeyId + * @property {Uint8Array|null} [eSkeyVal] DevicePairingRegistrationData eSkeyVal + * @property {Uint8Array|null} [eSkeySig] DevicePairingRegistrationData eSkeySig + * @property {Uint8Array|null} [buildHash] DevicePairingRegistrationData buildHash + * @property {Uint8Array|null} [deviceProps] DevicePairingRegistrationData deviceProps + */ + + /** + * Constructs a new DevicePairingRegistrationData. + * @memberof proto + * @classdesc Represents a DevicePairingRegistrationData. + * @implements IDevicePairingRegistrationData + * @constructor + * @param {proto.IDevicePairingRegistrationData=} [properties] Properties to set + */ + function DevicePairingRegistrationData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DevicePairingRegistrationData eRegid. + * @member {Uint8Array} eRegid + * @memberof proto.DevicePairingRegistrationData + * @instance + */ + DevicePairingRegistrationData.prototype.eRegid = $util.newBuffer([]); + + /** + * DevicePairingRegistrationData eKeytype. + * @member {Uint8Array} eKeytype + * @memberof proto.DevicePairingRegistrationData + * @instance + */ + DevicePairingRegistrationData.prototype.eKeytype = $util.newBuffer([]); + + /** + * DevicePairingRegistrationData eIdent. + * @member {Uint8Array} eIdent + * @memberof proto.DevicePairingRegistrationData + * @instance + */ + DevicePairingRegistrationData.prototype.eIdent = $util.newBuffer([]); + + /** + * DevicePairingRegistrationData eSkeyId. + * @member {Uint8Array} eSkeyId + * @memberof proto.DevicePairingRegistrationData + * @instance + */ + DevicePairingRegistrationData.prototype.eSkeyId = $util.newBuffer([]); + + /** + * DevicePairingRegistrationData eSkeyVal. + * @member {Uint8Array} eSkeyVal + * @memberof proto.DevicePairingRegistrationData + * @instance + */ + DevicePairingRegistrationData.prototype.eSkeyVal = $util.newBuffer([]); + + /** + * DevicePairingRegistrationData eSkeySig. + * @member {Uint8Array} eSkeySig + * @memberof proto.DevicePairingRegistrationData + * @instance + */ + DevicePairingRegistrationData.prototype.eSkeySig = $util.newBuffer([]); + + /** + * DevicePairingRegistrationData buildHash. + * @member {Uint8Array} buildHash + * @memberof proto.DevicePairingRegistrationData + * @instance + */ + DevicePairingRegistrationData.prototype.buildHash = $util.newBuffer([]); + + /** + * DevicePairingRegistrationData deviceProps. + * @member {Uint8Array} deviceProps + * @memberof proto.DevicePairingRegistrationData + * @instance + */ + DevicePairingRegistrationData.prototype.deviceProps = $util.newBuffer([]); + + /** + * Creates a new DevicePairingRegistrationData instance using the specified properties. + * @function create + * @memberof proto.DevicePairingRegistrationData + * @static + * @param {proto.IDevicePairingRegistrationData=} [properties] Properties to set + * @returns {proto.DevicePairingRegistrationData} DevicePairingRegistrationData instance + */ + DevicePairingRegistrationData.create = function create(properties) { + return new DevicePairingRegistrationData(properties); + }; + + /** + * Encodes the specified DevicePairingRegistrationData message. Does not implicitly {@link proto.DevicePairingRegistrationData.verify|verify} messages. + * @function encode + * @memberof proto.DevicePairingRegistrationData + * @static + * @param {proto.IDevicePairingRegistrationData} message DevicePairingRegistrationData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DevicePairingRegistrationData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.eRegid != null && Object.hasOwnProperty.call(message, "eRegid")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.eRegid); + if (message.eKeytype != null && Object.hasOwnProperty.call(message, "eKeytype")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.eKeytype); + if (message.eIdent != null && Object.hasOwnProperty.call(message, "eIdent")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.eIdent); + if (message.eSkeyId != null && Object.hasOwnProperty.call(message, "eSkeyId")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.eSkeyId); + if (message.eSkeyVal != null && Object.hasOwnProperty.call(message, "eSkeyVal")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.eSkeyVal); + if (message.eSkeySig != null && Object.hasOwnProperty.call(message, "eSkeySig")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.eSkeySig); + if (message.buildHash != null && Object.hasOwnProperty.call(message, "buildHash")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.buildHash); + if (message.deviceProps != null && Object.hasOwnProperty.call(message, "deviceProps")) + writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.deviceProps); + return writer; + }; + + /** + * Encodes the specified DevicePairingRegistrationData message, length delimited. Does not implicitly {@link proto.DevicePairingRegistrationData.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.DevicePairingRegistrationData + * @static + * @param {proto.IDevicePairingRegistrationData} message DevicePairingRegistrationData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DevicePairingRegistrationData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DevicePairingRegistrationData message from the specified reader or buffer. + * @function decode + * @memberof proto.DevicePairingRegistrationData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.DevicePairingRegistrationData} DevicePairingRegistrationData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DevicePairingRegistrationData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.DevicePairingRegistrationData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.eRegid = reader.bytes(); + break; + case 2: + message.eKeytype = reader.bytes(); + break; + case 3: + message.eIdent = reader.bytes(); + break; + case 4: + message.eSkeyId = reader.bytes(); + break; + case 5: + message.eSkeyVal = reader.bytes(); + break; + case 6: + message.eSkeySig = reader.bytes(); + break; + case 7: + message.buildHash = reader.bytes(); + break; + case 8: + message.deviceProps = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DevicePairingRegistrationData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.DevicePairingRegistrationData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.DevicePairingRegistrationData} DevicePairingRegistrationData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DevicePairingRegistrationData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DevicePairingRegistrationData message. + * @function verify + * @memberof proto.DevicePairingRegistrationData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DevicePairingRegistrationData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.eRegid != null && message.hasOwnProperty("eRegid")) + if (!(message.eRegid && typeof message.eRegid.length === "number" || $util.isString(message.eRegid))) + return "eRegid: buffer expected"; + if (message.eKeytype != null && message.hasOwnProperty("eKeytype")) + if (!(message.eKeytype && typeof message.eKeytype.length === "number" || $util.isString(message.eKeytype))) + return "eKeytype: buffer expected"; + if (message.eIdent != null && message.hasOwnProperty("eIdent")) + if (!(message.eIdent && typeof message.eIdent.length === "number" || $util.isString(message.eIdent))) + return "eIdent: buffer expected"; + if (message.eSkeyId != null && message.hasOwnProperty("eSkeyId")) + if (!(message.eSkeyId && typeof message.eSkeyId.length === "number" || $util.isString(message.eSkeyId))) + return "eSkeyId: buffer expected"; + if (message.eSkeyVal != null && message.hasOwnProperty("eSkeyVal")) + if (!(message.eSkeyVal && typeof message.eSkeyVal.length === "number" || $util.isString(message.eSkeyVal))) + return "eSkeyVal: buffer expected"; + if (message.eSkeySig != null && message.hasOwnProperty("eSkeySig")) + if (!(message.eSkeySig && typeof message.eSkeySig.length === "number" || $util.isString(message.eSkeySig))) + return "eSkeySig: buffer expected"; + if (message.buildHash != null && message.hasOwnProperty("buildHash")) + if (!(message.buildHash && typeof message.buildHash.length === "number" || $util.isString(message.buildHash))) + return "buildHash: buffer expected"; + if (message.deviceProps != null && message.hasOwnProperty("deviceProps")) + if (!(message.deviceProps && typeof message.deviceProps.length === "number" || $util.isString(message.deviceProps))) + return "deviceProps: buffer expected"; + return null; + }; + + /** + * Creates a DevicePairingRegistrationData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.DevicePairingRegistrationData + * @static + * @param {Object.} object Plain object + * @returns {proto.DevicePairingRegistrationData} DevicePairingRegistrationData + */ + DevicePairingRegistrationData.fromObject = function fromObject(object) { + if (object instanceof $root.proto.DevicePairingRegistrationData) + return object; + var message = new $root.proto.DevicePairingRegistrationData(); + if (object.eRegid != null) + if (typeof object.eRegid === "string") + $util.base64.decode(object.eRegid, message.eRegid = $util.newBuffer($util.base64.length(object.eRegid)), 0); + else if (object.eRegid.length) + message.eRegid = object.eRegid; + if (object.eKeytype != null) + if (typeof object.eKeytype === "string") + $util.base64.decode(object.eKeytype, message.eKeytype = $util.newBuffer($util.base64.length(object.eKeytype)), 0); + else if (object.eKeytype.length) + message.eKeytype = object.eKeytype; + if (object.eIdent != null) + if (typeof object.eIdent === "string") + $util.base64.decode(object.eIdent, message.eIdent = $util.newBuffer($util.base64.length(object.eIdent)), 0); + else if (object.eIdent.length) + message.eIdent = object.eIdent; + if (object.eSkeyId != null) + if (typeof object.eSkeyId === "string") + $util.base64.decode(object.eSkeyId, message.eSkeyId = $util.newBuffer($util.base64.length(object.eSkeyId)), 0); + else if (object.eSkeyId.length) + message.eSkeyId = object.eSkeyId; + if (object.eSkeyVal != null) + if (typeof object.eSkeyVal === "string") + $util.base64.decode(object.eSkeyVal, message.eSkeyVal = $util.newBuffer($util.base64.length(object.eSkeyVal)), 0); + else if (object.eSkeyVal.length) + message.eSkeyVal = object.eSkeyVal; + if (object.eSkeySig != null) + if (typeof object.eSkeySig === "string") + $util.base64.decode(object.eSkeySig, message.eSkeySig = $util.newBuffer($util.base64.length(object.eSkeySig)), 0); + else if (object.eSkeySig.length) + message.eSkeySig = object.eSkeySig; + if (object.buildHash != null) + if (typeof object.buildHash === "string") + $util.base64.decode(object.buildHash, message.buildHash = $util.newBuffer($util.base64.length(object.buildHash)), 0); + else if (object.buildHash.length) + message.buildHash = object.buildHash; + if (object.deviceProps != null) + if (typeof object.deviceProps === "string") + $util.base64.decode(object.deviceProps, message.deviceProps = $util.newBuffer($util.base64.length(object.deviceProps)), 0); + else if (object.deviceProps.length) + message.deviceProps = object.deviceProps; + return message; + }; + + /** + * Creates a plain object from a DevicePairingRegistrationData message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.DevicePairingRegistrationData + * @static + * @param {proto.DevicePairingRegistrationData} message DevicePairingRegistrationData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DevicePairingRegistrationData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.eRegid = ""; + else { + object.eRegid = []; + if (options.bytes !== Array) + object.eRegid = $util.newBuffer(object.eRegid); + } + if (options.bytes === String) + object.eKeytype = ""; + else { + object.eKeytype = []; + if (options.bytes !== Array) + object.eKeytype = $util.newBuffer(object.eKeytype); + } + if (options.bytes === String) + object.eIdent = ""; + else { + object.eIdent = []; + if (options.bytes !== Array) + object.eIdent = $util.newBuffer(object.eIdent); + } + if (options.bytes === String) + object.eSkeyId = ""; + else { + object.eSkeyId = []; + if (options.bytes !== Array) + object.eSkeyId = $util.newBuffer(object.eSkeyId); + } + if (options.bytes === String) + object.eSkeyVal = ""; + else { + object.eSkeyVal = []; + if (options.bytes !== Array) + object.eSkeyVal = $util.newBuffer(object.eSkeyVal); + } + if (options.bytes === String) + object.eSkeySig = ""; + else { + object.eSkeySig = []; + if (options.bytes !== Array) + object.eSkeySig = $util.newBuffer(object.eSkeySig); + } + if (options.bytes === String) + object.buildHash = ""; + else { + object.buildHash = []; + if (options.bytes !== Array) + object.buildHash = $util.newBuffer(object.buildHash); + } + if (options.bytes === String) + object.deviceProps = ""; + else { + object.deviceProps = []; + if (options.bytes !== Array) + object.deviceProps = $util.newBuffer(object.deviceProps); + } + } + if (message.eRegid != null && message.hasOwnProperty("eRegid")) + object.eRegid = options.bytes === String ? $util.base64.encode(message.eRegid, 0, message.eRegid.length) : options.bytes === Array ? Array.prototype.slice.call(message.eRegid) : message.eRegid; + if (message.eKeytype != null && message.hasOwnProperty("eKeytype")) + object.eKeytype = options.bytes === String ? $util.base64.encode(message.eKeytype, 0, message.eKeytype.length) : options.bytes === Array ? Array.prototype.slice.call(message.eKeytype) : message.eKeytype; + if (message.eIdent != null && message.hasOwnProperty("eIdent")) + object.eIdent = options.bytes === String ? $util.base64.encode(message.eIdent, 0, message.eIdent.length) : options.bytes === Array ? Array.prototype.slice.call(message.eIdent) : message.eIdent; + if (message.eSkeyId != null && message.hasOwnProperty("eSkeyId")) + object.eSkeyId = options.bytes === String ? $util.base64.encode(message.eSkeyId, 0, message.eSkeyId.length) : options.bytes === Array ? Array.prototype.slice.call(message.eSkeyId) : message.eSkeyId; + if (message.eSkeyVal != null && message.hasOwnProperty("eSkeyVal")) + object.eSkeyVal = options.bytes === String ? $util.base64.encode(message.eSkeyVal, 0, message.eSkeyVal.length) : options.bytes === Array ? Array.prototype.slice.call(message.eSkeyVal) : message.eSkeyVal; + if (message.eSkeySig != null && message.hasOwnProperty("eSkeySig")) + object.eSkeySig = options.bytes === String ? $util.base64.encode(message.eSkeySig, 0, message.eSkeySig.length) : options.bytes === Array ? Array.prototype.slice.call(message.eSkeySig) : message.eSkeySig; + if (message.buildHash != null && message.hasOwnProperty("buildHash")) + object.buildHash = options.bytes === String ? $util.base64.encode(message.buildHash, 0, message.buildHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.buildHash) : message.buildHash; + if (message.deviceProps != null && message.hasOwnProperty("deviceProps")) + object.deviceProps = options.bytes === String ? $util.base64.encode(message.deviceProps, 0, message.deviceProps.length) : options.bytes === Array ? Array.prototype.slice.call(message.deviceProps) : message.deviceProps; + return object; + }; + + /** + * Converts this DevicePairingRegistrationData to JSON. + * @function toJSON + * @memberof proto.DevicePairingRegistrationData + * @instance + * @returns {Object.} JSON object + */ + DevicePairingRegistrationData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DevicePairingRegistrationData; + })(); + + proto.DeviceProps = (function() { + + /** + * Properties of a DeviceProps. + * @memberof proto + * @interface IDeviceProps + * @property {string|null} [os] DeviceProps os + * @property {proto.IAppVersion|null} [version] DeviceProps version + * @property {proto.DeviceProps.DevicePropsPlatformType|null} [platformType] DeviceProps platformType + * @property {boolean|null} [requireFullSync] DeviceProps requireFullSync + */ + + /** + * Constructs a new DeviceProps. + * @memberof proto + * @classdesc Represents a DeviceProps. + * @implements IDeviceProps + * @constructor + * @param {proto.IDeviceProps=} [properties] Properties to set + */ + function DeviceProps(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeviceProps os. + * @member {string} os + * @memberof proto.DeviceProps + * @instance + */ + DeviceProps.prototype.os = ""; + + /** + * DeviceProps version. + * @member {proto.IAppVersion|null|undefined} version + * @memberof proto.DeviceProps + * @instance + */ + DeviceProps.prototype.version = null; + + /** + * DeviceProps platformType. + * @member {proto.DeviceProps.DevicePropsPlatformType} platformType + * @memberof proto.DeviceProps + * @instance + */ + DeviceProps.prototype.platformType = 0; + + /** + * DeviceProps requireFullSync. + * @member {boolean} requireFullSync + * @memberof proto.DeviceProps + * @instance + */ + DeviceProps.prototype.requireFullSync = false; + + /** + * Creates a new DeviceProps instance using the specified properties. + * @function create + * @memberof proto.DeviceProps + * @static + * @param {proto.IDeviceProps=} [properties] Properties to set + * @returns {proto.DeviceProps} DeviceProps instance + */ + DeviceProps.create = function create(properties) { + return new DeviceProps(properties); + }; + + /** + * Encodes the specified DeviceProps message. Does not implicitly {@link proto.DeviceProps.verify|verify} messages. + * @function encode + * @memberof proto.DeviceProps + * @static + * @param {proto.IDeviceProps} message DeviceProps message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeviceProps.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.os != null && Object.hasOwnProperty.call(message, "os")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.os); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + $root.proto.AppVersion.encode(message.version, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.platformType != null && Object.hasOwnProperty.call(message, "platformType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.platformType); + if (message.requireFullSync != null && Object.hasOwnProperty.call(message, "requireFullSync")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.requireFullSync); + return writer; + }; + + /** + * Encodes the specified DeviceProps message, length delimited. Does not implicitly {@link proto.DeviceProps.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.DeviceProps + * @static + * @param {proto.IDeviceProps} message DeviceProps message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeviceProps.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeviceProps message from the specified reader or buffer. + * @function decode + * @memberof proto.DeviceProps + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.DeviceProps} DeviceProps + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeviceProps.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.DeviceProps(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.os = reader.string(); + break; + case 2: + message.version = $root.proto.AppVersion.decode(reader, reader.uint32()); + break; + case 3: + message.platformType = reader.int32(); + break; + case 4: + message.requireFullSync = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeviceProps message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.DeviceProps + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.DeviceProps} DeviceProps + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeviceProps.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeviceProps message. + * @function verify + * @memberof proto.DeviceProps + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeviceProps.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.os != null && message.hasOwnProperty("os")) + if (!$util.isString(message.os)) + return "os: string expected"; + if (message.version != null && message.hasOwnProperty("version")) { + var error = $root.proto.AppVersion.verify(message.version); + if (error) + return "version." + error; + } + if (message.platformType != null && message.hasOwnProperty("platformType")) + switch (message.platformType) { + default: + return "platformType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + break; + } + if (message.requireFullSync != null && message.hasOwnProperty("requireFullSync")) + if (typeof message.requireFullSync !== "boolean") + return "requireFullSync: boolean expected"; + return null; + }; + + /** + * Creates a DeviceProps message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.DeviceProps + * @static + * @param {Object.} object Plain object + * @returns {proto.DeviceProps} DeviceProps + */ + DeviceProps.fromObject = function fromObject(object) { + if (object instanceof $root.proto.DeviceProps) + return object; + var message = new $root.proto.DeviceProps(); + if (object.os != null) + message.os = String(object.os); + if (object.version != null) { + if (typeof object.version !== "object") + throw TypeError(".proto.DeviceProps.version: object expected"); + message.version = $root.proto.AppVersion.fromObject(object.version); + } + switch (object.platformType) { + case "UNKNOWN": + case 0: + message.platformType = 0; + break; + case "CHROME": + case 1: + message.platformType = 1; + break; + case "FIREFOX": + case 2: + message.platformType = 2; + break; + case "IE": + case 3: + message.platformType = 3; + break; + case "OPERA": + case 4: + message.platformType = 4; + break; + case "SAFARI": + case 5: + message.platformType = 5; + break; + case "EDGE": + case 6: + message.platformType = 6; + break; + case "DESKTOP": + case 7: + message.platformType = 7; + break; + case "IPAD": + case 8: + message.platformType = 8; + break; + case "ANDROID_TABLET": + case 9: + message.platformType = 9; + break; + case "OHANA": + case 10: + message.platformType = 10; + break; + case "ALOHA": + case 11: + message.platformType = 11; + break; + case "CATALINA": + case 12: + message.platformType = 12; + break; + case "TCL_TV": + case 13: + message.platformType = 13; + break; + } + if (object.requireFullSync != null) + message.requireFullSync = Boolean(object.requireFullSync); + return message; + }; + + /** + * Creates a plain object from a DeviceProps message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.DeviceProps + * @static + * @param {proto.DeviceProps} message DeviceProps + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeviceProps.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.os = ""; + object.version = null; + object.platformType = options.enums === String ? "UNKNOWN" : 0; + object.requireFullSync = false; + } + if (message.os != null && message.hasOwnProperty("os")) + object.os = message.os; + if (message.version != null && message.hasOwnProperty("version")) + object.version = $root.proto.AppVersion.toObject(message.version, options); + if (message.platformType != null && message.hasOwnProperty("platformType")) + object.platformType = options.enums === String ? $root.proto.DeviceProps.DevicePropsPlatformType[message.platformType] : message.platformType; + if (message.requireFullSync != null && message.hasOwnProperty("requireFullSync")) + object.requireFullSync = message.requireFullSync; + return object; + }; + + /** + * Converts this DeviceProps to JSON. + * @function toJSON + * @memberof proto.DeviceProps + * @instance + * @returns {Object.} JSON object + */ + DeviceProps.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * DevicePropsPlatformType enum. + * @name proto.DeviceProps.DevicePropsPlatformType + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} CHROME=1 CHROME value + * @property {number} FIREFOX=2 FIREFOX value + * @property {number} IE=3 IE value + * @property {number} OPERA=4 OPERA value + * @property {number} SAFARI=5 SAFARI value + * @property {number} EDGE=6 EDGE value + * @property {number} DESKTOP=7 DESKTOP value + * @property {number} IPAD=8 IPAD value + * @property {number} ANDROID_TABLET=9 ANDROID_TABLET value + * @property {number} OHANA=10 OHANA value + * @property {number} ALOHA=11 ALOHA value + * @property {number} CATALINA=12 CATALINA value + * @property {number} TCL_TV=13 TCL_TV value + */ + DeviceProps.DevicePropsPlatformType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "CHROME"] = 1; + values[valuesById[2] = "FIREFOX"] = 2; + values[valuesById[3] = "IE"] = 3; + values[valuesById[4] = "OPERA"] = 4; + values[valuesById[5] = "SAFARI"] = 5; + values[valuesById[6] = "EDGE"] = 6; + values[valuesById[7] = "DESKTOP"] = 7; + values[valuesById[8] = "IPAD"] = 8; + values[valuesById[9] = "ANDROID_TABLET"] = 9; + values[valuesById[10] = "OHANA"] = 10; + values[valuesById[11] = "ALOHA"] = 11; + values[valuesById[12] = "CATALINA"] = 12; + values[valuesById[13] = "TCL_TV"] = 13; + return values; + })(); + + return DeviceProps; + })(); + proto.DeviceSentMessage = (function() { /** @@ -10263,6 +17678,454 @@ $root.proto = (function() { return DocumentMessage; })(); + proto.EphemeralSetting = (function() { + + /** + * Properties of an EphemeralSetting. + * @memberof proto + * @interface IEphemeralSetting + * @property {number|null} [duration] EphemeralSetting duration + * @property {number|Long|null} [timestamp] EphemeralSetting timestamp + */ + + /** + * Constructs a new EphemeralSetting. + * @memberof proto + * @classdesc Represents an EphemeralSetting. + * @implements IEphemeralSetting + * @constructor + * @param {proto.IEphemeralSetting=} [properties] Properties to set + */ + function EphemeralSetting(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EphemeralSetting duration. + * @member {number} duration + * @memberof proto.EphemeralSetting + * @instance + */ + EphemeralSetting.prototype.duration = 0; + + /** + * EphemeralSetting timestamp. + * @member {number|Long} timestamp + * @memberof proto.EphemeralSetting + * @instance + */ + EphemeralSetting.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new EphemeralSetting instance using the specified properties. + * @function create + * @memberof proto.EphemeralSetting + * @static + * @param {proto.IEphemeralSetting=} [properties] Properties to set + * @returns {proto.EphemeralSetting} EphemeralSetting instance + */ + EphemeralSetting.create = function create(properties) { + return new EphemeralSetting(properties); + }; + + /** + * Encodes the specified EphemeralSetting message. Does not implicitly {@link proto.EphemeralSetting.verify|verify} messages. + * @function encode + * @memberof proto.EphemeralSetting + * @static + * @param {proto.IEphemeralSetting} message EphemeralSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EphemeralSetting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) + writer.uint32(/* id 1, wireType 5 =*/13).sfixed32(message.duration); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + writer.uint32(/* id 2, wireType 1 =*/17).sfixed64(message.timestamp); + return writer; + }; + + /** + * Encodes the specified EphemeralSetting message, length delimited. Does not implicitly {@link proto.EphemeralSetting.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.EphemeralSetting + * @static + * @param {proto.IEphemeralSetting} message EphemeralSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EphemeralSetting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EphemeralSetting message from the specified reader or buffer. + * @function decode + * @memberof proto.EphemeralSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.EphemeralSetting} EphemeralSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EphemeralSetting.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.EphemeralSetting(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.duration = reader.sfixed32(); + break; + case 2: + message.timestamp = reader.sfixed64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EphemeralSetting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.EphemeralSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.EphemeralSetting} EphemeralSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EphemeralSetting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EphemeralSetting message. + * @function verify + * @memberof proto.EphemeralSetting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EphemeralSetting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.duration != null && message.hasOwnProperty("duration")) + if (!$util.isInteger(message.duration)) + return "duration: integer expected"; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) + return "timestamp: integer|Long expected"; + return null; + }; + + /** + * Creates an EphemeralSetting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.EphemeralSetting + * @static + * @param {Object.} object Plain object + * @returns {proto.EphemeralSetting} EphemeralSetting + */ + EphemeralSetting.fromObject = function fromObject(object) { + if (object instanceof $root.proto.EphemeralSetting) + return object; + var message = new $root.proto.EphemeralSetting(); + if (object.duration != null) + message.duration = object.duration | 0; + if (object.timestamp != null) + if ($util.Long) + (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = false; + else if (typeof object.timestamp === "string") + message.timestamp = parseInt(object.timestamp, 10); + else if (typeof object.timestamp === "number") + message.timestamp = object.timestamp; + else if (typeof object.timestamp === "object") + message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an EphemeralSetting message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.EphemeralSetting + * @static + * @param {proto.EphemeralSetting} message EphemeralSetting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EphemeralSetting.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.duration = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.timestamp = options.longs === String ? "0" : 0; + } + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = message.duration; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (typeof message.timestamp === "number") + object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; + else + object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() : message.timestamp; + return object; + }; + + /** + * Converts this EphemeralSetting to JSON. + * @function toJSON + * @memberof proto.EphemeralSetting + * @instance + * @returns {Object.} JSON object + */ + EphemeralSetting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EphemeralSetting; + })(); + + proto.ExitCode = (function() { + + /** + * Properties of an ExitCode. + * @memberof proto + * @interface IExitCode + * @property {number|Long|null} [code] ExitCode code + * @property {string|null} [text] ExitCode text + */ + + /** + * Constructs a new ExitCode. + * @memberof proto + * @classdesc Represents an ExitCode. + * @implements IExitCode + * @constructor + * @param {proto.IExitCode=} [properties] Properties to set + */ + function ExitCode(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExitCode code. + * @member {number|Long} code + * @memberof proto.ExitCode + * @instance + */ + ExitCode.prototype.code = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * ExitCode text. + * @member {string} text + * @memberof proto.ExitCode + * @instance + */ + ExitCode.prototype.text = ""; + + /** + * Creates a new ExitCode instance using the specified properties. + * @function create + * @memberof proto.ExitCode + * @static + * @param {proto.IExitCode=} [properties] Properties to set + * @returns {proto.ExitCode} ExitCode instance + */ + ExitCode.create = function create(properties) { + return new ExitCode(properties); + }; + + /** + * Encodes the specified ExitCode message. Does not implicitly {@link proto.ExitCode.verify|verify} messages. + * @function encode + * @memberof proto.ExitCode + * @static + * @param {proto.IExitCode} message ExitCode message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExitCode.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.code); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.text); + return writer; + }; + + /** + * Encodes the specified ExitCode message, length delimited. Does not implicitly {@link proto.ExitCode.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ExitCode + * @static + * @param {proto.IExitCode} message ExitCode message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExitCode.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExitCode message from the specified reader or buffer. + * @function decode + * @memberof proto.ExitCode + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ExitCode} ExitCode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExitCode.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ExitCode(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.code = reader.uint64(); + break; + case 2: + message.text = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExitCode message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ExitCode + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ExitCode} ExitCode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExitCode.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExitCode message. + * @function verify + * @memberof proto.ExitCode + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExitCode.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code) && !(message.code && $util.isInteger(message.code.low) && $util.isInteger(message.code.high))) + return "code: integer|Long expected"; + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + return null; + }; + + /** + * Creates an ExitCode message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ExitCode + * @static + * @param {Object.} object Plain object + * @returns {proto.ExitCode} ExitCode + */ + ExitCode.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ExitCode) + return object; + var message = new $root.proto.ExitCode(); + if (object.code != null) + if ($util.Long) + (message.code = $util.Long.fromValue(object.code)).unsigned = true; + else if (typeof object.code === "string") + message.code = parseInt(object.code, 10); + else if (typeof object.code === "number") + message.code = object.code; + else if (typeof object.code === "object") + message.code = new $util.LongBits(object.code.low >>> 0, object.code.high >>> 0).toNumber(true); + if (object.text != null) + message.text = String(object.text); + return message; + }; + + /** + * Creates a plain object from an ExitCode message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ExitCode + * @static + * @param {proto.ExitCode} message ExitCode + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExitCode.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.code = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.code = options.longs === String ? "0" : 0; + object.text = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + if (typeof message.code === "number") + object.code = options.longs === String ? String(message.code) : message.code; + else + object.code = options.longs === String ? $util.Long.prototype.toString.call(message.code) : options.longs === Number ? new $util.LongBits(message.code.low >>> 0, message.code.high >>> 0).toNumber(true) : message.code; + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + return object; + }; + + /** + * Converts this ExitCode to JSON. + * @function toJSON + * @memberof proto.ExitCode + * @instance + * @returns {Object.} JSON object + */ + ExitCode.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExitCode; + })(); + proto.ExtendedTextMessage = (function() { /** @@ -11594,6 +19457,701 @@ $root.proto = (function() { return ExternalAdReplyInfo; })(); + proto.ExternalBlobReference = (function() { + + /** + * Properties of an ExternalBlobReference. + * @memberof proto + * @interface IExternalBlobReference + * @property {Uint8Array|null} [mediaKey] ExternalBlobReference mediaKey + * @property {string|null} [directPath] ExternalBlobReference directPath + * @property {string|null} [handle] ExternalBlobReference handle + * @property {number|Long|null} [fileSizeBytes] ExternalBlobReference fileSizeBytes + * @property {Uint8Array|null} [fileSha256] ExternalBlobReference fileSha256 + * @property {Uint8Array|null} [fileEncSha256] ExternalBlobReference fileEncSha256 + */ + + /** + * Constructs a new ExternalBlobReference. + * @memberof proto + * @classdesc Represents an ExternalBlobReference. + * @implements IExternalBlobReference + * @constructor + * @param {proto.IExternalBlobReference=} [properties] Properties to set + */ + function ExternalBlobReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExternalBlobReference mediaKey. + * @member {Uint8Array} mediaKey + * @memberof proto.ExternalBlobReference + * @instance + */ + ExternalBlobReference.prototype.mediaKey = $util.newBuffer([]); + + /** + * ExternalBlobReference directPath. + * @member {string} directPath + * @memberof proto.ExternalBlobReference + * @instance + */ + ExternalBlobReference.prototype.directPath = ""; + + /** + * ExternalBlobReference handle. + * @member {string} handle + * @memberof proto.ExternalBlobReference + * @instance + */ + ExternalBlobReference.prototype.handle = ""; + + /** + * ExternalBlobReference fileSizeBytes. + * @member {number|Long} fileSizeBytes + * @memberof proto.ExternalBlobReference + * @instance + */ + ExternalBlobReference.prototype.fileSizeBytes = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * ExternalBlobReference fileSha256. + * @member {Uint8Array} fileSha256 + * @memberof proto.ExternalBlobReference + * @instance + */ + ExternalBlobReference.prototype.fileSha256 = $util.newBuffer([]); + + /** + * ExternalBlobReference fileEncSha256. + * @member {Uint8Array} fileEncSha256 + * @memberof proto.ExternalBlobReference + * @instance + */ + ExternalBlobReference.prototype.fileEncSha256 = $util.newBuffer([]); + + /** + * Creates a new ExternalBlobReference instance using the specified properties. + * @function create + * @memberof proto.ExternalBlobReference + * @static + * @param {proto.IExternalBlobReference=} [properties] Properties to set + * @returns {proto.ExternalBlobReference} ExternalBlobReference instance + */ + ExternalBlobReference.create = function create(properties) { + return new ExternalBlobReference(properties); + }; + + /** + * Encodes the specified ExternalBlobReference message. Does not implicitly {@link proto.ExternalBlobReference.verify|verify} messages. + * @function encode + * @memberof proto.ExternalBlobReference + * @static + * @param {proto.IExternalBlobReference} message ExternalBlobReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExternalBlobReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.mediaKey); + if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.directPath); + if (message.handle != null && Object.hasOwnProperty.call(message, "handle")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.handle); + if (message.fileSizeBytes != null && Object.hasOwnProperty.call(message, "fileSizeBytes")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.fileSizeBytes); + if (message.fileSha256 != null && Object.hasOwnProperty.call(message, "fileSha256")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.fileSha256); + if (message.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.fileEncSha256); + return writer; + }; + + /** + * Encodes the specified ExternalBlobReference message, length delimited. Does not implicitly {@link proto.ExternalBlobReference.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ExternalBlobReference + * @static + * @param {proto.IExternalBlobReference} message ExternalBlobReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExternalBlobReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExternalBlobReference message from the specified reader or buffer. + * @function decode + * @memberof proto.ExternalBlobReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ExternalBlobReference} ExternalBlobReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExternalBlobReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ExternalBlobReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.mediaKey = reader.bytes(); + break; + case 2: + message.directPath = reader.string(); + break; + case 3: + message.handle = reader.string(); + break; + case 4: + message.fileSizeBytes = reader.uint64(); + break; + case 5: + message.fileSha256 = reader.bytes(); + break; + case 6: + message.fileEncSha256 = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExternalBlobReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ExternalBlobReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ExternalBlobReference} ExternalBlobReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExternalBlobReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExternalBlobReference message. + * @function verify + * @memberof proto.ExternalBlobReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExternalBlobReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) + if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey))) + return "mediaKey: buffer expected"; + if (message.directPath != null && message.hasOwnProperty("directPath")) + if (!$util.isString(message.directPath)) + return "directPath: string expected"; + if (message.handle != null && message.hasOwnProperty("handle")) + if (!$util.isString(message.handle)) + return "handle: string expected"; + if (message.fileSizeBytes != null && message.hasOwnProperty("fileSizeBytes")) + if (!$util.isInteger(message.fileSizeBytes) && !(message.fileSizeBytes && $util.isInteger(message.fileSizeBytes.low) && $util.isInteger(message.fileSizeBytes.high))) + return "fileSizeBytes: integer|Long expected"; + if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256))) + return "fileSha256: buffer expected"; + if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) + if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256))) + return "fileEncSha256: buffer expected"; + return null; + }; + + /** + * Creates an ExternalBlobReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ExternalBlobReference + * @static + * @param {Object.} object Plain object + * @returns {proto.ExternalBlobReference} ExternalBlobReference + */ + ExternalBlobReference.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ExternalBlobReference) + return object; + var message = new $root.proto.ExternalBlobReference(); + if (object.mediaKey != null) + if (typeof object.mediaKey === "string") + $util.base64.decode(object.mediaKey, message.mediaKey = $util.newBuffer($util.base64.length(object.mediaKey)), 0); + else if (object.mediaKey.length) + message.mediaKey = object.mediaKey; + if (object.directPath != null) + message.directPath = String(object.directPath); + if (object.handle != null) + message.handle = String(object.handle); + if (object.fileSizeBytes != null) + if ($util.Long) + (message.fileSizeBytes = $util.Long.fromValue(object.fileSizeBytes)).unsigned = true; + else if (typeof object.fileSizeBytes === "string") + message.fileSizeBytes = parseInt(object.fileSizeBytes, 10); + else if (typeof object.fileSizeBytes === "number") + message.fileSizeBytes = object.fileSizeBytes; + else if (typeof object.fileSizeBytes === "object") + message.fileSizeBytes = new $util.LongBits(object.fileSizeBytes.low >>> 0, object.fileSizeBytes.high >>> 0).toNumber(true); + if (object.fileSha256 != null) + if (typeof object.fileSha256 === "string") + $util.base64.decode(object.fileSha256, message.fileSha256 = $util.newBuffer($util.base64.length(object.fileSha256)), 0); + else if (object.fileSha256.length) + message.fileSha256 = object.fileSha256; + if (object.fileEncSha256 != null) + if (typeof object.fileEncSha256 === "string") + $util.base64.decode(object.fileEncSha256, message.fileEncSha256 = $util.newBuffer($util.base64.length(object.fileEncSha256)), 0); + else if (object.fileEncSha256.length) + message.fileEncSha256 = object.fileEncSha256; + return message; + }; + + /** + * Creates a plain object from an ExternalBlobReference message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ExternalBlobReference + * @static + * @param {proto.ExternalBlobReference} message ExternalBlobReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExternalBlobReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.mediaKey = ""; + else { + object.mediaKey = []; + if (options.bytes !== Array) + object.mediaKey = $util.newBuffer(object.mediaKey); + } + object.directPath = ""; + object.handle = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.fileSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.fileSizeBytes = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.fileSha256 = ""; + else { + object.fileSha256 = []; + if (options.bytes !== Array) + object.fileSha256 = $util.newBuffer(object.fileSha256); + } + if (options.bytes === String) + object.fileEncSha256 = ""; + else { + object.fileEncSha256 = []; + if (options.bytes !== Array) + object.fileEncSha256 = $util.newBuffer(object.fileEncSha256); + } + } + if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) + object.mediaKey = options.bytes === String ? $util.base64.encode(message.mediaKey, 0, message.mediaKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.mediaKey) : message.mediaKey; + if (message.directPath != null && message.hasOwnProperty("directPath")) + object.directPath = message.directPath; + if (message.handle != null && message.hasOwnProperty("handle")) + object.handle = message.handle; + if (message.fileSizeBytes != null && message.hasOwnProperty("fileSizeBytes")) + if (typeof message.fileSizeBytes === "number") + object.fileSizeBytes = options.longs === String ? String(message.fileSizeBytes) : message.fileSizeBytes; + else + object.fileSizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.fileSizeBytes) : options.longs === Number ? new $util.LongBits(message.fileSizeBytes.low >>> 0, message.fileSizeBytes.high >>> 0).toNumber(true) : message.fileSizeBytes; + if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + object.fileSha256 = options.bytes === String ? $util.base64.encode(message.fileSha256, 0, message.fileSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileSha256) : message.fileSha256; + if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) + object.fileEncSha256 = options.bytes === String ? $util.base64.encode(message.fileEncSha256, 0, message.fileEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileEncSha256) : message.fileEncSha256; + return object; + }; + + /** + * Converts this ExternalBlobReference to JSON. + * @function toJSON + * @memberof proto.ExternalBlobReference + * @instance + * @returns {Object.} JSON object + */ + ExternalBlobReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExternalBlobReference; + })(); + + proto.FavoriteStickerAction = (function() { + + /** + * Properties of a FavoriteStickerAction. + * @memberof proto + * @interface IFavoriteStickerAction + * @property {string|null} [directPath] FavoriteStickerAction directPath + * @property {string|null} [lastUploadTimestamp] FavoriteStickerAction lastUploadTimestamp + * @property {string|null} [handle] FavoriteStickerAction handle + * @property {string|null} [encFilehash] FavoriteStickerAction encFilehash + * @property {string|null} [stickerHashWithoutMeta] FavoriteStickerAction stickerHashWithoutMeta + * @property {string|null} [mediaKey] FavoriteStickerAction mediaKey + * @property {number|Long|null} [mediaKeyTimestamp] FavoriteStickerAction mediaKeyTimestamp + * @property {boolean|null} [isFavorite] FavoriteStickerAction isFavorite + */ + + /** + * Constructs a new FavoriteStickerAction. + * @memberof proto + * @classdesc Represents a FavoriteStickerAction. + * @implements IFavoriteStickerAction + * @constructor + * @param {proto.IFavoriteStickerAction=} [properties] Properties to set + */ + function FavoriteStickerAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FavoriteStickerAction directPath. + * @member {string} directPath + * @memberof proto.FavoriteStickerAction + * @instance + */ + FavoriteStickerAction.prototype.directPath = ""; + + /** + * FavoriteStickerAction lastUploadTimestamp. + * @member {string} lastUploadTimestamp + * @memberof proto.FavoriteStickerAction + * @instance + */ + FavoriteStickerAction.prototype.lastUploadTimestamp = ""; + + /** + * FavoriteStickerAction handle. + * @member {string} handle + * @memberof proto.FavoriteStickerAction + * @instance + */ + FavoriteStickerAction.prototype.handle = ""; + + /** + * FavoriteStickerAction encFilehash. + * @member {string} encFilehash + * @memberof proto.FavoriteStickerAction + * @instance + */ + FavoriteStickerAction.prototype.encFilehash = ""; + + /** + * FavoriteStickerAction stickerHashWithoutMeta. + * @member {string} stickerHashWithoutMeta + * @memberof proto.FavoriteStickerAction + * @instance + */ + FavoriteStickerAction.prototype.stickerHashWithoutMeta = ""; + + /** + * FavoriteStickerAction mediaKey. + * @member {string} mediaKey + * @memberof proto.FavoriteStickerAction + * @instance + */ + FavoriteStickerAction.prototype.mediaKey = ""; + + /** + * FavoriteStickerAction mediaKeyTimestamp. + * @member {number|Long} mediaKeyTimestamp + * @memberof proto.FavoriteStickerAction + * @instance + */ + FavoriteStickerAction.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * FavoriteStickerAction isFavorite. + * @member {boolean} isFavorite + * @memberof proto.FavoriteStickerAction + * @instance + */ + FavoriteStickerAction.prototype.isFavorite = false; + + /** + * Creates a new FavoriteStickerAction instance using the specified properties. + * @function create + * @memberof proto.FavoriteStickerAction + * @static + * @param {proto.IFavoriteStickerAction=} [properties] Properties to set + * @returns {proto.FavoriteStickerAction} FavoriteStickerAction instance + */ + FavoriteStickerAction.create = function create(properties) { + return new FavoriteStickerAction(properties); + }; + + /** + * Encodes the specified FavoriteStickerAction message. Does not implicitly {@link proto.FavoriteStickerAction.verify|verify} messages. + * @function encode + * @memberof proto.FavoriteStickerAction + * @static + * @param {proto.IFavoriteStickerAction} message FavoriteStickerAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FavoriteStickerAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.directPath); + if (message.lastUploadTimestamp != null && Object.hasOwnProperty.call(message, "lastUploadTimestamp")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.lastUploadTimestamp); + if (message.handle != null && Object.hasOwnProperty.call(message, "handle")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.handle); + if (message.encFilehash != null && Object.hasOwnProperty.call(message, "encFilehash")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.encFilehash); + if (message.stickerHashWithoutMeta != null && Object.hasOwnProperty.call(message, "stickerHashWithoutMeta")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.stickerHashWithoutMeta); + if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.mediaKey); + if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.mediaKeyTimestamp); + if (message.isFavorite != null && Object.hasOwnProperty.call(message, "isFavorite")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.isFavorite); + return writer; + }; + + /** + * Encodes the specified FavoriteStickerAction message, length delimited. Does not implicitly {@link proto.FavoriteStickerAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.FavoriteStickerAction + * @static + * @param {proto.IFavoriteStickerAction} message FavoriteStickerAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FavoriteStickerAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FavoriteStickerAction message from the specified reader or buffer. + * @function decode + * @memberof proto.FavoriteStickerAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.FavoriteStickerAction} FavoriteStickerAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FavoriteStickerAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.FavoriteStickerAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.directPath = reader.string(); + break; + case 2: + message.lastUploadTimestamp = reader.string(); + break; + case 3: + message.handle = reader.string(); + break; + case 4: + message.encFilehash = reader.string(); + break; + case 5: + message.stickerHashWithoutMeta = reader.string(); + break; + case 6: + message.mediaKey = reader.string(); + break; + case 7: + message.mediaKeyTimestamp = reader.int64(); + break; + case 8: + message.isFavorite = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FavoriteStickerAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.FavoriteStickerAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.FavoriteStickerAction} FavoriteStickerAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FavoriteStickerAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FavoriteStickerAction message. + * @function verify + * @memberof proto.FavoriteStickerAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FavoriteStickerAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.directPath != null && message.hasOwnProperty("directPath")) + if (!$util.isString(message.directPath)) + return "directPath: string expected"; + if (message.lastUploadTimestamp != null && message.hasOwnProperty("lastUploadTimestamp")) + if (!$util.isString(message.lastUploadTimestamp)) + return "lastUploadTimestamp: string expected"; + if (message.handle != null && message.hasOwnProperty("handle")) + if (!$util.isString(message.handle)) + return "handle: string expected"; + if (message.encFilehash != null && message.hasOwnProperty("encFilehash")) + if (!$util.isString(message.encFilehash)) + return "encFilehash: string expected"; + if (message.stickerHashWithoutMeta != null && message.hasOwnProperty("stickerHashWithoutMeta")) + if (!$util.isString(message.stickerHashWithoutMeta)) + return "stickerHashWithoutMeta: string expected"; + if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) + if (!$util.isString(message.mediaKey)) + return "mediaKey: string expected"; + if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) + if (!$util.isInteger(message.mediaKeyTimestamp) && !(message.mediaKeyTimestamp && $util.isInteger(message.mediaKeyTimestamp.low) && $util.isInteger(message.mediaKeyTimestamp.high))) + return "mediaKeyTimestamp: integer|Long expected"; + if (message.isFavorite != null && message.hasOwnProperty("isFavorite")) + if (typeof message.isFavorite !== "boolean") + return "isFavorite: boolean expected"; + return null; + }; + + /** + * Creates a FavoriteStickerAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.FavoriteStickerAction + * @static + * @param {Object.} object Plain object + * @returns {proto.FavoriteStickerAction} FavoriteStickerAction + */ + FavoriteStickerAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.FavoriteStickerAction) + return object; + var message = new $root.proto.FavoriteStickerAction(); + if (object.directPath != null) + message.directPath = String(object.directPath); + if (object.lastUploadTimestamp != null) + message.lastUploadTimestamp = String(object.lastUploadTimestamp); + if (object.handle != null) + message.handle = String(object.handle); + if (object.encFilehash != null) + message.encFilehash = String(object.encFilehash); + if (object.stickerHashWithoutMeta != null) + message.stickerHashWithoutMeta = String(object.stickerHashWithoutMeta); + if (object.mediaKey != null) + message.mediaKey = String(object.mediaKey); + if (object.mediaKeyTimestamp != null) + if ($util.Long) + (message.mediaKeyTimestamp = $util.Long.fromValue(object.mediaKeyTimestamp)).unsigned = false; + else if (typeof object.mediaKeyTimestamp === "string") + message.mediaKeyTimestamp = parseInt(object.mediaKeyTimestamp, 10); + else if (typeof object.mediaKeyTimestamp === "number") + message.mediaKeyTimestamp = object.mediaKeyTimestamp; + else if (typeof object.mediaKeyTimestamp === "object") + message.mediaKeyTimestamp = new $util.LongBits(object.mediaKeyTimestamp.low >>> 0, object.mediaKeyTimestamp.high >>> 0).toNumber(); + if (object.isFavorite != null) + message.isFavorite = Boolean(object.isFavorite); + return message; + }; + + /** + * Creates a plain object from a FavoriteStickerAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.FavoriteStickerAction + * @static + * @param {proto.FavoriteStickerAction} message FavoriteStickerAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FavoriteStickerAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.directPath = ""; + object.lastUploadTimestamp = ""; + object.handle = ""; + object.encFilehash = ""; + object.stickerHashWithoutMeta = ""; + object.mediaKey = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.mediaKeyTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.mediaKeyTimestamp = options.longs === String ? "0" : 0; + object.isFavorite = false; + } + if (message.directPath != null && message.hasOwnProperty("directPath")) + object.directPath = message.directPath; + if (message.lastUploadTimestamp != null && message.hasOwnProperty("lastUploadTimestamp")) + object.lastUploadTimestamp = message.lastUploadTimestamp; + if (message.handle != null && message.hasOwnProperty("handle")) + object.handle = message.handle; + if (message.encFilehash != null && message.hasOwnProperty("encFilehash")) + object.encFilehash = message.encFilehash; + if (message.stickerHashWithoutMeta != null && message.hasOwnProperty("stickerHashWithoutMeta")) + object.stickerHashWithoutMeta = message.stickerHashWithoutMeta; + if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) + object.mediaKey = message.mediaKey; + if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) + if (typeof message.mediaKeyTimestamp === "number") + object.mediaKeyTimestamp = options.longs === String ? String(message.mediaKeyTimestamp) : message.mediaKeyTimestamp; + else + object.mediaKeyTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.mediaKeyTimestamp) : options.longs === Number ? new $util.LongBits(message.mediaKeyTimestamp.low >>> 0, message.mediaKeyTimestamp.high >>> 0).toNumber() : message.mediaKeyTimestamp; + if (message.isFavorite != null && message.hasOwnProperty("isFavorite")) + object.isFavorite = message.isFavorite; + return object; + }; + + /** + * Converts this FavoriteStickerAction to JSON. + * @function toJSON + * @memberof proto.FavoriteStickerAction + * @instance + * @returns {Object.} JSON object + */ + FavoriteStickerAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FavoriteStickerAction; + })(); + proto.Footer = (function() { /** @@ -12420,6 +20978,449 @@ $root.proto = (function() { return FutureProofMessage; })(); + proto.GlobalSettings = (function() { + + /** + * Properties of a GlobalSettings. + * @memberof proto + * @interface IGlobalSettings + * @property {proto.IWallpaperSettings|null} [lightThemeWallpaper] GlobalSettings lightThemeWallpaper + * @property {proto.MediaVisibility|null} [mediaVisibility] GlobalSettings mediaVisibility + * @property {proto.IWallpaperSettings|null} [darkThemeWallpaper] GlobalSettings darkThemeWallpaper + * @property {proto.IAutoDownloadSettings|null} [autoDownloadWiFi] GlobalSettings autoDownloadWiFi + * @property {proto.IAutoDownloadSettings|null} [autoDownloadCellular] GlobalSettings autoDownloadCellular + * @property {proto.IAutoDownloadSettings|null} [autoDownloadRoaming] GlobalSettings autoDownloadRoaming + * @property {boolean|null} [showIndividualNotificationsPreview] GlobalSettings showIndividualNotificationsPreview + * @property {boolean|null} [showGroupNotificationsPreview] GlobalSettings showGroupNotificationsPreview + * @property {number|null} [disappearingModeDuration] GlobalSettings disappearingModeDuration + * @property {number|Long|null} [disappearingModeTimestamp] GlobalSettings disappearingModeTimestamp + */ + + /** + * Constructs a new GlobalSettings. + * @memberof proto + * @classdesc Represents a GlobalSettings. + * @implements IGlobalSettings + * @constructor + * @param {proto.IGlobalSettings=} [properties] Properties to set + */ + function GlobalSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GlobalSettings lightThemeWallpaper. + * @member {proto.IWallpaperSettings|null|undefined} lightThemeWallpaper + * @memberof proto.GlobalSettings + * @instance + */ + GlobalSettings.prototype.lightThemeWallpaper = null; + + /** + * GlobalSettings mediaVisibility. + * @member {proto.MediaVisibility} mediaVisibility + * @memberof proto.GlobalSettings + * @instance + */ + GlobalSettings.prototype.mediaVisibility = 0; + + /** + * GlobalSettings darkThemeWallpaper. + * @member {proto.IWallpaperSettings|null|undefined} darkThemeWallpaper + * @memberof proto.GlobalSettings + * @instance + */ + GlobalSettings.prototype.darkThemeWallpaper = null; + + /** + * GlobalSettings autoDownloadWiFi. + * @member {proto.IAutoDownloadSettings|null|undefined} autoDownloadWiFi + * @memberof proto.GlobalSettings + * @instance + */ + GlobalSettings.prototype.autoDownloadWiFi = null; + + /** + * GlobalSettings autoDownloadCellular. + * @member {proto.IAutoDownloadSettings|null|undefined} autoDownloadCellular + * @memberof proto.GlobalSettings + * @instance + */ + GlobalSettings.prototype.autoDownloadCellular = null; + + /** + * GlobalSettings autoDownloadRoaming. + * @member {proto.IAutoDownloadSettings|null|undefined} autoDownloadRoaming + * @memberof proto.GlobalSettings + * @instance + */ + GlobalSettings.prototype.autoDownloadRoaming = null; + + /** + * GlobalSettings showIndividualNotificationsPreview. + * @member {boolean} showIndividualNotificationsPreview + * @memberof proto.GlobalSettings + * @instance + */ + GlobalSettings.prototype.showIndividualNotificationsPreview = false; + + /** + * GlobalSettings showGroupNotificationsPreview. + * @member {boolean} showGroupNotificationsPreview + * @memberof proto.GlobalSettings + * @instance + */ + GlobalSettings.prototype.showGroupNotificationsPreview = false; + + /** + * GlobalSettings disappearingModeDuration. + * @member {number} disappearingModeDuration + * @memberof proto.GlobalSettings + * @instance + */ + GlobalSettings.prototype.disappearingModeDuration = 0; + + /** + * GlobalSettings disappearingModeTimestamp. + * @member {number|Long} disappearingModeTimestamp + * @memberof proto.GlobalSettings + * @instance + */ + GlobalSettings.prototype.disappearingModeTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new GlobalSettings instance using the specified properties. + * @function create + * @memberof proto.GlobalSettings + * @static + * @param {proto.IGlobalSettings=} [properties] Properties to set + * @returns {proto.GlobalSettings} GlobalSettings instance + */ + GlobalSettings.create = function create(properties) { + return new GlobalSettings(properties); + }; + + /** + * Encodes the specified GlobalSettings message. Does not implicitly {@link proto.GlobalSettings.verify|verify} messages. + * @function encode + * @memberof proto.GlobalSettings + * @static + * @param {proto.IGlobalSettings} message GlobalSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GlobalSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lightThemeWallpaper != null && Object.hasOwnProperty.call(message, "lightThemeWallpaper")) + $root.proto.WallpaperSettings.encode(message.lightThemeWallpaper, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.mediaVisibility != null && Object.hasOwnProperty.call(message, "mediaVisibility")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.mediaVisibility); + if (message.darkThemeWallpaper != null && Object.hasOwnProperty.call(message, "darkThemeWallpaper")) + $root.proto.WallpaperSettings.encode(message.darkThemeWallpaper, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.autoDownloadWiFi != null && Object.hasOwnProperty.call(message, "autoDownloadWiFi")) + $root.proto.AutoDownloadSettings.encode(message.autoDownloadWiFi, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.autoDownloadCellular != null && Object.hasOwnProperty.call(message, "autoDownloadCellular")) + $root.proto.AutoDownloadSettings.encode(message.autoDownloadCellular, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.autoDownloadRoaming != null && Object.hasOwnProperty.call(message, "autoDownloadRoaming")) + $root.proto.AutoDownloadSettings.encode(message.autoDownloadRoaming, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.showIndividualNotificationsPreview != null && Object.hasOwnProperty.call(message, "showIndividualNotificationsPreview")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.showIndividualNotificationsPreview); + if (message.showGroupNotificationsPreview != null && Object.hasOwnProperty.call(message, "showGroupNotificationsPreview")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.showGroupNotificationsPreview); + if (message.disappearingModeDuration != null && Object.hasOwnProperty.call(message, "disappearingModeDuration")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.disappearingModeDuration); + if (message.disappearingModeTimestamp != null && Object.hasOwnProperty.call(message, "disappearingModeTimestamp")) + writer.uint32(/* id 10, wireType 0 =*/80).int64(message.disappearingModeTimestamp); + return writer; + }; + + /** + * Encodes the specified GlobalSettings message, length delimited. Does not implicitly {@link proto.GlobalSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.GlobalSettings + * @static + * @param {proto.IGlobalSettings} message GlobalSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GlobalSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GlobalSettings message from the specified reader or buffer. + * @function decode + * @memberof proto.GlobalSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.GlobalSettings} GlobalSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GlobalSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.GlobalSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.lightThemeWallpaper = $root.proto.WallpaperSettings.decode(reader, reader.uint32()); + break; + case 2: + message.mediaVisibility = reader.int32(); + break; + case 3: + message.darkThemeWallpaper = $root.proto.WallpaperSettings.decode(reader, reader.uint32()); + break; + case 4: + message.autoDownloadWiFi = $root.proto.AutoDownloadSettings.decode(reader, reader.uint32()); + break; + case 5: + message.autoDownloadCellular = $root.proto.AutoDownloadSettings.decode(reader, reader.uint32()); + break; + case 6: + message.autoDownloadRoaming = $root.proto.AutoDownloadSettings.decode(reader, reader.uint32()); + break; + case 7: + message.showIndividualNotificationsPreview = reader.bool(); + break; + case 8: + message.showGroupNotificationsPreview = reader.bool(); + break; + case 9: + message.disappearingModeDuration = reader.int32(); + break; + case 10: + message.disappearingModeTimestamp = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GlobalSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.GlobalSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.GlobalSettings} GlobalSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GlobalSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GlobalSettings message. + * @function verify + * @memberof proto.GlobalSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GlobalSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.lightThemeWallpaper != null && message.hasOwnProperty("lightThemeWallpaper")) { + var error = $root.proto.WallpaperSettings.verify(message.lightThemeWallpaper); + if (error) + return "lightThemeWallpaper." + error; + } + if (message.mediaVisibility != null && message.hasOwnProperty("mediaVisibility")) + switch (message.mediaVisibility) { + default: + return "mediaVisibility: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.darkThemeWallpaper != null && message.hasOwnProperty("darkThemeWallpaper")) { + var error = $root.proto.WallpaperSettings.verify(message.darkThemeWallpaper); + if (error) + return "darkThemeWallpaper." + error; + } + if (message.autoDownloadWiFi != null && message.hasOwnProperty("autoDownloadWiFi")) { + var error = $root.proto.AutoDownloadSettings.verify(message.autoDownloadWiFi); + if (error) + return "autoDownloadWiFi." + error; + } + if (message.autoDownloadCellular != null && message.hasOwnProperty("autoDownloadCellular")) { + var error = $root.proto.AutoDownloadSettings.verify(message.autoDownloadCellular); + if (error) + return "autoDownloadCellular." + error; + } + if (message.autoDownloadRoaming != null && message.hasOwnProperty("autoDownloadRoaming")) { + var error = $root.proto.AutoDownloadSettings.verify(message.autoDownloadRoaming); + if (error) + return "autoDownloadRoaming." + error; + } + if (message.showIndividualNotificationsPreview != null && message.hasOwnProperty("showIndividualNotificationsPreview")) + if (typeof message.showIndividualNotificationsPreview !== "boolean") + return "showIndividualNotificationsPreview: boolean expected"; + if (message.showGroupNotificationsPreview != null && message.hasOwnProperty("showGroupNotificationsPreview")) + if (typeof message.showGroupNotificationsPreview !== "boolean") + return "showGroupNotificationsPreview: boolean expected"; + if (message.disappearingModeDuration != null && message.hasOwnProperty("disappearingModeDuration")) + if (!$util.isInteger(message.disappearingModeDuration)) + return "disappearingModeDuration: integer expected"; + if (message.disappearingModeTimestamp != null && message.hasOwnProperty("disappearingModeTimestamp")) + if (!$util.isInteger(message.disappearingModeTimestamp) && !(message.disappearingModeTimestamp && $util.isInteger(message.disappearingModeTimestamp.low) && $util.isInteger(message.disappearingModeTimestamp.high))) + return "disappearingModeTimestamp: integer|Long expected"; + return null; + }; + + /** + * Creates a GlobalSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.GlobalSettings + * @static + * @param {Object.} object Plain object + * @returns {proto.GlobalSettings} GlobalSettings + */ + GlobalSettings.fromObject = function fromObject(object) { + if (object instanceof $root.proto.GlobalSettings) + return object; + var message = new $root.proto.GlobalSettings(); + if (object.lightThemeWallpaper != null) { + if (typeof object.lightThemeWallpaper !== "object") + throw TypeError(".proto.GlobalSettings.lightThemeWallpaper: object expected"); + message.lightThemeWallpaper = $root.proto.WallpaperSettings.fromObject(object.lightThemeWallpaper); + } + switch (object.mediaVisibility) { + case "DEFAULT": + case 0: + message.mediaVisibility = 0; + break; + case "OFF": + case 1: + message.mediaVisibility = 1; + break; + case "ON": + case 2: + message.mediaVisibility = 2; + break; + } + if (object.darkThemeWallpaper != null) { + if (typeof object.darkThemeWallpaper !== "object") + throw TypeError(".proto.GlobalSettings.darkThemeWallpaper: object expected"); + message.darkThemeWallpaper = $root.proto.WallpaperSettings.fromObject(object.darkThemeWallpaper); + } + if (object.autoDownloadWiFi != null) { + if (typeof object.autoDownloadWiFi !== "object") + throw TypeError(".proto.GlobalSettings.autoDownloadWiFi: object expected"); + message.autoDownloadWiFi = $root.proto.AutoDownloadSettings.fromObject(object.autoDownloadWiFi); + } + if (object.autoDownloadCellular != null) { + if (typeof object.autoDownloadCellular !== "object") + throw TypeError(".proto.GlobalSettings.autoDownloadCellular: object expected"); + message.autoDownloadCellular = $root.proto.AutoDownloadSettings.fromObject(object.autoDownloadCellular); + } + if (object.autoDownloadRoaming != null) { + if (typeof object.autoDownloadRoaming !== "object") + throw TypeError(".proto.GlobalSettings.autoDownloadRoaming: object expected"); + message.autoDownloadRoaming = $root.proto.AutoDownloadSettings.fromObject(object.autoDownloadRoaming); + } + if (object.showIndividualNotificationsPreview != null) + message.showIndividualNotificationsPreview = Boolean(object.showIndividualNotificationsPreview); + if (object.showGroupNotificationsPreview != null) + message.showGroupNotificationsPreview = Boolean(object.showGroupNotificationsPreview); + if (object.disappearingModeDuration != null) + message.disappearingModeDuration = object.disappearingModeDuration | 0; + if (object.disappearingModeTimestamp != null) + if ($util.Long) + (message.disappearingModeTimestamp = $util.Long.fromValue(object.disappearingModeTimestamp)).unsigned = false; + else if (typeof object.disappearingModeTimestamp === "string") + message.disappearingModeTimestamp = parseInt(object.disappearingModeTimestamp, 10); + else if (typeof object.disappearingModeTimestamp === "number") + message.disappearingModeTimestamp = object.disappearingModeTimestamp; + else if (typeof object.disappearingModeTimestamp === "object") + message.disappearingModeTimestamp = new $util.LongBits(object.disappearingModeTimestamp.low >>> 0, object.disappearingModeTimestamp.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a GlobalSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.GlobalSettings + * @static + * @param {proto.GlobalSettings} message GlobalSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GlobalSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.lightThemeWallpaper = null; + object.mediaVisibility = options.enums === String ? "DEFAULT" : 0; + object.darkThemeWallpaper = null; + object.autoDownloadWiFi = null; + object.autoDownloadCellular = null; + object.autoDownloadRoaming = null; + object.showIndividualNotificationsPreview = false; + object.showGroupNotificationsPreview = false; + object.disappearingModeDuration = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.disappearingModeTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.disappearingModeTimestamp = options.longs === String ? "0" : 0; + } + if (message.lightThemeWallpaper != null && message.hasOwnProperty("lightThemeWallpaper")) + object.lightThemeWallpaper = $root.proto.WallpaperSettings.toObject(message.lightThemeWallpaper, options); + if (message.mediaVisibility != null && message.hasOwnProperty("mediaVisibility")) + object.mediaVisibility = options.enums === String ? $root.proto.MediaVisibility[message.mediaVisibility] : message.mediaVisibility; + if (message.darkThemeWallpaper != null && message.hasOwnProperty("darkThemeWallpaper")) + object.darkThemeWallpaper = $root.proto.WallpaperSettings.toObject(message.darkThemeWallpaper, options); + if (message.autoDownloadWiFi != null && message.hasOwnProperty("autoDownloadWiFi")) + object.autoDownloadWiFi = $root.proto.AutoDownloadSettings.toObject(message.autoDownloadWiFi, options); + if (message.autoDownloadCellular != null && message.hasOwnProperty("autoDownloadCellular")) + object.autoDownloadCellular = $root.proto.AutoDownloadSettings.toObject(message.autoDownloadCellular, options); + if (message.autoDownloadRoaming != null && message.hasOwnProperty("autoDownloadRoaming")) + object.autoDownloadRoaming = $root.proto.AutoDownloadSettings.toObject(message.autoDownloadRoaming, options); + if (message.showIndividualNotificationsPreview != null && message.hasOwnProperty("showIndividualNotificationsPreview")) + object.showIndividualNotificationsPreview = message.showIndividualNotificationsPreview; + if (message.showGroupNotificationsPreview != null && message.hasOwnProperty("showGroupNotificationsPreview")) + object.showGroupNotificationsPreview = message.showGroupNotificationsPreview; + if (message.disappearingModeDuration != null && message.hasOwnProperty("disappearingModeDuration")) + object.disappearingModeDuration = message.disappearingModeDuration; + if (message.disappearingModeTimestamp != null && message.hasOwnProperty("disappearingModeTimestamp")) + if (typeof message.disappearingModeTimestamp === "number") + object.disappearingModeTimestamp = options.longs === String ? String(message.disappearingModeTimestamp) : message.disappearingModeTimestamp; + else + object.disappearingModeTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.disappearingModeTimestamp) : options.longs === Number ? new $util.LongBits(message.disappearingModeTimestamp.low >>> 0, message.disappearingModeTimestamp.high >>> 0).toNumber() : message.disappearingModeTimestamp; + return object; + }; + + /** + * Converts this GlobalSettings to JSON. + * @function toJSON + * @memberof proto.GlobalSettings + * @instance + * @returns {Object.} JSON object + */ + GlobalSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GlobalSettings; + })(); + proto.GroupInviteMessage = (function() { /** @@ -12817,30 +21818,25 @@ $root.proto = (function() { return GroupInviteMessage; })(); - proto.Header = (function() { + proto.GroupParticipant = (function() { /** - * Properties of a Header. + * Properties of a GroupParticipant. * @memberof proto - * @interface IHeader - * @property {string|null} [title] Header title - * @property {string|null} [subtitle] Header subtitle - * @property {boolean|null} [hasMediaAttachment] Header hasMediaAttachment - * @property {proto.IDocumentMessage|null} [documentMessage] Header documentMessage - * @property {proto.IImageMessage|null} [imageMessage] Header imageMessage - * @property {Uint8Array|null} [jpegThumbnail] Header jpegThumbnail - * @property {proto.IVideoMessage|null} [videoMessage] Header videoMessage + * @interface IGroupParticipant + * @property {string} userJid GroupParticipant userJid + * @property {proto.GroupParticipant.GroupParticipantRank|null} [rank] GroupParticipant rank */ /** - * Constructs a new Header. + * Constructs a new GroupParticipant. * @memberof proto - * @classdesc Represents a Header. - * @implements IHeader + * @classdesc Represents a GroupParticipant. + * @implements IGroupParticipant * @constructor - * @param {proto.IHeader=} [properties] Properties to set + * @param {proto.IGroupParticipant=} [properties] Properties to set */ - function Header(properties) { + function GroupParticipant(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12848,1190 +21844,222 @@ $root.proto = (function() { } /** - * Header title. - * @member {string} title - * @memberof proto.Header + * GroupParticipant userJid. + * @member {string} userJid + * @memberof proto.GroupParticipant * @instance */ - Header.prototype.title = ""; + GroupParticipant.prototype.userJid = ""; /** - * Header subtitle. - * @member {string} subtitle - * @memberof proto.Header + * GroupParticipant rank. + * @member {proto.GroupParticipant.GroupParticipantRank} rank + * @memberof proto.GroupParticipant * @instance */ - Header.prototype.subtitle = ""; + GroupParticipant.prototype.rank = 0; /** - * Header hasMediaAttachment. - * @member {boolean} hasMediaAttachment - * @memberof proto.Header - * @instance - */ - Header.prototype.hasMediaAttachment = false; - - /** - * Header documentMessage. - * @member {proto.IDocumentMessage|null|undefined} documentMessage - * @memberof proto.Header - * @instance - */ - Header.prototype.documentMessage = null; - - /** - * Header imageMessage. - * @member {proto.IImageMessage|null|undefined} imageMessage - * @memberof proto.Header - * @instance - */ - Header.prototype.imageMessage = null; - - /** - * Header jpegThumbnail. - * @member {Uint8Array|null|undefined} jpegThumbnail - * @memberof proto.Header - * @instance - */ - Header.prototype.jpegThumbnail = null; - - /** - * Header videoMessage. - * @member {proto.IVideoMessage|null|undefined} videoMessage - * @memberof proto.Header - * @instance - */ - Header.prototype.videoMessage = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Header media. - * @member {"documentMessage"|"imageMessage"|"jpegThumbnail"|"videoMessage"|undefined} media - * @memberof proto.Header - * @instance - */ - Object.defineProperty(Header.prototype, "media", { - get: $util.oneOfGetter($oneOfFields = ["documentMessage", "imageMessage", "jpegThumbnail", "videoMessage"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Header instance using the specified properties. + * Creates a new GroupParticipant instance using the specified properties. * @function create - * @memberof proto.Header + * @memberof proto.GroupParticipant * @static - * @param {proto.IHeader=} [properties] Properties to set - * @returns {proto.Header} Header instance + * @param {proto.IGroupParticipant=} [properties] Properties to set + * @returns {proto.GroupParticipant} GroupParticipant instance */ - Header.create = function create(properties) { - return new Header(properties); + GroupParticipant.create = function create(properties) { + return new GroupParticipant(properties); }; /** - * Encodes the specified Header message. Does not implicitly {@link proto.Header.verify|verify} messages. + * Encodes the specified GroupParticipant message. Does not implicitly {@link proto.GroupParticipant.verify|verify} messages. * @function encode - * @memberof proto.Header + * @memberof proto.GroupParticipant * @static - * @param {proto.IHeader} message Header message or plain object to encode + * @param {proto.IGroupParticipant} message GroupParticipant message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Header.encode = function encode(message, writer) { + GroupParticipant.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); - if (message.subtitle != null && Object.hasOwnProperty.call(message, "subtitle")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.subtitle); - if (message.documentMessage != null && Object.hasOwnProperty.call(message, "documentMessage")) - $root.proto.DocumentMessage.encode(message.documentMessage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.imageMessage != null && Object.hasOwnProperty.call(message, "imageMessage")) - $root.proto.ImageMessage.encode(message.imageMessage, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.hasMediaAttachment != null && Object.hasOwnProperty.call(message, "hasMediaAttachment")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.hasMediaAttachment); - if (message.jpegThumbnail != null && Object.hasOwnProperty.call(message, "jpegThumbnail")) - writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.jpegThumbnail); - if (message.videoMessage != null && Object.hasOwnProperty.call(message, "videoMessage")) - $root.proto.VideoMessage.encode(message.videoMessage, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.userJid); + if (message.rank != null && Object.hasOwnProperty.call(message, "rank")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.rank); return writer; }; /** - * Encodes the specified Header message, length delimited. Does not implicitly {@link proto.Header.verify|verify} messages. + * Encodes the specified GroupParticipant message, length delimited. Does not implicitly {@link proto.GroupParticipant.verify|verify} messages. * @function encodeDelimited - * @memberof proto.Header + * @memberof proto.GroupParticipant * @static - * @param {proto.IHeader} message Header message or plain object to encode + * @param {proto.IGroupParticipant} message GroupParticipant message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Header.encodeDelimited = function encodeDelimited(message, writer) { + GroupParticipant.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Header message from the specified reader or buffer. + * Decodes a GroupParticipant message from the specified reader or buffer. * @function decode - * @memberof proto.Header + * @memberof proto.GroupParticipant * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.Header} Header + * @returns {proto.GroupParticipant} GroupParticipant * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Header.decode = function decode(reader, length) { + GroupParticipant.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Header(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.GroupParticipant(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.title = reader.string(); + message.userJid = reader.string(); break; case 2: - message.subtitle = reader.string(); - break; - case 5: - message.hasMediaAttachment = reader.bool(); - break; - case 3: - message.documentMessage = $root.proto.DocumentMessage.decode(reader, reader.uint32()); - break; - case 4: - message.imageMessage = $root.proto.ImageMessage.decode(reader, reader.uint32()); - break; - case 6: - message.jpegThumbnail = reader.bytes(); - break; - case 7: - message.videoMessage = $root.proto.VideoMessage.decode(reader, reader.uint32()); + message.rank = reader.int32(); break; default: reader.skipType(tag & 7); break; } } + if (!message.hasOwnProperty("userJid")) + throw $util.ProtocolError("missing required 'userJid'", { instance: message }); return message; }; /** - * Decodes a Header message from the specified reader or buffer, length delimited. + * Decodes a GroupParticipant message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.Header + * @memberof proto.GroupParticipant * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Header} Header + * @returns {proto.GroupParticipant} GroupParticipant * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Header.decodeDelimited = function decodeDelimited(reader) { + GroupParticipant.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Header message. + * Verifies a GroupParticipant message. * @function verify - * @memberof proto.Header + * @memberof proto.GroupParticipant * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Header.verify = function verify(message) { + GroupParticipant.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.subtitle != null && message.hasOwnProperty("subtitle")) - if (!$util.isString(message.subtitle)) - return "subtitle: string expected"; - if (message.hasMediaAttachment != null && message.hasOwnProperty("hasMediaAttachment")) - if (typeof message.hasMediaAttachment !== "boolean") - return "hasMediaAttachment: boolean expected"; - if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) { - properties.media = 1; - { - var error = $root.proto.DocumentMessage.verify(message.documentMessage); - if (error) - return "documentMessage." + error; - } - } - if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) { - if (properties.media === 1) - return "media: multiple values"; - properties.media = 1; - { - var error = $root.proto.ImageMessage.verify(message.imageMessage); - if (error) - return "imageMessage." + error; - } - } - if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) { - if (properties.media === 1) - return "media: multiple values"; - properties.media = 1; - if (!(message.jpegThumbnail && typeof message.jpegThumbnail.length === "number" || $util.isString(message.jpegThumbnail))) - return "jpegThumbnail: buffer expected"; - } - if (message.videoMessage != null && message.hasOwnProperty("videoMessage")) { - if (properties.media === 1) - return "media: multiple values"; - properties.media = 1; - { - var error = $root.proto.VideoMessage.verify(message.videoMessage); - if (error) - return "videoMessage." + error; - } - } - return null; - }; - - /** - * Creates a Header message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.Header - * @static - * @param {Object.} object Plain object - * @returns {proto.Header} Header - */ - Header.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Header) - return object; - var message = new $root.proto.Header(); - if (object.title != null) - message.title = String(object.title); - if (object.subtitle != null) - message.subtitle = String(object.subtitle); - if (object.hasMediaAttachment != null) - message.hasMediaAttachment = Boolean(object.hasMediaAttachment); - if (object.documentMessage != null) { - if (typeof object.documentMessage !== "object") - throw TypeError(".proto.Header.documentMessage: object expected"); - message.documentMessage = $root.proto.DocumentMessage.fromObject(object.documentMessage); - } - if (object.imageMessage != null) { - if (typeof object.imageMessage !== "object") - throw TypeError(".proto.Header.imageMessage: object expected"); - message.imageMessage = $root.proto.ImageMessage.fromObject(object.imageMessage); - } - if (object.jpegThumbnail != null) - if (typeof object.jpegThumbnail === "string") - $util.base64.decode(object.jpegThumbnail, message.jpegThumbnail = $util.newBuffer($util.base64.length(object.jpegThumbnail)), 0); - else if (object.jpegThumbnail.length) - message.jpegThumbnail = object.jpegThumbnail; - if (object.videoMessage != null) { - if (typeof object.videoMessage !== "object") - throw TypeError(".proto.Header.videoMessage: object expected"); - message.videoMessage = $root.proto.VideoMessage.fromObject(object.videoMessage); - } - return message; - }; - - /** - * Creates a plain object from a Header message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.Header - * @static - * @param {proto.Header} message Header - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Header.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.title = ""; - object.subtitle = ""; - object.hasMediaAttachment = false; - } - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.subtitle != null && message.hasOwnProperty("subtitle")) - object.subtitle = message.subtitle; - if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) { - object.documentMessage = $root.proto.DocumentMessage.toObject(message.documentMessage, options); - if (options.oneofs) - object.media = "documentMessage"; - } - if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) { - object.imageMessage = $root.proto.ImageMessage.toObject(message.imageMessage, options); - if (options.oneofs) - object.media = "imageMessage"; - } - if (message.hasMediaAttachment != null && message.hasOwnProperty("hasMediaAttachment")) - object.hasMediaAttachment = message.hasMediaAttachment; - if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) { - object.jpegThumbnail = options.bytes === String ? $util.base64.encode(message.jpegThumbnail, 0, message.jpegThumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.jpegThumbnail) : message.jpegThumbnail; - if (options.oneofs) - object.media = "jpegThumbnail"; - } - if (message.videoMessage != null && message.hasOwnProperty("videoMessage")) { - object.videoMessage = $root.proto.VideoMessage.toObject(message.videoMessage, options); - if (options.oneofs) - object.media = "videoMessage"; - } - return object; - }; - - /** - * Converts this Header to JSON. - * @function toJSON - * @memberof proto.Header - * @instance - * @returns {Object.} JSON object - */ - Header.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Header; - })(); - - proto.HighlyStructuredMessage = (function() { - - /** - * Properties of a HighlyStructuredMessage. - * @memberof proto - * @interface IHighlyStructuredMessage - * @property {string|null} [namespace] HighlyStructuredMessage namespace - * @property {string|null} [elementName] HighlyStructuredMessage elementName - * @property {Array.|null} [params] HighlyStructuredMessage params - * @property {string|null} [fallbackLg] HighlyStructuredMessage fallbackLg - * @property {string|null} [fallbackLc] HighlyStructuredMessage fallbackLc - * @property {Array.|null} [localizableParams] HighlyStructuredMessage localizableParams - * @property {string|null} [deterministicLg] HighlyStructuredMessage deterministicLg - * @property {string|null} [deterministicLc] HighlyStructuredMessage deterministicLc - * @property {proto.ITemplateMessage|null} [hydratedHsm] HighlyStructuredMessage hydratedHsm - */ - - /** - * Constructs a new HighlyStructuredMessage. - * @memberof proto - * @classdesc Represents a HighlyStructuredMessage. - * @implements IHighlyStructuredMessage - * @constructor - * @param {proto.IHighlyStructuredMessage=} [properties] Properties to set - */ - function HighlyStructuredMessage(properties) { - this.params = []; - this.localizableParams = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HighlyStructuredMessage namespace. - * @member {string} namespace - * @memberof proto.HighlyStructuredMessage - * @instance - */ - HighlyStructuredMessage.prototype.namespace = ""; - - /** - * HighlyStructuredMessage elementName. - * @member {string} elementName - * @memberof proto.HighlyStructuredMessage - * @instance - */ - HighlyStructuredMessage.prototype.elementName = ""; - - /** - * HighlyStructuredMessage params. - * @member {Array.} params - * @memberof proto.HighlyStructuredMessage - * @instance - */ - HighlyStructuredMessage.prototype.params = $util.emptyArray; - - /** - * HighlyStructuredMessage fallbackLg. - * @member {string} fallbackLg - * @memberof proto.HighlyStructuredMessage - * @instance - */ - HighlyStructuredMessage.prototype.fallbackLg = ""; - - /** - * HighlyStructuredMessage fallbackLc. - * @member {string} fallbackLc - * @memberof proto.HighlyStructuredMessage - * @instance - */ - HighlyStructuredMessage.prototype.fallbackLc = ""; - - /** - * HighlyStructuredMessage localizableParams. - * @member {Array.} localizableParams - * @memberof proto.HighlyStructuredMessage - * @instance - */ - HighlyStructuredMessage.prototype.localizableParams = $util.emptyArray; - - /** - * HighlyStructuredMessage deterministicLg. - * @member {string} deterministicLg - * @memberof proto.HighlyStructuredMessage - * @instance - */ - HighlyStructuredMessage.prototype.deterministicLg = ""; - - /** - * HighlyStructuredMessage deterministicLc. - * @member {string} deterministicLc - * @memberof proto.HighlyStructuredMessage - * @instance - */ - HighlyStructuredMessage.prototype.deterministicLc = ""; - - /** - * HighlyStructuredMessage hydratedHsm. - * @member {proto.ITemplateMessage|null|undefined} hydratedHsm - * @memberof proto.HighlyStructuredMessage - * @instance - */ - HighlyStructuredMessage.prototype.hydratedHsm = null; - - /** - * Creates a new HighlyStructuredMessage instance using the specified properties. - * @function create - * @memberof proto.HighlyStructuredMessage - * @static - * @param {proto.IHighlyStructuredMessage=} [properties] Properties to set - * @returns {proto.HighlyStructuredMessage} HighlyStructuredMessage instance - */ - HighlyStructuredMessage.create = function create(properties) { - return new HighlyStructuredMessage(properties); - }; - - /** - * Encodes the specified HighlyStructuredMessage message. Does not implicitly {@link proto.HighlyStructuredMessage.verify|verify} messages. - * @function encode - * @memberof proto.HighlyStructuredMessage - * @static - * @param {proto.IHighlyStructuredMessage} message HighlyStructuredMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HighlyStructuredMessage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.namespace != null && Object.hasOwnProperty.call(message, "namespace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.namespace); - if (message.elementName != null && Object.hasOwnProperty.call(message, "elementName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.elementName); - if (message.params != null && message.params.length) - for (var i = 0; i < message.params.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.params[i]); - if (message.fallbackLg != null && Object.hasOwnProperty.call(message, "fallbackLg")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.fallbackLg); - if (message.fallbackLc != null && Object.hasOwnProperty.call(message, "fallbackLc")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.fallbackLc); - if (message.localizableParams != null && message.localizableParams.length) - for (var i = 0; i < message.localizableParams.length; ++i) - $root.proto.HSMLocalizableParameter.encode(message.localizableParams[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.deterministicLg != null && Object.hasOwnProperty.call(message, "deterministicLg")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.deterministicLg); - if (message.deterministicLc != null && Object.hasOwnProperty.call(message, "deterministicLc")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.deterministicLc); - if (message.hydratedHsm != null && Object.hasOwnProperty.call(message, "hydratedHsm")) - $root.proto.TemplateMessage.encode(message.hydratedHsm, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified HighlyStructuredMessage message, length delimited. Does not implicitly {@link proto.HighlyStructuredMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.HighlyStructuredMessage - * @static - * @param {proto.IHighlyStructuredMessage} message HighlyStructuredMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HighlyStructuredMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HighlyStructuredMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.HighlyStructuredMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.HighlyStructuredMessage} HighlyStructuredMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HighlyStructuredMessage.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.HighlyStructuredMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namespace = reader.string(); - break; - case 2: - message.elementName = reader.string(); - break; - case 3: - if (!(message.params && message.params.length)) - message.params = []; - message.params.push(reader.string()); - break; - case 4: - message.fallbackLg = reader.string(); - break; - case 5: - message.fallbackLc = reader.string(); - break; - case 6: - if (!(message.localizableParams && message.localizableParams.length)) - message.localizableParams = []; - message.localizableParams.push($root.proto.HSMLocalizableParameter.decode(reader, reader.uint32())); - break; - case 7: - message.deterministicLg = reader.string(); - break; - case 8: - message.deterministicLc = reader.string(); - break; - case 9: - message.hydratedHsm = $root.proto.TemplateMessage.decode(reader, reader.uint32()); - break; + if (!$util.isString(message.userJid)) + return "userJid: string expected"; + if (message.rank != null && message.hasOwnProperty("rank")) + switch (message.rank) { default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HighlyStructuredMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.HighlyStructuredMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.HighlyStructuredMessage} HighlyStructuredMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HighlyStructuredMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HighlyStructuredMessage message. - * @function verify - * @memberof proto.HighlyStructuredMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HighlyStructuredMessage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.namespace != null && message.hasOwnProperty("namespace")) - if (!$util.isString(message.namespace)) - return "namespace: string expected"; - if (message.elementName != null && message.hasOwnProperty("elementName")) - if (!$util.isString(message.elementName)) - return "elementName: string expected"; - if (message.params != null && message.hasOwnProperty("params")) { - if (!Array.isArray(message.params)) - return "params: array expected"; - for (var i = 0; i < message.params.length; ++i) - if (!$util.isString(message.params[i])) - return "params: string[] expected"; - } - if (message.fallbackLg != null && message.hasOwnProperty("fallbackLg")) - if (!$util.isString(message.fallbackLg)) - return "fallbackLg: string expected"; - if (message.fallbackLc != null && message.hasOwnProperty("fallbackLc")) - if (!$util.isString(message.fallbackLc)) - return "fallbackLc: string expected"; - if (message.localizableParams != null && message.hasOwnProperty("localizableParams")) { - if (!Array.isArray(message.localizableParams)) - return "localizableParams: array expected"; - for (var i = 0; i < message.localizableParams.length; ++i) { - var error = $root.proto.HSMLocalizableParameter.verify(message.localizableParams[i]); - if (error) - return "localizableParams." + error; - } - } - if (message.deterministicLg != null && message.hasOwnProperty("deterministicLg")) - if (!$util.isString(message.deterministicLg)) - return "deterministicLg: string expected"; - if (message.deterministicLc != null && message.hasOwnProperty("deterministicLc")) - if (!$util.isString(message.deterministicLc)) - return "deterministicLc: string expected"; - if (message.hydratedHsm != null && message.hasOwnProperty("hydratedHsm")) { - var error = $root.proto.TemplateMessage.verify(message.hydratedHsm); - if (error) - return "hydratedHsm." + error; - } - return null; - }; - - /** - * Creates a HighlyStructuredMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.HighlyStructuredMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.HighlyStructuredMessage} HighlyStructuredMessage - */ - HighlyStructuredMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.HighlyStructuredMessage) - return object; - var message = new $root.proto.HighlyStructuredMessage(); - if (object.namespace != null) - message.namespace = String(object.namespace); - if (object.elementName != null) - message.elementName = String(object.elementName); - if (object.params) { - if (!Array.isArray(object.params)) - throw TypeError(".proto.HighlyStructuredMessage.params: array expected"); - message.params = []; - for (var i = 0; i < object.params.length; ++i) - message.params[i] = String(object.params[i]); - } - if (object.fallbackLg != null) - message.fallbackLg = String(object.fallbackLg); - if (object.fallbackLc != null) - message.fallbackLc = String(object.fallbackLc); - if (object.localizableParams) { - if (!Array.isArray(object.localizableParams)) - throw TypeError(".proto.HighlyStructuredMessage.localizableParams: array expected"); - message.localizableParams = []; - for (var i = 0; i < object.localizableParams.length; ++i) { - if (typeof object.localizableParams[i] !== "object") - throw TypeError(".proto.HighlyStructuredMessage.localizableParams: object expected"); - message.localizableParams[i] = $root.proto.HSMLocalizableParameter.fromObject(object.localizableParams[i]); - } - } - if (object.deterministicLg != null) - message.deterministicLg = String(object.deterministicLg); - if (object.deterministicLc != null) - message.deterministicLc = String(object.deterministicLc); - if (object.hydratedHsm != null) { - if (typeof object.hydratedHsm !== "object") - throw TypeError(".proto.HighlyStructuredMessage.hydratedHsm: object expected"); - message.hydratedHsm = $root.proto.TemplateMessage.fromObject(object.hydratedHsm); - } - return message; - }; - - /** - * Creates a plain object from a HighlyStructuredMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.HighlyStructuredMessage - * @static - * @param {proto.HighlyStructuredMessage} message HighlyStructuredMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HighlyStructuredMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.params = []; - object.localizableParams = []; - } - if (options.defaults) { - object.namespace = ""; - object.elementName = ""; - object.fallbackLg = ""; - object.fallbackLc = ""; - object.deterministicLg = ""; - object.deterministicLc = ""; - object.hydratedHsm = null; - } - if (message.namespace != null && message.hasOwnProperty("namespace")) - object.namespace = message.namespace; - if (message.elementName != null && message.hasOwnProperty("elementName")) - object.elementName = message.elementName; - if (message.params && message.params.length) { - object.params = []; - for (var j = 0; j < message.params.length; ++j) - object.params[j] = message.params[j]; - } - if (message.fallbackLg != null && message.hasOwnProperty("fallbackLg")) - object.fallbackLg = message.fallbackLg; - if (message.fallbackLc != null && message.hasOwnProperty("fallbackLc")) - object.fallbackLc = message.fallbackLc; - if (message.localizableParams && message.localizableParams.length) { - object.localizableParams = []; - for (var j = 0; j < message.localizableParams.length; ++j) - object.localizableParams[j] = $root.proto.HSMLocalizableParameter.toObject(message.localizableParams[j], options); - } - if (message.deterministicLg != null && message.hasOwnProperty("deterministicLg")) - object.deterministicLg = message.deterministicLg; - if (message.deterministicLc != null && message.hasOwnProperty("deterministicLc")) - object.deterministicLc = message.deterministicLc; - if (message.hydratedHsm != null && message.hasOwnProperty("hydratedHsm")) - object.hydratedHsm = $root.proto.TemplateMessage.toObject(message.hydratedHsm, options); - return object; - }; - - /** - * Converts this HighlyStructuredMessage to JSON. - * @function toJSON - * @memberof proto.HighlyStructuredMessage - * @instance - * @returns {Object.} JSON object - */ - HighlyStructuredMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return HighlyStructuredMessage; - })(); - - proto.HistorySyncNotification = (function() { - - /** - * Properties of a HistorySyncNotification. - * @memberof proto - * @interface IHistorySyncNotification - * @property {Uint8Array|null} [fileSha256] HistorySyncNotification fileSha256 - * @property {number|Long|null} [fileLength] HistorySyncNotification fileLength - * @property {Uint8Array|null} [mediaKey] HistorySyncNotification mediaKey - * @property {Uint8Array|null} [fileEncSha256] HistorySyncNotification fileEncSha256 - * @property {string|null} [directPath] HistorySyncNotification directPath - * @property {proto.HistorySyncNotification.HistorySyncNotificationHistorySyncType|null} [syncType] HistorySyncNotification syncType - * @property {number|null} [chunkOrder] HistorySyncNotification chunkOrder - * @property {string|null} [originalMessageId] HistorySyncNotification originalMessageId - */ - - /** - * Constructs a new HistorySyncNotification. - * @memberof proto - * @classdesc Represents a HistorySyncNotification. - * @implements IHistorySyncNotification - * @constructor - * @param {proto.IHistorySyncNotification=} [properties] Properties to set - */ - function HistorySyncNotification(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HistorySyncNotification fileSha256. - * @member {Uint8Array} fileSha256 - * @memberof proto.HistorySyncNotification - * @instance - */ - HistorySyncNotification.prototype.fileSha256 = $util.newBuffer([]); - - /** - * HistorySyncNotification fileLength. - * @member {number|Long} fileLength - * @memberof proto.HistorySyncNotification - * @instance - */ - HistorySyncNotification.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * HistorySyncNotification mediaKey. - * @member {Uint8Array} mediaKey - * @memberof proto.HistorySyncNotification - * @instance - */ - HistorySyncNotification.prototype.mediaKey = $util.newBuffer([]); - - /** - * HistorySyncNotification fileEncSha256. - * @member {Uint8Array} fileEncSha256 - * @memberof proto.HistorySyncNotification - * @instance - */ - HistorySyncNotification.prototype.fileEncSha256 = $util.newBuffer([]); - - /** - * HistorySyncNotification directPath. - * @member {string} directPath - * @memberof proto.HistorySyncNotification - * @instance - */ - HistorySyncNotification.prototype.directPath = ""; - - /** - * HistorySyncNotification syncType. - * @member {proto.HistorySyncNotification.HistorySyncNotificationHistorySyncType} syncType - * @memberof proto.HistorySyncNotification - * @instance - */ - HistorySyncNotification.prototype.syncType = 0; - - /** - * HistorySyncNotification chunkOrder. - * @member {number} chunkOrder - * @memberof proto.HistorySyncNotification - * @instance - */ - HistorySyncNotification.prototype.chunkOrder = 0; - - /** - * HistorySyncNotification originalMessageId. - * @member {string} originalMessageId - * @memberof proto.HistorySyncNotification - * @instance - */ - HistorySyncNotification.prototype.originalMessageId = ""; - - /** - * Creates a new HistorySyncNotification instance using the specified properties. - * @function create - * @memberof proto.HistorySyncNotification - * @static - * @param {proto.IHistorySyncNotification=} [properties] Properties to set - * @returns {proto.HistorySyncNotification} HistorySyncNotification instance - */ - HistorySyncNotification.create = function create(properties) { - return new HistorySyncNotification(properties); - }; - - /** - * Encodes the specified HistorySyncNotification message. Does not implicitly {@link proto.HistorySyncNotification.verify|verify} messages. - * @function encode - * @memberof proto.HistorySyncNotification - * @static - * @param {proto.IHistorySyncNotification} message HistorySyncNotification message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HistorySyncNotification.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fileSha256 != null && Object.hasOwnProperty.call(message, "fileSha256")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.fileSha256); - if (message.fileLength != null && Object.hasOwnProperty.call(message, "fileLength")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.fileLength); - if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.mediaKey); - if (message.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.fileEncSha256); - if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.directPath); - if (message.syncType != null && Object.hasOwnProperty.call(message, "syncType")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.syncType); - if (message.chunkOrder != null && Object.hasOwnProperty.call(message, "chunkOrder")) - writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.chunkOrder); - if (message.originalMessageId != null && Object.hasOwnProperty.call(message, "originalMessageId")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.originalMessageId); - return writer; - }; - - /** - * Encodes the specified HistorySyncNotification message, length delimited. Does not implicitly {@link proto.HistorySyncNotification.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.HistorySyncNotification - * @static - * @param {proto.IHistorySyncNotification} message HistorySyncNotification message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HistorySyncNotification.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HistorySyncNotification message from the specified reader or buffer. - * @function decode - * @memberof proto.HistorySyncNotification - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.HistorySyncNotification} HistorySyncNotification - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HistorySyncNotification.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.HistorySyncNotification(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.fileSha256 = reader.bytes(); - break; - case 2: - message.fileLength = reader.uint64(); - break; - case 3: - message.mediaKey = reader.bytes(); - break; - case 4: - message.fileEncSha256 = reader.bytes(); - break; - case 5: - message.directPath = reader.string(); - break; - case 6: - message.syncType = reader.int32(); - break; - case 7: - message.chunkOrder = reader.uint32(); - break; - case 8: - message.originalMessageId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HistorySyncNotification message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.HistorySyncNotification - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.HistorySyncNotification} HistorySyncNotification - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HistorySyncNotification.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HistorySyncNotification message. - * @function verify - * @memberof proto.HistorySyncNotification - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HistorySyncNotification.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) - if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256))) - return "fileSha256: buffer expected"; - if (message.fileLength != null && message.hasOwnProperty("fileLength")) - if (!$util.isInteger(message.fileLength) && !(message.fileLength && $util.isInteger(message.fileLength.low) && $util.isInteger(message.fileLength.high))) - return "fileLength: integer|Long expected"; - if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) - if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey))) - return "mediaKey: buffer expected"; - if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) - if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256))) - return "fileEncSha256: buffer expected"; - if (message.directPath != null && message.hasOwnProperty("directPath")) - if (!$util.isString(message.directPath)) - return "directPath: string expected"; - if (message.syncType != null && message.hasOwnProperty("syncType")) - switch (message.syncType) { - default: - return "syncType: enum value expected"; + return "rank: enum value expected"; case 0: case 1: case 2: - case 3: - case 4: break; } - if (message.chunkOrder != null && message.hasOwnProperty("chunkOrder")) - if (!$util.isInteger(message.chunkOrder)) - return "chunkOrder: integer expected"; - if (message.originalMessageId != null && message.hasOwnProperty("originalMessageId")) - if (!$util.isString(message.originalMessageId)) - return "originalMessageId: string expected"; return null; }; /** - * Creates a HistorySyncNotification message from a plain object. Also converts values to their respective internal types. + * Creates a GroupParticipant message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.HistorySyncNotification + * @memberof proto.GroupParticipant * @static * @param {Object.} object Plain object - * @returns {proto.HistorySyncNotification} HistorySyncNotification + * @returns {proto.GroupParticipant} GroupParticipant */ - HistorySyncNotification.fromObject = function fromObject(object) { - if (object instanceof $root.proto.HistorySyncNotification) + GroupParticipant.fromObject = function fromObject(object) { + if (object instanceof $root.proto.GroupParticipant) return object; - var message = new $root.proto.HistorySyncNotification(); - if (object.fileSha256 != null) - if (typeof object.fileSha256 === "string") - $util.base64.decode(object.fileSha256, message.fileSha256 = $util.newBuffer($util.base64.length(object.fileSha256)), 0); - else if (object.fileSha256.length) - message.fileSha256 = object.fileSha256; - if (object.fileLength != null) - if ($util.Long) - (message.fileLength = $util.Long.fromValue(object.fileLength)).unsigned = true; - else if (typeof object.fileLength === "string") - message.fileLength = parseInt(object.fileLength, 10); - else if (typeof object.fileLength === "number") - message.fileLength = object.fileLength; - else if (typeof object.fileLength === "object") - message.fileLength = new $util.LongBits(object.fileLength.low >>> 0, object.fileLength.high >>> 0).toNumber(true); - if (object.mediaKey != null) - if (typeof object.mediaKey === "string") - $util.base64.decode(object.mediaKey, message.mediaKey = $util.newBuffer($util.base64.length(object.mediaKey)), 0); - else if (object.mediaKey.length) - message.mediaKey = object.mediaKey; - if (object.fileEncSha256 != null) - if (typeof object.fileEncSha256 === "string") - $util.base64.decode(object.fileEncSha256, message.fileEncSha256 = $util.newBuffer($util.base64.length(object.fileEncSha256)), 0); - else if (object.fileEncSha256.length) - message.fileEncSha256 = object.fileEncSha256; - if (object.directPath != null) - message.directPath = String(object.directPath); - switch (object.syncType) { - case "INITIAL_BOOTSTRAP": + var message = new $root.proto.GroupParticipant(); + if (object.userJid != null) + message.userJid = String(object.userJid); + switch (object.rank) { + case "REGULAR": case 0: - message.syncType = 0; + message.rank = 0; break; - case "INITIAL_STATUS_V3": + case "ADMIN": case 1: - message.syncType = 1; + message.rank = 1; break; - case "FULL": + case "SUPERADMIN": case 2: - message.syncType = 2; - break; - case "RECENT": - case 3: - message.syncType = 3; - break; - case "PUSH_NAME": - case 4: - message.syncType = 4; + message.rank = 2; break; } - if (object.chunkOrder != null) - message.chunkOrder = object.chunkOrder >>> 0; - if (object.originalMessageId != null) - message.originalMessageId = String(object.originalMessageId); return message; }; /** - * Creates a plain object from a HistorySyncNotification message. Also converts values to other types if specified. + * Creates a plain object from a GroupParticipant message. Also converts values to other types if specified. * @function toObject - * @memberof proto.HistorySyncNotification + * @memberof proto.GroupParticipant * @static - * @param {proto.HistorySyncNotification} message HistorySyncNotification + * @param {proto.GroupParticipant} message GroupParticipant * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HistorySyncNotification.toObject = function toObject(message, options) { + GroupParticipant.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - if (options.bytes === String) - object.fileSha256 = ""; - else { - object.fileSha256 = []; - if (options.bytes !== Array) - object.fileSha256 = $util.newBuffer(object.fileSha256); - } - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.fileLength = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.fileLength = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.mediaKey = ""; - else { - object.mediaKey = []; - if (options.bytes !== Array) - object.mediaKey = $util.newBuffer(object.mediaKey); - } - if (options.bytes === String) - object.fileEncSha256 = ""; - else { - object.fileEncSha256 = []; - if (options.bytes !== Array) - object.fileEncSha256 = $util.newBuffer(object.fileEncSha256); - } - object.directPath = ""; - object.syncType = options.enums === String ? "INITIAL_BOOTSTRAP" : 0; - object.chunkOrder = 0; - object.originalMessageId = ""; + object.userJid = ""; + object.rank = options.enums === String ? "REGULAR" : 0; } - if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) - object.fileSha256 = options.bytes === String ? $util.base64.encode(message.fileSha256, 0, message.fileSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileSha256) : message.fileSha256; - if (message.fileLength != null && message.hasOwnProperty("fileLength")) - if (typeof message.fileLength === "number") - object.fileLength = options.longs === String ? String(message.fileLength) : message.fileLength; - else - object.fileLength = options.longs === String ? $util.Long.prototype.toString.call(message.fileLength) : options.longs === Number ? new $util.LongBits(message.fileLength.low >>> 0, message.fileLength.high >>> 0).toNumber(true) : message.fileLength; - if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) - object.mediaKey = options.bytes === String ? $util.base64.encode(message.mediaKey, 0, message.mediaKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.mediaKey) : message.mediaKey; - if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) - object.fileEncSha256 = options.bytes === String ? $util.base64.encode(message.fileEncSha256, 0, message.fileEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileEncSha256) : message.fileEncSha256; - if (message.directPath != null && message.hasOwnProperty("directPath")) - object.directPath = message.directPath; - if (message.syncType != null && message.hasOwnProperty("syncType")) - object.syncType = options.enums === String ? $root.proto.HistorySyncNotification.HistorySyncNotificationHistorySyncType[message.syncType] : message.syncType; - if (message.chunkOrder != null && message.hasOwnProperty("chunkOrder")) - object.chunkOrder = message.chunkOrder; - if (message.originalMessageId != null && message.hasOwnProperty("originalMessageId")) - object.originalMessageId = message.originalMessageId; + if (message.userJid != null && message.hasOwnProperty("userJid")) + object.userJid = message.userJid; + if (message.rank != null && message.hasOwnProperty("rank")) + object.rank = options.enums === String ? $root.proto.GroupParticipant.GroupParticipantRank[message.rank] : message.rank; return object; }; /** - * Converts this HistorySyncNotification to JSON. + * Converts this GroupParticipant to JSON. * @function toJSON - * @memberof proto.HistorySyncNotification + * @memberof proto.GroupParticipant * @instance * @returns {Object.} JSON object */ - HistorySyncNotification.prototype.toJSON = function toJSON() { + GroupParticipant.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * HistorySyncNotificationHistorySyncType enum. - * @name proto.HistorySyncNotification.HistorySyncNotificationHistorySyncType + * GroupParticipantRank enum. + * @name proto.GroupParticipant.GroupParticipantRank * @enum {number} - * @property {number} INITIAL_BOOTSTRAP=0 INITIAL_BOOTSTRAP value - * @property {number} INITIAL_STATUS_V3=1 INITIAL_STATUS_V3 value - * @property {number} FULL=2 FULL value - * @property {number} RECENT=3 RECENT value - * @property {number} PUSH_NAME=4 PUSH_NAME value + * @property {number} REGULAR=0 REGULAR value + * @property {number} ADMIN=1 ADMIN value + * @property {number} SUPERADMIN=2 SUPERADMIN value */ - HistorySyncNotification.HistorySyncNotificationHistorySyncType = (function() { + GroupParticipant.GroupParticipantRank = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "INITIAL_BOOTSTRAP"] = 0; - values[valuesById[1] = "INITIAL_STATUS_V3"] = 1; - values[valuesById[2] = "FULL"] = 2; - values[valuesById[3] = "RECENT"] = 3; - values[valuesById[4] = "PUSH_NAME"] = 4; + values[valuesById[0] = "REGULAR"] = 0; + values[valuesById[1] = "ADMIN"] = 1; + values[valuesById[2] = "SUPERADMIN"] = 2; return values; })(); - return HistorySyncNotification; + return GroupParticipant; })(); proto.HSMCurrency = (function() { @@ -15381,6 +23409,2190 @@ $root.proto = (function() { return HSMLocalizableParameter; })(); + proto.HandshakeMessage = (function() { + + /** + * Properties of a HandshakeMessage. + * @memberof proto + * @interface IHandshakeMessage + * @property {proto.IClientHello|null} [clientHello] HandshakeMessage clientHello + * @property {proto.IServerHello|null} [serverHello] HandshakeMessage serverHello + * @property {proto.IClientFinish|null} [clientFinish] HandshakeMessage clientFinish + */ + + /** + * Constructs a new HandshakeMessage. + * @memberof proto + * @classdesc Represents a HandshakeMessage. + * @implements IHandshakeMessage + * @constructor + * @param {proto.IHandshakeMessage=} [properties] Properties to set + */ + function HandshakeMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HandshakeMessage clientHello. + * @member {proto.IClientHello|null|undefined} clientHello + * @memberof proto.HandshakeMessage + * @instance + */ + HandshakeMessage.prototype.clientHello = null; + + /** + * HandshakeMessage serverHello. + * @member {proto.IServerHello|null|undefined} serverHello + * @memberof proto.HandshakeMessage + * @instance + */ + HandshakeMessage.prototype.serverHello = null; + + /** + * HandshakeMessage clientFinish. + * @member {proto.IClientFinish|null|undefined} clientFinish + * @memberof proto.HandshakeMessage + * @instance + */ + HandshakeMessage.prototype.clientFinish = null; + + /** + * Creates a new HandshakeMessage instance using the specified properties. + * @function create + * @memberof proto.HandshakeMessage + * @static + * @param {proto.IHandshakeMessage=} [properties] Properties to set + * @returns {proto.HandshakeMessage} HandshakeMessage instance + */ + HandshakeMessage.create = function create(properties) { + return new HandshakeMessage(properties); + }; + + /** + * Encodes the specified HandshakeMessage message. Does not implicitly {@link proto.HandshakeMessage.verify|verify} messages. + * @function encode + * @memberof proto.HandshakeMessage + * @static + * @param {proto.IHandshakeMessage} message HandshakeMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HandshakeMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientHello != null && Object.hasOwnProperty.call(message, "clientHello")) + $root.proto.ClientHello.encode(message.clientHello, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.serverHello != null && Object.hasOwnProperty.call(message, "serverHello")) + $root.proto.ServerHello.encode(message.serverHello, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.clientFinish != null && Object.hasOwnProperty.call(message, "clientFinish")) + $root.proto.ClientFinish.encode(message.clientFinish, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified HandshakeMessage message, length delimited. Does not implicitly {@link proto.HandshakeMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.HandshakeMessage + * @static + * @param {proto.IHandshakeMessage} message HandshakeMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HandshakeMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HandshakeMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.HandshakeMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.HandshakeMessage} HandshakeMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HandshakeMessage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.HandshakeMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.clientHello = $root.proto.ClientHello.decode(reader, reader.uint32()); + break; + case 3: + message.serverHello = $root.proto.ServerHello.decode(reader, reader.uint32()); + break; + case 4: + message.clientFinish = $root.proto.ClientFinish.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HandshakeMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.HandshakeMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.HandshakeMessage} HandshakeMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HandshakeMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HandshakeMessage message. + * @function verify + * @memberof proto.HandshakeMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HandshakeMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientHello != null && message.hasOwnProperty("clientHello")) { + var error = $root.proto.ClientHello.verify(message.clientHello); + if (error) + return "clientHello." + error; + } + if (message.serverHello != null && message.hasOwnProperty("serverHello")) { + var error = $root.proto.ServerHello.verify(message.serverHello); + if (error) + return "serverHello." + error; + } + if (message.clientFinish != null && message.hasOwnProperty("clientFinish")) { + var error = $root.proto.ClientFinish.verify(message.clientFinish); + if (error) + return "clientFinish." + error; + } + return null; + }; + + /** + * Creates a HandshakeMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.HandshakeMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.HandshakeMessage} HandshakeMessage + */ + HandshakeMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.HandshakeMessage) + return object; + var message = new $root.proto.HandshakeMessage(); + if (object.clientHello != null) { + if (typeof object.clientHello !== "object") + throw TypeError(".proto.HandshakeMessage.clientHello: object expected"); + message.clientHello = $root.proto.ClientHello.fromObject(object.clientHello); + } + if (object.serverHello != null) { + if (typeof object.serverHello !== "object") + throw TypeError(".proto.HandshakeMessage.serverHello: object expected"); + message.serverHello = $root.proto.ServerHello.fromObject(object.serverHello); + } + if (object.clientFinish != null) { + if (typeof object.clientFinish !== "object") + throw TypeError(".proto.HandshakeMessage.clientFinish: object expected"); + message.clientFinish = $root.proto.ClientFinish.fromObject(object.clientFinish); + } + return message; + }; + + /** + * Creates a plain object from a HandshakeMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.HandshakeMessage + * @static + * @param {proto.HandshakeMessage} message HandshakeMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HandshakeMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.clientHello = null; + object.serverHello = null; + object.clientFinish = null; + } + if (message.clientHello != null && message.hasOwnProperty("clientHello")) + object.clientHello = $root.proto.ClientHello.toObject(message.clientHello, options); + if (message.serverHello != null && message.hasOwnProperty("serverHello")) + object.serverHello = $root.proto.ServerHello.toObject(message.serverHello, options); + if (message.clientFinish != null && message.hasOwnProperty("clientFinish")) + object.clientFinish = $root.proto.ClientFinish.toObject(message.clientFinish, options); + return object; + }; + + /** + * Converts this HandshakeMessage to JSON. + * @function toJSON + * @memberof proto.HandshakeMessage + * @instance + * @returns {Object.} JSON object + */ + HandshakeMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HandshakeMessage; + })(); + + proto.Header = (function() { + + /** + * Properties of a Header. + * @memberof proto + * @interface IHeader + * @property {string|null} [title] Header title + * @property {string|null} [subtitle] Header subtitle + * @property {boolean|null} [hasMediaAttachment] Header hasMediaAttachment + * @property {proto.IDocumentMessage|null} [documentMessage] Header documentMessage + * @property {proto.IImageMessage|null} [imageMessage] Header imageMessage + * @property {Uint8Array|null} [jpegThumbnail] Header jpegThumbnail + * @property {proto.IVideoMessage|null} [videoMessage] Header videoMessage + */ + + /** + * Constructs a new Header. + * @memberof proto + * @classdesc Represents a Header. + * @implements IHeader + * @constructor + * @param {proto.IHeader=} [properties] Properties to set + */ + function Header(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Header title. + * @member {string} title + * @memberof proto.Header + * @instance + */ + Header.prototype.title = ""; + + /** + * Header subtitle. + * @member {string} subtitle + * @memberof proto.Header + * @instance + */ + Header.prototype.subtitle = ""; + + /** + * Header hasMediaAttachment. + * @member {boolean} hasMediaAttachment + * @memberof proto.Header + * @instance + */ + Header.prototype.hasMediaAttachment = false; + + /** + * Header documentMessage. + * @member {proto.IDocumentMessage|null|undefined} documentMessage + * @memberof proto.Header + * @instance + */ + Header.prototype.documentMessage = null; + + /** + * Header imageMessage. + * @member {proto.IImageMessage|null|undefined} imageMessage + * @memberof proto.Header + * @instance + */ + Header.prototype.imageMessage = null; + + /** + * Header jpegThumbnail. + * @member {Uint8Array|null|undefined} jpegThumbnail + * @memberof proto.Header + * @instance + */ + Header.prototype.jpegThumbnail = null; + + /** + * Header videoMessage. + * @member {proto.IVideoMessage|null|undefined} videoMessage + * @memberof proto.Header + * @instance + */ + Header.prototype.videoMessage = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Header media. + * @member {"documentMessage"|"imageMessage"|"jpegThumbnail"|"videoMessage"|undefined} media + * @memberof proto.Header + * @instance + */ + Object.defineProperty(Header.prototype, "media", { + get: $util.oneOfGetter($oneOfFields = ["documentMessage", "imageMessage", "jpegThumbnail", "videoMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Header instance using the specified properties. + * @function create + * @memberof proto.Header + * @static + * @param {proto.IHeader=} [properties] Properties to set + * @returns {proto.Header} Header instance + */ + Header.create = function create(properties) { + return new Header(properties); + }; + + /** + * Encodes the specified Header message. Does not implicitly {@link proto.Header.verify|verify} messages. + * @function encode + * @memberof proto.Header + * @static + * @param {proto.IHeader} message Header message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Header.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + if (message.subtitle != null && Object.hasOwnProperty.call(message, "subtitle")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subtitle); + if (message.documentMessage != null && Object.hasOwnProperty.call(message, "documentMessage")) + $root.proto.DocumentMessage.encode(message.documentMessage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.imageMessage != null && Object.hasOwnProperty.call(message, "imageMessage")) + $root.proto.ImageMessage.encode(message.imageMessage, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.hasMediaAttachment != null && Object.hasOwnProperty.call(message, "hasMediaAttachment")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.hasMediaAttachment); + if (message.jpegThumbnail != null && Object.hasOwnProperty.call(message, "jpegThumbnail")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.jpegThumbnail); + if (message.videoMessage != null && Object.hasOwnProperty.call(message, "videoMessage")) + $root.proto.VideoMessage.encode(message.videoMessage, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Header message, length delimited. Does not implicitly {@link proto.Header.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Header + * @static + * @param {proto.IHeader} message Header message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Header.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Header message from the specified reader or buffer. + * @function decode + * @memberof proto.Header + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Header} Header + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Header.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Header(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.subtitle = reader.string(); + break; + case 5: + message.hasMediaAttachment = reader.bool(); + break; + case 3: + message.documentMessage = $root.proto.DocumentMessage.decode(reader, reader.uint32()); + break; + case 4: + message.imageMessage = $root.proto.ImageMessage.decode(reader, reader.uint32()); + break; + case 6: + message.jpegThumbnail = reader.bytes(); + break; + case 7: + message.videoMessage = $root.proto.VideoMessage.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Header message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Header + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Header} Header + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Header.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Header message. + * @function verify + * @memberof proto.Header + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Header.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.subtitle != null && message.hasOwnProperty("subtitle")) + if (!$util.isString(message.subtitle)) + return "subtitle: string expected"; + if (message.hasMediaAttachment != null && message.hasOwnProperty("hasMediaAttachment")) + if (typeof message.hasMediaAttachment !== "boolean") + return "hasMediaAttachment: boolean expected"; + if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) { + properties.media = 1; + { + var error = $root.proto.DocumentMessage.verify(message.documentMessage); + if (error) + return "documentMessage." + error; + } + } + if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) { + if (properties.media === 1) + return "media: multiple values"; + properties.media = 1; + { + var error = $root.proto.ImageMessage.verify(message.imageMessage); + if (error) + return "imageMessage." + error; + } + } + if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) { + if (properties.media === 1) + return "media: multiple values"; + properties.media = 1; + if (!(message.jpegThumbnail && typeof message.jpegThumbnail.length === "number" || $util.isString(message.jpegThumbnail))) + return "jpegThumbnail: buffer expected"; + } + if (message.videoMessage != null && message.hasOwnProperty("videoMessage")) { + if (properties.media === 1) + return "media: multiple values"; + properties.media = 1; + { + var error = $root.proto.VideoMessage.verify(message.videoMessage); + if (error) + return "videoMessage." + error; + } + } + return null; + }; + + /** + * Creates a Header message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Header + * @static + * @param {Object.} object Plain object + * @returns {proto.Header} Header + */ + Header.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Header) + return object; + var message = new $root.proto.Header(); + if (object.title != null) + message.title = String(object.title); + if (object.subtitle != null) + message.subtitle = String(object.subtitle); + if (object.hasMediaAttachment != null) + message.hasMediaAttachment = Boolean(object.hasMediaAttachment); + if (object.documentMessage != null) { + if (typeof object.documentMessage !== "object") + throw TypeError(".proto.Header.documentMessage: object expected"); + message.documentMessage = $root.proto.DocumentMessage.fromObject(object.documentMessage); + } + if (object.imageMessage != null) { + if (typeof object.imageMessage !== "object") + throw TypeError(".proto.Header.imageMessage: object expected"); + message.imageMessage = $root.proto.ImageMessage.fromObject(object.imageMessage); + } + if (object.jpegThumbnail != null) + if (typeof object.jpegThumbnail === "string") + $util.base64.decode(object.jpegThumbnail, message.jpegThumbnail = $util.newBuffer($util.base64.length(object.jpegThumbnail)), 0); + else if (object.jpegThumbnail.length) + message.jpegThumbnail = object.jpegThumbnail; + if (object.videoMessage != null) { + if (typeof object.videoMessage !== "object") + throw TypeError(".proto.Header.videoMessage: object expected"); + message.videoMessage = $root.proto.VideoMessage.fromObject(object.videoMessage); + } + return message; + }; + + /** + * Creates a plain object from a Header message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Header + * @static + * @param {proto.Header} message Header + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Header.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.title = ""; + object.subtitle = ""; + object.hasMediaAttachment = false; + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.subtitle != null && message.hasOwnProperty("subtitle")) + object.subtitle = message.subtitle; + if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) { + object.documentMessage = $root.proto.DocumentMessage.toObject(message.documentMessage, options); + if (options.oneofs) + object.media = "documentMessage"; + } + if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) { + object.imageMessage = $root.proto.ImageMessage.toObject(message.imageMessage, options); + if (options.oneofs) + object.media = "imageMessage"; + } + if (message.hasMediaAttachment != null && message.hasOwnProperty("hasMediaAttachment")) + object.hasMediaAttachment = message.hasMediaAttachment; + if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) { + object.jpegThumbnail = options.bytes === String ? $util.base64.encode(message.jpegThumbnail, 0, message.jpegThumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.jpegThumbnail) : message.jpegThumbnail; + if (options.oneofs) + object.media = "jpegThumbnail"; + } + if (message.videoMessage != null && message.hasOwnProperty("videoMessage")) { + object.videoMessage = $root.proto.VideoMessage.toObject(message.videoMessage, options); + if (options.oneofs) + object.media = "videoMessage"; + } + return object; + }; + + /** + * Converts this Header to JSON. + * @function toJSON + * @memberof proto.Header + * @instance + * @returns {Object.} JSON object + */ + Header.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Header; + })(); + + proto.HighlyStructuredMessage = (function() { + + /** + * Properties of a HighlyStructuredMessage. + * @memberof proto + * @interface IHighlyStructuredMessage + * @property {string|null} [namespace] HighlyStructuredMessage namespace + * @property {string|null} [elementName] HighlyStructuredMessage elementName + * @property {Array.|null} [params] HighlyStructuredMessage params + * @property {string|null} [fallbackLg] HighlyStructuredMessage fallbackLg + * @property {string|null} [fallbackLc] HighlyStructuredMessage fallbackLc + * @property {Array.|null} [localizableParams] HighlyStructuredMessage localizableParams + * @property {string|null} [deterministicLg] HighlyStructuredMessage deterministicLg + * @property {string|null} [deterministicLc] HighlyStructuredMessage deterministicLc + * @property {proto.ITemplateMessage|null} [hydratedHsm] HighlyStructuredMessage hydratedHsm + */ + + /** + * Constructs a new HighlyStructuredMessage. + * @memberof proto + * @classdesc Represents a HighlyStructuredMessage. + * @implements IHighlyStructuredMessage + * @constructor + * @param {proto.IHighlyStructuredMessage=} [properties] Properties to set + */ + function HighlyStructuredMessage(properties) { + this.params = []; + this.localizableParams = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HighlyStructuredMessage namespace. + * @member {string} namespace + * @memberof proto.HighlyStructuredMessage + * @instance + */ + HighlyStructuredMessage.prototype.namespace = ""; + + /** + * HighlyStructuredMessage elementName. + * @member {string} elementName + * @memberof proto.HighlyStructuredMessage + * @instance + */ + HighlyStructuredMessage.prototype.elementName = ""; + + /** + * HighlyStructuredMessage params. + * @member {Array.} params + * @memberof proto.HighlyStructuredMessage + * @instance + */ + HighlyStructuredMessage.prototype.params = $util.emptyArray; + + /** + * HighlyStructuredMessage fallbackLg. + * @member {string} fallbackLg + * @memberof proto.HighlyStructuredMessage + * @instance + */ + HighlyStructuredMessage.prototype.fallbackLg = ""; + + /** + * HighlyStructuredMessage fallbackLc. + * @member {string} fallbackLc + * @memberof proto.HighlyStructuredMessage + * @instance + */ + HighlyStructuredMessage.prototype.fallbackLc = ""; + + /** + * HighlyStructuredMessage localizableParams. + * @member {Array.} localizableParams + * @memberof proto.HighlyStructuredMessage + * @instance + */ + HighlyStructuredMessage.prototype.localizableParams = $util.emptyArray; + + /** + * HighlyStructuredMessage deterministicLg. + * @member {string} deterministicLg + * @memberof proto.HighlyStructuredMessage + * @instance + */ + HighlyStructuredMessage.prototype.deterministicLg = ""; + + /** + * HighlyStructuredMessage deterministicLc. + * @member {string} deterministicLc + * @memberof proto.HighlyStructuredMessage + * @instance + */ + HighlyStructuredMessage.prototype.deterministicLc = ""; + + /** + * HighlyStructuredMessage hydratedHsm. + * @member {proto.ITemplateMessage|null|undefined} hydratedHsm + * @memberof proto.HighlyStructuredMessage + * @instance + */ + HighlyStructuredMessage.prototype.hydratedHsm = null; + + /** + * Creates a new HighlyStructuredMessage instance using the specified properties. + * @function create + * @memberof proto.HighlyStructuredMessage + * @static + * @param {proto.IHighlyStructuredMessage=} [properties] Properties to set + * @returns {proto.HighlyStructuredMessage} HighlyStructuredMessage instance + */ + HighlyStructuredMessage.create = function create(properties) { + return new HighlyStructuredMessage(properties); + }; + + /** + * Encodes the specified HighlyStructuredMessage message. Does not implicitly {@link proto.HighlyStructuredMessage.verify|verify} messages. + * @function encode + * @memberof proto.HighlyStructuredMessage + * @static + * @param {proto.IHighlyStructuredMessage} message HighlyStructuredMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HighlyStructuredMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.namespace != null && Object.hasOwnProperty.call(message, "namespace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namespace); + if (message.elementName != null && Object.hasOwnProperty.call(message, "elementName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.elementName); + if (message.params != null && message.params.length) + for (var i = 0; i < message.params.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.params[i]); + if (message.fallbackLg != null && Object.hasOwnProperty.call(message, "fallbackLg")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.fallbackLg); + if (message.fallbackLc != null && Object.hasOwnProperty.call(message, "fallbackLc")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.fallbackLc); + if (message.localizableParams != null && message.localizableParams.length) + for (var i = 0; i < message.localizableParams.length; ++i) + $root.proto.HSMLocalizableParameter.encode(message.localizableParams[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.deterministicLg != null && Object.hasOwnProperty.call(message, "deterministicLg")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.deterministicLg); + if (message.deterministicLc != null && Object.hasOwnProperty.call(message, "deterministicLc")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.deterministicLc); + if (message.hydratedHsm != null && Object.hasOwnProperty.call(message, "hydratedHsm")) + $root.proto.TemplateMessage.encode(message.hydratedHsm, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified HighlyStructuredMessage message, length delimited. Does not implicitly {@link proto.HighlyStructuredMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.HighlyStructuredMessage + * @static + * @param {proto.IHighlyStructuredMessage} message HighlyStructuredMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HighlyStructuredMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HighlyStructuredMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.HighlyStructuredMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.HighlyStructuredMessage} HighlyStructuredMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HighlyStructuredMessage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.HighlyStructuredMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.namespace = reader.string(); + break; + case 2: + message.elementName = reader.string(); + break; + case 3: + if (!(message.params && message.params.length)) + message.params = []; + message.params.push(reader.string()); + break; + case 4: + message.fallbackLg = reader.string(); + break; + case 5: + message.fallbackLc = reader.string(); + break; + case 6: + if (!(message.localizableParams && message.localizableParams.length)) + message.localizableParams = []; + message.localizableParams.push($root.proto.HSMLocalizableParameter.decode(reader, reader.uint32())); + break; + case 7: + message.deterministicLg = reader.string(); + break; + case 8: + message.deterministicLc = reader.string(); + break; + case 9: + message.hydratedHsm = $root.proto.TemplateMessage.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HighlyStructuredMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.HighlyStructuredMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.HighlyStructuredMessage} HighlyStructuredMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HighlyStructuredMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HighlyStructuredMessage message. + * @function verify + * @memberof proto.HighlyStructuredMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HighlyStructuredMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.namespace != null && message.hasOwnProperty("namespace")) + if (!$util.isString(message.namespace)) + return "namespace: string expected"; + if (message.elementName != null && message.hasOwnProperty("elementName")) + if (!$util.isString(message.elementName)) + return "elementName: string expected"; + if (message.params != null && message.hasOwnProperty("params")) { + if (!Array.isArray(message.params)) + return "params: array expected"; + for (var i = 0; i < message.params.length; ++i) + if (!$util.isString(message.params[i])) + return "params: string[] expected"; + } + if (message.fallbackLg != null && message.hasOwnProperty("fallbackLg")) + if (!$util.isString(message.fallbackLg)) + return "fallbackLg: string expected"; + if (message.fallbackLc != null && message.hasOwnProperty("fallbackLc")) + if (!$util.isString(message.fallbackLc)) + return "fallbackLc: string expected"; + if (message.localizableParams != null && message.hasOwnProperty("localizableParams")) { + if (!Array.isArray(message.localizableParams)) + return "localizableParams: array expected"; + for (var i = 0; i < message.localizableParams.length; ++i) { + var error = $root.proto.HSMLocalizableParameter.verify(message.localizableParams[i]); + if (error) + return "localizableParams." + error; + } + } + if (message.deterministicLg != null && message.hasOwnProperty("deterministicLg")) + if (!$util.isString(message.deterministicLg)) + return "deterministicLg: string expected"; + if (message.deterministicLc != null && message.hasOwnProperty("deterministicLc")) + if (!$util.isString(message.deterministicLc)) + return "deterministicLc: string expected"; + if (message.hydratedHsm != null && message.hasOwnProperty("hydratedHsm")) { + var error = $root.proto.TemplateMessage.verify(message.hydratedHsm); + if (error) + return "hydratedHsm." + error; + } + return null; + }; + + /** + * Creates a HighlyStructuredMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.HighlyStructuredMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.HighlyStructuredMessage} HighlyStructuredMessage + */ + HighlyStructuredMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.HighlyStructuredMessage) + return object; + var message = new $root.proto.HighlyStructuredMessage(); + if (object.namespace != null) + message.namespace = String(object.namespace); + if (object.elementName != null) + message.elementName = String(object.elementName); + if (object.params) { + if (!Array.isArray(object.params)) + throw TypeError(".proto.HighlyStructuredMessage.params: array expected"); + message.params = []; + for (var i = 0; i < object.params.length; ++i) + message.params[i] = String(object.params[i]); + } + if (object.fallbackLg != null) + message.fallbackLg = String(object.fallbackLg); + if (object.fallbackLc != null) + message.fallbackLc = String(object.fallbackLc); + if (object.localizableParams) { + if (!Array.isArray(object.localizableParams)) + throw TypeError(".proto.HighlyStructuredMessage.localizableParams: array expected"); + message.localizableParams = []; + for (var i = 0; i < object.localizableParams.length; ++i) { + if (typeof object.localizableParams[i] !== "object") + throw TypeError(".proto.HighlyStructuredMessage.localizableParams: object expected"); + message.localizableParams[i] = $root.proto.HSMLocalizableParameter.fromObject(object.localizableParams[i]); + } + } + if (object.deterministicLg != null) + message.deterministicLg = String(object.deterministicLg); + if (object.deterministicLc != null) + message.deterministicLc = String(object.deterministicLc); + if (object.hydratedHsm != null) { + if (typeof object.hydratedHsm !== "object") + throw TypeError(".proto.HighlyStructuredMessage.hydratedHsm: object expected"); + message.hydratedHsm = $root.proto.TemplateMessage.fromObject(object.hydratedHsm); + } + return message; + }; + + /** + * Creates a plain object from a HighlyStructuredMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.HighlyStructuredMessage + * @static + * @param {proto.HighlyStructuredMessage} message HighlyStructuredMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HighlyStructuredMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.params = []; + object.localizableParams = []; + } + if (options.defaults) { + object.namespace = ""; + object.elementName = ""; + object.fallbackLg = ""; + object.fallbackLc = ""; + object.deterministicLg = ""; + object.deterministicLc = ""; + object.hydratedHsm = null; + } + if (message.namespace != null && message.hasOwnProperty("namespace")) + object.namespace = message.namespace; + if (message.elementName != null && message.hasOwnProperty("elementName")) + object.elementName = message.elementName; + if (message.params && message.params.length) { + object.params = []; + for (var j = 0; j < message.params.length; ++j) + object.params[j] = message.params[j]; + } + if (message.fallbackLg != null && message.hasOwnProperty("fallbackLg")) + object.fallbackLg = message.fallbackLg; + if (message.fallbackLc != null && message.hasOwnProperty("fallbackLc")) + object.fallbackLc = message.fallbackLc; + if (message.localizableParams && message.localizableParams.length) { + object.localizableParams = []; + for (var j = 0; j < message.localizableParams.length; ++j) + object.localizableParams[j] = $root.proto.HSMLocalizableParameter.toObject(message.localizableParams[j], options); + } + if (message.deterministicLg != null && message.hasOwnProperty("deterministicLg")) + object.deterministicLg = message.deterministicLg; + if (message.deterministicLc != null && message.hasOwnProperty("deterministicLc")) + object.deterministicLc = message.deterministicLc; + if (message.hydratedHsm != null && message.hasOwnProperty("hydratedHsm")) + object.hydratedHsm = $root.proto.TemplateMessage.toObject(message.hydratedHsm, options); + return object; + }; + + /** + * Converts this HighlyStructuredMessage to JSON. + * @function toJSON + * @memberof proto.HighlyStructuredMessage + * @instance + * @returns {Object.} JSON object + */ + HighlyStructuredMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HighlyStructuredMessage; + })(); + + proto.HistorySync = (function() { + + /** + * Properties of a HistorySync. + * @memberof proto + * @interface IHistorySync + * @property {proto.HistorySync.HistorySyncHistorySyncType} syncType HistorySync syncType + * @property {Array.|null} [conversations] HistorySync conversations + * @property {Array.|null} [statusV3Messages] HistorySync statusV3Messages + * @property {number|null} [chunkOrder] HistorySync chunkOrder + * @property {number|null} [progress] HistorySync progress + * @property {Array.|null} [pushnames] HistorySync pushnames + * @property {proto.IGlobalSettings|null} [globalSettings] HistorySync globalSettings + * @property {Uint8Array|null} [threadIdUserSecret] HistorySync threadIdUserSecret + * @property {number|null} [threadDsTimeframeOffset] HistorySync threadDsTimeframeOffset + */ + + /** + * Constructs a new HistorySync. + * @memberof proto + * @classdesc Represents a HistorySync. + * @implements IHistorySync + * @constructor + * @param {proto.IHistorySync=} [properties] Properties to set + */ + function HistorySync(properties) { + this.conversations = []; + this.statusV3Messages = []; + this.pushnames = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HistorySync syncType. + * @member {proto.HistorySync.HistorySyncHistorySyncType} syncType + * @memberof proto.HistorySync + * @instance + */ + HistorySync.prototype.syncType = 0; + + /** + * HistorySync conversations. + * @member {Array.} conversations + * @memberof proto.HistorySync + * @instance + */ + HistorySync.prototype.conversations = $util.emptyArray; + + /** + * HistorySync statusV3Messages. + * @member {Array.} statusV3Messages + * @memberof proto.HistorySync + * @instance + */ + HistorySync.prototype.statusV3Messages = $util.emptyArray; + + /** + * HistorySync chunkOrder. + * @member {number} chunkOrder + * @memberof proto.HistorySync + * @instance + */ + HistorySync.prototype.chunkOrder = 0; + + /** + * HistorySync progress. + * @member {number} progress + * @memberof proto.HistorySync + * @instance + */ + HistorySync.prototype.progress = 0; + + /** + * HistorySync pushnames. + * @member {Array.} pushnames + * @memberof proto.HistorySync + * @instance + */ + HistorySync.prototype.pushnames = $util.emptyArray; + + /** + * HistorySync globalSettings. + * @member {proto.IGlobalSettings|null|undefined} globalSettings + * @memberof proto.HistorySync + * @instance + */ + HistorySync.prototype.globalSettings = null; + + /** + * HistorySync threadIdUserSecret. + * @member {Uint8Array} threadIdUserSecret + * @memberof proto.HistorySync + * @instance + */ + HistorySync.prototype.threadIdUserSecret = $util.newBuffer([]); + + /** + * HistorySync threadDsTimeframeOffset. + * @member {number} threadDsTimeframeOffset + * @memberof proto.HistorySync + * @instance + */ + HistorySync.prototype.threadDsTimeframeOffset = 0; + + /** + * Creates a new HistorySync instance using the specified properties. + * @function create + * @memberof proto.HistorySync + * @static + * @param {proto.IHistorySync=} [properties] Properties to set + * @returns {proto.HistorySync} HistorySync instance + */ + HistorySync.create = function create(properties) { + return new HistorySync(properties); + }; + + /** + * Encodes the specified HistorySync message. Does not implicitly {@link proto.HistorySync.verify|verify} messages. + * @function encode + * @memberof proto.HistorySync + * @static + * @param {proto.IHistorySync} message HistorySync message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HistorySync.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.syncType); + if (message.conversations != null && message.conversations.length) + for (var i = 0; i < message.conversations.length; ++i) + $root.proto.Conversation.encode(message.conversations[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.statusV3Messages != null && message.statusV3Messages.length) + for (var i = 0; i < message.statusV3Messages.length; ++i) + $root.proto.WebMessageInfo.encode(message.statusV3Messages[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.chunkOrder != null && Object.hasOwnProperty.call(message, "chunkOrder")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.chunkOrder); + if (message.progress != null && Object.hasOwnProperty.call(message, "progress")) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.progress); + if (message.pushnames != null && message.pushnames.length) + for (var i = 0; i < message.pushnames.length; ++i) + $root.proto.Pushname.encode(message.pushnames[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.globalSettings != null && Object.hasOwnProperty.call(message, "globalSettings")) + $root.proto.GlobalSettings.encode(message.globalSettings, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.threadIdUserSecret != null && Object.hasOwnProperty.call(message, "threadIdUserSecret")) + writer.uint32(/* id 9, wireType 2 =*/74).bytes(message.threadIdUserSecret); + if (message.threadDsTimeframeOffset != null && Object.hasOwnProperty.call(message, "threadDsTimeframeOffset")) + writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.threadDsTimeframeOffset); + return writer; + }; + + /** + * Encodes the specified HistorySync message, length delimited. Does not implicitly {@link proto.HistorySync.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.HistorySync + * @static + * @param {proto.IHistorySync} message HistorySync message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HistorySync.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HistorySync message from the specified reader or buffer. + * @function decode + * @memberof proto.HistorySync + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.HistorySync} HistorySync + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HistorySync.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.HistorySync(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.syncType = reader.int32(); + break; + case 2: + if (!(message.conversations && message.conversations.length)) + message.conversations = []; + message.conversations.push($root.proto.Conversation.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.statusV3Messages && message.statusV3Messages.length)) + message.statusV3Messages = []; + message.statusV3Messages.push($root.proto.WebMessageInfo.decode(reader, reader.uint32())); + break; + case 5: + message.chunkOrder = reader.uint32(); + break; + case 6: + message.progress = reader.uint32(); + break; + case 7: + if (!(message.pushnames && message.pushnames.length)) + message.pushnames = []; + message.pushnames.push($root.proto.Pushname.decode(reader, reader.uint32())); + break; + case 8: + message.globalSettings = $root.proto.GlobalSettings.decode(reader, reader.uint32()); + break; + case 9: + message.threadIdUserSecret = reader.bytes(); + break; + case 10: + message.threadDsTimeframeOffset = reader.uint32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("syncType")) + throw $util.ProtocolError("missing required 'syncType'", { instance: message }); + return message; + }; + + /** + * Decodes a HistorySync message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.HistorySync + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.HistorySync} HistorySync + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HistorySync.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HistorySync message. + * @function verify + * @memberof proto.HistorySync + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HistorySync.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + switch (message.syncType) { + default: + return "syncType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.conversations != null && message.hasOwnProperty("conversations")) { + if (!Array.isArray(message.conversations)) + return "conversations: array expected"; + for (var i = 0; i < message.conversations.length; ++i) { + var error = $root.proto.Conversation.verify(message.conversations[i]); + if (error) + return "conversations." + error; + } + } + if (message.statusV3Messages != null && message.hasOwnProperty("statusV3Messages")) { + if (!Array.isArray(message.statusV3Messages)) + return "statusV3Messages: array expected"; + for (var i = 0; i < message.statusV3Messages.length; ++i) { + var error = $root.proto.WebMessageInfo.verify(message.statusV3Messages[i]); + if (error) + return "statusV3Messages." + error; + } + } + if (message.chunkOrder != null && message.hasOwnProperty("chunkOrder")) + if (!$util.isInteger(message.chunkOrder)) + return "chunkOrder: integer expected"; + if (message.progress != null && message.hasOwnProperty("progress")) + if (!$util.isInteger(message.progress)) + return "progress: integer expected"; + if (message.pushnames != null && message.hasOwnProperty("pushnames")) { + if (!Array.isArray(message.pushnames)) + return "pushnames: array expected"; + for (var i = 0; i < message.pushnames.length; ++i) { + var error = $root.proto.Pushname.verify(message.pushnames[i]); + if (error) + return "pushnames." + error; + } + } + if (message.globalSettings != null && message.hasOwnProperty("globalSettings")) { + var error = $root.proto.GlobalSettings.verify(message.globalSettings); + if (error) + return "globalSettings." + error; + } + if (message.threadIdUserSecret != null && message.hasOwnProperty("threadIdUserSecret")) + if (!(message.threadIdUserSecret && typeof message.threadIdUserSecret.length === "number" || $util.isString(message.threadIdUserSecret))) + return "threadIdUserSecret: buffer expected"; + if (message.threadDsTimeframeOffset != null && message.hasOwnProperty("threadDsTimeframeOffset")) + if (!$util.isInteger(message.threadDsTimeframeOffset)) + return "threadDsTimeframeOffset: integer expected"; + return null; + }; + + /** + * Creates a HistorySync message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.HistorySync + * @static + * @param {Object.} object Plain object + * @returns {proto.HistorySync} HistorySync + */ + HistorySync.fromObject = function fromObject(object) { + if (object instanceof $root.proto.HistorySync) + return object; + var message = new $root.proto.HistorySync(); + switch (object.syncType) { + case "INITIAL_BOOTSTRAP": + case 0: + message.syncType = 0; + break; + case "INITIAL_STATUS_V3": + case 1: + message.syncType = 1; + break; + case "FULL": + case 2: + message.syncType = 2; + break; + case "RECENT": + case 3: + message.syncType = 3; + break; + case "PUSH_NAME": + case 4: + message.syncType = 4; + break; + } + if (object.conversations) { + if (!Array.isArray(object.conversations)) + throw TypeError(".proto.HistorySync.conversations: array expected"); + message.conversations = []; + for (var i = 0; i < object.conversations.length; ++i) { + if (typeof object.conversations[i] !== "object") + throw TypeError(".proto.HistorySync.conversations: object expected"); + message.conversations[i] = $root.proto.Conversation.fromObject(object.conversations[i]); + } + } + if (object.statusV3Messages) { + if (!Array.isArray(object.statusV3Messages)) + throw TypeError(".proto.HistorySync.statusV3Messages: array expected"); + message.statusV3Messages = []; + for (var i = 0; i < object.statusV3Messages.length; ++i) { + if (typeof object.statusV3Messages[i] !== "object") + throw TypeError(".proto.HistorySync.statusV3Messages: object expected"); + message.statusV3Messages[i] = $root.proto.WebMessageInfo.fromObject(object.statusV3Messages[i]); + } + } + if (object.chunkOrder != null) + message.chunkOrder = object.chunkOrder >>> 0; + if (object.progress != null) + message.progress = object.progress >>> 0; + if (object.pushnames) { + if (!Array.isArray(object.pushnames)) + throw TypeError(".proto.HistorySync.pushnames: array expected"); + message.pushnames = []; + for (var i = 0; i < object.pushnames.length; ++i) { + if (typeof object.pushnames[i] !== "object") + throw TypeError(".proto.HistorySync.pushnames: object expected"); + message.pushnames[i] = $root.proto.Pushname.fromObject(object.pushnames[i]); + } + } + if (object.globalSettings != null) { + if (typeof object.globalSettings !== "object") + throw TypeError(".proto.HistorySync.globalSettings: object expected"); + message.globalSettings = $root.proto.GlobalSettings.fromObject(object.globalSettings); + } + if (object.threadIdUserSecret != null) + if (typeof object.threadIdUserSecret === "string") + $util.base64.decode(object.threadIdUserSecret, message.threadIdUserSecret = $util.newBuffer($util.base64.length(object.threadIdUserSecret)), 0); + else if (object.threadIdUserSecret.length) + message.threadIdUserSecret = object.threadIdUserSecret; + if (object.threadDsTimeframeOffset != null) + message.threadDsTimeframeOffset = object.threadDsTimeframeOffset >>> 0; + return message; + }; + + /** + * Creates a plain object from a HistorySync message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.HistorySync + * @static + * @param {proto.HistorySync} message HistorySync + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HistorySync.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.conversations = []; + object.statusV3Messages = []; + object.pushnames = []; + } + if (options.defaults) { + object.syncType = options.enums === String ? "INITIAL_BOOTSTRAP" : 0; + object.chunkOrder = 0; + object.progress = 0; + object.globalSettings = null; + if (options.bytes === String) + object.threadIdUserSecret = ""; + else { + object.threadIdUserSecret = []; + if (options.bytes !== Array) + object.threadIdUserSecret = $util.newBuffer(object.threadIdUserSecret); + } + object.threadDsTimeframeOffset = 0; + } + if (message.syncType != null && message.hasOwnProperty("syncType")) + object.syncType = options.enums === String ? $root.proto.HistorySync.HistorySyncHistorySyncType[message.syncType] : message.syncType; + if (message.conversations && message.conversations.length) { + object.conversations = []; + for (var j = 0; j < message.conversations.length; ++j) + object.conversations[j] = $root.proto.Conversation.toObject(message.conversations[j], options); + } + if (message.statusV3Messages && message.statusV3Messages.length) { + object.statusV3Messages = []; + for (var j = 0; j < message.statusV3Messages.length; ++j) + object.statusV3Messages[j] = $root.proto.WebMessageInfo.toObject(message.statusV3Messages[j], options); + } + if (message.chunkOrder != null && message.hasOwnProperty("chunkOrder")) + object.chunkOrder = message.chunkOrder; + if (message.progress != null && message.hasOwnProperty("progress")) + object.progress = message.progress; + if (message.pushnames && message.pushnames.length) { + object.pushnames = []; + for (var j = 0; j < message.pushnames.length; ++j) + object.pushnames[j] = $root.proto.Pushname.toObject(message.pushnames[j], options); + } + if (message.globalSettings != null && message.hasOwnProperty("globalSettings")) + object.globalSettings = $root.proto.GlobalSettings.toObject(message.globalSettings, options); + if (message.threadIdUserSecret != null && message.hasOwnProperty("threadIdUserSecret")) + object.threadIdUserSecret = options.bytes === String ? $util.base64.encode(message.threadIdUserSecret, 0, message.threadIdUserSecret.length) : options.bytes === Array ? Array.prototype.slice.call(message.threadIdUserSecret) : message.threadIdUserSecret; + if (message.threadDsTimeframeOffset != null && message.hasOwnProperty("threadDsTimeframeOffset")) + object.threadDsTimeframeOffset = message.threadDsTimeframeOffset; + return object; + }; + + /** + * Converts this HistorySync to JSON. + * @function toJSON + * @memberof proto.HistorySync + * @instance + * @returns {Object.} JSON object + */ + HistorySync.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * HistorySyncHistorySyncType enum. + * @name proto.HistorySync.HistorySyncHistorySyncType + * @enum {number} + * @property {number} INITIAL_BOOTSTRAP=0 INITIAL_BOOTSTRAP value + * @property {number} INITIAL_STATUS_V3=1 INITIAL_STATUS_V3 value + * @property {number} FULL=2 FULL value + * @property {number} RECENT=3 RECENT value + * @property {number} PUSH_NAME=4 PUSH_NAME value + */ + HistorySync.HistorySyncHistorySyncType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INITIAL_BOOTSTRAP"] = 0; + values[valuesById[1] = "INITIAL_STATUS_V3"] = 1; + values[valuesById[2] = "FULL"] = 2; + values[valuesById[3] = "RECENT"] = 3; + values[valuesById[4] = "PUSH_NAME"] = 4; + return values; + })(); + + return HistorySync; + })(); + + proto.HistorySyncMsg = (function() { + + /** + * Properties of a HistorySyncMsg. + * @memberof proto + * @interface IHistorySyncMsg + * @property {proto.IWebMessageInfo|null} [message] HistorySyncMsg message + * @property {number|Long|null} [msgOrderId] HistorySyncMsg msgOrderId + */ + + /** + * Constructs a new HistorySyncMsg. + * @memberof proto + * @classdesc Represents a HistorySyncMsg. + * @implements IHistorySyncMsg + * @constructor + * @param {proto.IHistorySyncMsg=} [properties] Properties to set + */ + function HistorySyncMsg(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HistorySyncMsg message. + * @member {proto.IWebMessageInfo|null|undefined} message + * @memberof proto.HistorySyncMsg + * @instance + */ + HistorySyncMsg.prototype.message = null; + + /** + * HistorySyncMsg msgOrderId. + * @member {number|Long} msgOrderId + * @memberof proto.HistorySyncMsg + * @instance + */ + HistorySyncMsg.prototype.msgOrderId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new HistorySyncMsg instance using the specified properties. + * @function create + * @memberof proto.HistorySyncMsg + * @static + * @param {proto.IHistorySyncMsg=} [properties] Properties to set + * @returns {proto.HistorySyncMsg} HistorySyncMsg instance + */ + HistorySyncMsg.create = function create(properties) { + return new HistorySyncMsg(properties); + }; + + /** + * Encodes the specified HistorySyncMsg message. Does not implicitly {@link proto.HistorySyncMsg.verify|verify} messages. + * @function encode + * @memberof proto.HistorySyncMsg + * @static + * @param {proto.IHistorySyncMsg} message HistorySyncMsg message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HistorySyncMsg.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + $root.proto.WebMessageInfo.encode(message.message, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.msgOrderId != null && Object.hasOwnProperty.call(message, "msgOrderId")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.msgOrderId); + return writer; + }; + + /** + * Encodes the specified HistorySyncMsg message, length delimited. Does not implicitly {@link proto.HistorySyncMsg.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.HistorySyncMsg + * @static + * @param {proto.IHistorySyncMsg} message HistorySyncMsg message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HistorySyncMsg.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HistorySyncMsg message from the specified reader or buffer. + * @function decode + * @memberof proto.HistorySyncMsg + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.HistorySyncMsg} HistorySyncMsg + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HistorySyncMsg.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.HistorySyncMsg(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.message = $root.proto.WebMessageInfo.decode(reader, reader.uint32()); + break; + case 2: + message.msgOrderId = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HistorySyncMsg message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.HistorySyncMsg + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.HistorySyncMsg} HistorySyncMsg + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HistorySyncMsg.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HistorySyncMsg message. + * @function verify + * @memberof proto.HistorySyncMsg + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HistorySyncMsg.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.message != null && message.hasOwnProperty("message")) { + var error = $root.proto.WebMessageInfo.verify(message.message); + if (error) + return "message." + error; + } + if (message.msgOrderId != null && message.hasOwnProperty("msgOrderId")) + if (!$util.isInteger(message.msgOrderId) && !(message.msgOrderId && $util.isInteger(message.msgOrderId.low) && $util.isInteger(message.msgOrderId.high))) + return "msgOrderId: integer|Long expected"; + return null; + }; + + /** + * Creates a HistorySyncMsg message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.HistorySyncMsg + * @static + * @param {Object.} object Plain object + * @returns {proto.HistorySyncMsg} HistorySyncMsg + */ + HistorySyncMsg.fromObject = function fromObject(object) { + if (object instanceof $root.proto.HistorySyncMsg) + return object; + var message = new $root.proto.HistorySyncMsg(); + if (object.message != null) { + if (typeof object.message !== "object") + throw TypeError(".proto.HistorySyncMsg.message: object expected"); + message.message = $root.proto.WebMessageInfo.fromObject(object.message); + } + if (object.msgOrderId != null) + if ($util.Long) + (message.msgOrderId = $util.Long.fromValue(object.msgOrderId)).unsigned = true; + else if (typeof object.msgOrderId === "string") + message.msgOrderId = parseInt(object.msgOrderId, 10); + else if (typeof object.msgOrderId === "number") + message.msgOrderId = object.msgOrderId; + else if (typeof object.msgOrderId === "object") + message.msgOrderId = new $util.LongBits(object.msgOrderId.low >>> 0, object.msgOrderId.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a HistorySyncMsg message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.HistorySyncMsg + * @static + * @param {proto.HistorySyncMsg} message HistorySyncMsg + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HistorySyncMsg.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.message = null; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.msgOrderId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.msgOrderId = options.longs === String ? "0" : 0; + } + if (message.message != null && message.hasOwnProperty("message")) + object.message = $root.proto.WebMessageInfo.toObject(message.message, options); + if (message.msgOrderId != null && message.hasOwnProperty("msgOrderId")) + if (typeof message.msgOrderId === "number") + object.msgOrderId = options.longs === String ? String(message.msgOrderId) : message.msgOrderId; + else + object.msgOrderId = options.longs === String ? $util.Long.prototype.toString.call(message.msgOrderId) : options.longs === Number ? new $util.LongBits(message.msgOrderId.low >>> 0, message.msgOrderId.high >>> 0).toNumber(true) : message.msgOrderId; + return object; + }; + + /** + * Converts this HistorySyncMsg to JSON. + * @function toJSON + * @memberof proto.HistorySyncMsg + * @instance + * @returns {Object.} JSON object + */ + HistorySyncMsg.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HistorySyncMsg; + })(); + + proto.HistorySyncNotification = (function() { + + /** + * Properties of a HistorySyncNotification. + * @memberof proto + * @interface IHistorySyncNotification + * @property {Uint8Array|null} [fileSha256] HistorySyncNotification fileSha256 + * @property {number|Long|null} [fileLength] HistorySyncNotification fileLength + * @property {Uint8Array|null} [mediaKey] HistorySyncNotification mediaKey + * @property {Uint8Array|null} [fileEncSha256] HistorySyncNotification fileEncSha256 + * @property {string|null} [directPath] HistorySyncNotification directPath + * @property {proto.HistorySyncNotification.HistorySyncNotificationHistorySyncType|null} [syncType] HistorySyncNotification syncType + * @property {number|null} [chunkOrder] HistorySyncNotification chunkOrder + * @property {string|null} [originalMessageId] HistorySyncNotification originalMessageId + */ + + /** + * Constructs a new HistorySyncNotification. + * @memberof proto + * @classdesc Represents a HistorySyncNotification. + * @implements IHistorySyncNotification + * @constructor + * @param {proto.IHistorySyncNotification=} [properties] Properties to set + */ + function HistorySyncNotification(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HistorySyncNotification fileSha256. + * @member {Uint8Array} fileSha256 + * @memberof proto.HistorySyncNotification + * @instance + */ + HistorySyncNotification.prototype.fileSha256 = $util.newBuffer([]); + + /** + * HistorySyncNotification fileLength. + * @member {number|Long} fileLength + * @memberof proto.HistorySyncNotification + * @instance + */ + HistorySyncNotification.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * HistorySyncNotification mediaKey. + * @member {Uint8Array} mediaKey + * @memberof proto.HistorySyncNotification + * @instance + */ + HistorySyncNotification.prototype.mediaKey = $util.newBuffer([]); + + /** + * HistorySyncNotification fileEncSha256. + * @member {Uint8Array} fileEncSha256 + * @memberof proto.HistorySyncNotification + * @instance + */ + HistorySyncNotification.prototype.fileEncSha256 = $util.newBuffer([]); + + /** + * HistorySyncNotification directPath. + * @member {string} directPath + * @memberof proto.HistorySyncNotification + * @instance + */ + HistorySyncNotification.prototype.directPath = ""; + + /** + * HistorySyncNotification syncType. + * @member {proto.HistorySyncNotification.HistorySyncNotificationHistorySyncType} syncType + * @memberof proto.HistorySyncNotification + * @instance + */ + HistorySyncNotification.prototype.syncType = 0; + + /** + * HistorySyncNotification chunkOrder. + * @member {number} chunkOrder + * @memberof proto.HistorySyncNotification + * @instance + */ + HistorySyncNotification.prototype.chunkOrder = 0; + + /** + * HistorySyncNotification originalMessageId. + * @member {string} originalMessageId + * @memberof proto.HistorySyncNotification + * @instance + */ + HistorySyncNotification.prototype.originalMessageId = ""; + + /** + * Creates a new HistorySyncNotification instance using the specified properties. + * @function create + * @memberof proto.HistorySyncNotification + * @static + * @param {proto.IHistorySyncNotification=} [properties] Properties to set + * @returns {proto.HistorySyncNotification} HistorySyncNotification instance + */ + HistorySyncNotification.create = function create(properties) { + return new HistorySyncNotification(properties); + }; + + /** + * Encodes the specified HistorySyncNotification message. Does not implicitly {@link proto.HistorySyncNotification.verify|verify} messages. + * @function encode + * @memberof proto.HistorySyncNotification + * @static + * @param {proto.IHistorySyncNotification} message HistorySyncNotification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HistorySyncNotification.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fileSha256 != null && Object.hasOwnProperty.call(message, "fileSha256")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.fileSha256); + if (message.fileLength != null && Object.hasOwnProperty.call(message, "fileLength")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.fileLength); + if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.mediaKey); + if (message.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.fileEncSha256); + if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.directPath); + if (message.syncType != null && Object.hasOwnProperty.call(message, "syncType")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.syncType); + if (message.chunkOrder != null && Object.hasOwnProperty.call(message, "chunkOrder")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.chunkOrder); + if (message.originalMessageId != null && Object.hasOwnProperty.call(message, "originalMessageId")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.originalMessageId); + return writer; + }; + + /** + * Encodes the specified HistorySyncNotification message, length delimited. Does not implicitly {@link proto.HistorySyncNotification.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.HistorySyncNotification + * @static + * @param {proto.IHistorySyncNotification} message HistorySyncNotification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HistorySyncNotification.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HistorySyncNotification message from the specified reader or buffer. + * @function decode + * @memberof proto.HistorySyncNotification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.HistorySyncNotification} HistorySyncNotification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HistorySyncNotification.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.HistorySyncNotification(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.fileSha256 = reader.bytes(); + break; + case 2: + message.fileLength = reader.uint64(); + break; + case 3: + message.mediaKey = reader.bytes(); + break; + case 4: + message.fileEncSha256 = reader.bytes(); + break; + case 5: + message.directPath = reader.string(); + break; + case 6: + message.syncType = reader.int32(); + break; + case 7: + message.chunkOrder = reader.uint32(); + break; + case 8: + message.originalMessageId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HistorySyncNotification message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.HistorySyncNotification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.HistorySyncNotification} HistorySyncNotification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HistorySyncNotification.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HistorySyncNotification message. + * @function verify + * @memberof proto.HistorySyncNotification + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HistorySyncNotification.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256))) + return "fileSha256: buffer expected"; + if (message.fileLength != null && message.hasOwnProperty("fileLength")) + if (!$util.isInteger(message.fileLength) && !(message.fileLength && $util.isInteger(message.fileLength.low) && $util.isInteger(message.fileLength.high))) + return "fileLength: integer|Long expected"; + if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) + if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey))) + return "mediaKey: buffer expected"; + if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) + if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256))) + return "fileEncSha256: buffer expected"; + if (message.directPath != null && message.hasOwnProperty("directPath")) + if (!$util.isString(message.directPath)) + return "directPath: string expected"; + if (message.syncType != null && message.hasOwnProperty("syncType")) + switch (message.syncType) { + default: + return "syncType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.chunkOrder != null && message.hasOwnProperty("chunkOrder")) + if (!$util.isInteger(message.chunkOrder)) + return "chunkOrder: integer expected"; + if (message.originalMessageId != null && message.hasOwnProperty("originalMessageId")) + if (!$util.isString(message.originalMessageId)) + return "originalMessageId: string expected"; + return null; + }; + + /** + * Creates a HistorySyncNotification message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.HistorySyncNotification + * @static + * @param {Object.} object Plain object + * @returns {proto.HistorySyncNotification} HistorySyncNotification + */ + HistorySyncNotification.fromObject = function fromObject(object) { + if (object instanceof $root.proto.HistorySyncNotification) + return object; + var message = new $root.proto.HistorySyncNotification(); + if (object.fileSha256 != null) + if (typeof object.fileSha256 === "string") + $util.base64.decode(object.fileSha256, message.fileSha256 = $util.newBuffer($util.base64.length(object.fileSha256)), 0); + else if (object.fileSha256.length) + message.fileSha256 = object.fileSha256; + if (object.fileLength != null) + if ($util.Long) + (message.fileLength = $util.Long.fromValue(object.fileLength)).unsigned = true; + else if (typeof object.fileLength === "string") + message.fileLength = parseInt(object.fileLength, 10); + else if (typeof object.fileLength === "number") + message.fileLength = object.fileLength; + else if (typeof object.fileLength === "object") + message.fileLength = new $util.LongBits(object.fileLength.low >>> 0, object.fileLength.high >>> 0).toNumber(true); + if (object.mediaKey != null) + if (typeof object.mediaKey === "string") + $util.base64.decode(object.mediaKey, message.mediaKey = $util.newBuffer($util.base64.length(object.mediaKey)), 0); + else if (object.mediaKey.length) + message.mediaKey = object.mediaKey; + if (object.fileEncSha256 != null) + if (typeof object.fileEncSha256 === "string") + $util.base64.decode(object.fileEncSha256, message.fileEncSha256 = $util.newBuffer($util.base64.length(object.fileEncSha256)), 0); + else if (object.fileEncSha256.length) + message.fileEncSha256 = object.fileEncSha256; + if (object.directPath != null) + message.directPath = String(object.directPath); + switch (object.syncType) { + case "INITIAL_BOOTSTRAP": + case 0: + message.syncType = 0; + break; + case "INITIAL_STATUS_V3": + case 1: + message.syncType = 1; + break; + case "FULL": + case 2: + message.syncType = 2; + break; + case "RECENT": + case 3: + message.syncType = 3; + break; + case "PUSH_NAME": + case 4: + message.syncType = 4; + break; + } + if (object.chunkOrder != null) + message.chunkOrder = object.chunkOrder >>> 0; + if (object.originalMessageId != null) + message.originalMessageId = String(object.originalMessageId); + return message; + }; + + /** + * Creates a plain object from a HistorySyncNotification message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.HistorySyncNotification + * @static + * @param {proto.HistorySyncNotification} message HistorySyncNotification + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HistorySyncNotification.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.fileSha256 = ""; + else { + object.fileSha256 = []; + if (options.bytes !== Array) + object.fileSha256 = $util.newBuffer(object.fileSha256); + } + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.fileLength = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.fileLength = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.mediaKey = ""; + else { + object.mediaKey = []; + if (options.bytes !== Array) + object.mediaKey = $util.newBuffer(object.mediaKey); + } + if (options.bytes === String) + object.fileEncSha256 = ""; + else { + object.fileEncSha256 = []; + if (options.bytes !== Array) + object.fileEncSha256 = $util.newBuffer(object.fileEncSha256); + } + object.directPath = ""; + object.syncType = options.enums === String ? "INITIAL_BOOTSTRAP" : 0; + object.chunkOrder = 0; + object.originalMessageId = ""; + } + if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + object.fileSha256 = options.bytes === String ? $util.base64.encode(message.fileSha256, 0, message.fileSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileSha256) : message.fileSha256; + if (message.fileLength != null && message.hasOwnProperty("fileLength")) + if (typeof message.fileLength === "number") + object.fileLength = options.longs === String ? String(message.fileLength) : message.fileLength; + else + object.fileLength = options.longs === String ? $util.Long.prototype.toString.call(message.fileLength) : options.longs === Number ? new $util.LongBits(message.fileLength.low >>> 0, message.fileLength.high >>> 0).toNumber(true) : message.fileLength; + if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) + object.mediaKey = options.bytes === String ? $util.base64.encode(message.mediaKey, 0, message.mediaKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.mediaKey) : message.mediaKey; + if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) + object.fileEncSha256 = options.bytes === String ? $util.base64.encode(message.fileEncSha256, 0, message.fileEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileEncSha256) : message.fileEncSha256; + if (message.directPath != null && message.hasOwnProperty("directPath")) + object.directPath = message.directPath; + if (message.syncType != null && message.hasOwnProperty("syncType")) + object.syncType = options.enums === String ? $root.proto.HistorySyncNotification.HistorySyncNotificationHistorySyncType[message.syncType] : message.syncType; + if (message.chunkOrder != null && message.hasOwnProperty("chunkOrder")) + object.chunkOrder = message.chunkOrder; + if (message.originalMessageId != null && message.hasOwnProperty("originalMessageId")) + object.originalMessageId = message.originalMessageId; + return object; + }; + + /** + * Converts this HistorySyncNotification to JSON. + * @function toJSON + * @memberof proto.HistorySyncNotification + * @instance + * @returns {Object.} JSON object + */ + HistorySyncNotification.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * HistorySyncNotificationHistorySyncType enum. + * @name proto.HistorySyncNotification.HistorySyncNotificationHistorySyncType + * @enum {number} + * @property {number} INITIAL_BOOTSTRAP=0 INITIAL_BOOTSTRAP value + * @property {number} INITIAL_STATUS_V3=1 INITIAL_STATUS_V3 value + * @property {number} FULL=2 FULL value + * @property {number} RECENT=3 RECENT value + * @property {number} PUSH_NAME=4 PUSH_NAME value + */ + HistorySyncNotification.HistorySyncNotificationHistorySyncType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INITIAL_BOOTSTRAP"] = 0; + values[valuesById[1] = "INITIAL_STATUS_V3"] = 1; + values[valuesById[2] = "FULL"] = 2; + values[valuesById[3] = "RECENT"] = 3; + values[valuesById[4] = "PUSH_NAME"] = 4; + return values; + })(); + + return HistorySyncNotification; + })(); + proto.HydratedCallButton = (function() { /** @@ -16766,6 +26978,234 @@ $root.proto = (function() { return HydratedURLButton; })(); + proto.IdentityKeyPairStructure = (function() { + + /** + * Properties of an IdentityKeyPairStructure. + * @memberof proto + * @interface IIdentityKeyPairStructure + * @property {Uint8Array|null} [publicKey] IdentityKeyPairStructure publicKey + * @property {Uint8Array|null} [privateKey] IdentityKeyPairStructure privateKey + */ + + /** + * Constructs a new IdentityKeyPairStructure. + * @memberof proto + * @classdesc Represents an IdentityKeyPairStructure. + * @implements IIdentityKeyPairStructure + * @constructor + * @param {proto.IIdentityKeyPairStructure=} [properties] Properties to set + */ + function IdentityKeyPairStructure(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IdentityKeyPairStructure publicKey. + * @member {Uint8Array} publicKey + * @memberof proto.IdentityKeyPairStructure + * @instance + */ + IdentityKeyPairStructure.prototype.publicKey = $util.newBuffer([]); + + /** + * IdentityKeyPairStructure privateKey. + * @member {Uint8Array} privateKey + * @memberof proto.IdentityKeyPairStructure + * @instance + */ + IdentityKeyPairStructure.prototype.privateKey = $util.newBuffer([]); + + /** + * Creates a new IdentityKeyPairStructure instance using the specified properties. + * @function create + * @memberof proto.IdentityKeyPairStructure + * @static + * @param {proto.IIdentityKeyPairStructure=} [properties] Properties to set + * @returns {proto.IdentityKeyPairStructure} IdentityKeyPairStructure instance + */ + IdentityKeyPairStructure.create = function create(properties) { + return new IdentityKeyPairStructure(properties); + }; + + /** + * Encodes the specified IdentityKeyPairStructure message. Does not implicitly {@link proto.IdentityKeyPairStructure.verify|verify} messages. + * @function encode + * @memberof proto.IdentityKeyPairStructure + * @static + * @param {proto.IIdentityKeyPairStructure} message IdentityKeyPairStructure message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IdentityKeyPairStructure.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.publicKey); + if (message.privateKey != null && Object.hasOwnProperty.call(message, "privateKey")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.privateKey); + return writer; + }; + + /** + * Encodes the specified IdentityKeyPairStructure message, length delimited. Does not implicitly {@link proto.IdentityKeyPairStructure.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.IdentityKeyPairStructure + * @static + * @param {proto.IIdentityKeyPairStructure} message IdentityKeyPairStructure message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IdentityKeyPairStructure.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IdentityKeyPairStructure message from the specified reader or buffer. + * @function decode + * @memberof proto.IdentityKeyPairStructure + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.IdentityKeyPairStructure} IdentityKeyPairStructure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IdentityKeyPairStructure.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.IdentityKeyPairStructure(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.publicKey = reader.bytes(); + break; + case 2: + message.privateKey = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IdentityKeyPairStructure message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.IdentityKeyPairStructure + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.IdentityKeyPairStructure} IdentityKeyPairStructure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IdentityKeyPairStructure.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IdentityKeyPairStructure message. + * @function verify + * @memberof proto.IdentityKeyPairStructure + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IdentityKeyPairStructure.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.publicKey != null && message.hasOwnProperty("publicKey")) + if (!(message.publicKey && typeof message.publicKey.length === "number" || $util.isString(message.publicKey))) + return "publicKey: buffer expected"; + if (message.privateKey != null && message.hasOwnProperty("privateKey")) + if (!(message.privateKey && typeof message.privateKey.length === "number" || $util.isString(message.privateKey))) + return "privateKey: buffer expected"; + return null; + }; + + /** + * Creates an IdentityKeyPairStructure message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.IdentityKeyPairStructure + * @static + * @param {Object.} object Plain object + * @returns {proto.IdentityKeyPairStructure} IdentityKeyPairStructure + */ + IdentityKeyPairStructure.fromObject = function fromObject(object) { + if (object instanceof $root.proto.IdentityKeyPairStructure) + return object; + var message = new $root.proto.IdentityKeyPairStructure(); + if (object.publicKey != null) + if (typeof object.publicKey === "string") + $util.base64.decode(object.publicKey, message.publicKey = $util.newBuffer($util.base64.length(object.publicKey)), 0); + else if (object.publicKey.length) + message.publicKey = object.publicKey; + if (object.privateKey != null) + if (typeof object.privateKey === "string") + $util.base64.decode(object.privateKey, message.privateKey = $util.newBuffer($util.base64.length(object.privateKey)), 0); + else if (object.privateKey.length) + message.privateKey = object.privateKey; + return message; + }; + + /** + * Creates a plain object from an IdentityKeyPairStructure message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.IdentityKeyPairStructure + * @static + * @param {proto.IdentityKeyPairStructure} message IdentityKeyPairStructure + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IdentityKeyPairStructure.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.publicKey = ""; + else { + object.publicKey = []; + if (options.bytes !== Array) + object.publicKey = $util.newBuffer(object.publicKey); + } + if (options.bytes === String) + object.privateKey = ""; + else { + object.privateKey = []; + if (options.bytes !== Array) + object.privateKey = $util.newBuffer(object.privateKey); + } + } + if (message.publicKey != null && message.hasOwnProperty("publicKey")) + object.publicKey = options.bytes === String ? $util.base64.encode(message.publicKey, 0, message.publicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKey) : message.publicKey; + if (message.privateKey != null && message.hasOwnProperty("privateKey")) + object.privateKey = options.bytes === String ? $util.base64.encode(message.privateKey, 0, message.privateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.privateKey) : message.privateKey; + return object; + }; + + /** + * Converts this IdentityKeyPairStructure to JSON. + * @function toJSON + * @memberof proto.IdentityKeyPairStructure + * @instance + * @returns {Object.} JSON object + */ + IdentityKeyPairStructure.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return IdentityKeyPairStructure; + })(); + proto.ImageMessage = (function() { /** @@ -19606,6 +30046,1379 @@ $root.proto = (function() { return InvoiceMessage; })(); + proto.KeepInChat = (function() { + + /** + * Properties of a KeepInChat. + * @memberof proto + * @interface IKeepInChat + * @property {proto.KeepType|null} [keepType] KeepInChat keepType + * @property {number|Long|null} [serverTimestamp] KeepInChat serverTimestamp + * @property {string|null} [deviceJid] KeepInChat deviceJid + */ + + /** + * Constructs a new KeepInChat. + * @memberof proto + * @classdesc Represents a KeepInChat. + * @implements IKeepInChat + * @constructor + * @param {proto.IKeepInChat=} [properties] Properties to set + */ + function KeepInChat(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * KeepInChat keepType. + * @member {proto.KeepType} keepType + * @memberof proto.KeepInChat + * @instance + */ + KeepInChat.prototype.keepType = 0; + + /** + * KeepInChat serverTimestamp. + * @member {number|Long} serverTimestamp + * @memberof proto.KeepInChat + * @instance + */ + KeepInChat.prototype.serverTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * KeepInChat deviceJid. + * @member {string} deviceJid + * @memberof proto.KeepInChat + * @instance + */ + KeepInChat.prototype.deviceJid = ""; + + /** + * Creates a new KeepInChat instance using the specified properties. + * @function create + * @memberof proto.KeepInChat + * @static + * @param {proto.IKeepInChat=} [properties] Properties to set + * @returns {proto.KeepInChat} KeepInChat instance + */ + KeepInChat.create = function create(properties) { + return new KeepInChat(properties); + }; + + /** + * Encodes the specified KeepInChat message. Does not implicitly {@link proto.KeepInChat.verify|verify} messages. + * @function encode + * @memberof proto.KeepInChat + * @static + * @param {proto.IKeepInChat} message KeepInChat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeepInChat.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.keepType != null && Object.hasOwnProperty.call(message, "keepType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.keepType); + if (message.serverTimestamp != null && Object.hasOwnProperty.call(message, "serverTimestamp")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.serverTimestamp); + if (message.deviceJid != null && Object.hasOwnProperty.call(message, "deviceJid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.deviceJid); + return writer; + }; + + /** + * Encodes the specified KeepInChat message, length delimited. Does not implicitly {@link proto.KeepInChat.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.KeepInChat + * @static + * @param {proto.IKeepInChat} message KeepInChat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeepInChat.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a KeepInChat message from the specified reader or buffer. + * @function decode + * @memberof proto.KeepInChat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.KeepInChat} KeepInChat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeepInChat.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.KeepInChat(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.keepType = reader.int32(); + break; + case 2: + message.serverTimestamp = reader.int64(); + break; + case 3: + message.deviceJid = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a KeepInChat message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.KeepInChat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.KeepInChat} KeepInChat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeepInChat.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a KeepInChat message. + * @function verify + * @memberof proto.KeepInChat + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KeepInChat.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.keepType != null && message.hasOwnProperty("keepType")) + switch (message.keepType) { + default: + return "keepType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.serverTimestamp != null && message.hasOwnProperty("serverTimestamp")) + if (!$util.isInteger(message.serverTimestamp) && !(message.serverTimestamp && $util.isInteger(message.serverTimestamp.low) && $util.isInteger(message.serverTimestamp.high))) + return "serverTimestamp: integer|Long expected"; + if (message.deviceJid != null && message.hasOwnProperty("deviceJid")) + if (!$util.isString(message.deviceJid)) + return "deviceJid: string expected"; + return null; + }; + + /** + * Creates a KeepInChat message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.KeepInChat + * @static + * @param {Object.} object Plain object + * @returns {proto.KeepInChat} KeepInChat + */ + KeepInChat.fromObject = function fromObject(object) { + if (object instanceof $root.proto.KeepInChat) + return object; + var message = new $root.proto.KeepInChat(); + switch (object.keepType) { + case "UNKNOWN": + case 0: + message.keepType = 0; + break; + case "KEEP_FOR_ALL": + case 1: + message.keepType = 1; + break; + case "UNDO_KEEP_FOR_ALL": + case 2: + message.keepType = 2; + break; + } + if (object.serverTimestamp != null) + if ($util.Long) + (message.serverTimestamp = $util.Long.fromValue(object.serverTimestamp)).unsigned = false; + else if (typeof object.serverTimestamp === "string") + message.serverTimestamp = parseInt(object.serverTimestamp, 10); + else if (typeof object.serverTimestamp === "number") + message.serverTimestamp = object.serverTimestamp; + else if (typeof object.serverTimestamp === "object") + message.serverTimestamp = new $util.LongBits(object.serverTimestamp.low >>> 0, object.serverTimestamp.high >>> 0).toNumber(); + if (object.deviceJid != null) + message.deviceJid = String(object.deviceJid); + return message; + }; + + /** + * Creates a plain object from a KeepInChat message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.KeepInChat + * @static + * @param {proto.KeepInChat} message KeepInChat + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KeepInChat.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.keepType = options.enums === String ? "UNKNOWN" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.serverTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.serverTimestamp = options.longs === String ? "0" : 0; + object.deviceJid = ""; + } + if (message.keepType != null && message.hasOwnProperty("keepType")) + object.keepType = options.enums === String ? $root.proto.KeepType[message.keepType] : message.keepType; + if (message.serverTimestamp != null && message.hasOwnProperty("serverTimestamp")) + if (typeof message.serverTimestamp === "number") + object.serverTimestamp = options.longs === String ? String(message.serverTimestamp) : message.serverTimestamp; + else + object.serverTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.serverTimestamp) : options.longs === Number ? new $util.LongBits(message.serverTimestamp.low >>> 0, message.serverTimestamp.high >>> 0).toNumber() : message.serverTimestamp; + if (message.deviceJid != null && message.hasOwnProperty("deviceJid")) + object.deviceJid = message.deviceJid; + return object; + }; + + /** + * Converts this KeepInChat to JSON. + * @function toJSON + * @memberof proto.KeepInChat + * @instance + * @returns {Object.} JSON object + */ + KeepInChat.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return KeepInChat; + })(); + + proto.KeepInChatMessage = (function() { + + /** + * Properties of a KeepInChatMessage. + * @memberof proto + * @interface IKeepInChatMessage + * @property {proto.IMessageKey|null} [key] KeepInChatMessage key + * @property {proto.KeepType|null} [keepType] KeepInChatMessage keepType + * @property {number|Long|null} [timestampMs] KeepInChatMessage timestampMs + */ + + /** + * Constructs a new KeepInChatMessage. + * @memberof proto + * @classdesc Represents a KeepInChatMessage. + * @implements IKeepInChatMessage + * @constructor + * @param {proto.IKeepInChatMessage=} [properties] Properties to set + */ + function KeepInChatMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * KeepInChatMessage key. + * @member {proto.IMessageKey|null|undefined} key + * @memberof proto.KeepInChatMessage + * @instance + */ + KeepInChatMessage.prototype.key = null; + + /** + * KeepInChatMessage keepType. + * @member {proto.KeepType} keepType + * @memberof proto.KeepInChatMessage + * @instance + */ + KeepInChatMessage.prototype.keepType = 0; + + /** + * KeepInChatMessage timestampMs. + * @member {number|Long} timestampMs + * @memberof proto.KeepInChatMessage + * @instance + */ + KeepInChatMessage.prototype.timestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new KeepInChatMessage instance using the specified properties. + * @function create + * @memberof proto.KeepInChatMessage + * @static + * @param {proto.IKeepInChatMessage=} [properties] Properties to set + * @returns {proto.KeepInChatMessage} KeepInChatMessage instance + */ + KeepInChatMessage.create = function create(properties) { + return new KeepInChatMessage(properties); + }; + + /** + * Encodes the specified KeepInChatMessage message. Does not implicitly {@link proto.KeepInChatMessage.verify|verify} messages. + * @function encode + * @memberof proto.KeepInChatMessage + * @static + * @param {proto.IKeepInChatMessage} message KeepInChatMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeepInChatMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + $root.proto.MessageKey.encode(message.key, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.keepType != null && Object.hasOwnProperty.call(message, "keepType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.keepType); + if (message.timestampMs != null && Object.hasOwnProperty.call(message, "timestampMs")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.timestampMs); + return writer; + }; + + /** + * Encodes the specified KeepInChatMessage message, length delimited. Does not implicitly {@link proto.KeepInChatMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.KeepInChatMessage + * @static + * @param {proto.IKeepInChatMessage} message KeepInChatMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeepInChatMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a KeepInChatMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.KeepInChatMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.KeepInChatMessage} KeepInChatMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeepInChatMessage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.KeepInChatMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + case 2: + message.keepType = reader.int32(); + break; + case 3: + message.timestampMs = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a KeepInChatMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.KeepInChatMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.KeepInChatMessage} KeepInChatMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeepInChatMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a KeepInChatMessage message. + * @function verify + * @memberof proto.KeepInChatMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KeepInChatMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) { + var error = $root.proto.MessageKey.verify(message.key); + if (error) + return "key." + error; + } + if (message.keepType != null && message.hasOwnProperty("keepType")) + switch (message.keepType) { + default: + return "keepType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.timestampMs != null && message.hasOwnProperty("timestampMs")) + if (!$util.isInteger(message.timestampMs) && !(message.timestampMs && $util.isInteger(message.timestampMs.low) && $util.isInteger(message.timestampMs.high))) + return "timestampMs: integer|Long expected"; + return null; + }; + + /** + * Creates a KeepInChatMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.KeepInChatMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.KeepInChatMessage} KeepInChatMessage + */ + KeepInChatMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.KeepInChatMessage) + return object; + var message = new $root.proto.KeepInChatMessage(); + if (object.key != null) { + if (typeof object.key !== "object") + throw TypeError(".proto.KeepInChatMessage.key: object expected"); + message.key = $root.proto.MessageKey.fromObject(object.key); + } + switch (object.keepType) { + case "UNKNOWN": + case 0: + message.keepType = 0; + break; + case "KEEP_FOR_ALL": + case 1: + message.keepType = 1; + break; + case "UNDO_KEEP_FOR_ALL": + case 2: + message.keepType = 2; + break; + } + if (object.timestampMs != null) + if ($util.Long) + (message.timestampMs = $util.Long.fromValue(object.timestampMs)).unsigned = false; + else if (typeof object.timestampMs === "string") + message.timestampMs = parseInt(object.timestampMs, 10); + else if (typeof object.timestampMs === "number") + message.timestampMs = object.timestampMs; + else if (typeof object.timestampMs === "object") + message.timestampMs = new $util.LongBits(object.timestampMs.low >>> 0, object.timestampMs.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a KeepInChatMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.KeepInChatMessage + * @static + * @param {proto.KeepInChatMessage} message KeepInChatMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KeepInChatMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.key = null; + object.keepType = options.enums === String ? "UNKNOWN" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.timestampMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.timestampMs = options.longs === String ? "0" : 0; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = $root.proto.MessageKey.toObject(message.key, options); + if (message.keepType != null && message.hasOwnProperty("keepType")) + object.keepType = options.enums === String ? $root.proto.KeepType[message.keepType] : message.keepType; + if (message.timestampMs != null && message.hasOwnProperty("timestampMs")) + if (typeof message.timestampMs === "number") + object.timestampMs = options.longs === String ? String(message.timestampMs) : message.timestampMs; + else + object.timestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.timestampMs) : options.longs === Number ? new $util.LongBits(message.timestampMs.low >>> 0, message.timestampMs.high >>> 0).toNumber() : message.timestampMs; + return object; + }; + + /** + * Converts this KeepInChatMessage to JSON. + * @function toJSON + * @memberof proto.KeepInChatMessage + * @instance + * @returns {Object.} JSON object + */ + KeepInChatMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return KeepInChatMessage; + })(); + + /** + * KeepType enum. + * @name proto.KeepType + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} KEEP_FOR_ALL=1 KEEP_FOR_ALL value + * @property {number} UNDO_KEEP_FOR_ALL=2 UNDO_KEEP_FOR_ALL value + */ + proto.KeepType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "KEEP_FOR_ALL"] = 1; + values[valuesById[2] = "UNDO_KEEP_FOR_ALL"] = 2; + return values; + })(); + + proto.KeyExpiration = (function() { + + /** + * Properties of a KeyExpiration. + * @memberof proto + * @interface IKeyExpiration + * @property {number|null} [expiredKeyEpoch] KeyExpiration expiredKeyEpoch + */ + + /** + * Constructs a new KeyExpiration. + * @memberof proto + * @classdesc Represents a KeyExpiration. + * @implements IKeyExpiration + * @constructor + * @param {proto.IKeyExpiration=} [properties] Properties to set + */ + function KeyExpiration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * KeyExpiration expiredKeyEpoch. + * @member {number} expiredKeyEpoch + * @memberof proto.KeyExpiration + * @instance + */ + KeyExpiration.prototype.expiredKeyEpoch = 0; + + /** + * Creates a new KeyExpiration instance using the specified properties. + * @function create + * @memberof proto.KeyExpiration + * @static + * @param {proto.IKeyExpiration=} [properties] Properties to set + * @returns {proto.KeyExpiration} KeyExpiration instance + */ + KeyExpiration.create = function create(properties) { + return new KeyExpiration(properties); + }; + + /** + * Encodes the specified KeyExpiration message. Does not implicitly {@link proto.KeyExpiration.verify|verify} messages. + * @function encode + * @memberof proto.KeyExpiration + * @static + * @param {proto.IKeyExpiration} message KeyExpiration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyExpiration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.expiredKeyEpoch != null && Object.hasOwnProperty.call(message, "expiredKeyEpoch")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.expiredKeyEpoch); + return writer; + }; + + /** + * Encodes the specified KeyExpiration message, length delimited. Does not implicitly {@link proto.KeyExpiration.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.KeyExpiration + * @static + * @param {proto.IKeyExpiration} message KeyExpiration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyExpiration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a KeyExpiration message from the specified reader or buffer. + * @function decode + * @memberof proto.KeyExpiration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.KeyExpiration} KeyExpiration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyExpiration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.KeyExpiration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.expiredKeyEpoch = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a KeyExpiration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.KeyExpiration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.KeyExpiration} KeyExpiration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyExpiration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a KeyExpiration message. + * @function verify + * @memberof proto.KeyExpiration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KeyExpiration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.expiredKeyEpoch != null && message.hasOwnProperty("expiredKeyEpoch")) + if (!$util.isInteger(message.expiredKeyEpoch)) + return "expiredKeyEpoch: integer expected"; + return null; + }; + + /** + * Creates a KeyExpiration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.KeyExpiration + * @static + * @param {Object.} object Plain object + * @returns {proto.KeyExpiration} KeyExpiration + */ + KeyExpiration.fromObject = function fromObject(object) { + if (object instanceof $root.proto.KeyExpiration) + return object; + var message = new $root.proto.KeyExpiration(); + if (object.expiredKeyEpoch != null) + message.expiredKeyEpoch = object.expiredKeyEpoch | 0; + return message; + }; + + /** + * Creates a plain object from a KeyExpiration message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.KeyExpiration + * @static + * @param {proto.KeyExpiration} message KeyExpiration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KeyExpiration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.expiredKeyEpoch = 0; + if (message.expiredKeyEpoch != null && message.hasOwnProperty("expiredKeyEpoch")) + object.expiredKeyEpoch = message.expiredKeyEpoch; + return object; + }; + + /** + * Converts this KeyExpiration to JSON. + * @function toJSON + * @memberof proto.KeyExpiration + * @instance + * @returns {Object.} JSON object + */ + KeyExpiration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return KeyExpiration; + })(); + + proto.KeyId = (function() { + + /** + * Properties of a KeyId. + * @memberof proto + * @interface IKeyId + * @property {Uint8Array|null} [id] KeyId id + */ + + /** + * Constructs a new KeyId. + * @memberof proto + * @classdesc Represents a KeyId. + * @implements IKeyId + * @constructor + * @param {proto.IKeyId=} [properties] Properties to set + */ + function KeyId(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * KeyId id. + * @member {Uint8Array} id + * @memberof proto.KeyId + * @instance + */ + KeyId.prototype.id = $util.newBuffer([]); + + /** + * Creates a new KeyId instance using the specified properties. + * @function create + * @memberof proto.KeyId + * @static + * @param {proto.IKeyId=} [properties] Properties to set + * @returns {proto.KeyId} KeyId instance + */ + KeyId.create = function create(properties) { + return new KeyId(properties); + }; + + /** + * Encodes the specified KeyId message. Does not implicitly {@link proto.KeyId.verify|verify} messages. + * @function encode + * @memberof proto.KeyId + * @static + * @param {proto.IKeyId} message KeyId message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyId.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.id); + return writer; + }; + + /** + * Encodes the specified KeyId message, length delimited. Does not implicitly {@link proto.KeyId.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.KeyId + * @static + * @param {proto.IKeyId} message KeyId message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyId.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a KeyId message from the specified reader or buffer. + * @function decode + * @memberof proto.KeyId + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.KeyId} KeyId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyId.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.KeyId(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a KeyId message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.KeyId + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.KeyId} KeyId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyId.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a KeyId message. + * @function verify + * @memberof proto.KeyId + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KeyId.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!(message.id && typeof message.id.length === "number" || $util.isString(message.id))) + return "id: buffer expected"; + return null; + }; + + /** + * Creates a KeyId message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.KeyId + * @static + * @param {Object.} object Plain object + * @returns {proto.KeyId} KeyId + */ + KeyId.fromObject = function fromObject(object) { + if (object instanceof $root.proto.KeyId) + return object; + var message = new $root.proto.KeyId(); + if (object.id != null) + if (typeof object.id === "string") + $util.base64.decode(object.id, message.id = $util.newBuffer($util.base64.length(object.id)), 0); + else if (object.id.length) + message.id = object.id; + return message; + }; + + /** + * Creates a plain object from a KeyId message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.KeyId + * @static + * @param {proto.KeyId} message KeyId + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KeyId.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.id = ""; + else { + object.id = []; + if (options.bytes !== Array) + object.id = $util.newBuffer(object.id); + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = options.bytes === String ? $util.base64.encode(message.id, 0, message.id.length) : options.bytes === Array ? Array.prototype.slice.call(message.id) : message.id; + return object; + }; + + /** + * Converts this KeyId to JSON. + * @function toJSON + * @memberof proto.KeyId + * @instance + * @returns {Object.} JSON object + */ + KeyId.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return KeyId; + })(); + + proto.LabelAssociationAction = (function() { + + /** + * Properties of a LabelAssociationAction. + * @memberof proto + * @interface ILabelAssociationAction + * @property {boolean|null} [labeled] LabelAssociationAction labeled + */ + + /** + * Constructs a new LabelAssociationAction. + * @memberof proto + * @classdesc Represents a LabelAssociationAction. + * @implements ILabelAssociationAction + * @constructor + * @param {proto.ILabelAssociationAction=} [properties] Properties to set + */ + function LabelAssociationAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LabelAssociationAction labeled. + * @member {boolean} labeled + * @memberof proto.LabelAssociationAction + * @instance + */ + LabelAssociationAction.prototype.labeled = false; + + /** + * Creates a new LabelAssociationAction instance using the specified properties. + * @function create + * @memberof proto.LabelAssociationAction + * @static + * @param {proto.ILabelAssociationAction=} [properties] Properties to set + * @returns {proto.LabelAssociationAction} LabelAssociationAction instance + */ + LabelAssociationAction.create = function create(properties) { + return new LabelAssociationAction(properties); + }; + + /** + * Encodes the specified LabelAssociationAction message. Does not implicitly {@link proto.LabelAssociationAction.verify|verify} messages. + * @function encode + * @memberof proto.LabelAssociationAction + * @static + * @param {proto.ILabelAssociationAction} message LabelAssociationAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LabelAssociationAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.labeled != null && Object.hasOwnProperty.call(message, "labeled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.labeled); + return writer; + }; + + /** + * Encodes the specified LabelAssociationAction message, length delimited. Does not implicitly {@link proto.LabelAssociationAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.LabelAssociationAction + * @static + * @param {proto.ILabelAssociationAction} message LabelAssociationAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LabelAssociationAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LabelAssociationAction message from the specified reader or buffer. + * @function decode + * @memberof proto.LabelAssociationAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.LabelAssociationAction} LabelAssociationAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LabelAssociationAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.LabelAssociationAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.labeled = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LabelAssociationAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.LabelAssociationAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.LabelAssociationAction} LabelAssociationAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LabelAssociationAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LabelAssociationAction message. + * @function verify + * @memberof proto.LabelAssociationAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LabelAssociationAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.labeled != null && message.hasOwnProperty("labeled")) + if (typeof message.labeled !== "boolean") + return "labeled: boolean expected"; + return null; + }; + + /** + * Creates a LabelAssociationAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.LabelAssociationAction + * @static + * @param {Object.} object Plain object + * @returns {proto.LabelAssociationAction} LabelAssociationAction + */ + LabelAssociationAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.LabelAssociationAction) + return object; + var message = new $root.proto.LabelAssociationAction(); + if (object.labeled != null) + message.labeled = Boolean(object.labeled); + return message; + }; + + /** + * Creates a plain object from a LabelAssociationAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.LabelAssociationAction + * @static + * @param {proto.LabelAssociationAction} message LabelAssociationAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LabelAssociationAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.labeled = false; + if (message.labeled != null && message.hasOwnProperty("labeled")) + object.labeled = message.labeled; + return object; + }; + + /** + * Converts this LabelAssociationAction to JSON. + * @function toJSON + * @memberof proto.LabelAssociationAction + * @instance + * @returns {Object.} JSON object + */ + LabelAssociationAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LabelAssociationAction; + })(); + + proto.LabelEditAction = (function() { + + /** + * Properties of a LabelEditAction. + * @memberof proto + * @interface ILabelEditAction + * @property {string|null} [name] LabelEditAction name + * @property {number|null} [color] LabelEditAction color + * @property {number|null} [predefinedId] LabelEditAction predefinedId + * @property {boolean|null} [deleted] LabelEditAction deleted + */ + + /** + * Constructs a new LabelEditAction. + * @memberof proto + * @classdesc Represents a LabelEditAction. + * @implements ILabelEditAction + * @constructor + * @param {proto.ILabelEditAction=} [properties] Properties to set + */ + function LabelEditAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LabelEditAction name. + * @member {string} name + * @memberof proto.LabelEditAction + * @instance + */ + LabelEditAction.prototype.name = ""; + + /** + * LabelEditAction color. + * @member {number} color + * @memberof proto.LabelEditAction + * @instance + */ + LabelEditAction.prototype.color = 0; + + /** + * LabelEditAction predefinedId. + * @member {number} predefinedId + * @memberof proto.LabelEditAction + * @instance + */ + LabelEditAction.prototype.predefinedId = 0; + + /** + * LabelEditAction deleted. + * @member {boolean} deleted + * @memberof proto.LabelEditAction + * @instance + */ + LabelEditAction.prototype.deleted = false; + + /** + * Creates a new LabelEditAction instance using the specified properties. + * @function create + * @memberof proto.LabelEditAction + * @static + * @param {proto.ILabelEditAction=} [properties] Properties to set + * @returns {proto.LabelEditAction} LabelEditAction instance + */ + LabelEditAction.create = function create(properties) { + return new LabelEditAction(properties); + }; + + /** + * Encodes the specified LabelEditAction message. Does not implicitly {@link proto.LabelEditAction.verify|verify} messages. + * @function encode + * @memberof proto.LabelEditAction + * @static + * @param {proto.ILabelEditAction} message LabelEditAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LabelEditAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.color != null && Object.hasOwnProperty.call(message, "color")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.color); + if (message.predefinedId != null && Object.hasOwnProperty.call(message, "predefinedId")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.predefinedId); + if (message.deleted != null && Object.hasOwnProperty.call(message, "deleted")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.deleted); + return writer; + }; + + /** + * Encodes the specified LabelEditAction message, length delimited. Does not implicitly {@link proto.LabelEditAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.LabelEditAction + * @static + * @param {proto.ILabelEditAction} message LabelEditAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LabelEditAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LabelEditAction message from the specified reader or buffer. + * @function decode + * @memberof proto.LabelEditAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.LabelEditAction} LabelEditAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LabelEditAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.LabelEditAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.color = reader.int32(); + break; + case 3: + message.predefinedId = reader.int32(); + break; + case 4: + message.deleted = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LabelEditAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.LabelEditAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.LabelEditAction} LabelEditAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LabelEditAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LabelEditAction message. + * @function verify + * @memberof proto.LabelEditAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LabelEditAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.color != null && message.hasOwnProperty("color")) + if (!$util.isInteger(message.color)) + return "color: integer expected"; + if (message.predefinedId != null && message.hasOwnProperty("predefinedId")) + if (!$util.isInteger(message.predefinedId)) + return "predefinedId: integer expected"; + if (message.deleted != null && message.hasOwnProperty("deleted")) + if (typeof message.deleted !== "boolean") + return "deleted: boolean expected"; + return null; + }; + + /** + * Creates a LabelEditAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.LabelEditAction + * @static + * @param {Object.} object Plain object + * @returns {proto.LabelEditAction} LabelEditAction + */ + LabelEditAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.LabelEditAction) + return object; + var message = new $root.proto.LabelEditAction(); + if (object.name != null) + message.name = String(object.name); + if (object.color != null) + message.color = object.color | 0; + if (object.predefinedId != null) + message.predefinedId = object.predefinedId | 0; + if (object.deleted != null) + message.deleted = Boolean(object.deleted); + return message; + }; + + /** + * Creates a plain object from a LabelEditAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.LabelEditAction + * @static + * @param {proto.LabelEditAction} message LabelEditAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LabelEditAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.color = 0; + object.predefinedId = 0; + object.deleted = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.color != null && message.hasOwnProperty("color")) + object.color = message.color; + if (message.predefinedId != null && message.hasOwnProperty("predefinedId")) + object.predefinedId = message.predefinedId; + if (message.deleted != null && message.hasOwnProperty("deleted")) + object.deleted = message.deleted; + return object; + }; + + /** + * Converts this LabelEditAction to JSON. + * @function toJSON + * @memberof proto.LabelEditAction + * @instance + * @returns {Object.} JSON object + */ + LabelEditAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LabelEditAction; + })(); + proto.ListMessage = (function() { /** @@ -20741,6 +32554,425 @@ $root.proto = (function() { return LiveLocationMessage; })(); + proto.LocaleSetting = (function() { + + /** + * Properties of a LocaleSetting. + * @memberof proto + * @interface ILocaleSetting + * @property {string|null} [locale] LocaleSetting locale + */ + + /** + * Constructs a new LocaleSetting. + * @memberof proto + * @classdesc Represents a LocaleSetting. + * @implements ILocaleSetting + * @constructor + * @param {proto.ILocaleSetting=} [properties] Properties to set + */ + function LocaleSetting(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LocaleSetting locale. + * @member {string} locale + * @memberof proto.LocaleSetting + * @instance + */ + LocaleSetting.prototype.locale = ""; + + /** + * Creates a new LocaleSetting instance using the specified properties. + * @function create + * @memberof proto.LocaleSetting + * @static + * @param {proto.ILocaleSetting=} [properties] Properties to set + * @returns {proto.LocaleSetting} LocaleSetting instance + */ + LocaleSetting.create = function create(properties) { + return new LocaleSetting(properties); + }; + + /** + * Encodes the specified LocaleSetting message. Does not implicitly {@link proto.LocaleSetting.verify|verify} messages. + * @function encode + * @memberof proto.LocaleSetting + * @static + * @param {proto.ILocaleSetting} message LocaleSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocaleSetting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.locale != null && Object.hasOwnProperty.call(message, "locale")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.locale); + return writer; + }; + + /** + * Encodes the specified LocaleSetting message, length delimited. Does not implicitly {@link proto.LocaleSetting.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.LocaleSetting + * @static + * @param {proto.ILocaleSetting} message LocaleSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocaleSetting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LocaleSetting message from the specified reader or buffer. + * @function decode + * @memberof proto.LocaleSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.LocaleSetting} LocaleSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocaleSetting.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.LocaleSetting(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.locale = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LocaleSetting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.LocaleSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.LocaleSetting} LocaleSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocaleSetting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LocaleSetting message. + * @function verify + * @memberof proto.LocaleSetting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LocaleSetting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.locale != null && message.hasOwnProperty("locale")) + if (!$util.isString(message.locale)) + return "locale: string expected"; + return null; + }; + + /** + * Creates a LocaleSetting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.LocaleSetting + * @static + * @param {Object.} object Plain object + * @returns {proto.LocaleSetting} LocaleSetting + */ + LocaleSetting.fromObject = function fromObject(object) { + if (object instanceof $root.proto.LocaleSetting) + return object; + var message = new $root.proto.LocaleSetting(); + if (object.locale != null) + message.locale = String(object.locale); + return message; + }; + + /** + * Creates a plain object from a LocaleSetting message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.LocaleSetting + * @static + * @param {proto.LocaleSetting} message LocaleSetting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LocaleSetting.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.locale = ""; + if (message.locale != null && message.hasOwnProperty("locale")) + object.locale = message.locale; + return object; + }; + + /** + * Converts this LocaleSetting to JSON. + * @function toJSON + * @memberof proto.LocaleSetting + * @instance + * @returns {Object.} JSON object + */ + LocaleSetting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LocaleSetting; + })(); + + proto.LocalizedName = (function() { + + /** + * Properties of a LocalizedName. + * @memberof proto + * @interface ILocalizedName + * @property {string|null} [lg] LocalizedName lg + * @property {string|null} [lc] LocalizedName lc + * @property {string|null} [verifiedName] LocalizedName verifiedName + */ + + /** + * Constructs a new LocalizedName. + * @memberof proto + * @classdesc Represents a LocalizedName. + * @implements ILocalizedName + * @constructor + * @param {proto.ILocalizedName=} [properties] Properties to set + */ + function LocalizedName(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LocalizedName lg. + * @member {string} lg + * @memberof proto.LocalizedName + * @instance + */ + LocalizedName.prototype.lg = ""; + + /** + * LocalizedName lc. + * @member {string} lc + * @memberof proto.LocalizedName + * @instance + */ + LocalizedName.prototype.lc = ""; + + /** + * LocalizedName verifiedName. + * @member {string} verifiedName + * @memberof proto.LocalizedName + * @instance + */ + LocalizedName.prototype.verifiedName = ""; + + /** + * Creates a new LocalizedName instance using the specified properties. + * @function create + * @memberof proto.LocalizedName + * @static + * @param {proto.ILocalizedName=} [properties] Properties to set + * @returns {proto.LocalizedName} LocalizedName instance + */ + LocalizedName.create = function create(properties) { + return new LocalizedName(properties); + }; + + /** + * Encodes the specified LocalizedName message. Does not implicitly {@link proto.LocalizedName.verify|verify} messages. + * @function encode + * @memberof proto.LocalizedName + * @static + * @param {proto.ILocalizedName} message LocalizedName message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocalizedName.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lg != null && Object.hasOwnProperty.call(message, "lg")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.lg); + if (message.lc != null && Object.hasOwnProperty.call(message, "lc")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.lc); + if (message.verifiedName != null && Object.hasOwnProperty.call(message, "verifiedName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.verifiedName); + return writer; + }; + + /** + * Encodes the specified LocalizedName message, length delimited. Does not implicitly {@link proto.LocalizedName.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.LocalizedName + * @static + * @param {proto.ILocalizedName} message LocalizedName message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocalizedName.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LocalizedName message from the specified reader or buffer. + * @function decode + * @memberof proto.LocalizedName + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.LocalizedName} LocalizedName + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocalizedName.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.LocalizedName(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.lg = reader.string(); + break; + case 2: + message.lc = reader.string(); + break; + case 3: + message.verifiedName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LocalizedName message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.LocalizedName + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.LocalizedName} LocalizedName + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocalizedName.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LocalizedName message. + * @function verify + * @memberof proto.LocalizedName + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LocalizedName.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.lg != null && message.hasOwnProperty("lg")) + if (!$util.isString(message.lg)) + return "lg: string expected"; + if (message.lc != null && message.hasOwnProperty("lc")) + if (!$util.isString(message.lc)) + return "lc: string expected"; + if (message.verifiedName != null && message.hasOwnProperty("verifiedName")) + if (!$util.isString(message.verifiedName)) + return "verifiedName: string expected"; + return null; + }; + + /** + * Creates a LocalizedName message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.LocalizedName + * @static + * @param {Object.} object Plain object + * @returns {proto.LocalizedName} LocalizedName + */ + LocalizedName.fromObject = function fromObject(object) { + if (object instanceof $root.proto.LocalizedName) + return object; + var message = new $root.proto.LocalizedName(); + if (object.lg != null) + message.lg = String(object.lg); + if (object.lc != null) + message.lc = String(object.lc); + if (object.verifiedName != null) + message.verifiedName = String(object.verifiedName); + return message; + }; + + /** + * Creates a plain object from a LocalizedName message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.LocalizedName + * @static + * @param {proto.LocalizedName} message LocalizedName + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LocalizedName.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.lg = ""; + object.lc = ""; + object.verifiedName = ""; + } + if (message.lg != null && message.hasOwnProperty("lg")) + object.lg = message.lg; + if (message.lc != null && message.hasOwnProperty("lc")) + object.lc = message.lc; + if (message.verifiedName != null && message.hasOwnProperty("verifiedName")) + object.verifiedName = message.verifiedName; + return object; + }; + + /** + * Converts this LocalizedName to JSON. + * @function toJSON + * @memberof proto.LocalizedName + * @instance + * @returns {Object.} JSON object + */ + LocalizedName.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LocalizedName; + })(); + proto.Location = (function() { /** @@ -21417,6 +33649,697 @@ $root.proto = (function() { return LocationMessage; })(); + proto.MarkChatAsReadAction = (function() { + + /** + * Properties of a MarkChatAsReadAction. + * @memberof proto + * @interface IMarkChatAsReadAction + * @property {boolean|null} [read] MarkChatAsReadAction read + * @property {proto.ISyncActionMessageRange|null} [messageRange] MarkChatAsReadAction messageRange + */ + + /** + * Constructs a new MarkChatAsReadAction. + * @memberof proto + * @classdesc Represents a MarkChatAsReadAction. + * @implements IMarkChatAsReadAction + * @constructor + * @param {proto.IMarkChatAsReadAction=} [properties] Properties to set + */ + function MarkChatAsReadAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MarkChatAsReadAction read. + * @member {boolean} read + * @memberof proto.MarkChatAsReadAction + * @instance + */ + MarkChatAsReadAction.prototype.read = false; + + /** + * MarkChatAsReadAction messageRange. + * @member {proto.ISyncActionMessageRange|null|undefined} messageRange + * @memberof proto.MarkChatAsReadAction + * @instance + */ + MarkChatAsReadAction.prototype.messageRange = null; + + /** + * Creates a new MarkChatAsReadAction instance using the specified properties. + * @function create + * @memberof proto.MarkChatAsReadAction + * @static + * @param {proto.IMarkChatAsReadAction=} [properties] Properties to set + * @returns {proto.MarkChatAsReadAction} MarkChatAsReadAction instance + */ + MarkChatAsReadAction.create = function create(properties) { + return new MarkChatAsReadAction(properties); + }; + + /** + * Encodes the specified MarkChatAsReadAction message. Does not implicitly {@link proto.MarkChatAsReadAction.verify|verify} messages. + * @function encode + * @memberof proto.MarkChatAsReadAction + * @static + * @param {proto.IMarkChatAsReadAction} message MarkChatAsReadAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MarkChatAsReadAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.read != null && Object.hasOwnProperty.call(message, "read")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.read); + if (message.messageRange != null && Object.hasOwnProperty.call(message, "messageRange")) + $root.proto.SyncActionMessageRange.encode(message.messageRange, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MarkChatAsReadAction message, length delimited. Does not implicitly {@link proto.MarkChatAsReadAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.MarkChatAsReadAction + * @static + * @param {proto.IMarkChatAsReadAction} message MarkChatAsReadAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MarkChatAsReadAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MarkChatAsReadAction message from the specified reader or buffer. + * @function decode + * @memberof proto.MarkChatAsReadAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.MarkChatAsReadAction} MarkChatAsReadAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MarkChatAsReadAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.MarkChatAsReadAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.read = reader.bool(); + break; + case 2: + message.messageRange = $root.proto.SyncActionMessageRange.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MarkChatAsReadAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.MarkChatAsReadAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.MarkChatAsReadAction} MarkChatAsReadAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MarkChatAsReadAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MarkChatAsReadAction message. + * @function verify + * @memberof proto.MarkChatAsReadAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MarkChatAsReadAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.read != null && message.hasOwnProperty("read")) + if (typeof message.read !== "boolean") + return "read: boolean expected"; + if (message.messageRange != null && message.hasOwnProperty("messageRange")) { + var error = $root.proto.SyncActionMessageRange.verify(message.messageRange); + if (error) + return "messageRange." + error; + } + return null; + }; + + /** + * Creates a MarkChatAsReadAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.MarkChatAsReadAction + * @static + * @param {Object.} object Plain object + * @returns {proto.MarkChatAsReadAction} MarkChatAsReadAction + */ + MarkChatAsReadAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.MarkChatAsReadAction) + return object; + var message = new $root.proto.MarkChatAsReadAction(); + if (object.read != null) + message.read = Boolean(object.read); + if (object.messageRange != null) { + if (typeof object.messageRange !== "object") + throw TypeError(".proto.MarkChatAsReadAction.messageRange: object expected"); + message.messageRange = $root.proto.SyncActionMessageRange.fromObject(object.messageRange); + } + return message; + }; + + /** + * Creates a plain object from a MarkChatAsReadAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.MarkChatAsReadAction + * @static + * @param {proto.MarkChatAsReadAction} message MarkChatAsReadAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MarkChatAsReadAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.read = false; + object.messageRange = null; + } + if (message.read != null && message.hasOwnProperty("read")) + object.read = message.read; + if (message.messageRange != null && message.hasOwnProperty("messageRange")) + object.messageRange = $root.proto.SyncActionMessageRange.toObject(message.messageRange, options); + return object; + }; + + /** + * Converts this MarkChatAsReadAction to JSON. + * @function toJSON + * @memberof proto.MarkChatAsReadAction + * @instance + * @returns {Object.} JSON object + */ + MarkChatAsReadAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MarkChatAsReadAction; + })(); + + proto.MediaData = (function() { + + /** + * Properties of a MediaData. + * @memberof proto + * @interface IMediaData + * @property {string|null} [localPath] MediaData localPath + */ + + /** + * Constructs a new MediaData. + * @memberof proto + * @classdesc Represents a MediaData. + * @implements IMediaData + * @constructor + * @param {proto.IMediaData=} [properties] Properties to set + */ + function MediaData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MediaData localPath. + * @member {string} localPath + * @memberof proto.MediaData + * @instance + */ + MediaData.prototype.localPath = ""; + + /** + * Creates a new MediaData instance using the specified properties. + * @function create + * @memberof proto.MediaData + * @static + * @param {proto.IMediaData=} [properties] Properties to set + * @returns {proto.MediaData} MediaData instance + */ + MediaData.create = function create(properties) { + return new MediaData(properties); + }; + + /** + * Encodes the specified MediaData message. Does not implicitly {@link proto.MediaData.verify|verify} messages. + * @function encode + * @memberof proto.MediaData + * @static + * @param {proto.IMediaData} message MediaData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MediaData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.localPath != null && Object.hasOwnProperty.call(message, "localPath")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.localPath); + return writer; + }; + + /** + * Encodes the specified MediaData message, length delimited. Does not implicitly {@link proto.MediaData.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.MediaData + * @static + * @param {proto.IMediaData} message MediaData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MediaData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MediaData message from the specified reader or buffer. + * @function decode + * @memberof proto.MediaData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.MediaData} MediaData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MediaData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.MediaData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.localPath = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MediaData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.MediaData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.MediaData} MediaData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MediaData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MediaData message. + * @function verify + * @memberof proto.MediaData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MediaData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.localPath != null && message.hasOwnProperty("localPath")) + if (!$util.isString(message.localPath)) + return "localPath: string expected"; + return null; + }; + + /** + * Creates a MediaData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.MediaData + * @static + * @param {Object.} object Plain object + * @returns {proto.MediaData} MediaData + */ + MediaData.fromObject = function fromObject(object) { + if (object instanceof $root.proto.MediaData) + return object; + var message = new $root.proto.MediaData(); + if (object.localPath != null) + message.localPath = String(object.localPath); + return message; + }; + + /** + * Creates a plain object from a MediaData message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.MediaData + * @static + * @param {proto.MediaData} message MediaData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MediaData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.localPath = ""; + if (message.localPath != null && message.hasOwnProperty("localPath")) + object.localPath = message.localPath; + return object; + }; + + /** + * Converts this MediaData to JSON. + * @function toJSON + * @memberof proto.MediaData + * @instance + * @returns {Object.} JSON object + */ + MediaData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MediaData; + })(); + + proto.MediaRetryNotification = (function() { + + /** + * Properties of a MediaRetryNotification. + * @memberof proto + * @interface IMediaRetryNotification + * @property {string|null} [stanzaId] MediaRetryNotification stanzaId + * @property {string|null} [directPath] MediaRetryNotification directPath + * @property {proto.MediaRetryNotification.MediaRetryNotificationResultType|null} [result] MediaRetryNotification result + */ + + /** + * Constructs a new MediaRetryNotification. + * @memberof proto + * @classdesc Represents a MediaRetryNotification. + * @implements IMediaRetryNotification + * @constructor + * @param {proto.IMediaRetryNotification=} [properties] Properties to set + */ + function MediaRetryNotification(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MediaRetryNotification stanzaId. + * @member {string} stanzaId + * @memberof proto.MediaRetryNotification + * @instance + */ + MediaRetryNotification.prototype.stanzaId = ""; + + /** + * MediaRetryNotification directPath. + * @member {string} directPath + * @memberof proto.MediaRetryNotification + * @instance + */ + MediaRetryNotification.prototype.directPath = ""; + + /** + * MediaRetryNotification result. + * @member {proto.MediaRetryNotification.MediaRetryNotificationResultType} result + * @memberof proto.MediaRetryNotification + * @instance + */ + MediaRetryNotification.prototype.result = 0; + + /** + * Creates a new MediaRetryNotification instance using the specified properties. + * @function create + * @memberof proto.MediaRetryNotification + * @static + * @param {proto.IMediaRetryNotification=} [properties] Properties to set + * @returns {proto.MediaRetryNotification} MediaRetryNotification instance + */ + MediaRetryNotification.create = function create(properties) { + return new MediaRetryNotification(properties); + }; + + /** + * Encodes the specified MediaRetryNotification message. Does not implicitly {@link proto.MediaRetryNotification.verify|verify} messages. + * @function encode + * @memberof proto.MediaRetryNotification + * @static + * @param {proto.IMediaRetryNotification} message MediaRetryNotification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MediaRetryNotification.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.stanzaId != null && Object.hasOwnProperty.call(message, "stanzaId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.stanzaId); + if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.directPath); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.result); + return writer; + }; + + /** + * Encodes the specified MediaRetryNotification message, length delimited. Does not implicitly {@link proto.MediaRetryNotification.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.MediaRetryNotification + * @static + * @param {proto.IMediaRetryNotification} message MediaRetryNotification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MediaRetryNotification.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MediaRetryNotification message from the specified reader or buffer. + * @function decode + * @memberof proto.MediaRetryNotification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.MediaRetryNotification} MediaRetryNotification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MediaRetryNotification.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.MediaRetryNotification(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.stanzaId = reader.string(); + break; + case 2: + message.directPath = reader.string(); + break; + case 3: + message.result = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MediaRetryNotification message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.MediaRetryNotification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.MediaRetryNotification} MediaRetryNotification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MediaRetryNotification.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MediaRetryNotification message. + * @function verify + * @memberof proto.MediaRetryNotification + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MediaRetryNotification.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) + if (!$util.isString(message.stanzaId)) + return "stanzaId: string expected"; + if (message.directPath != null && message.hasOwnProperty("directPath")) + if (!$util.isString(message.directPath)) + return "directPath: string expected"; + if (message.result != null && message.hasOwnProperty("result")) + switch (message.result) { + default: + return "result: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a MediaRetryNotification message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.MediaRetryNotification + * @static + * @param {Object.} object Plain object + * @returns {proto.MediaRetryNotification} MediaRetryNotification + */ + MediaRetryNotification.fromObject = function fromObject(object) { + if (object instanceof $root.proto.MediaRetryNotification) + return object; + var message = new $root.proto.MediaRetryNotification(); + if (object.stanzaId != null) + message.stanzaId = String(object.stanzaId); + if (object.directPath != null) + message.directPath = String(object.directPath); + switch (object.result) { + case "GENERAL_ERROR": + case 0: + message.result = 0; + break; + case "SUCCESS": + case 1: + message.result = 1; + break; + case "NOT_FOUND": + case 2: + message.result = 2; + break; + case "DECRYPTION_ERROR": + case 3: + message.result = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a MediaRetryNotification message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.MediaRetryNotification + * @static + * @param {proto.MediaRetryNotification} message MediaRetryNotification + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MediaRetryNotification.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.stanzaId = ""; + object.directPath = ""; + object.result = options.enums === String ? "GENERAL_ERROR" : 0; + } + if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) + object.stanzaId = message.stanzaId; + if (message.directPath != null && message.hasOwnProperty("directPath")) + object.directPath = message.directPath; + if (message.result != null && message.hasOwnProperty("result")) + object.result = options.enums === String ? $root.proto.MediaRetryNotification.MediaRetryNotificationResultType[message.result] : message.result; + return object; + }; + + /** + * Converts this MediaRetryNotification to JSON. + * @function toJSON + * @memberof proto.MediaRetryNotification + * @instance + * @returns {Object.} JSON object + */ + MediaRetryNotification.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * MediaRetryNotificationResultType enum. + * @name proto.MediaRetryNotification.MediaRetryNotificationResultType + * @enum {number} + * @property {number} GENERAL_ERROR=0 GENERAL_ERROR value + * @property {number} SUCCESS=1 SUCCESS value + * @property {number} NOT_FOUND=2 NOT_FOUND value + * @property {number} DECRYPTION_ERROR=3 DECRYPTION_ERROR value + */ + MediaRetryNotification.MediaRetryNotificationResultType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GENERAL_ERROR"] = 0; + values[valuesById[1] = "SUCCESS"] = 1; + values[valuesById[2] = "NOT_FOUND"] = 2; + values[valuesById[3] = "DECRYPTION_ERROR"] = 3; + return values; + })(); + + return MediaRetryNotification; + })(); + + /** + * MediaVisibility enum. + * @name proto.MediaVisibility + * @enum {number} + * @property {number} DEFAULT=0 DEFAULT value + * @property {number} OFF=1 OFF value + * @property {number} ON=2 ON value + */ + proto.MediaVisibility = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DEFAULT"] = 0; + values[valuesById[1] = "OFF"] = 1; + values[valuesById[2] = "ON"] = 2; + return values; + })(); + proto.Message = (function() { /** @@ -21465,6 +34388,7 @@ $root.proto = (function() { * @property {proto.IInteractiveResponseMessage|null} [interactiveResponseMessage] Message interactiveResponseMessage * @property {proto.IPollCreationMessage|null} [pollCreationMessage] Message pollCreationMessage * @property {proto.IPollUpdateMessage|null} [pollUpdateMessage] Message pollUpdateMessage + * @property {proto.IKeepInChatMessage|null} [keepInChatMessage] Message keepInChatMessage */ /** @@ -21818,6 +34742,14 @@ $root.proto = (function() { */ Message.prototype.pollUpdateMessage = null; + /** + * Message keepInChatMessage. + * @member {proto.IKeepInChatMessage|null|undefined} keepInChatMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.keepInChatMessage = null; + /** * Creates a new Message instance using the specified properties. * @function create @@ -21926,6 +34858,8 @@ $root.proto = (function() { $root.proto.PollCreationMessage.encode(message.pollCreationMessage, writer.uint32(/* id 49, wireType 2 =*/394).fork()).ldelim(); if (message.pollUpdateMessage != null && Object.hasOwnProperty.call(message, "pollUpdateMessage")) $root.proto.PollUpdateMessage.encode(message.pollUpdateMessage, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.keepInChatMessage != null && Object.hasOwnProperty.call(message, "keepInChatMessage")) + $root.proto.KeepInChatMessage.encode(message.keepInChatMessage, writer.uint32(/* id 51, wireType 2 =*/410).fork()).ldelim(); return writer; }; @@ -22086,6 +35020,9 @@ $root.proto = (function() { case 50: message.pollUpdateMessage = $root.proto.PollUpdateMessage.decode(reader, reader.uint32()); break; + case 51: + message.keepInChatMessage = $root.proto.KeepInChatMessage.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -22329,6 +35266,11 @@ $root.proto = (function() { if (error) return "pollUpdateMessage." + error; } + if (message.keepInChatMessage != null && message.hasOwnProperty("keepInChatMessage")) { + var error = $root.proto.KeepInChatMessage.verify(message.keepInChatMessage); + if (error) + return "keepInChatMessage." + error; + } return null; }; @@ -22551,6 +35493,11 @@ $root.proto = (function() { throw TypeError(".proto.Message.pollUpdateMessage: object expected"); message.pollUpdateMessage = $root.proto.PollUpdateMessage.fromObject(object.pollUpdateMessage); } + if (object.keepInChatMessage != null) { + if (typeof object.keepInChatMessage !== "object") + throw TypeError(".proto.Message.keepInChatMessage: object expected"); + message.keepInChatMessage = $root.proto.KeepInChatMessage.fromObject(object.keepInChatMessage); + } return message; }; @@ -22610,6 +35557,7 @@ $root.proto = (function() { object.interactiveResponseMessage = null; object.pollCreationMessage = null; object.pollUpdateMessage = null; + object.keepInChatMessage = null; } if (message.conversation != null && message.hasOwnProperty("conversation")) object.conversation = message.conversation; @@ -22695,6 +35643,8 @@ $root.proto = (function() { object.pollCreationMessage = $root.proto.PollCreationMessage.toObject(message.pollCreationMessage, options); if (message.pollUpdateMessage != null && message.hasOwnProperty("pollUpdateMessage")) object.pollUpdateMessage = $root.proto.PollUpdateMessage.toObject(message.pollUpdateMessage, options); + if (message.keepInChatMessage != null && message.hasOwnProperty("keepInChatMessage")) + object.keepInChatMessage = $root.proto.KeepInChatMessage.toObject(message.keepInChatMessage, options); return object; }; @@ -22720,6 +35670,8 @@ $root.proto = (function() { * @interface IMessageContextInfo * @property {proto.IDeviceListMetadata|null} [deviceListMetadata] MessageContextInfo deviceListMetadata * @property {number|null} [deviceListMetadataVersion] MessageContextInfo deviceListMetadataVersion + * @property {Uint8Array|null} [messageSecret] MessageContextInfo messageSecret + * @property {Uint8Array|null} [paddingBytes] MessageContextInfo paddingBytes */ /** @@ -22753,6 +35705,22 @@ $root.proto = (function() { */ MessageContextInfo.prototype.deviceListMetadataVersion = 0; + /** + * MessageContextInfo messageSecret. + * @member {Uint8Array} messageSecret + * @memberof proto.MessageContextInfo + * @instance + */ + MessageContextInfo.prototype.messageSecret = $util.newBuffer([]); + + /** + * MessageContextInfo paddingBytes. + * @member {Uint8Array} paddingBytes + * @memberof proto.MessageContextInfo + * @instance + */ + MessageContextInfo.prototype.paddingBytes = $util.newBuffer([]); + /** * Creates a new MessageContextInfo instance using the specified properties. * @function create @@ -22781,6 +35749,10 @@ $root.proto = (function() { $root.proto.DeviceListMetadata.encode(message.deviceListMetadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.deviceListMetadataVersion != null && Object.hasOwnProperty.call(message, "deviceListMetadataVersion")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.deviceListMetadataVersion); + if (message.messageSecret != null && Object.hasOwnProperty.call(message, "messageSecret")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.messageSecret); + if (message.paddingBytes != null && Object.hasOwnProperty.call(message, "paddingBytes")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.paddingBytes); return writer; }; @@ -22821,6 +35793,12 @@ $root.proto = (function() { case 2: message.deviceListMetadataVersion = reader.int32(); break; + case 3: + message.messageSecret = reader.bytes(); + break; + case 4: + message.paddingBytes = reader.bytes(); + break; default: reader.skipType(tag & 7); break; @@ -22864,6 +35842,12 @@ $root.proto = (function() { if (message.deviceListMetadataVersion != null && message.hasOwnProperty("deviceListMetadataVersion")) if (!$util.isInteger(message.deviceListMetadataVersion)) return "deviceListMetadataVersion: integer expected"; + if (message.messageSecret != null && message.hasOwnProperty("messageSecret")) + if (!(message.messageSecret && typeof message.messageSecret.length === "number" || $util.isString(message.messageSecret))) + return "messageSecret: buffer expected"; + if (message.paddingBytes != null && message.hasOwnProperty("paddingBytes")) + if (!(message.paddingBytes && typeof message.paddingBytes.length === "number" || $util.isString(message.paddingBytes))) + return "paddingBytes: buffer expected"; return null; }; @@ -22886,6 +35870,16 @@ $root.proto = (function() { } if (object.deviceListMetadataVersion != null) message.deviceListMetadataVersion = object.deviceListMetadataVersion | 0; + if (object.messageSecret != null) + if (typeof object.messageSecret === "string") + $util.base64.decode(object.messageSecret, message.messageSecret = $util.newBuffer($util.base64.length(object.messageSecret)), 0); + else if (object.messageSecret.length) + message.messageSecret = object.messageSecret; + if (object.paddingBytes != null) + if (typeof object.paddingBytes === "string") + $util.base64.decode(object.paddingBytes, message.paddingBytes = $util.newBuffer($util.base64.length(object.paddingBytes)), 0); + else if (object.paddingBytes.length) + message.paddingBytes = object.paddingBytes; return message; }; @@ -22905,11 +35899,29 @@ $root.proto = (function() { if (options.defaults) { object.deviceListMetadata = null; object.deviceListMetadataVersion = 0; + if (options.bytes === String) + object.messageSecret = ""; + else { + object.messageSecret = []; + if (options.bytes !== Array) + object.messageSecret = $util.newBuffer(object.messageSecret); + } + if (options.bytes === String) + object.paddingBytes = ""; + else { + object.paddingBytes = []; + if (options.bytes !== Array) + object.paddingBytes = $util.newBuffer(object.paddingBytes); + } } if (message.deviceListMetadata != null && message.hasOwnProperty("deviceListMetadata")) object.deviceListMetadata = $root.proto.DeviceListMetadata.toObject(message.deviceListMetadata, options); if (message.deviceListMetadataVersion != null && message.hasOwnProperty("deviceListMetadataVersion")) object.deviceListMetadataVersion = message.deviceListMetadataVersion; + if (message.messageSecret != null && message.hasOwnProperty("messageSecret")) + object.messageSecret = options.bytes === String ? $util.base64.encode(message.messageSecret, 0, message.messageSecret.length) : options.bytes === Array ? Array.prototype.slice.call(message.messageSecret) : message.messageSecret; + if (message.paddingBytes != null && message.hasOwnProperty("paddingBytes")) + object.paddingBytes = options.bytes === String ? $util.base64.encode(message.paddingBytes, 0, message.paddingBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.paddingBytes) : message.paddingBytes; return object; }; @@ -22927,6 +35939,260 @@ $root.proto = (function() { return MessageContextInfo; })(); + proto.MessageKey = (function() { + + /** + * Properties of a MessageKey. + * @memberof proto + * @interface IMessageKey + * @property {string|null} [remoteJid] MessageKey remoteJid + * @property {boolean|null} [fromMe] MessageKey fromMe + * @property {string|null} [id] MessageKey id + * @property {string|null} [participant] MessageKey participant + */ + + /** + * Constructs a new MessageKey. + * @memberof proto + * @classdesc Represents a MessageKey. + * @implements IMessageKey + * @constructor + * @param {proto.IMessageKey=} [properties] Properties to set + */ + function MessageKey(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageKey remoteJid. + * @member {string} remoteJid + * @memberof proto.MessageKey + * @instance + */ + MessageKey.prototype.remoteJid = ""; + + /** + * MessageKey fromMe. + * @member {boolean} fromMe + * @memberof proto.MessageKey + * @instance + */ + MessageKey.prototype.fromMe = false; + + /** + * MessageKey id. + * @member {string} id + * @memberof proto.MessageKey + * @instance + */ + MessageKey.prototype.id = ""; + + /** + * MessageKey participant. + * @member {string} participant + * @memberof proto.MessageKey + * @instance + */ + MessageKey.prototype.participant = ""; + + /** + * Creates a new MessageKey instance using the specified properties. + * @function create + * @memberof proto.MessageKey + * @static + * @param {proto.IMessageKey=} [properties] Properties to set + * @returns {proto.MessageKey} MessageKey instance + */ + MessageKey.create = function create(properties) { + return new MessageKey(properties); + }; + + /** + * Encodes the specified MessageKey message. Does not implicitly {@link proto.MessageKey.verify|verify} messages. + * @function encode + * @memberof proto.MessageKey + * @static + * @param {proto.IMessageKey} message MessageKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageKey.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.remoteJid != null && Object.hasOwnProperty.call(message, "remoteJid")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.remoteJid); + if (message.fromMe != null && Object.hasOwnProperty.call(message, "fromMe")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fromMe); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.id); + if (message.participant != null && Object.hasOwnProperty.call(message, "participant")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.participant); + return writer; + }; + + /** + * Encodes the specified MessageKey message, length delimited. Does not implicitly {@link proto.MessageKey.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.MessageKey + * @static + * @param {proto.IMessageKey} message MessageKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageKey message from the specified reader or buffer. + * @function decode + * @memberof proto.MessageKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.MessageKey} MessageKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageKey.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.MessageKey(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.remoteJid = reader.string(); + break; + case 2: + message.fromMe = reader.bool(); + break; + case 3: + message.id = reader.string(); + break; + case 4: + message.participant = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.MessageKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.MessageKey} MessageKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageKey message. + * @function verify + * @memberof proto.MessageKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageKey.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.remoteJid != null && message.hasOwnProperty("remoteJid")) + if (!$util.isString(message.remoteJid)) + return "remoteJid: string expected"; + if (message.fromMe != null && message.hasOwnProperty("fromMe")) + if (typeof message.fromMe !== "boolean") + return "fromMe: boolean expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.participant != null && message.hasOwnProperty("participant")) + if (!$util.isString(message.participant)) + return "participant: string expected"; + return null; + }; + + /** + * Creates a MessageKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.MessageKey + * @static + * @param {Object.} object Plain object + * @returns {proto.MessageKey} MessageKey + */ + MessageKey.fromObject = function fromObject(object) { + if (object instanceof $root.proto.MessageKey) + return object; + var message = new $root.proto.MessageKey(); + if (object.remoteJid != null) + message.remoteJid = String(object.remoteJid); + if (object.fromMe != null) + message.fromMe = Boolean(object.fromMe); + if (object.id != null) + message.id = String(object.id); + if (object.participant != null) + message.participant = String(object.participant); + return message; + }; + + /** + * Creates a plain object from a MessageKey message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.MessageKey + * @static + * @param {proto.MessageKey} message MessageKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.remoteJid = ""; + object.fromMe = false; + object.id = ""; + object.participant = ""; + } + if (message.remoteJid != null && message.hasOwnProperty("remoteJid")) + object.remoteJid = message.remoteJid; + if (message.fromMe != null && message.hasOwnProperty("fromMe")) + object.fromMe = message.fromMe; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.participant != null && message.hasOwnProperty("participant")) + object.participant = message.participant; + return object; + }; + + /** + * Converts this MessageKey to JSON. + * @function toJSON + * @memberof proto.MessageKey + * @instance + * @returns {Object.} JSON object + */ + MessageKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MessageKey; + })(); + proto.Money = (function() { /** @@ -23173,6 +36439,1052 @@ $root.proto = (function() { return Money; })(); + proto.MsgOpaqueData = (function() { + + /** + * Properties of a MsgOpaqueData. + * @memberof proto + * @interface IMsgOpaqueData + * @property {string|null} [body] MsgOpaqueData body + * @property {string|null} [caption] MsgOpaqueData caption + * @property {number|null} [lng] MsgOpaqueData lng + * @property {boolean|null} [isLive] MsgOpaqueData isLive + * @property {number|null} [lat] MsgOpaqueData lat + * @property {number|null} [paymentAmount1000] MsgOpaqueData paymentAmount1000 + * @property {string|null} [paymentNoteMsgBody] MsgOpaqueData paymentNoteMsgBody + * @property {string|null} [canonicalUrl] MsgOpaqueData canonicalUrl + * @property {string|null} [matchedText] MsgOpaqueData matchedText + * @property {string|null} [title] MsgOpaqueData title + * @property {string|null} [description] MsgOpaqueData description + * @property {Uint8Array|null} [futureproofBuffer] MsgOpaqueData futureproofBuffer + * @property {string|null} [clientUrl] MsgOpaqueData clientUrl + * @property {string|null} [loc] MsgOpaqueData loc + * @property {string|null} [pollName] MsgOpaqueData pollName + * @property {Array.|null} [pollOptions] MsgOpaqueData pollOptions + * @property {number|null} [pollSelectableOptionsCount] MsgOpaqueData pollSelectableOptionsCount + * @property {Uint8Array|null} [messageSecret] MsgOpaqueData messageSecret + */ + + /** + * Constructs a new MsgOpaqueData. + * @memberof proto + * @classdesc Represents a MsgOpaqueData. + * @implements IMsgOpaqueData + * @constructor + * @param {proto.IMsgOpaqueData=} [properties] Properties to set + */ + function MsgOpaqueData(properties) { + this.pollOptions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgOpaqueData body. + * @member {string} body + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.body = ""; + + /** + * MsgOpaqueData caption. + * @member {string} caption + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.caption = ""; + + /** + * MsgOpaqueData lng. + * @member {number} lng + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.lng = 0; + + /** + * MsgOpaqueData isLive. + * @member {boolean} isLive + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.isLive = false; + + /** + * MsgOpaqueData lat. + * @member {number} lat + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.lat = 0; + + /** + * MsgOpaqueData paymentAmount1000. + * @member {number} paymentAmount1000 + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.paymentAmount1000 = 0; + + /** + * MsgOpaqueData paymentNoteMsgBody. + * @member {string} paymentNoteMsgBody + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.paymentNoteMsgBody = ""; + + /** + * MsgOpaqueData canonicalUrl. + * @member {string} canonicalUrl + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.canonicalUrl = ""; + + /** + * MsgOpaqueData matchedText. + * @member {string} matchedText + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.matchedText = ""; + + /** + * MsgOpaqueData title. + * @member {string} title + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.title = ""; + + /** + * MsgOpaqueData description. + * @member {string} description + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.description = ""; + + /** + * MsgOpaqueData futureproofBuffer. + * @member {Uint8Array} futureproofBuffer + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.futureproofBuffer = $util.newBuffer([]); + + /** + * MsgOpaqueData clientUrl. + * @member {string} clientUrl + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.clientUrl = ""; + + /** + * MsgOpaqueData loc. + * @member {string} loc + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.loc = ""; + + /** + * MsgOpaqueData pollName. + * @member {string} pollName + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.pollName = ""; + + /** + * MsgOpaqueData pollOptions. + * @member {Array.} pollOptions + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.pollOptions = $util.emptyArray; + + /** + * MsgOpaqueData pollSelectableOptionsCount. + * @member {number} pollSelectableOptionsCount + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.pollSelectableOptionsCount = 0; + + /** + * MsgOpaqueData messageSecret. + * @member {Uint8Array} messageSecret + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.messageSecret = $util.newBuffer([]); + + /** + * Creates a new MsgOpaqueData instance using the specified properties. + * @function create + * @memberof proto.MsgOpaqueData + * @static + * @param {proto.IMsgOpaqueData=} [properties] Properties to set + * @returns {proto.MsgOpaqueData} MsgOpaqueData instance + */ + MsgOpaqueData.create = function create(properties) { + return new MsgOpaqueData(properties); + }; + + /** + * Encodes the specified MsgOpaqueData message. Does not implicitly {@link proto.MsgOpaqueData.verify|verify} messages. + * @function encode + * @memberof proto.MsgOpaqueData + * @static + * @param {proto.IMsgOpaqueData} message MsgOpaqueData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgOpaqueData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.body); + if (message.caption != null && Object.hasOwnProperty.call(message, "caption")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.caption); + if (message.lng != null && Object.hasOwnProperty.call(message, "lng")) + writer.uint32(/* id 5, wireType 1 =*/41).double(message.lng); + if (message.isLive != null && Object.hasOwnProperty.call(message, "isLive")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.isLive); + if (message.lat != null && Object.hasOwnProperty.call(message, "lat")) + writer.uint32(/* id 7, wireType 1 =*/57).double(message.lat); + if (message.paymentAmount1000 != null && Object.hasOwnProperty.call(message, "paymentAmount1000")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.paymentAmount1000); + if (message.paymentNoteMsgBody != null && Object.hasOwnProperty.call(message, "paymentNoteMsgBody")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.paymentNoteMsgBody); + if (message.canonicalUrl != null && Object.hasOwnProperty.call(message, "canonicalUrl")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.canonicalUrl); + if (message.matchedText != null && Object.hasOwnProperty.call(message, "matchedText")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.matchedText); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.description); + if (message.futureproofBuffer != null && Object.hasOwnProperty.call(message, "futureproofBuffer")) + writer.uint32(/* id 14, wireType 2 =*/114).bytes(message.futureproofBuffer); + if (message.clientUrl != null && Object.hasOwnProperty.call(message, "clientUrl")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.clientUrl); + if (message.loc != null && Object.hasOwnProperty.call(message, "loc")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.loc); + if (message.pollName != null && Object.hasOwnProperty.call(message, "pollName")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.pollName); + if (message.pollOptions != null && message.pollOptions.length) + for (var i = 0; i < message.pollOptions.length; ++i) + $root.proto.PollOption.encode(message.pollOptions[i], writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.pollSelectableOptionsCount != null && Object.hasOwnProperty.call(message, "pollSelectableOptionsCount")) + writer.uint32(/* id 20, wireType 0 =*/160).uint32(message.pollSelectableOptionsCount); + if (message.messageSecret != null && Object.hasOwnProperty.call(message, "messageSecret")) + writer.uint32(/* id 21, wireType 2 =*/170).bytes(message.messageSecret); + return writer; + }; + + /** + * Encodes the specified MsgOpaqueData message, length delimited. Does not implicitly {@link proto.MsgOpaqueData.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.MsgOpaqueData + * @static + * @param {proto.IMsgOpaqueData} message MsgOpaqueData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgOpaqueData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgOpaqueData message from the specified reader or buffer. + * @function decode + * @memberof proto.MsgOpaqueData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.MsgOpaqueData} MsgOpaqueData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgOpaqueData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.MsgOpaqueData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.body = reader.string(); + break; + case 3: + message.caption = reader.string(); + break; + case 5: + message.lng = reader.double(); + break; + case 6: + message.isLive = reader.bool(); + break; + case 7: + message.lat = reader.double(); + break; + case 8: + message.paymentAmount1000 = reader.int32(); + break; + case 9: + message.paymentNoteMsgBody = reader.string(); + break; + case 10: + message.canonicalUrl = reader.string(); + break; + case 11: + message.matchedText = reader.string(); + break; + case 12: + message.title = reader.string(); + break; + case 13: + message.description = reader.string(); + break; + case 14: + message.futureproofBuffer = reader.bytes(); + break; + case 15: + message.clientUrl = reader.string(); + break; + case 16: + message.loc = reader.string(); + break; + case 17: + message.pollName = reader.string(); + break; + case 18: + if (!(message.pollOptions && message.pollOptions.length)) + message.pollOptions = []; + message.pollOptions.push($root.proto.PollOption.decode(reader, reader.uint32())); + break; + case 20: + message.pollSelectableOptionsCount = reader.uint32(); + break; + case 21: + message.messageSecret = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgOpaqueData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.MsgOpaqueData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.MsgOpaqueData} MsgOpaqueData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgOpaqueData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgOpaqueData message. + * @function verify + * @memberof proto.MsgOpaqueData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgOpaqueData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.caption != null && message.hasOwnProperty("caption")) + if (!$util.isString(message.caption)) + return "caption: string expected"; + if (message.lng != null && message.hasOwnProperty("lng")) + if (typeof message.lng !== "number") + return "lng: number expected"; + if (message.isLive != null && message.hasOwnProperty("isLive")) + if (typeof message.isLive !== "boolean") + return "isLive: boolean expected"; + if (message.lat != null && message.hasOwnProperty("lat")) + if (typeof message.lat !== "number") + return "lat: number expected"; + if (message.paymentAmount1000 != null && message.hasOwnProperty("paymentAmount1000")) + if (!$util.isInteger(message.paymentAmount1000)) + return "paymentAmount1000: integer expected"; + if (message.paymentNoteMsgBody != null && message.hasOwnProperty("paymentNoteMsgBody")) + if (!$util.isString(message.paymentNoteMsgBody)) + return "paymentNoteMsgBody: string expected"; + if (message.canonicalUrl != null && message.hasOwnProperty("canonicalUrl")) + if (!$util.isString(message.canonicalUrl)) + return "canonicalUrl: string expected"; + if (message.matchedText != null && message.hasOwnProperty("matchedText")) + if (!$util.isString(message.matchedText)) + return "matchedText: string expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.futureproofBuffer != null && message.hasOwnProperty("futureproofBuffer")) + if (!(message.futureproofBuffer && typeof message.futureproofBuffer.length === "number" || $util.isString(message.futureproofBuffer))) + return "futureproofBuffer: buffer expected"; + if (message.clientUrl != null && message.hasOwnProperty("clientUrl")) + if (!$util.isString(message.clientUrl)) + return "clientUrl: string expected"; + if (message.loc != null && message.hasOwnProperty("loc")) + if (!$util.isString(message.loc)) + return "loc: string expected"; + if (message.pollName != null && message.hasOwnProperty("pollName")) + if (!$util.isString(message.pollName)) + return "pollName: string expected"; + if (message.pollOptions != null && message.hasOwnProperty("pollOptions")) { + if (!Array.isArray(message.pollOptions)) + return "pollOptions: array expected"; + for (var i = 0; i < message.pollOptions.length; ++i) { + var error = $root.proto.PollOption.verify(message.pollOptions[i]); + if (error) + return "pollOptions." + error; + } + } + if (message.pollSelectableOptionsCount != null && message.hasOwnProperty("pollSelectableOptionsCount")) + if (!$util.isInteger(message.pollSelectableOptionsCount)) + return "pollSelectableOptionsCount: integer expected"; + if (message.messageSecret != null && message.hasOwnProperty("messageSecret")) + if (!(message.messageSecret && typeof message.messageSecret.length === "number" || $util.isString(message.messageSecret))) + return "messageSecret: buffer expected"; + return null; + }; + + /** + * Creates a MsgOpaqueData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.MsgOpaqueData + * @static + * @param {Object.} object Plain object + * @returns {proto.MsgOpaqueData} MsgOpaqueData + */ + MsgOpaqueData.fromObject = function fromObject(object) { + if (object instanceof $root.proto.MsgOpaqueData) + return object; + var message = new $root.proto.MsgOpaqueData(); + if (object.body != null) + message.body = String(object.body); + if (object.caption != null) + message.caption = String(object.caption); + if (object.lng != null) + message.lng = Number(object.lng); + if (object.isLive != null) + message.isLive = Boolean(object.isLive); + if (object.lat != null) + message.lat = Number(object.lat); + if (object.paymentAmount1000 != null) + message.paymentAmount1000 = object.paymentAmount1000 | 0; + if (object.paymentNoteMsgBody != null) + message.paymentNoteMsgBody = String(object.paymentNoteMsgBody); + if (object.canonicalUrl != null) + message.canonicalUrl = String(object.canonicalUrl); + if (object.matchedText != null) + message.matchedText = String(object.matchedText); + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + if (object.futureproofBuffer != null) + if (typeof object.futureproofBuffer === "string") + $util.base64.decode(object.futureproofBuffer, message.futureproofBuffer = $util.newBuffer($util.base64.length(object.futureproofBuffer)), 0); + else if (object.futureproofBuffer.length) + message.futureproofBuffer = object.futureproofBuffer; + if (object.clientUrl != null) + message.clientUrl = String(object.clientUrl); + if (object.loc != null) + message.loc = String(object.loc); + if (object.pollName != null) + message.pollName = String(object.pollName); + if (object.pollOptions) { + if (!Array.isArray(object.pollOptions)) + throw TypeError(".proto.MsgOpaqueData.pollOptions: array expected"); + message.pollOptions = []; + for (var i = 0; i < object.pollOptions.length; ++i) { + if (typeof object.pollOptions[i] !== "object") + throw TypeError(".proto.MsgOpaqueData.pollOptions: object expected"); + message.pollOptions[i] = $root.proto.PollOption.fromObject(object.pollOptions[i]); + } + } + if (object.pollSelectableOptionsCount != null) + message.pollSelectableOptionsCount = object.pollSelectableOptionsCount >>> 0; + if (object.messageSecret != null) + if (typeof object.messageSecret === "string") + $util.base64.decode(object.messageSecret, message.messageSecret = $util.newBuffer($util.base64.length(object.messageSecret)), 0); + else if (object.messageSecret.length) + message.messageSecret = object.messageSecret; + return message; + }; + + /** + * Creates a plain object from a MsgOpaqueData message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.MsgOpaqueData + * @static + * @param {proto.MsgOpaqueData} message MsgOpaqueData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgOpaqueData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.pollOptions = []; + if (options.defaults) { + object.body = ""; + object.caption = ""; + object.lng = 0; + object.isLive = false; + object.lat = 0; + object.paymentAmount1000 = 0; + object.paymentNoteMsgBody = ""; + object.canonicalUrl = ""; + object.matchedText = ""; + object.title = ""; + object.description = ""; + if (options.bytes === String) + object.futureproofBuffer = ""; + else { + object.futureproofBuffer = []; + if (options.bytes !== Array) + object.futureproofBuffer = $util.newBuffer(object.futureproofBuffer); + } + object.clientUrl = ""; + object.loc = ""; + object.pollName = ""; + object.pollSelectableOptionsCount = 0; + if (options.bytes === String) + object.messageSecret = ""; + else { + object.messageSecret = []; + if (options.bytes !== Array) + object.messageSecret = $util.newBuffer(object.messageSecret); + } + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.caption != null && message.hasOwnProperty("caption")) + object.caption = message.caption; + if (message.lng != null && message.hasOwnProperty("lng")) + object.lng = options.json && !isFinite(message.lng) ? String(message.lng) : message.lng; + if (message.isLive != null && message.hasOwnProperty("isLive")) + object.isLive = message.isLive; + if (message.lat != null && message.hasOwnProperty("lat")) + object.lat = options.json && !isFinite(message.lat) ? String(message.lat) : message.lat; + if (message.paymentAmount1000 != null && message.hasOwnProperty("paymentAmount1000")) + object.paymentAmount1000 = message.paymentAmount1000; + if (message.paymentNoteMsgBody != null && message.hasOwnProperty("paymentNoteMsgBody")) + object.paymentNoteMsgBody = message.paymentNoteMsgBody; + if (message.canonicalUrl != null && message.hasOwnProperty("canonicalUrl")) + object.canonicalUrl = message.canonicalUrl; + if (message.matchedText != null && message.hasOwnProperty("matchedText")) + object.matchedText = message.matchedText; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.futureproofBuffer != null && message.hasOwnProperty("futureproofBuffer")) + object.futureproofBuffer = options.bytes === String ? $util.base64.encode(message.futureproofBuffer, 0, message.futureproofBuffer.length) : options.bytes === Array ? Array.prototype.slice.call(message.futureproofBuffer) : message.futureproofBuffer; + if (message.clientUrl != null && message.hasOwnProperty("clientUrl")) + object.clientUrl = message.clientUrl; + if (message.loc != null && message.hasOwnProperty("loc")) + object.loc = message.loc; + if (message.pollName != null && message.hasOwnProperty("pollName")) + object.pollName = message.pollName; + if (message.pollOptions && message.pollOptions.length) { + object.pollOptions = []; + for (var j = 0; j < message.pollOptions.length; ++j) + object.pollOptions[j] = $root.proto.PollOption.toObject(message.pollOptions[j], options); + } + if (message.pollSelectableOptionsCount != null && message.hasOwnProperty("pollSelectableOptionsCount")) + object.pollSelectableOptionsCount = message.pollSelectableOptionsCount; + if (message.messageSecret != null && message.hasOwnProperty("messageSecret")) + object.messageSecret = options.bytes === String ? $util.base64.encode(message.messageSecret, 0, message.messageSecret.length) : options.bytes === Array ? Array.prototype.slice.call(message.messageSecret) : message.messageSecret; + return object; + }; + + /** + * Converts this MsgOpaqueData to JSON. + * @function toJSON + * @memberof proto.MsgOpaqueData + * @instance + * @returns {Object.} JSON object + */ + MsgOpaqueData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgOpaqueData; + })(); + + proto.MsgRowOpaqueData = (function() { + + /** + * Properties of a MsgRowOpaqueData. + * @memberof proto + * @interface IMsgRowOpaqueData + * @property {proto.IMsgOpaqueData|null} [currentMsg] MsgRowOpaqueData currentMsg + * @property {proto.IMsgOpaqueData|null} [quotedMsg] MsgRowOpaqueData quotedMsg + */ + + /** + * Constructs a new MsgRowOpaqueData. + * @memberof proto + * @classdesc Represents a MsgRowOpaqueData. + * @implements IMsgRowOpaqueData + * @constructor + * @param {proto.IMsgRowOpaqueData=} [properties] Properties to set + */ + function MsgRowOpaqueData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgRowOpaqueData currentMsg. + * @member {proto.IMsgOpaqueData|null|undefined} currentMsg + * @memberof proto.MsgRowOpaqueData + * @instance + */ + MsgRowOpaqueData.prototype.currentMsg = null; + + /** + * MsgRowOpaqueData quotedMsg. + * @member {proto.IMsgOpaqueData|null|undefined} quotedMsg + * @memberof proto.MsgRowOpaqueData + * @instance + */ + MsgRowOpaqueData.prototype.quotedMsg = null; + + /** + * Creates a new MsgRowOpaqueData instance using the specified properties. + * @function create + * @memberof proto.MsgRowOpaqueData + * @static + * @param {proto.IMsgRowOpaqueData=} [properties] Properties to set + * @returns {proto.MsgRowOpaqueData} MsgRowOpaqueData instance + */ + MsgRowOpaqueData.create = function create(properties) { + return new MsgRowOpaqueData(properties); + }; + + /** + * Encodes the specified MsgRowOpaqueData message. Does not implicitly {@link proto.MsgRowOpaqueData.verify|verify} messages. + * @function encode + * @memberof proto.MsgRowOpaqueData + * @static + * @param {proto.IMsgRowOpaqueData} message MsgRowOpaqueData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgRowOpaqueData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.currentMsg != null && Object.hasOwnProperty.call(message, "currentMsg")) + $root.proto.MsgOpaqueData.encode(message.currentMsg, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.quotedMsg != null && Object.hasOwnProperty.call(message, "quotedMsg")) + $root.proto.MsgOpaqueData.encode(message.quotedMsg, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MsgRowOpaqueData message, length delimited. Does not implicitly {@link proto.MsgRowOpaqueData.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.MsgRowOpaqueData + * @static + * @param {proto.IMsgRowOpaqueData} message MsgRowOpaqueData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgRowOpaqueData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgRowOpaqueData message from the specified reader or buffer. + * @function decode + * @memberof proto.MsgRowOpaqueData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.MsgRowOpaqueData} MsgRowOpaqueData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgRowOpaqueData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.MsgRowOpaqueData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.currentMsg = $root.proto.MsgOpaqueData.decode(reader, reader.uint32()); + break; + case 2: + message.quotedMsg = $root.proto.MsgOpaqueData.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgRowOpaqueData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.MsgRowOpaqueData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.MsgRowOpaqueData} MsgRowOpaqueData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgRowOpaqueData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgRowOpaqueData message. + * @function verify + * @memberof proto.MsgRowOpaqueData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgRowOpaqueData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.currentMsg != null && message.hasOwnProperty("currentMsg")) { + var error = $root.proto.MsgOpaqueData.verify(message.currentMsg); + if (error) + return "currentMsg." + error; + } + if (message.quotedMsg != null && message.hasOwnProperty("quotedMsg")) { + var error = $root.proto.MsgOpaqueData.verify(message.quotedMsg); + if (error) + return "quotedMsg." + error; + } + return null; + }; + + /** + * Creates a MsgRowOpaqueData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.MsgRowOpaqueData + * @static + * @param {Object.} object Plain object + * @returns {proto.MsgRowOpaqueData} MsgRowOpaqueData + */ + MsgRowOpaqueData.fromObject = function fromObject(object) { + if (object instanceof $root.proto.MsgRowOpaqueData) + return object; + var message = new $root.proto.MsgRowOpaqueData(); + if (object.currentMsg != null) { + if (typeof object.currentMsg !== "object") + throw TypeError(".proto.MsgRowOpaqueData.currentMsg: object expected"); + message.currentMsg = $root.proto.MsgOpaqueData.fromObject(object.currentMsg); + } + if (object.quotedMsg != null) { + if (typeof object.quotedMsg !== "object") + throw TypeError(".proto.MsgRowOpaqueData.quotedMsg: object expected"); + message.quotedMsg = $root.proto.MsgOpaqueData.fromObject(object.quotedMsg); + } + return message; + }; + + /** + * Creates a plain object from a MsgRowOpaqueData message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.MsgRowOpaqueData + * @static + * @param {proto.MsgRowOpaqueData} message MsgRowOpaqueData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgRowOpaqueData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.currentMsg = null; + object.quotedMsg = null; + } + if (message.currentMsg != null && message.hasOwnProperty("currentMsg")) + object.currentMsg = $root.proto.MsgOpaqueData.toObject(message.currentMsg, options); + if (message.quotedMsg != null && message.hasOwnProperty("quotedMsg")) + object.quotedMsg = $root.proto.MsgOpaqueData.toObject(message.quotedMsg, options); + return object; + }; + + /** + * Converts this MsgRowOpaqueData to JSON. + * @function toJSON + * @memberof proto.MsgRowOpaqueData + * @instance + * @returns {Object.} JSON object + */ + MsgRowOpaqueData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgRowOpaqueData; + })(); + + proto.MuteAction = (function() { + + /** + * Properties of a MuteAction. + * @memberof proto + * @interface IMuteAction + * @property {boolean|null} [muted] MuteAction muted + * @property {number|Long|null} [muteEndTimestamp] MuteAction muteEndTimestamp + */ + + /** + * Constructs a new MuteAction. + * @memberof proto + * @classdesc Represents a MuteAction. + * @implements IMuteAction + * @constructor + * @param {proto.IMuteAction=} [properties] Properties to set + */ + function MuteAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MuteAction muted. + * @member {boolean} muted + * @memberof proto.MuteAction + * @instance + */ + MuteAction.prototype.muted = false; + + /** + * MuteAction muteEndTimestamp. + * @member {number|Long} muteEndTimestamp + * @memberof proto.MuteAction + * @instance + */ + MuteAction.prototype.muteEndTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new MuteAction instance using the specified properties. + * @function create + * @memberof proto.MuteAction + * @static + * @param {proto.IMuteAction=} [properties] Properties to set + * @returns {proto.MuteAction} MuteAction instance + */ + MuteAction.create = function create(properties) { + return new MuteAction(properties); + }; + + /** + * Encodes the specified MuteAction message. Does not implicitly {@link proto.MuteAction.verify|verify} messages. + * @function encode + * @memberof proto.MuteAction + * @static + * @param {proto.IMuteAction} message MuteAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MuteAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.muted != null && Object.hasOwnProperty.call(message, "muted")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.muted); + if (message.muteEndTimestamp != null && Object.hasOwnProperty.call(message, "muteEndTimestamp")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.muteEndTimestamp); + return writer; + }; + + /** + * Encodes the specified MuteAction message, length delimited. Does not implicitly {@link proto.MuteAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.MuteAction + * @static + * @param {proto.IMuteAction} message MuteAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MuteAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MuteAction message from the specified reader or buffer. + * @function decode + * @memberof proto.MuteAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.MuteAction} MuteAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MuteAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.MuteAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.muted = reader.bool(); + break; + case 2: + message.muteEndTimestamp = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MuteAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.MuteAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.MuteAction} MuteAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MuteAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MuteAction message. + * @function verify + * @memberof proto.MuteAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MuteAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.muted != null && message.hasOwnProperty("muted")) + if (typeof message.muted !== "boolean") + return "muted: boolean expected"; + if (message.muteEndTimestamp != null && message.hasOwnProperty("muteEndTimestamp")) + if (!$util.isInteger(message.muteEndTimestamp) && !(message.muteEndTimestamp && $util.isInteger(message.muteEndTimestamp.low) && $util.isInteger(message.muteEndTimestamp.high))) + return "muteEndTimestamp: integer|Long expected"; + return null; + }; + + /** + * Creates a MuteAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.MuteAction + * @static + * @param {Object.} object Plain object + * @returns {proto.MuteAction} MuteAction + */ + MuteAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.MuteAction) + return object; + var message = new $root.proto.MuteAction(); + if (object.muted != null) + message.muted = Boolean(object.muted); + if (object.muteEndTimestamp != null) + if ($util.Long) + (message.muteEndTimestamp = $util.Long.fromValue(object.muteEndTimestamp)).unsigned = false; + else if (typeof object.muteEndTimestamp === "string") + message.muteEndTimestamp = parseInt(object.muteEndTimestamp, 10); + else if (typeof object.muteEndTimestamp === "number") + message.muteEndTimestamp = object.muteEndTimestamp; + else if (typeof object.muteEndTimestamp === "object") + message.muteEndTimestamp = new $util.LongBits(object.muteEndTimestamp.low >>> 0, object.muteEndTimestamp.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a MuteAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.MuteAction + * @static + * @param {proto.MuteAction} message MuteAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MuteAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.muted = false; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.muteEndTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.muteEndTimestamp = options.longs === String ? "0" : 0; + } + if (message.muted != null && message.hasOwnProperty("muted")) + object.muted = message.muted; + if (message.muteEndTimestamp != null && message.hasOwnProperty("muteEndTimestamp")) + if (typeof message.muteEndTimestamp === "number") + object.muteEndTimestamp = options.longs === String ? String(message.muteEndTimestamp) : message.muteEndTimestamp; + else + object.muteEndTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.muteEndTimestamp) : options.longs === Number ? new $util.LongBits(message.muteEndTimestamp.low >>> 0, message.muteEndTimestamp.high >>> 0).toNumber() : message.muteEndTimestamp; + return object; + }; + + /** + * Converts this MuteAction to JSON. + * @function toJSON + * @memberof proto.MuteAction + * @instance + * @returns {Object.} JSON object + */ + MuteAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MuteAction; + })(); + proto.NativeFlowButton = (function() { /** @@ -24079,6 +38391,811 @@ $root.proto = (function() { return NativeFlowResponseMessage; })(); + proto.NoiseCertificate = (function() { + + /** + * Properties of a NoiseCertificate. + * @memberof proto + * @interface INoiseCertificate + * @property {Uint8Array|null} [details] NoiseCertificate details + * @property {Uint8Array|null} [signature] NoiseCertificate signature + */ + + /** + * Constructs a new NoiseCertificate. + * @memberof proto + * @classdesc Represents a NoiseCertificate. + * @implements INoiseCertificate + * @constructor + * @param {proto.INoiseCertificate=} [properties] Properties to set + */ + function NoiseCertificate(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NoiseCertificate details. + * @member {Uint8Array} details + * @memberof proto.NoiseCertificate + * @instance + */ + NoiseCertificate.prototype.details = $util.newBuffer([]); + + /** + * NoiseCertificate signature. + * @member {Uint8Array} signature + * @memberof proto.NoiseCertificate + * @instance + */ + NoiseCertificate.prototype.signature = $util.newBuffer([]); + + /** + * Creates a new NoiseCertificate instance using the specified properties. + * @function create + * @memberof proto.NoiseCertificate + * @static + * @param {proto.INoiseCertificate=} [properties] Properties to set + * @returns {proto.NoiseCertificate} NoiseCertificate instance + */ + NoiseCertificate.create = function create(properties) { + return new NoiseCertificate(properties); + }; + + /** + * Encodes the specified NoiseCertificate message. Does not implicitly {@link proto.NoiseCertificate.verify|verify} messages. + * @function encode + * @memberof proto.NoiseCertificate + * @static + * @param {proto.INoiseCertificate} message NoiseCertificate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NoiseCertificate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.details != null && Object.hasOwnProperty.call(message, "details")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.details); + if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.signature); + return writer; + }; + + /** + * Encodes the specified NoiseCertificate message, length delimited. Does not implicitly {@link proto.NoiseCertificate.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.NoiseCertificate + * @static + * @param {proto.INoiseCertificate} message NoiseCertificate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NoiseCertificate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NoiseCertificate message from the specified reader or buffer. + * @function decode + * @memberof proto.NoiseCertificate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.NoiseCertificate} NoiseCertificate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NoiseCertificate.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.NoiseCertificate(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.details = reader.bytes(); + break; + case 2: + message.signature = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NoiseCertificate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.NoiseCertificate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.NoiseCertificate} NoiseCertificate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NoiseCertificate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NoiseCertificate message. + * @function verify + * @memberof proto.NoiseCertificate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NoiseCertificate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.details != null && message.hasOwnProperty("details")) + if (!(message.details && typeof message.details.length === "number" || $util.isString(message.details))) + return "details: buffer expected"; + if (message.signature != null && message.hasOwnProperty("signature")) + if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) + return "signature: buffer expected"; + return null; + }; + + /** + * Creates a NoiseCertificate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.NoiseCertificate + * @static + * @param {Object.} object Plain object + * @returns {proto.NoiseCertificate} NoiseCertificate + */ + NoiseCertificate.fromObject = function fromObject(object) { + if (object instanceof $root.proto.NoiseCertificate) + return object; + var message = new $root.proto.NoiseCertificate(); + if (object.details != null) + if (typeof object.details === "string") + $util.base64.decode(object.details, message.details = $util.newBuffer($util.base64.length(object.details)), 0); + else if (object.details.length) + message.details = object.details; + if (object.signature != null) + if (typeof object.signature === "string") + $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); + else if (object.signature.length) + message.signature = object.signature; + return message; + }; + + /** + * Creates a plain object from a NoiseCertificate message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.NoiseCertificate + * @static + * @param {proto.NoiseCertificate} message NoiseCertificate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NoiseCertificate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.details = ""; + else { + object.details = []; + if (options.bytes !== Array) + object.details = $util.newBuffer(object.details); + } + if (options.bytes === String) + object.signature = ""; + else { + object.signature = []; + if (options.bytes !== Array) + object.signature = $util.newBuffer(object.signature); + } + } + if (message.details != null && message.hasOwnProperty("details")) + object.details = options.bytes === String ? $util.base64.encode(message.details, 0, message.details.length) : options.bytes === Array ? Array.prototype.slice.call(message.details) : message.details; + if (message.signature != null && message.hasOwnProperty("signature")) + object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; + return object; + }; + + /** + * Converts this NoiseCertificate to JSON. + * @function toJSON + * @memberof proto.NoiseCertificate + * @instance + * @returns {Object.} JSON object + */ + NoiseCertificate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return NoiseCertificate; + })(); + + proto.NoiseCertificateDetails = (function() { + + /** + * Properties of a NoiseCertificateDetails. + * @memberof proto + * @interface INoiseCertificateDetails + * @property {number|null} [serial] NoiseCertificateDetails serial + * @property {string|null} [issuer] NoiseCertificateDetails issuer + * @property {number|Long|null} [expires] NoiseCertificateDetails expires + * @property {string|null} [subject] NoiseCertificateDetails subject + * @property {Uint8Array|null} [key] NoiseCertificateDetails key + */ + + /** + * Constructs a new NoiseCertificateDetails. + * @memberof proto + * @classdesc Represents a NoiseCertificateDetails. + * @implements INoiseCertificateDetails + * @constructor + * @param {proto.INoiseCertificateDetails=} [properties] Properties to set + */ + function NoiseCertificateDetails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NoiseCertificateDetails serial. + * @member {number} serial + * @memberof proto.NoiseCertificateDetails + * @instance + */ + NoiseCertificateDetails.prototype.serial = 0; + + /** + * NoiseCertificateDetails issuer. + * @member {string} issuer + * @memberof proto.NoiseCertificateDetails + * @instance + */ + NoiseCertificateDetails.prototype.issuer = ""; + + /** + * NoiseCertificateDetails expires. + * @member {number|Long} expires + * @memberof proto.NoiseCertificateDetails + * @instance + */ + NoiseCertificateDetails.prototype.expires = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * NoiseCertificateDetails subject. + * @member {string} subject + * @memberof proto.NoiseCertificateDetails + * @instance + */ + NoiseCertificateDetails.prototype.subject = ""; + + /** + * NoiseCertificateDetails key. + * @member {Uint8Array} key + * @memberof proto.NoiseCertificateDetails + * @instance + */ + NoiseCertificateDetails.prototype.key = $util.newBuffer([]); + + /** + * Creates a new NoiseCertificateDetails instance using the specified properties. + * @function create + * @memberof proto.NoiseCertificateDetails + * @static + * @param {proto.INoiseCertificateDetails=} [properties] Properties to set + * @returns {proto.NoiseCertificateDetails} NoiseCertificateDetails instance + */ + NoiseCertificateDetails.create = function create(properties) { + return new NoiseCertificateDetails(properties); + }; + + /** + * Encodes the specified NoiseCertificateDetails message. Does not implicitly {@link proto.NoiseCertificateDetails.verify|verify} messages. + * @function encode + * @memberof proto.NoiseCertificateDetails + * @static + * @param {proto.INoiseCertificateDetails} message NoiseCertificateDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NoiseCertificateDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.serial != null && Object.hasOwnProperty.call(message, "serial")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.serial); + if (message.issuer != null && Object.hasOwnProperty.call(message, "issuer")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.issuer); + if (message.expires != null && Object.hasOwnProperty.call(message, "expires")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.expires); + if (message.subject != null && Object.hasOwnProperty.call(message, "subject")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.subject); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.key); + return writer; + }; + + /** + * Encodes the specified NoiseCertificateDetails message, length delimited. Does not implicitly {@link proto.NoiseCertificateDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.NoiseCertificateDetails + * @static + * @param {proto.INoiseCertificateDetails} message NoiseCertificateDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NoiseCertificateDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NoiseCertificateDetails message from the specified reader or buffer. + * @function decode + * @memberof proto.NoiseCertificateDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.NoiseCertificateDetails} NoiseCertificateDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NoiseCertificateDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.NoiseCertificateDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.serial = reader.uint32(); + break; + case 2: + message.issuer = reader.string(); + break; + case 3: + message.expires = reader.uint64(); + break; + case 4: + message.subject = reader.string(); + break; + case 5: + message.key = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NoiseCertificateDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.NoiseCertificateDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.NoiseCertificateDetails} NoiseCertificateDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NoiseCertificateDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NoiseCertificateDetails message. + * @function verify + * @memberof proto.NoiseCertificateDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NoiseCertificateDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.serial != null && message.hasOwnProperty("serial")) + if (!$util.isInteger(message.serial)) + return "serial: integer expected"; + if (message.issuer != null && message.hasOwnProperty("issuer")) + if (!$util.isString(message.issuer)) + return "issuer: string expected"; + if (message.expires != null && message.hasOwnProperty("expires")) + if (!$util.isInteger(message.expires) && !(message.expires && $util.isInteger(message.expires.low) && $util.isInteger(message.expires.high))) + return "expires: integer|Long expected"; + if (message.subject != null && message.hasOwnProperty("subject")) + if (!$util.isString(message.subject)) + return "subject: string expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + return null; + }; + + /** + * Creates a NoiseCertificateDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.NoiseCertificateDetails + * @static + * @param {Object.} object Plain object + * @returns {proto.NoiseCertificateDetails} NoiseCertificateDetails + */ + NoiseCertificateDetails.fromObject = function fromObject(object) { + if (object instanceof $root.proto.NoiseCertificateDetails) + return object; + var message = new $root.proto.NoiseCertificateDetails(); + if (object.serial != null) + message.serial = object.serial >>> 0; + if (object.issuer != null) + message.issuer = String(object.issuer); + if (object.expires != null) + if ($util.Long) + (message.expires = $util.Long.fromValue(object.expires)).unsigned = true; + else if (typeof object.expires === "string") + message.expires = parseInt(object.expires, 10); + else if (typeof object.expires === "number") + message.expires = object.expires; + else if (typeof object.expires === "object") + message.expires = new $util.LongBits(object.expires.low >>> 0, object.expires.high >>> 0).toNumber(true); + if (object.subject != null) + message.subject = String(object.subject); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length) + message.key = object.key; + return message; + }; + + /** + * Creates a plain object from a NoiseCertificateDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.NoiseCertificateDetails + * @static + * @param {proto.NoiseCertificateDetails} message NoiseCertificateDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NoiseCertificateDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.serial = 0; + object.issuer = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.expires = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.expires = options.longs === String ? "0" : 0; + object.subject = ""; + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + } + if (message.serial != null && message.hasOwnProperty("serial")) + object.serial = message.serial; + if (message.issuer != null && message.hasOwnProperty("issuer")) + object.issuer = message.issuer; + if (message.expires != null && message.hasOwnProperty("expires")) + if (typeof message.expires === "number") + object.expires = options.longs === String ? String(message.expires) : message.expires; + else + object.expires = options.longs === String ? $util.Long.prototype.toString.call(message.expires) : options.longs === Number ? new $util.LongBits(message.expires.low >>> 0, message.expires.high >>> 0).toNumber(true) : message.expires; + if (message.subject != null && message.hasOwnProperty("subject")) + object.subject = message.subject; + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + return object; + }; + + /** + * Converts this NoiseCertificateDetails to JSON. + * @function toJSON + * @memberof proto.NoiseCertificateDetails + * @instance + * @returns {Object.} JSON object + */ + NoiseCertificateDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return NoiseCertificateDetails; + })(); + + proto.NotificationMessageInfo = (function() { + + /** + * Properties of a NotificationMessageInfo. + * @memberof proto + * @interface INotificationMessageInfo + * @property {proto.IMessageKey|null} [key] NotificationMessageInfo key + * @property {proto.IMessage|null} [message] NotificationMessageInfo message + * @property {number|Long|null} [messageTimestamp] NotificationMessageInfo messageTimestamp + * @property {string|null} [participant] NotificationMessageInfo participant + */ + + /** + * Constructs a new NotificationMessageInfo. + * @memberof proto + * @classdesc Represents a NotificationMessageInfo. + * @implements INotificationMessageInfo + * @constructor + * @param {proto.INotificationMessageInfo=} [properties] Properties to set + */ + function NotificationMessageInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NotificationMessageInfo key. + * @member {proto.IMessageKey|null|undefined} key + * @memberof proto.NotificationMessageInfo + * @instance + */ + NotificationMessageInfo.prototype.key = null; + + /** + * NotificationMessageInfo message. + * @member {proto.IMessage|null|undefined} message + * @memberof proto.NotificationMessageInfo + * @instance + */ + NotificationMessageInfo.prototype.message = null; + + /** + * NotificationMessageInfo messageTimestamp. + * @member {number|Long} messageTimestamp + * @memberof proto.NotificationMessageInfo + * @instance + */ + NotificationMessageInfo.prototype.messageTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * NotificationMessageInfo participant. + * @member {string} participant + * @memberof proto.NotificationMessageInfo + * @instance + */ + NotificationMessageInfo.prototype.participant = ""; + + /** + * Creates a new NotificationMessageInfo instance using the specified properties. + * @function create + * @memberof proto.NotificationMessageInfo + * @static + * @param {proto.INotificationMessageInfo=} [properties] Properties to set + * @returns {proto.NotificationMessageInfo} NotificationMessageInfo instance + */ + NotificationMessageInfo.create = function create(properties) { + return new NotificationMessageInfo(properties); + }; + + /** + * Encodes the specified NotificationMessageInfo message. Does not implicitly {@link proto.NotificationMessageInfo.verify|verify} messages. + * @function encode + * @memberof proto.NotificationMessageInfo + * @static + * @param {proto.INotificationMessageInfo} message NotificationMessageInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NotificationMessageInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + $root.proto.MessageKey.encode(message.key, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + $root.proto.Message.encode(message.message, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.messageTimestamp != null && Object.hasOwnProperty.call(message, "messageTimestamp")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.messageTimestamp); + if (message.participant != null && Object.hasOwnProperty.call(message, "participant")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.participant); + return writer; + }; + + /** + * Encodes the specified NotificationMessageInfo message, length delimited. Does not implicitly {@link proto.NotificationMessageInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.NotificationMessageInfo + * @static + * @param {proto.INotificationMessageInfo} message NotificationMessageInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NotificationMessageInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NotificationMessageInfo message from the specified reader or buffer. + * @function decode + * @memberof proto.NotificationMessageInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.NotificationMessageInfo} NotificationMessageInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NotificationMessageInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.NotificationMessageInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + case 2: + message.message = $root.proto.Message.decode(reader, reader.uint32()); + break; + case 3: + message.messageTimestamp = reader.uint64(); + break; + case 4: + message.participant = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NotificationMessageInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.NotificationMessageInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.NotificationMessageInfo} NotificationMessageInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NotificationMessageInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NotificationMessageInfo message. + * @function verify + * @memberof proto.NotificationMessageInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NotificationMessageInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) { + var error = $root.proto.MessageKey.verify(message.key); + if (error) + return "key." + error; + } + if (message.message != null && message.hasOwnProperty("message")) { + var error = $root.proto.Message.verify(message.message); + if (error) + return "message." + error; + } + if (message.messageTimestamp != null && message.hasOwnProperty("messageTimestamp")) + if (!$util.isInteger(message.messageTimestamp) && !(message.messageTimestamp && $util.isInteger(message.messageTimestamp.low) && $util.isInteger(message.messageTimestamp.high))) + return "messageTimestamp: integer|Long expected"; + if (message.participant != null && message.hasOwnProperty("participant")) + if (!$util.isString(message.participant)) + return "participant: string expected"; + return null; + }; + + /** + * Creates a NotificationMessageInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.NotificationMessageInfo + * @static + * @param {Object.} object Plain object + * @returns {proto.NotificationMessageInfo} NotificationMessageInfo + */ + NotificationMessageInfo.fromObject = function fromObject(object) { + if (object instanceof $root.proto.NotificationMessageInfo) + return object; + var message = new $root.proto.NotificationMessageInfo(); + if (object.key != null) { + if (typeof object.key !== "object") + throw TypeError(".proto.NotificationMessageInfo.key: object expected"); + message.key = $root.proto.MessageKey.fromObject(object.key); + } + if (object.message != null) { + if (typeof object.message !== "object") + throw TypeError(".proto.NotificationMessageInfo.message: object expected"); + message.message = $root.proto.Message.fromObject(object.message); + } + if (object.messageTimestamp != null) + if ($util.Long) + (message.messageTimestamp = $util.Long.fromValue(object.messageTimestamp)).unsigned = true; + else if (typeof object.messageTimestamp === "string") + message.messageTimestamp = parseInt(object.messageTimestamp, 10); + else if (typeof object.messageTimestamp === "number") + message.messageTimestamp = object.messageTimestamp; + else if (typeof object.messageTimestamp === "object") + message.messageTimestamp = new $util.LongBits(object.messageTimestamp.low >>> 0, object.messageTimestamp.high >>> 0).toNumber(true); + if (object.participant != null) + message.participant = String(object.participant); + return message; + }; + + /** + * Creates a plain object from a NotificationMessageInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.NotificationMessageInfo + * @static + * @param {proto.NotificationMessageInfo} message NotificationMessageInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NotificationMessageInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.key = null; + object.message = null; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.messageTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.messageTimestamp = options.longs === String ? "0" : 0; + object.participant = ""; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = $root.proto.MessageKey.toObject(message.key, options); + if (message.message != null && message.hasOwnProperty("message")) + object.message = $root.proto.Message.toObject(message.message, options); + if (message.messageTimestamp != null && message.hasOwnProperty("messageTimestamp")) + if (typeof message.messageTimestamp === "number") + object.messageTimestamp = options.longs === String ? String(message.messageTimestamp) : message.messageTimestamp; + else + object.messageTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.messageTimestamp) : options.longs === Number ? new $util.LongBits(message.messageTimestamp.low >>> 0, message.messageTimestamp.high >>> 0).toNumber(true) : message.messageTimestamp; + if (message.participant != null && message.hasOwnProperty("participant")) + object.participant = message.participant; + return object; + }; + + /** + * Converts this NotificationMessageInfo to JSON. + * @function toJSON + * @memberof proto.NotificationMessageInfo + * @instance + * @returns {Object.} JSON object + */ + NotificationMessageInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return NotificationMessageInfo; + })(); + proto.Option = (function() { /** @@ -24764,6 +39881,323 @@ $root.proto = (function() { return OrderMessage; })(); + proto.PBMediaData = (function() { + + /** + * Properties of a PBMediaData. + * @memberof proto + * @interface IPBMediaData + * @property {Uint8Array|null} [mediaKey] PBMediaData mediaKey + * @property {number|Long|null} [mediaKeyTimestamp] PBMediaData mediaKeyTimestamp + * @property {Uint8Array|null} [fileSha256] PBMediaData fileSha256 + * @property {Uint8Array|null} [fileEncSha256] PBMediaData fileEncSha256 + * @property {string|null} [directPath] PBMediaData directPath + */ + + /** + * Constructs a new PBMediaData. + * @memberof proto + * @classdesc Represents a PBMediaData. + * @implements IPBMediaData + * @constructor + * @param {proto.IPBMediaData=} [properties] Properties to set + */ + function PBMediaData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PBMediaData mediaKey. + * @member {Uint8Array} mediaKey + * @memberof proto.PBMediaData + * @instance + */ + PBMediaData.prototype.mediaKey = $util.newBuffer([]); + + /** + * PBMediaData mediaKeyTimestamp. + * @member {number|Long} mediaKeyTimestamp + * @memberof proto.PBMediaData + * @instance + */ + PBMediaData.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * PBMediaData fileSha256. + * @member {Uint8Array} fileSha256 + * @memberof proto.PBMediaData + * @instance + */ + PBMediaData.prototype.fileSha256 = $util.newBuffer([]); + + /** + * PBMediaData fileEncSha256. + * @member {Uint8Array} fileEncSha256 + * @memberof proto.PBMediaData + * @instance + */ + PBMediaData.prototype.fileEncSha256 = $util.newBuffer([]); + + /** + * PBMediaData directPath. + * @member {string} directPath + * @memberof proto.PBMediaData + * @instance + */ + PBMediaData.prototype.directPath = ""; + + /** + * Creates a new PBMediaData instance using the specified properties. + * @function create + * @memberof proto.PBMediaData + * @static + * @param {proto.IPBMediaData=} [properties] Properties to set + * @returns {proto.PBMediaData} PBMediaData instance + */ + PBMediaData.create = function create(properties) { + return new PBMediaData(properties); + }; + + /** + * Encodes the specified PBMediaData message. Does not implicitly {@link proto.PBMediaData.verify|verify} messages. + * @function encode + * @memberof proto.PBMediaData + * @static + * @param {proto.IPBMediaData} message PBMediaData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PBMediaData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.mediaKey); + if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.mediaKeyTimestamp); + if (message.fileSha256 != null && Object.hasOwnProperty.call(message, "fileSha256")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.fileSha256); + if (message.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.fileEncSha256); + if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.directPath); + return writer; + }; + + /** + * Encodes the specified PBMediaData message, length delimited. Does not implicitly {@link proto.PBMediaData.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.PBMediaData + * @static + * @param {proto.IPBMediaData} message PBMediaData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PBMediaData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PBMediaData message from the specified reader or buffer. + * @function decode + * @memberof proto.PBMediaData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.PBMediaData} PBMediaData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PBMediaData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.PBMediaData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.mediaKey = reader.bytes(); + break; + case 2: + message.mediaKeyTimestamp = reader.int64(); + break; + case 3: + message.fileSha256 = reader.bytes(); + break; + case 4: + message.fileEncSha256 = reader.bytes(); + break; + case 5: + message.directPath = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PBMediaData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.PBMediaData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.PBMediaData} PBMediaData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PBMediaData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PBMediaData message. + * @function verify + * @memberof proto.PBMediaData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PBMediaData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) + if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey))) + return "mediaKey: buffer expected"; + if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) + if (!$util.isInteger(message.mediaKeyTimestamp) && !(message.mediaKeyTimestamp && $util.isInteger(message.mediaKeyTimestamp.low) && $util.isInteger(message.mediaKeyTimestamp.high))) + return "mediaKeyTimestamp: integer|Long expected"; + if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256))) + return "fileSha256: buffer expected"; + if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) + if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256))) + return "fileEncSha256: buffer expected"; + if (message.directPath != null && message.hasOwnProperty("directPath")) + if (!$util.isString(message.directPath)) + return "directPath: string expected"; + return null; + }; + + /** + * Creates a PBMediaData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.PBMediaData + * @static + * @param {Object.} object Plain object + * @returns {proto.PBMediaData} PBMediaData + */ + PBMediaData.fromObject = function fromObject(object) { + if (object instanceof $root.proto.PBMediaData) + return object; + var message = new $root.proto.PBMediaData(); + if (object.mediaKey != null) + if (typeof object.mediaKey === "string") + $util.base64.decode(object.mediaKey, message.mediaKey = $util.newBuffer($util.base64.length(object.mediaKey)), 0); + else if (object.mediaKey.length) + message.mediaKey = object.mediaKey; + if (object.mediaKeyTimestamp != null) + if ($util.Long) + (message.mediaKeyTimestamp = $util.Long.fromValue(object.mediaKeyTimestamp)).unsigned = false; + else if (typeof object.mediaKeyTimestamp === "string") + message.mediaKeyTimestamp = parseInt(object.mediaKeyTimestamp, 10); + else if (typeof object.mediaKeyTimestamp === "number") + message.mediaKeyTimestamp = object.mediaKeyTimestamp; + else if (typeof object.mediaKeyTimestamp === "object") + message.mediaKeyTimestamp = new $util.LongBits(object.mediaKeyTimestamp.low >>> 0, object.mediaKeyTimestamp.high >>> 0).toNumber(); + if (object.fileSha256 != null) + if (typeof object.fileSha256 === "string") + $util.base64.decode(object.fileSha256, message.fileSha256 = $util.newBuffer($util.base64.length(object.fileSha256)), 0); + else if (object.fileSha256.length) + message.fileSha256 = object.fileSha256; + if (object.fileEncSha256 != null) + if (typeof object.fileEncSha256 === "string") + $util.base64.decode(object.fileEncSha256, message.fileEncSha256 = $util.newBuffer($util.base64.length(object.fileEncSha256)), 0); + else if (object.fileEncSha256.length) + message.fileEncSha256 = object.fileEncSha256; + if (object.directPath != null) + message.directPath = String(object.directPath); + return message; + }; + + /** + * Creates a plain object from a PBMediaData message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.PBMediaData + * @static + * @param {proto.PBMediaData} message PBMediaData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PBMediaData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.mediaKey = ""; + else { + object.mediaKey = []; + if (options.bytes !== Array) + object.mediaKey = $util.newBuffer(object.mediaKey); + } + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.mediaKeyTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.mediaKeyTimestamp = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.fileSha256 = ""; + else { + object.fileSha256 = []; + if (options.bytes !== Array) + object.fileSha256 = $util.newBuffer(object.fileSha256); + } + if (options.bytes === String) + object.fileEncSha256 = ""; + else { + object.fileEncSha256 = []; + if (options.bytes !== Array) + object.fileEncSha256 = $util.newBuffer(object.fileEncSha256); + } + object.directPath = ""; + } + if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) + object.mediaKey = options.bytes === String ? $util.base64.encode(message.mediaKey, 0, message.mediaKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.mediaKey) : message.mediaKey; + if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) + if (typeof message.mediaKeyTimestamp === "number") + object.mediaKeyTimestamp = options.longs === String ? String(message.mediaKeyTimestamp) : message.mediaKeyTimestamp; + else + object.mediaKeyTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.mediaKeyTimestamp) : options.longs === Number ? new $util.LongBits(message.mediaKeyTimestamp.low >>> 0, message.mediaKeyTimestamp.high >>> 0).toNumber() : message.mediaKeyTimestamp; + if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + object.fileSha256 = options.bytes === String ? $util.base64.encode(message.fileSha256, 0, message.fileSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileSha256) : message.fileSha256; + if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) + object.fileEncSha256 = options.bytes === String ? $util.base64.encode(message.fileEncSha256, 0, message.fileEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileEncSha256) : message.fileEncSha256; + if (message.directPath != null && message.hasOwnProperty("directPath")) + object.directPath = message.directPath; + return object; + }; + + /** + * Converts this PBMediaData to JSON. + * @function toJSON + * @memberof proto.PBMediaData + * @instance + * @returns {Object.} JSON object + */ + PBMediaData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PBMediaData; + })(); + proto.PaymentBackground = (function() { /** @@ -25196,6 +40630,876 @@ $root.proto = (function() { return PaymentBackground; })(); + proto.PaymentInfo = (function() { + + /** + * Properties of a PaymentInfo. + * @memberof proto + * @interface IPaymentInfo + * @property {proto.PaymentInfo.PaymentInfoCurrency|null} [currencyDeprecated] PaymentInfo currencyDeprecated + * @property {number|Long|null} [amount1000] PaymentInfo amount1000 + * @property {string|null} [receiverJid] PaymentInfo receiverJid + * @property {proto.PaymentInfo.PaymentInfoStatus|null} [status] PaymentInfo status + * @property {number|Long|null} [transactionTimestamp] PaymentInfo transactionTimestamp + * @property {proto.IMessageKey|null} [requestMessageKey] PaymentInfo requestMessageKey + * @property {number|Long|null} [expiryTimestamp] PaymentInfo expiryTimestamp + * @property {boolean|null} [futureproofed] PaymentInfo futureproofed + * @property {string|null} [currency] PaymentInfo currency + * @property {proto.PaymentInfo.PaymentInfoTxnStatus|null} [txnStatus] PaymentInfo txnStatus + * @property {boolean|null} [useNoviFiatFormat] PaymentInfo useNoviFiatFormat + * @property {proto.IMoney|null} [primaryAmount] PaymentInfo primaryAmount + * @property {proto.IMoney|null} [exchangeAmount] PaymentInfo exchangeAmount + */ + + /** + * Constructs a new PaymentInfo. + * @memberof proto + * @classdesc Represents a PaymentInfo. + * @implements IPaymentInfo + * @constructor + * @param {proto.IPaymentInfo=} [properties] Properties to set + */ + function PaymentInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PaymentInfo currencyDeprecated. + * @member {proto.PaymentInfo.PaymentInfoCurrency} currencyDeprecated + * @memberof proto.PaymentInfo + * @instance + */ + PaymentInfo.prototype.currencyDeprecated = 0; + + /** + * PaymentInfo amount1000. + * @member {number|Long} amount1000 + * @memberof proto.PaymentInfo + * @instance + */ + PaymentInfo.prototype.amount1000 = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * PaymentInfo receiverJid. + * @member {string} receiverJid + * @memberof proto.PaymentInfo + * @instance + */ + PaymentInfo.prototype.receiverJid = ""; + + /** + * PaymentInfo status. + * @member {proto.PaymentInfo.PaymentInfoStatus} status + * @memberof proto.PaymentInfo + * @instance + */ + PaymentInfo.prototype.status = 0; + + /** + * PaymentInfo transactionTimestamp. + * @member {number|Long} transactionTimestamp + * @memberof proto.PaymentInfo + * @instance + */ + PaymentInfo.prototype.transactionTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * PaymentInfo requestMessageKey. + * @member {proto.IMessageKey|null|undefined} requestMessageKey + * @memberof proto.PaymentInfo + * @instance + */ + PaymentInfo.prototype.requestMessageKey = null; + + /** + * PaymentInfo expiryTimestamp. + * @member {number|Long} expiryTimestamp + * @memberof proto.PaymentInfo + * @instance + */ + PaymentInfo.prototype.expiryTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * PaymentInfo futureproofed. + * @member {boolean} futureproofed + * @memberof proto.PaymentInfo + * @instance + */ + PaymentInfo.prototype.futureproofed = false; + + /** + * PaymentInfo currency. + * @member {string} currency + * @memberof proto.PaymentInfo + * @instance + */ + PaymentInfo.prototype.currency = ""; + + /** + * PaymentInfo txnStatus. + * @member {proto.PaymentInfo.PaymentInfoTxnStatus} txnStatus + * @memberof proto.PaymentInfo + * @instance + */ + PaymentInfo.prototype.txnStatus = 0; + + /** + * PaymentInfo useNoviFiatFormat. + * @member {boolean} useNoviFiatFormat + * @memberof proto.PaymentInfo + * @instance + */ + PaymentInfo.prototype.useNoviFiatFormat = false; + + /** + * PaymentInfo primaryAmount. + * @member {proto.IMoney|null|undefined} primaryAmount + * @memberof proto.PaymentInfo + * @instance + */ + PaymentInfo.prototype.primaryAmount = null; + + /** + * PaymentInfo exchangeAmount. + * @member {proto.IMoney|null|undefined} exchangeAmount + * @memberof proto.PaymentInfo + * @instance + */ + PaymentInfo.prototype.exchangeAmount = null; + + /** + * Creates a new PaymentInfo instance using the specified properties. + * @function create + * @memberof proto.PaymentInfo + * @static + * @param {proto.IPaymentInfo=} [properties] Properties to set + * @returns {proto.PaymentInfo} PaymentInfo instance + */ + PaymentInfo.create = function create(properties) { + return new PaymentInfo(properties); + }; + + /** + * Encodes the specified PaymentInfo message. Does not implicitly {@link proto.PaymentInfo.verify|verify} messages. + * @function encode + * @memberof proto.PaymentInfo + * @static + * @param {proto.IPaymentInfo} message PaymentInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PaymentInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.currencyDeprecated != null && Object.hasOwnProperty.call(message, "currencyDeprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.currencyDeprecated); + if (message.amount1000 != null && Object.hasOwnProperty.call(message, "amount1000")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.amount1000); + if (message.receiverJid != null && Object.hasOwnProperty.call(message, "receiverJid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.receiverJid); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.status); + if (message.transactionTimestamp != null && Object.hasOwnProperty.call(message, "transactionTimestamp")) + writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.transactionTimestamp); + if (message.requestMessageKey != null && Object.hasOwnProperty.call(message, "requestMessageKey")) + $root.proto.MessageKey.encode(message.requestMessageKey, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.expiryTimestamp != null && Object.hasOwnProperty.call(message, "expiryTimestamp")) + writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.expiryTimestamp); + if (message.futureproofed != null && Object.hasOwnProperty.call(message, "futureproofed")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.futureproofed); + if (message.currency != null && Object.hasOwnProperty.call(message, "currency")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.currency); + if (message.txnStatus != null && Object.hasOwnProperty.call(message, "txnStatus")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.txnStatus); + if (message.useNoviFiatFormat != null && Object.hasOwnProperty.call(message, "useNoviFiatFormat")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.useNoviFiatFormat); + if (message.primaryAmount != null && Object.hasOwnProperty.call(message, "primaryAmount")) + $root.proto.Money.encode(message.primaryAmount, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.exchangeAmount != null && Object.hasOwnProperty.call(message, "exchangeAmount")) + $root.proto.Money.encode(message.exchangeAmount, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PaymentInfo message, length delimited. Does not implicitly {@link proto.PaymentInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.PaymentInfo + * @static + * @param {proto.IPaymentInfo} message PaymentInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PaymentInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PaymentInfo message from the specified reader or buffer. + * @function decode + * @memberof proto.PaymentInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.PaymentInfo} PaymentInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PaymentInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.PaymentInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.currencyDeprecated = reader.int32(); + break; + case 2: + message.amount1000 = reader.uint64(); + break; + case 3: + message.receiverJid = reader.string(); + break; + case 4: + message.status = reader.int32(); + break; + case 5: + message.transactionTimestamp = reader.uint64(); + break; + case 6: + message.requestMessageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + case 7: + message.expiryTimestamp = reader.uint64(); + break; + case 8: + message.futureproofed = reader.bool(); + break; + case 9: + message.currency = reader.string(); + break; + case 10: + message.txnStatus = reader.int32(); + break; + case 11: + message.useNoviFiatFormat = reader.bool(); + break; + case 12: + message.primaryAmount = $root.proto.Money.decode(reader, reader.uint32()); + break; + case 13: + message.exchangeAmount = $root.proto.Money.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PaymentInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.PaymentInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.PaymentInfo} PaymentInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PaymentInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PaymentInfo message. + * @function verify + * @memberof proto.PaymentInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PaymentInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.currencyDeprecated != null && message.hasOwnProperty("currencyDeprecated")) + switch (message.currencyDeprecated) { + default: + return "currencyDeprecated: enum value expected"; + case 0: + case 1: + break; + } + if (message.amount1000 != null && message.hasOwnProperty("amount1000")) + if (!$util.isInteger(message.amount1000) && !(message.amount1000 && $util.isInteger(message.amount1000.low) && $util.isInteger(message.amount1000.high))) + return "amount1000: integer|Long expected"; + if (message.receiverJid != null && message.hasOwnProperty("receiverJid")) + if (!$util.isString(message.receiverJid)) + return "receiverJid: string expected"; + if (message.status != null && message.hasOwnProperty("status")) + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + break; + } + if (message.transactionTimestamp != null && message.hasOwnProperty("transactionTimestamp")) + if (!$util.isInteger(message.transactionTimestamp) && !(message.transactionTimestamp && $util.isInteger(message.transactionTimestamp.low) && $util.isInteger(message.transactionTimestamp.high))) + return "transactionTimestamp: integer|Long expected"; + if (message.requestMessageKey != null && message.hasOwnProperty("requestMessageKey")) { + var error = $root.proto.MessageKey.verify(message.requestMessageKey); + if (error) + return "requestMessageKey." + error; + } + if (message.expiryTimestamp != null && message.hasOwnProperty("expiryTimestamp")) + if (!$util.isInteger(message.expiryTimestamp) && !(message.expiryTimestamp && $util.isInteger(message.expiryTimestamp.low) && $util.isInteger(message.expiryTimestamp.high))) + return "expiryTimestamp: integer|Long expected"; + if (message.futureproofed != null && message.hasOwnProperty("futureproofed")) + if (typeof message.futureproofed !== "boolean") + return "futureproofed: boolean expected"; + if (message.currency != null && message.hasOwnProperty("currency")) + if (!$util.isString(message.currency)) + return "currency: string expected"; + if (message.txnStatus != null && message.hasOwnProperty("txnStatus")) + switch (message.txnStatus) { + default: + return "txnStatus: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + case 24: + case 25: + case 26: + case 27: + case 28: + case 29: + case 30: + case 31: + break; + } + if (message.useNoviFiatFormat != null && message.hasOwnProperty("useNoviFiatFormat")) + if (typeof message.useNoviFiatFormat !== "boolean") + return "useNoviFiatFormat: boolean expected"; + if (message.primaryAmount != null && message.hasOwnProperty("primaryAmount")) { + var error = $root.proto.Money.verify(message.primaryAmount); + if (error) + return "primaryAmount." + error; + } + if (message.exchangeAmount != null && message.hasOwnProperty("exchangeAmount")) { + var error = $root.proto.Money.verify(message.exchangeAmount); + if (error) + return "exchangeAmount." + error; + } + return null; + }; + + /** + * Creates a PaymentInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.PaymentInfo + * @static + * @param {Object.} object Plain object + * @returns {proto.PaymentInfo} PaymentInfo + */ + PaymentInfo.fromObject = function fromObject(object) { + if (object instanceof $root.proto.PaymentInfo) + return object; + var message = new $root.proto.PaymentInfo(); + switch (object.currencyDeprecated) { + case "UNKNOWN_CURRENCY": + case 0: + message.currencyDeprecated = 0; + break; + case "INR": + case 1: + message.currencyDeprecated = 1; + break; + } + if (object.amount1000 != null) + if ($util.Long) + (message.amount1000 = $util.Long.fromValue(object.amount1000)).unsigned = true; + else if (typeof object.amount1000 === "string") + message.amount1000 = parseInt(object.amount1000, 10); + else if (typeof object.amount1000 === "number") + message.amount1000 = object.amount1000; + else if (typeof object.amount1000 === "object") + message.amount1000 = new $util.LongBits(object.amount1000.low >>> 0, object.amount1000.high >>> 0).toNumber(true); + if (object.receiverJid != null) + message.receiverJid = String(object.receiverJid); + switch (object.status) { + case "UNKNOWN_STATUS": + case 0: + message.status = 0; + break; + case "PROCESSING": + case 1: + message.status = 1; + break; + case "SENT": + case 2: + message.status = 2; + break; + case "NEED_TO_ACCEPT": + case 3: + message.status = 3; + break; + case "COMPLETE": + case 4: + message.status = 4; + break; + case "COULD_NOT_COMPLETE": + case 5: + message.status = 5; + break; + case "REFUNDED": + case 6: + message.status = 6; + break; + case "EXPIRED": + case 7: + message.status = 7; + break; + case "REJECTED": + case 8: + message.status = 8; + break; + case "CANCELLED": + case 9: + message.status = 9; + break; + case "WAITING_FOR_PAYER": + case 10: + message.status = 10; + break; + case "WAITING": + case 11: + message.status = 11; + break; + } + if (object.transactionTimestamp != null) + if ($util.Long) + (message.transactionTimestamp = $util.Long.fromValue(object.transactionTimestamp)).unsigned = true; + else if (typeof object.transactionTimestamp === "string") + message.transactionTimestamp = parseInt(object.transactionTimestamp, 10); + else if (typeof object.transactionTimestamp === "number") + message.transactionTimestamp = object.transactionTimestamp; + else if (typeof object.transactionTimestamp === "object") + message.transactionTimestamp = new $util.LongBits(object.transactionTimestamp.low >>> 0, object.transactionTimestamp.high >>> 0).toNumber(true); + if (object.requestMessageKey != null) { + if (typeof object.requestMessageKey !== "object") + throw TypeError(".proto.PaymentInfo.requestMessageKey: object expected"); + message.requestMessageKey = $root.proto.MessageKey.fromObject(object.requestMessageKey); + } + if (object.expiryTimestamp != null) + if ($util.Long) + (message.expiryTimestamp = $util.Long.fromValue(object.expiryTimestamp)).unsigned = true; + else if (typeof object.expiryTimestamp === "string") + message.expiryTimestamp = parseInt(object.expiryTimestamp, 10); + else if (typeof object.expiryTimestamp === "number") + message.expiryTimestamp = object.expiryTimestamp; + else if (typeof object.expiryTimestamp === "object") + message.expiryTimestamp = new $util.LongBits(object.expiryTimestamp.low >>> 0, object.expiryTimestamp.high >>> 0).toNumber(true); + if (object.futureproofed != null) + message.futureproofed = Boolean(object.futureproofed); + if (object.currency != null) + message.currency = String(object.currency); + switch (object.txnStatus) { + case "UNKNOWN": + case 0: + message.txnStatus = 0; + break; + case "PENDING_SETUP": + case 1: + message.txnStatus = 1; + break; + case "PENDING_RECEIVER_SETUP": + case 2: + message.txnStatus = 2; + break; + case "INIT": + case 3: + message.txnStatus = 3; + break; + case "SUCCESS": + case 4: + message.txnStatus = 4; + break; + case "COMPLETED": + case 5: + message.txnStatus = 5; + break; + case "FAILED": + case 6: + message.txnStatus = 6; + break; + case "FAILED_RISK": + case 7: + message.txnStatus = 7; + break; + case "FAILED_PROCESSING": + case 8: + message.txnStatus = 8; + break; + case "FAILED_RECEIVER_PROCESSING": + case 9: + message.txnStatus = 9; + break; + case "FAILED_DA": + case 10: + message.txnStatus = 10; + break; + case "FAILED_DA_FINAL": + case 11: + message.txnStatus = 11; + break; + case "REFUNDED_TXN": + case 12: + message.txnStatus = 12; + break; + case "REFUND_FAILED": + case 13: + message.txnStatus = 13; + break; + case "REFUND_FAILED_PROCESSING": + case 14: + message.txnStatus = 14; + break; + case "REFUND_FAILED_DA": + case 15: + message.txnStatus = 15; + break; + case "EXPIRED_TXN": + case 16: + message.txnStatus = 16; + break; + case "AUTH_CANCELED": + case 17: + message.txnStatus = 17; + break; + case "AUTH_CANCEL_FAILED_PROCESSING": + case 18: + message.txnStatus = 18; + break; + case "AUTH_CANCEL_FAILED": + case 19: + message.txnStatus = 19; + break; + case "COLLECT_INIT": + case 20: + message.txnStatus = 20; + break; + case "COLLECT_SUCCESS": + case 21: + message.txnStatus = 21; + break; + case "COLLECT_FAILED": + case 22: + message.txnStatus = 22; + break; + case "COLLECT_FAILED_RISK": + case 23: + message.txnStatus = 23; + break; + case "COLLECT_REJECTED": + case 24: + message.txnStatus = 24; + break; + case "COLLECT_EXPIRED": + case 25: + message.txnStatus = 25; + break; + case "COLLECT_CANCELED": + case 26: + message.txnStatus = 26; + break; + case "COLLECT_CANCELLING": + case 27: + message.txnStatus = 27; + break; + case "IN_REVIEW": + case 28: + message.txnStatus = 28; + break; + case "REVERSAL_SUCCESS": + case 29: + message.txnStatus = 29; + break; + case "REVERSAL_PENDING": + case 30: + message.txnStatus = 30; + break; + case "REFUND_PENDING": + case 31: + message.txnStatus = 31; + break; + } + if (object.useNoviFiatFormat != null) + message.useNoviFiatFormat = Boolean(object.useNoviFiatFormat); + if (object.primaryAmount != null) { + if (typeof object.primaryAmount !== "object") + throw TypeError(".proto.PaymentInfo.primaryAmount: object expected"); + message.primaryAmount = $root.proto.Money.fromObject(object.primaryAmount); + } + if (object.exchangeAmount != null) { + if (typeof object.exchangeAmount !== "object") + throw TypeError(".proto.PaymentInfo.exchangeAmount: object expected"); + message.exchangeAmount = $root.proto.Money.fromObject(object.exchangeAmount); + } + return message; + }; + + /** + * Creates a plain object from a PaymentInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.PaymentInfo + * @static + * @param {proto.PaymentInfo} message PaymentInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PaymentInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.currencyDeprecated = options.enums === String ? "UNKNOWN_CURRENCY" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.amount1000 = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.amount1000 = options.longs === String ? "0" : 0; + object.receiverJid = ""; + object.status = options.enums === String ? "UNKNOWN_STATUS" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.transactionTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.transactionTimestamp = options.longs === String ? "0" : 0; + object.requestMessageKey = null; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.expiryTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.expiryTimestamp = options.longs === String ? "0" : 0; + object.futureproofed = false; + object.currency = ""; + object.txnStatus = options.enums === String ? "UNKNOWN" : 0; + object.useNoviFiatFormat = false; + object.primaryAmount = null; + object.exchangeAmount = null; + } + if (message.currencyDeprecated != null && message.hasOwnProperty("currencyDeprecated")) + object.currencyDeprecated = options.enums === String ? $root.proto.PaymentInfo.PaymentInfoCurrency[message.currencyDeprecated] : message.currencyDeprecated; + if (message.amount1000 != null && message.hasOwnProperty("amount1000")) + if (typeof message.amount1000 === "number") + object.amount1000 = options.longs === String ? String(message.amount1000) : message.amount1000; + else + object.amount1000 = options.longs === String ? $util.Long.prototype.toString.call(message.amount1000) : options.longs === Number ? new $util.LongBits(message.amount1000.low >>> 0, message.amount1000.high >>> 0).toNumber(true) : message.amount1000; + if (message.receiverJid != null && message.hasOwnProperty("receiverJid")) + object.receiverJid = message.receiverJid; + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.proto.PaymentInfo.PaymentInfoStatus[message.status] : message.status; + if (message.transactionTimestamp != null && message.hasOwnProperty("transactionTimestamp")) + if (typeof message.transactionTimestamp === "number") + object.transactionTimestamp = options.longs === String ? String(message.transactionTimestamp) : message.transactionTimestamp; + else + object.transactionTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.transactionTimestamp) : options.longs === Number ? new $util.LongBits(message.transactionTimestamp.low >>> 0, message.transactionTimestamp.high >>> 0).toNumber(true) : message.transactionTimestamp; + if (message.requestMessageKey != null && message.hasOwnProperty("requestMessageKey")) + object.requestMessageKey = $root.proto.MessageKey.toObject(message.requestMessageKey, options); + if (message.expiryTimestamp != null && message.hasOwnProperty("expiryTimestamp")) + if (typeof message.expiryTimestamp === "number") + object.expiryTimestamp = options.longs === String ? String(message.expiryTimestamp) : message.expiryTimestamp; + else + object.expiryTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.expiryTimestamp) : options.longs === Number ? new $util.LongBits(message.expiryTimestamp.low >>> 0, message.expiryTimestamp.high >>> 0).toNumber(true) : message.expiryTimestamp; + if (message.futureproofed != null && message.hasOwnProperty("futureproofed")) + object.futureproofed = message.futureproofed; + if (message.currency != null && message.hasOwnProperty("currency")) + object.currency = message.currency; + if (message.txnStatus != null && message.hasOwnProperty("txnStatus")) + object.txnStatus = options.enums === String ? $root.proto.PaymentInfo.PaymentInfoTxnStatus[message.txnStatus] : message.txnStatus; + if (message.useNoviFiatFormat != null && message.hasOwnProperty("useNoviFiatFormat")) + object.useNoviFiatFormat = message.useNoviFiatFormat; + if (message.primaryAmount != null && message.hasOwnProperty("primaryAmount")) + object.primaryAmount = $root.proto.Money.toObject(message.primaryAmount, options); + if (message.exchangeAmount != null && message.hasOwnProperty("exchangeAmount")) + object.exchangeAmount = $root.proto.Money.toObject(message.exchangeAmount, options); + return object; + }; + + /** + * Converts this PaymentInfo to JSON. + * @function toJSON + * @memberof proto.PaymentInfo + * @instance + * @returns {Object.} JSON object + */ + PaymentInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * PaymentInfoCurrency enum. + * @name proto.PaymentInfo.PaymentInfoCurrency + * @enum {number} + * @property {number} UNKNOWN_CURRENCY=0 UNKNOWN_CURRENCY value + * @property {number} INR=1 INR value + */ + PaymentInfo.PaymentInfoCurrency = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN_CURRENCY"] = 0; + values[valuesById[1] = "INR"] = 1; + return values; + })(); + + /** + * PaymentInfoStatus enum. + * @name proto.PaymentInfo.PaymentInfoStatus + * @enum {number} + * @property {number} UNKNOWN_STATUS=0 UNKNOWN_STATUS value + * @property {number} PROCESSING=1 PROCESSING value + * @property {number} SENT=2 SENT value + * @property {number} NEED_TO_ACCEPT=3 NEED_TO_ACCEPT value + * @property {number} COMPLETE=4 COMPLETE value + * @property {number} COULD_NOT_COMPLETE=5 COULD_NOT_COMPLETE value + * @property {number} REFUNDED=6 REFUNDED value + * @property {number} EXPIRED=7 EXPIRED value + * @property {number} REJECTED=8 REJECTED value + * @property {number} CANCELLED=9 CANCELLED value + * @property {number} WAITING_FOR_PAYER=10 WAITING_FOR_PAYER value + * @property {number} WAITING=11 WAITING value + */ + PaymentInfo.PaymentInfoStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN_STATUS"] = 0; + values[valuesById[1] = "PROCESSING"] = 1; + values[valuesById[2] = "SENT"] = 2; + values[valuesById[3] = "NEED_TO_ACCEPT"] = 3; + values[valuesById[4] = "COMPLETE"] = 4; + values[valuesById[5] = "COULD_NOT_COMPLETE"] = 5; + values[valuesById[6] = "REFUNDED"] = 6; + values[valuesById[7] = "EXPIRED"] = 7; + values[valuesById[8] = "REJECTED"] = 8; + values[valuesById[9] = "CANCELLED"] = 9; + values[valuesById[10] = "WAITING_FOR_PAYER"] = 10; + values[valuesById[11] = "WAITING"] = 11; + return values; + })(); + + /** + * PaymentInfoTxnStatus enum. + * @name proto.PaymentInfo.PaymentInfoTxnStatus + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} PENDING_SETUP=1 PENDING_SETUP value + * @property {number} PENDING_RECEIVER_SETUP=2 PENDING_RECEIVER_SETUP value + * @property {number} INIT=3 INIT value + * @property {number} SUCCESS=4 SUCCESS value + * @property {number} COMPLETED=5 COMPLETED value + * @property {number} FAILED=6 FAILED value + * @property {number} FAILED_RISK=7 FAILED_RISK value + * @property {number} FAILED_PROCESSING=8 FAILED_PROCESSING value + * @property {number} FAILED_RECEIVER_PROCESSING=9 FAILED_RECEIVER_PROCESSING value + * @property {number} FAILED_DA=10 FAILED_DA value + * @property {number} FAILED_DA_FINAL=11 FAILED_DA_FINAL value + * @property {number} REFUNDED_TXN=12 REFUNDED_TXN value + * @property {number} REFUND_FAILED=13 REFUND_FAILED value + * @property {number} REFUND_FAILED_PROCESSING=14 REFUND_FAILED_PROCESSING value + * @property {number} REFUND_FAILED_DA=15 REFUND_FAILED_DA value + * @property {number} EXPIRED_TXN=16 EXPIRED_TXN value + * @property {number} AUTH_CANCELED=17 AUTH_CANCELED value + * @property {number} AUTH_CANCEL_FAILED_PROCESSING=18 AUTH_CANCEL_FAILED_PROCESSING value + * @property {number} AUTH_CANCEL_FAILED=19 AUTH_CANCEL_FAILED value + * @property {number} COLLECT_INIT=20 COLLECT_INIT value + * @property {number} COLLECT_SUCCESS=21 COLLECT_SUCCESS value + * @property {number} COLLECT_FAILED=22 COLLECT_FAILED value + * @property {number} COLLECT_FAILED_RISK=23 COLLECT_FAILED_RISK value + * @property {number} COLLECT_REJECTED=24 COLLECT_REJECTED value + * @property {number} COLLECT_EXPIRED=25 COLLECT_EXPIRED value + * @property {number} COLLECT_CANCELED=26 COLLECT_CANCELED value + * @property {number} COLLECT_CANCELLING=27 COLLECT_CANCELLING value + * @property {number} IN_REVIEW=28 IN_REVIEW value + * @property {number} REVERSAL_SUCCESS=29 REVERSAL_SUCCESS value + * @property {number} REVERSAL_PENDING=30 REVERSAL_PENDING value + * @property {number} REFUND_PENDING=31 REFUND_PENDING value + */ + PaymentInfo.PaymentInfoTxnStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "PENDING_SETUP"] = 1; + values[valuesById[2] = "PENDING_RECEIVER_SETUP"] = 2; + values[valuesById[3] = "INIT"] = 3; + values[valuesById[4] = "SUCCESS"] = 4; + values[valuesById[5] = "COMPLETED"] = 5; + values[valuesById[6] = "FAILED"] = 6; + values[valuesById[7] = "FAILED_RISK"] = 7; + values[valuesById[8] = "FAILED_PROCESSING"] = 8; + values[valuesById[9] = "FAILED_RECEIVER_PROCESSING"] = 9; + values[valuesById[10] = "FAILED_DA"] = 10; + values[valuesById[11] = "FAILED_DA_FINAL"] = 11; + values[valuesById[12] = "REFUNDED_TXN"] = 12; + values[valuesById[13] = "REFUND_FAILED"] = 13; + values[valuesById[14] = "REFUND_FAILED_PROCESSING"] = 14; + values[valuesById[15] = "REFUND_FAILED_DA"] = 15; + values[valuesById[16] = "EXPIRED_TXN"] = 16; + values[valuesById[17] = "AUTH_CANCELED"] = 17; + values[valuesById[18] = "AUTH_CANCEL_FAILED_PROCESSING"] = 18; + values[valuesById[19] = "AUTH_CANCEL_FAILED"] = 19; + values[valuesById[20] = "COLLECT_INIT"] = 20; + values[valuesById[21] = "COLLECT_SUCCESS"] = 21; + values[valuesById[22] = "COLLECT_FAILED"] = 22; + values[valuesById[23] = "COLLECT_FAILED_RISK"] = 23; + values[valuesById[24] = "COLLECT_REJECTED"] = 24; + values[valuesById[25] = "COLLECT_EXPIRED"] = 25; + values[valuesById[26] = "COLLECT_CANCELED"] = 26; + values[valuesById[27] = "COLLECT_CANCELLING"] = 27; + values[valuesById[28] = "IN_REVIEW"] = 28; + values[valuesById[29] = "REVERSAL_SUCCESS"] = 29; + values[valuesById[30] = "REVERSAL_PENDING"] = 30; + values[valuesById[31] = "REFUND_PENDING"] = 31; + return values; + })(); + + return PaymentInfo; + })(); + proto.PaymentInviteMessage = (function() { /** @@ -25461,28 +41765,30 @@ $root.proto = (function() { return PaymentInviteMessage; })(); - proto.PBMediaData = (function() { + proto.PendingKeyExchange = (function() { /** - * Properties of a PBMediaData. + * Properties of a PendingKeyExchange. * @memberof proto - * @interface IPBMediaData - * @property {Uint8Array|null} [mediaKey] PBMediaData mediaKey - * @property {number|Long|null} [mediaKeyTimestamp] PBMediaData mediaKeyTimestamp - * @property {Uint8Array|null} [fileSha256] PBMediaData fileSha256 - * @property {Uint8Array|null} [fileEncSha256] PBMediaData fileEncSha256 - * @property {string|null} [directPath] PBMediaData directPath + * @interface IPendingKeyExchange + * @property {number|null} [sequence] PendingKeyExchange sequence + * @property {Uint8Array|null} [localBaseKey] PendingKeyExchange localBaseKey + * @property {Uint8Array|null} [localBaseKeyPrivate] PendingKeyExchange localBaseKeyPrivate + * @property {Uint8Array|null} [localRatchetKey] PendingKeyExchange localRatchetKey + * @property {Uint8Array|null} [localRatchetKeyPrivate] PendingKeyExchange localRatchetKeyPrivate + * @property {Uint8Array|null} [localIdentityKey] PendingKeyExchange localIdentityKey + * @property {Uint8Array|null} [localIdentityKeyPrivate] PendingKeyExchange localIdentityKeyPrivate */ /** - * Constructs a new PBMediaData. + * Constructs a new PendingKeyExchange. * @memberof proto - * @classdesc Represents a PBMediaData. - * @implements IPBMediaData + * @classdesc Represents a PendingKeyExchange. + * @implements IPendingKeyExchange * @constructor - * @param {proto.IPBMediaData=} [properties] Properties to set + * @param {proto.IPendingKeyExchange=} [properties] Properties to set */ - function PBMediaData(properties) { + function PendingKeyExchange(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25490,127 +41796,153 @@ $root.proto = (function() { } /** - * PBMediaData mediaKey. - * @member {Uint8Array} mediaKey - * @memberof proto.PBMediaData + * PendingKeyExchange sequence. + * @member {number} sequence + * @memberof proto.PendingKeyExchange * @instance */ - PBMediaData.prototype.mediaKey = $util.newBuffer([]); + PendingKeyExchange.prototype.sequence = 0; /** - * PBMediaData mediaKeyTimestamp. - * @member {number|Long} mediaKeyTimestamp - * @memberof proto.PBMediaData + * PendingKeyExchange localBaseKey. + * @member {Uint8Array} localBaseKey + * @memberof proto.PendingKeyExchange * @instance */ - PBMediaData.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + PendingKeyExchange.prototype.localBaseKey = $util.newBuffer([]); /** - * PBMediaData fileSha256. - * @member {Uint8Array} fileSha256 - * @memberof proto.PBMediaData + * PendingKeyExchange localBaseKeyPrivate. + * @member {Uint8Array} localBaseKeyPrivate + * @memberof proto.PendingKeyExchange * @instance */ - PBMediaData.prototype.fileSha256 = $util.newBuffer([]); + PendingKeyExchange.prototype.localBaseKeyPrivate = $util.newBuffer([]); /** - * PBMediaData fileEncSha256. - * @member {Uint8Array} fileEncSha256 - * @memberof proto.PBMediaData + * PendingKeyExchange localRatchetKey. + * @member {Uint8Array} localRatchetKey + * @memberof proto.PendingKeyExchange * @instance */ - PBMediaData.prototype.fileEncSha256 = $util.newBuffer([]); + PendingKeyExchange.prototype.localRatchetKey = $util.newBuffer([]); /** - * PBMediaData directPath. - * @member {string} directPath - * @memberof proto.PBMediaData + * PendingKeyExchange localRatchetKeyPrivate. + * @member {Uint8Array} localRatchetKeyPrivate + * @memberof proto.PendingKeyExchange * @instance */ - PBMediaData.prototype.directPath = ""; + PendingKeyExchange.prototype.localRatchetKeyPrivate = $util.newBuffer([]); /** - * Creates a new PBMediaData instance using the specified properties. + * PendingKeyExchange localIdentityKey. + * @member {Uint8Array} localIdentityKey + * @memberof proto.PendingKeyExchange + * @instance + */ + PendingKeyExchange.prototype.localIdentityKey = $util.newBuffer([]); + + /** + * PendingKeyExchange localIdentityKeyPrivate. + * @member {Uint8Array} localIdentityKeyPrivate + * @memberof proto.PendingKeyExchange + * @instance + */ + PendingKeyExchange.prototype.localIdentityKeyPrivate = $util.newBuffer([]); + + /** + * Creates a new PendingKeyExchange instance using the specified properties. * @function create - * @memberof proto.PBMediaData + * @memberof proto.PendingKeyExchange * @static - * @param {proto.IPBMediaData=} [properties] Properties to set - * @returns {proto.PBMediaData} PBMediaData instance + * @param {proto.IPendingKeyExchange=} [properties] Properties to set + * @returns {proto.PendingKeyExchange} PendingKeyExchange instance */ - PBMediaData.create = function create(properties) { - return new PBMediaData(properties); + PendingKeyExchange.create = function create(properties) { + return new PendingKeyExchange(properties); }; /** - * Encodes the specified PBMediaData message. Does not implicitly {@link proto.PBMediaData.verify|verify} messages. + * Encodes the specified PendingKeyExchange message. Does not implicitly {@link proto.PendingKeyExchange.verify|verify} messages. * @function encode - * @memberof proto.PBMediaData + * @memberof proto.PendingKeyExchange * @static - * @param {proto.IPBMediaData} message PBMediaData message or plain object to encode + * @param {proto.IPendingKeyExchange} message PendingKeyExchange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PBMediaData.encode = function encode(message, writer) { + PendingKeyExchange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.mediaKey); - if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.mediaKeyTimestamp); - if (message.fileSha256 != null && Object.hasOwnProperty.call(message, "fileSha256")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.fileSha256); - if (message.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.fileEncSha256); - if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.directPath); + if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.sequence); + if (message.localBaseKey != null && Object.hasOwnProperty.call(message, "localBaseKey")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.localBaseKey); + if (message.localBaseKeyPrivate != null && Object.hasOwnProperty.call(message, "localBaseKeyPrivate")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.localBaseKeyPrivate); + if (message.localRatchetKey != null && Object.hasOwnProperty.call(message, "localRatchetKey")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.localRatchetKey); + if (message.localRatchetKeyPrivate != null && Object.hasOwnProperty.call(message, "localRatchetKeyPrivate")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.localRatchetKeyPrivate); + if (message.localIdentityKey != null && Object.hasOwnProperty.call(message, "localIdentityKey")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.localIdentityKey); + if (message.localIdentityKeyPrivate != null && Object.hasOwnProperty.call(message, "localIdentityKeyPrivate")) + writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.localIdentityKeyPrivate); return writer; }; /** - * Encodes the specified PBMediaData message, length delimited. Does not implicitly {@link proto.PBMediaData.verify|verify} messages. + * Encodes the specified PendingKeyExchange message, length delimited. Does not implicitly {@link proto.PendingKeyExchange.verify|verify} messages. * @function encodeDelimited - * @memberof proto.PBMediaData + * @memberof proto.PendingKeyExchange * @static - * @param {proto.IPBMediaData} message PBMediaData message or plain object to encode + * @param {proto.IPendingKeyExchange} message PendingKeyExchange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PBMediaData.encodeDelimited = function encodeDelimited(message, writer) { + PendingKeyExchange.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PBMediaData message from the specified reader or buffer. + * Decodes a PendingKeyExchange message from the specified reader or buffer. * @function decode - * @memberof proto.PBMediaData + * @memberof proto.PendingKeyExchange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.PBMediaData} PBMediaData + * @returns {proto.PendingKeyExchange} PendingKeyExchange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PBMediaData.decode = function decode(reader, length) { + PendingKeyExchange.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.PBMediaData(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.PendingKeyExchange(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.mediaKey = reader.bytes(); + message.sequence = reader.uint32(); break; case 2: - message.mediaKeyTimestamp = reader.int64(); + message.localBaseKey = reader.bytes(); break; case 3: - message.fileSha256 = reader.bytes(); + message.localBaseKeyPrivate = reader.bytes(); break; case 4: - message.fileEncSha256 = reader.bytes(); + message.localRatchetKey = reader.bytes(); break; case 5: - message.directPath = reader.string(); + message.localRatchetKeyPrivate = reader.bytes(); + break; + case 7: + message.localIdentityKey = reader.bytes(); + break; + case 8: + message.localIdentityKeyPrivate = reader.bytes(); break; default: reader.skipType(tag & 7); @@ -25621,161 +41953,868 @@ $root.proto = (function() { }; /** - * Decodes a PBMediaData message from the specified reader or buffer, length delimited. + * Decodes a PendingKeyExchange message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.PBMediaData + * @memberof proto.PendingKeyExchange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.PBMediaData} PBMediaData + * @returns {proto.PendingKeyExchange} PendingKeyExchange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PBMediaData.decodeDelimited = function decodeDelimited(reader) { + PendingKeyExchange.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PBMediaData message. + * Verifies a PendingKeyExchange message. * @function verify - * @memberof proto.PBMediaData + * @memberof proto.PendingKeyExchange * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PBMediaData.verify = function verify(message) { + PendingKeyExchange.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) - if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey))) - return "mediaKey: buffer expected"; - if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) - if (!$util.isInteger(message.mediaKeyTimestamp) && !(message.mediaKeyTimestamp && $util.isInteger(message.mediaKeyTimestamp.low) && $util.isInteger(message.mediaKeyTimestamp.high))) - return "mediaKeyTimestamp: integer|Long expected"; - if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) - if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256))) - return "fileSha256: buffer expected"; - if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) - if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256))) - return "fileEncSha256: buffer expected"; - if (message.directPath != null && message.hasOwnProperty("directPath")) - if (!$util.isString(message.directPath)) - return "directPath: string expected"; + if (message.sequence != null && message.hasOwnProperty("sequence")) + if (!$util.isInteger(message.sequence)) + return "sequence: integer expected"; + if (message.localBaseKey != null && message.hasOwnProperty("localBaseKey")) + if (!(message.localBaseKey && typeof message.localBaseKey.length === "number" || $util.isString(message.localBaseKey))) + return "localBaseKey: buffer expected"; + if (message.localBaseKeyPrivate != null && message.hasOwnProperty("localBaseKeyPrivate")) + if (!(message.localBaseKeyPrivate && typeof message.localBaseKeyPrivate.length === "number" || $util.isString(message.localBaseKeyPrivate))) + return "localBaseKeyPrivate: buffer expected"; + if (message.localRatchetKey != null && message.hasOwnProperty("localRatchetKey")) + if (!(message.localRatchetKey && typeof message.localRatchetKey.length === "number" || $util.isString(message.localRatchetKey))) + return "localRatchetKey: buffer expected"; + if (message.localRatchetKeyPrivate != null && message.hasOwnProperty("localRatchetKeyPrivate")) + if (!(message.localRatchetKeyPrivate && typeof message.localRatchetKeyPrivate.length === "number" || $util.isString(message.localRatchetKeyPrivate))) + return "localRatchetKeyPrivate: buffer expected"; + if (message.localIdentityKey != null && message.hasOwnProperty("localIdentityKey")) + if (!(message.localIdentityKey && typeof message.localIdentityKey.length === "number" || $util.isString(message.localIdentityKey))) + return "localIdentityKey: buffer expected"; + if (message.localIdentityKeyPrivate != null && message.hasOwnProperty("localIdentityKeyPrivate")) + if (!(message.localIdentityKeyPrivate && typeof message.localIdentityKeyPrivate.length === "number" || $util.isString(message.localIdentityKeyPrivate))) + return "localIdentityKeyPrivate: buffer expected"; return null; }; /** - * Creates a PBMediaData message from a plain object. Also converts values to their respective internal types. + * Creates a PendingKeyExchange message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.PBMediaData + * @memberof proto.PendingKeyExchange * @static * @param {Object.} object Plain object - * @returns {proto.PBMediaData} PBMediaData + * @returns {proto.PendingKeyExchange} PendingKeyExchange */ - PBMediaData.fromObject = function fromObject(object) { - if (object instanceof $root.proto.PBMediaData) + PendingKeyExchange.fromObject = function fromObject(object) { + if (object instanceof $root.proto.PendingKeyExchange) return object; - var message = new $root.proto.PBMediaData(); - if (object.mediaKey != null) - if (typeof object.mediaKey === "string") - $util.base64.decode(object.mediaKey, message.mediaKey = $util.newBuffer($util.base64.length(object.mediaKey)), 0); - else if (object.mediaKey.length) - message.mediaKey = object.mediaKey; - if (object.mediaKeyTimestamp != null) - if ($util.Long) - (message.mediaKeyTimestamp = $util.Long.fromValue(object.mediaKeyTimestamp)).unsigned = false; - else if (typeof object.mediaKeyTimestamp === "string") - message.mediaKeyTimestamp = parseInt(object.mediaKeyTimestamp, 10); - else if (typeof object.mediaKeyTimestamp === "number") - message.mediaKeyTimestamp = object.mediaKeyTimestamp; - else if (typeof object.mediaKeyTimestamp === "object") - message.mediaKeyTimestamp = new $util.LongBits(object.mediaKeyTimestamp.low >>> 0, object.mediaKeyTimestamp.high >>> 0).toNumber(); - if (object.fileSha256 != null) - if (typeof object.fileSha256 === "string") - $util.base64.decode(object.fileSha256, message.fileSha256 = $util.newBuffer($util.base64.length(object.fileSha256)), 0); - else if (object.fileSha256.length) - message.fileSha256 = object.fileSha256; - if (object.fileEncSha256 != null) - if (typeof object.fileEncSha256 === "string") - $util.base64.decode(object.fileEncSha256, message.fileEncSha256 = $util.newBuffer($util.base64.length(object.fileEncSha256)), 0); - else if (object.fileEncSha256.length) - message.fileEncSha256 = object.fileEncSha256; - if (object.directPath != null) - message.directPath = String(object.directPath); + var message = new $root.proto.PendingKeyExchange(); + if (object.sequence != null) + message.sequence = object.sequence >>> 0; + if (object.localBaseKey != null) + if (typeof object.localBaseKey === "string") + $util.base64.decode(object.localBaseKey, message.localBaseKey = $util.newBuffer($util.base64.length(object.localBaseKey)), 0); + else if (object.localBaseKey.length) + message.localBaseKey = object.localBaseKey; + if (object.localBaseKeyPrivate != null) + if (typeof object.localBaseKeyPrivate === "string") + $util.base64.decode(object.localBaseKeyPrivate, message.localBaseKeyPrivate = $util.newBuffer($util.base64.length(object.localBaseKeyPrivate)), 0); + else if (object.localBaseKeyPrivate.length) + message.localBaseKeyPrivate = object.localBaseKeyPrivate; + if (object.localRatchetKey != null) + if (typeof object.localRatchetKey === "string") + $util.base64.decode(object.localRatchetKey, message.localRatchetKey = $util.newBuffer($util.base64.length(object.localRatchetKey)), 0); + else if (object.localRatchetKey.length) + message.localRatchetKey = object.localRatchetKey; + if (object.localRatchetKeyPrivate != null) + if (typeof object.localRatchetKeyPrivate === "string") + $util.base64.decode(object.localRatchetKeyPrivate, message.localRatchetKeyPrivate = $util.newBuffer($util.base64.length(object.localRatchetKeyPrivate)), 0); + else if (object.localRatchetKeyPrivate.length) + message.localRatchetKeyPrivate = object.localRatchetKeyPrivate; + if (object.localIdentityKey != null) + if (typeof object.localIdentityKey === "string") + $util.base64.decode(object.localIdentityKey, message.localIdentityKey = $util.newBuffer($util.base64.length(object.localIdentityKey)), 0); + else if (object.localIdentityKey.length) + message.localIdentityKey = object.localIdentityKey; + if (object.localIdentityKeyPrivate != null) + if (typeof object.localIdentityKeyPrivate === "string") + $util.base64.decode(object.localIdentityKeyPrivate, message.localIdentityKeyPrivate = $util.newBuffer($util.base64.length(object.localIdentityKeyPrivate)), 0); + else if (object.localIdentityKeyPrivate.length) + message.localIdentityKeyPrivate = object.localIdentityKeyPrivate; return message; }; /** - * Creates a plain object from a PBMediaData message. Also converts values to other types if specified. + * Creates a plain object from a PendingKeyExchange message. Also converts values to other types if specified. * @function toObject - * @memberof proto.PBMediaData + * @memberof proto.PendingKeyExchange * @static - * @param {proto.PBMediaData} message PBMediaData + * @param {proto.PendingKeyExchange} message PendingKeyExchange * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PBMediaData.toObject = function toObject(message, options) { + PendingKeyExchange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sequence = 0; + if (options.bytes === String) + object.localBaseKey = ""; + else { + object.localBaseKey = []; + if (options.bytes !== Array) + object.localBaseKey = $util.newBuffer(object.localBaseKey); + } + if (options.bytes === String) + object.localBaseKeyPrivate = ""; + else { + object.localBaseKeyPrivate = []; + if (options.bytes !== Array) + object.localBaseKeyPrivate = $util.newBuffer(object.localBaseKeyPrivate); + } + if (options.bytes === String) + object.localRatchetKey = ""; + else { + object.localRatchetKey = []; + if (options.bytes !== Array) + object.localRatchetKey = $util.newBuffer(object.localRatchetKey); + } + if (options.bytes === String) + object.localRatchetKeyPrivate = ""; + else { + object.localRatchetKeyPrivate = []; + if (options.bytes !== Array) + object.localRatchetKeyPrivate = $util.newBuffer(object.localRatchetKeyPrivate); + } + if (options.bytes === String) + object.localIdentityKey = ""; + else { + object.localIdentityKey = []; + if (options.bytes !== Array) + object.localIdentityKey = $util.newBuffer(object.localIdentityKey); + } + if (options.bytes === String) + object.localIdentityKeyPrivate = ""; + else { + object.localIdentityKeyPrivate = []; + if (options.bytes !== Array) + object.localIdentityKeyPrivate = $util.newBuffer(object.localIdentityKeyPrivate); + } + } + if (message.sequence != null && message.hasOwnProperty("sequence")) + object.sequence = message.sequence; + if (message.localBaseKey != null && message.hasOwnProperty("localBaseKey")) + object.localBaseKey = options.bytes === String ? $util.base64.encode(message.localBaseKey, 0, message.localBaseKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.localBaseKey) : message.localBaseKey; + if (message.localBaseKeyPrivate != null && message.hasOwnProperty("localBaseKeyPrivate")) + object.localBaseKeyPrivate = options.bytes === String ? $util.base64.encode(message.localBaseKeyPrivate, 0, message.localBaseKeyPrivate.length) : options.bytes === Array ? Array.prototype.slice.call(message.localBaseKeyPrivate) : message.localBaseKeyPrivate; + if (message.localRatchetKey != null && message.hasOwnProperty("localRatchetKey")) + object.localRatchetKey = options.bytes === String ? $util.base64.encode(message.localRatchetKey, 0, message.localRatchetKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.localRatchetKey) : message.localRatchetKey; + if (message.localRatchetKeyPrivate != null && message.hasOwnProperty("localRatchetKeyPrivate")) + object.localRatchetKeyPrivate = options.bytes === String ? $util.base64.encode(message.localRatchetKeyPrivate, 0, message.localRatchetKeyPrivate.length) : options.bytes === Array ? Array.prototype.slice.call(message.localRatchetKeyPrivate) : message.localRatchetKeyPrivate; + if (message.localIdentityKey != null && message.hasOwnProperty("localIdentityKey")) + object.localIdentityKey = options.bytes === String ? $util.base64.encode(message.localIdentityKey, 0, message.localIdentityKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.localIdentityKey) : message.localIdentityKey; + if (message.localIdentityKeyPrivate != null && message.hasOwnProperty("localIdentityKeyPrivate")) + object.localIdentityKeyPrivate = options.bytes === String ? $util.base64.encode(message.localIdentityKeyPrivate, 0, message.localIdentityKeyPrivate.length) : options.bytes === Array ? Array.prototype.slice.call(message.localIdentityKeyPrivate) : message.localIdentityKeyPrivate; + return object; + }; + + /** + * Converts this PendingKeyExchange to JSON. + * @function toJSON + * @memberof proto.PendingKeyExchange + * @instance + * @returns {Object.} JSON object + */ + PendingKeyExchange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PendingKeyExchange; + })(); + + proto.PendingPreKey = (function() { + + /** + * Properties of a PendingPreKey. + * @memberof proto + * @interface IPendingPreKey + * @property {number|null} [preKeyId] PendingPreKey preKeyId + * @property {number|null} [signedPreKeyId] PendingPreKey signedPreKeyId + * @property {Uint8Array|null} [baseKey] PendingPreKey baseKey + */ + + /** + * Constructs a new PendingPreKey. + * @memberof proto + * @classdesc Represents a PendingPreKey. + * @implements IPendingPreKey + * @constructor + * @param {proto.IPendingPreKey=} [properties] Properties to set + */ + function PendingPreKey(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PendingPreKey preKeyId. + * @member {number} preKeyId + * @memberof proto.PendingPreKey + * @instance + */ + PendingPreKey.prototype.preKeyId = 0; + + /** + * PendingPreKey signedPreKeyId. + * @member {number} signedPreKeyId + * @memberof proto.PendingPreKey + * @instance + */ + PendingPreKey.prototype.signedPreKeyId = 0; + + /** + * PendingPreKey baseKey. + * @member {Uint8Array} baseKey + * @memberof proto.PendingPreKey + * @instance + */ + PendingPreKey.prototype.baseKey = $util.newBuffer([]); + + /** + * Creates a new PendingPreKey instance using the specified properties. + * @function create + * @memberof proto.PendingPreKey + * @static + * @param {proto.IPendingPreKey=} [properties] Properties to set + * @returns {proto.PendingPreKey} PendingPreKey instance + */ + PendingPreKey.create = function create(properties) { + return new PendingPreKey(properties); + }; + + /** + * Encodes the specified PendingPreKey message. Does not implicitly {@link proto.PendingPreKey.verify|verify} messages. + * @function encode + * @memberof proto.PendingPreKey + * @static + * @param {proto.IPendingPreKey} message PendingPreKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PendingPreKey.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.preKeyId != null && Object.hasOwnProperty.call(message, "preKeyId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.preKeyId); + if (message.baseKey != null && Object.hasOwnProperty.call(message, "baseKey")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.baseKey); + if (message.signedPreKeyId != null && Object.hasOwnProperty.call(message, "signedPreKeyId")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.signedPreKeyId); + return writer; + }; + + /** + * Encodes the specified PendingPreKey message, length delimited. Does not implicitly {@link proto.PendingPreKey.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.PendingPreKey + * @static + * @param {proto.IPendingPreKey} message PendingPreKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PendingPreKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PendingPreKey message from the specified reader or buffer. + * @function decode + * @memberof proto.PendingPreKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.PendingPreKey} PendingPreKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PendingPreKey.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.PendingPreKey(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.preKeyId = reader.uint32(); + break; + case 3: + message.signedPreKeyId = reader.int32(); + break; + case 2: + message.baseKey = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PendingPreKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.PendingPreKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.PendingPreKey} PendingPreKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PendingPreKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PendingPreKey message. + * @function verify + * @memberof proto.PendingPreKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PendingPreKey.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.preKeyId != null && message.hasOwnProperty("preKeyId")) + if (!$util.isInteger(message.preKeyId)) + return "preKeyId: integer expected"; + if (message.signedPreKeyId != null && message.hasOwnProperty("signedPreKeyId")) + if (!$util.isInteger(message.signedPreKeyId)) + return "signedPreKeyId: integer expected"; + if (message.baseKey != null && message.hasOwnProperty("baseKey")) + if (!(message.baseKey && typeof message.baseKey.length === "number" || $util.isString(message.baseKey))) + return "baseKey: buffer expected"; + return null; + }; + + /** + * Creates a PendingPreKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.PendingPreKey + * @static + * @param {Object.} object Plain object + * @returns {proto.PendingPreKey} PendingPreKey + */ + PendingPreKey.fromObject = function fromObject(object) { + if (object instanceof $root.proto.PendingPreKey) + return object; + var message = new $root.proto.PendingPreKey(); + if (object.preKeyId != null) + message.preKeyId = object.preKeyId >>> 0; + if (object.signedPreKeyId != null) + message.signedPreKeyId = object.signedPreKeyId | 0; + if (object.baseKey != null) + if (typeof object.baseKey === "string") + $util.base64.decode(object.baseKey, message.baseKey = $util.newBuffer($util.base64.length(object.baseKey)), 0); + else if (object.baseKey.length) + message.baseKey = object.baseKey; + return message; + }; + + /** + * Creates a plain object from a PendingPreKey message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.PendingPreKey + * @static + * @param {proto.PendingPreKey} message PendingPreKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PendingPreKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.preKeyId = 0; + if (options.bytes === String) + object.baseKey = ""; + else { + object.baseKey = []; + if (options.bytes !== Array) + object.baseKey = $util.newBuffer(object.baseKey); + } + object.signedPreKeyId = 0; + } + if (message.preKeyId != null && message.hasOwnProperty("preKeyId")) + object.preKeyId = message.preKeyId; + if (message.baseKey != null && message.hasOwnProperty("baseKey")) + object.baseKey = options.bytes === String ? $util.base64.encode(message.baseKey, 0, message.baseKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.baseKey) : message.baseKey; + if (message.signedPreKeyId != null && message.hasOwnProperty("signedPreKeyId")) + object.signedPreKeyId = message.signedPreKeyId; + return object; + }; + + /** + * Converts this PendingPreKey to JSON. + * @function toJSON + * @memberof proto.PendingPreKey + * @instance + * @returns {Object.} JSON object + */ + PendingPreKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PendingPreKey; + })(); + + proto.PhotoChange = (function() { + + /** + * Properties of a PhotoChange. + * @memberof proto + * @interface IPhotoChange + * @property {Uint8Array|null} [oldPhoto] PhotoChange oldPhoto + * @property {Uint8Array|null} [newPhoto] PhotoChange newPhoto + * @property {number|null} [newPhotoId] PhotoChange newPhotoId + */ + + /** + * Constructs a new PhotoChange. + * @memberof proto + * @classdesc Represents a PhotoChange. + * @implements IPhotoChange + * @constructor + * @param {proto.IPhotoChange=} [properties] Properties to set + */ + function PhotoChange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PhotoChange oldPhoto. + * @member {Uint8Array} oldPhoto + * @memberof proto.PhotoChange + * @instance + */ + PhotoChange.prototype.oldPhoto = $util.newBuffer([]); + + /** + * PhotoChange newPhoto. + * @member {Uint8Array} newPhoto + * @memberof proto.PhotoChange + * @instance + */ + PhotoChange.prototype.newPhoto = $util.newBuffer([]); + + /** + * PhotoChange newPhotoId. + * @member {number} newPhotoId + * @memberof proto.PhotoChange + * @instance + */ + PhotoChange.prototype.newPhotoId = 0; + + /** + * Creates a new PhotoChange instance using the specified properties. + * @function create + * @memberof proto.PhotoChange + * @static + * @param {proto.IPhotoChange=} [properties] Properties to set + * @returns {proto.PhotoChange} PhotoChange instance + */ + PhotoChange.create = function create(properties) { + return new PhotoChange(properties); + }; + + /** + * Encodes the specified PhotoChange message. Does not implicitly {@link proto.PhotoChange.verify|verify} messages. + * @function encode + * @memberof proto.PhotoChange + * @static + * @param {proto.IPhotoChange} message PhotoChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhotoChange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.oldPhoto != null && Object.hasOwnProperty.call(message, "oldPhoto")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.oldPhoto); + if (message.newPhoto != null && Object.hasOwnProperty.call(message, "newPhoto")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.newPhoto); + if (message.newPhotoId != null && Object.hasOwnProperty.call(message, "newPhotoId")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.newPhotoId); + return writer; + }; + + /** + * Encodes the specified PhotoChange message, length delimited. Does not implicitly {@link proto.PhotoChange.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.PhotoChange + * @static + * @param {proto.IPhotoChange} message PhotoChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhotoChange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PhotoChange message from the specified reader or buffer. + * @function decode + * @memberof proto.PhotoChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.PhotoChange} PhotoChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhotoChange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.PhotoChange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.oldPhoto = reader.bytes(); + break; + case 2: + message.newPhoto = reader.bytes(); + break; + case 3: + message.newPhotoId = reader.uint32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PhotoChange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.PhotoChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.PhotoChange} PhotoChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhotoChange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PhotoChange message. + * @function verify + * @memberof proto.PhotoChange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PhotoChange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.oldPhoto != null && message.hasOwnProperty("oldPhoto")) + if (!(message.oldPhoto && typeof message.oldPhoto.length === "number" || $util.isString(message.oldPhoto))) + return "oldPhoto: buffer expected"; + if (message.newPhoto != null && message.hasOwnProperty("newPhoto")) + if (!(message.newPhoto && typeof message.newPhoto.length === "number" || $util.isString(message.newPhoto))) + return "newPhoto: buffer expected"; + if (message.newPhotoId != null && message.hasOwnProperty("newPhotoId")) + if (!$util.isInteger(message.newPhotoId)) + return "newPhotoId: integer expected"; + return null; + }; + + /** + * Creates a PhotoChange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.PhotoChange + * @static + * @param {Object.} object Plain object + * @returns {proto.PhotoChange} PhotoChange + */ + PhotoChange.fromObject = function fromObject(object) { + if (object instanceof $root.proto.PhotoChange) + return object; + var message = new $root.proto.PhotoChange(); + if (object.oldPhoto != null) + if (typeof object.oldPhoto === "string") + $util.base64.decode(object.oldPhoto, message.oldPhoto = $util.newBuffer($util.base64.length(object.oldPhoto)), 0); + else if (object.oldPhoto.length) + message.oldPhoto = object.oldPhoto; + if (object.newPhoto != null) + if (typeof object.newPhoto === "string") + $util.base64.decode(object.newPhoto, message.newPhoto = $util.newBuffer($util.base64.length(object.newPhoto)), 0); + else if (object.newPhoto.length) + message.newPhoto = object.newPhoto; + if (object.newPhotoId != null) + message.newPhotoId = object.newPhotoId >>> 0; + return message; + }; + + /** + * Creates a plain object from a PhotoChange message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.PhotoChange + * @static + * @param {proto.PhotoChange} message PhotoChange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PhotoChange.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { if (options.bytes === String) - object.mediaKey = ""; + object.oldPhoto = ""; else { - object.mediaKey = []; + object.oldPhoto = []; if (options.bytes !== Array) - object.mediaKey = $util.newBuffer(object.mediaKey); - } - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.mediaKeyTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.mediaKeyTimestamp = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.fileSha256 = ""; - else { - object.fileSha256 = []; - if (options.bytes !== Array) - object.fileSha256 = $util.newBuffer(object.fileSha256); + object.oldPhoto = $util.newBuffer(object.oldPhoto); } if (options.bytes === String) - object.fileEncSha256 = ""; + object.newPhoto = ""; else { - object.fileEncSha256 = []; + object.newPhoto = []; if (options.bytes !== Array) - object.fileEncSha256 = $util.newBuffer(object.fileEncSha256); + object.newPhoto = $util.newBuffer(object.newPhoto); } - object.directPath = ""; + object.newPhotoId = 0; } - if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) - object.mediaKey = options.bytes === String ? $util.base64.encode(message.mediaKey, 0, message.mediaKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.mediaKey) : message.mediaKey; - if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) - if (typeof message.mediaKeyTimestamp === "number") - object.mediaKeyTimestamp = options.longs === String ? String(message.mediaKeyTimestamp) : message.mediaKeyTimestamp; - else - object.mediaKeyTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.mediaKeyTimestamp) : options.longs === Number ? new $util.LongBits(message.mediaKeyTimestamp.low >>> 0, message.mediaKeyTimestamp.high >>> 0).toNumber() : message.mediaKeyTimestamp; - if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) - object.fileSha256 = options.bytes === String ? $util.base64.encode(message.fileSha256, 0, message.fileSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileSha256) : message.fileSha256; - if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) - object.fileEncSha256 = options.bytes === String ? $util.base64.encode(message.fileEncSha256, 0, message.fileEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileEncSha256) : message.fileEncSha256; - if (message.directPath != null && message.hasOwnProperty("directPath")) - object.directPath = message.directPath; + if (message.oldPhoto != null && message.hasOwnProperty("oldPhoto")) + object.oldPhoto = options.bytes === String ? $util.base64.encode(message.oldPhoto, 0, message.oldPhoto.length) : options.bytes === Array ? Array.prototype.slice.call(message.oldPhoto) : message.oldPhoto; + if (message.newPhoto != null && message.hasOwnProperty("newPhoto")) + object.newPhoto = options.bytes === String ? $util.base64.encode(message.newPhoto, 0, message.newPhoto.length) : options.bytes === Array ? Array.prototype.slice.call(message.newPhoto) : message.newPhoto; + if (message.newPhotoId != null && message.hasOwnProperty("newPhotoId")) + object.newPhotoId = message.newPhotoId; return object; }; /** - * Converts this PBMediaData to JSON. + * Converts this PhotoChange to JSON. * @function toJSON - * @memberof proto.PBMediaData + * @memberof proto.PhotoChange * @instance * @returns {Object.} JSON object */ - PBMediaData.prototype.toJSON = function toJSON() { + PhotoChange.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return PBMediaData; + return PhotoChange; + })(); + + proto.PinAction = (function() { + + /** + * Properties of a PinAction. + * @memberof proto + * @interface IPinAction + * @property {boolean|null} [pinned] PinAction pinned + */ + + /** + * Constructs a new PinAction. + * @memberof proto + * @classdesc Represents a PinAction. + * @implements IPinAction + * @constructor + * @param {proto.IPinAction=} [properties] Properties to set + */ + function PinAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PinAction pinned. + * @member {boolean} pinned + * @memberof proto.PinAction + * @instance + */ + PinAction.prototype.pinned = false; + + /** + * Creates a new PinAction instance using the specified properties. + * @function create + * @memberof proto.PinAction + * @static + * @param {proto.IPinAction=} [properties] Properties to set + * @returns {proto.PinAction} PinAction instance + */ + PinAction.create = function create(properties) { + return new PinAction(properties); + }; + + /** + * Encodes the specified PinAction message. Does not implicitly {@link proto.PinAction.verify|verify} messages. + * @function encode + * @memberof proto.PinAction + * @static + * @param {proto.IPinAction} message PinAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PinAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pinned != null && Object.hasOwnProperty.call(message, "pinned")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.pinned); + return writer; + }; + + /** + * Encodes the specified PinAction message, length delimited. Does not implicitly {@link proto.PinAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.PinAction + * @static + * @param {proto.IPinAction} message PinAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PinAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PinAction message from the specified reader or buffer. + * @function decode + * @memberof proto.PinAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.PinAction} PinAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PinAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.PinAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pinned = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PinAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.PinAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.PinAction} PinAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PinAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PinAction message. + * @function verify + * @memberof proto.PinAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PinAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pinned != null && message.hasOwnProperty("pinned")) + if (typeof message.pinned !== "boolean") + return "pinned: boolean expected"; + return null; + }; + + /** + * Creates a PinAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.PinAction + * @static + * @param {Object.} object Plain object + * @returns {proto.PinAction} PinAction + */ + PinAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.PinAction) + return object; + var message = new $root.proto.PinAction(); + if (object.pinned != null) + message.pinned = Boolean(object.pinned); + return message; + }; + + /** + * Creates a plain object from a PinAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.PinAction + * @static + * @param {proto.PinAction} message PinAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PinAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.pinned = false; + if (message.pinned != null && message.hasOwnProperty("pinned")) + object.pinned = message.pinned; + return object; + }; + + /** + * Converts this PinAction to JSON. + * @function toJSON + * @memberof proto.PinAction + * @instance + * @returns {Object.} JSON object + */ + PinAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PinAction; })(); proto.Point = (function() { @@ -26032,6 +43071,193 @@ $root.proto = (function() { return Point; })(); + proto.PollAdditionalMetadata = (function() { + + /** + * Properties of a PollAdditionalMetadata. + * @memberof proto + * @interface IPollAdditionalMetadata + * @property {boolean|null} [pollInvalidated] PollAdditionalMetadata pollInvalidated + */ + + /** + * Constructs a new PollAdditionalMetadata. + * @memberof proto + * @classdesc Represents a PollAdditionalMetadata. + * @implements IPollAdditionalMetadata + * @constructor + * @param {proto.IPollAdditionalMetadata=} [properties] Properties to set + */ + function PollAdditionalMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PollAdditionalMetadata pollInvalidated. + * @member {boolean} pollInvalidated + * @memberof proto.PollAdditionalMetadata + * @instance + */ + PollAdditionalMetadata.prototype.pollInvalidated = false; + + /** + * Creates a new PollAdditionalMetadata instance using the specified properties. + * @function create + * @memberof proto.PollAdditionalMetadata + * @static + * @param {proto.IPollAdditionalMetadata=} [properties] Properties to set + * @returns {proto.PollAdditionalMetadata} PollAdditionalMetadata instance + */ + PollAdditionalMetadata.create = function create(properties) { + return new PollAdditionalMetadata(properties); + }; + + /** + * Encodes the specified PollAdditionalMetadata message. Does not implicitly {@link proto.PollAdditionalMetadata.verify|verify} messages. + * @function encode + * @memberof proto.PollAdditionalMetadata + * @static + * @param {proto.IPollAdditionalMetadata} message PollAdditionalMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PollAdditionalMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pollInvalidated != null && Object.hasOwnProperty.call(message, "pollInvalidated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.pollInvalidated); + return writer; + }; + + /** + * Encodes the specified PollAdditionalMetadata message, length delimited. Does not implicitly {@link proto.PollAdditionalMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.PollAdditionalMetadata + * @static + * @param {proto.IPollAdditionalMetadata} message PollAdditionalMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PollAdditionalMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PollAdditionalMetadata message from the specified reader or buffer. + * @function decode + * @memberof proto.PollAdditionalMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.PollAdditionalMetadata} PollAdditionalMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PollAdditionalMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.PollAdditionalMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pollInvalidated = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PollAdditionalMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.PollAdditionalMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.PollAdditionalMetadata} PollAdditionalMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PollAdditionalMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PollAdditionalMetadata message. + * @function verify + * @memberof proto.PollAdditionalMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PollAdditionalMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pollInvalidated != null && message.hasOwnProperty("pollInvalidated")) + if (typeof message.pollInvalidated !== "boolean") + return "pollInvalidated: boolean expected"; + return null; + }; + + /** + * Creates a PollAdditionalMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.PollAdditionalMetadata + * @static + * @param {Object.} object Plain object + * @returns {proto.PollAdditionalMetadata} PollAdditionalMetadata + */ + PollAdditionalMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.proto.PollAdditionalMetadata) + return object; + var message = new $root.proto.PollAdditionalMetadata(); + if (object.pollInvalidated != null) + message.pollInvalidated = Boolean(object.pollInvalidated); + return message; + }; + + /** + * Creates a plain object from a PollAdditionalMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.PollAdditionalMetadata + * @static + * @param {proto.PollAdditionalMetadata} message PollAdditionalMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PollAdditionalMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.pollInvalidated = false; + if (message.pollInvalidated != null && message.hasOwnProperty("pollInvalidated")) + object.pollInvalidated = message.pollInvalidated; + return object; + }; + + /** + * Converts this PollAdditionalMetadata to JSON. + * @function toJSON + * @memberof proto.PollAdditionalMetadata + * @instance + * @returns {Object.} JSON object + */ + PollAdditionalMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PollAdditionalMetadata; + })(); + proto.PollCreationMessage = (function() { /** @@ -26572,6 +43798,413 @@ $root.proto = (function() { return PollEncValue; })(); + proto.PollOption = (function() { + + /** + * Properties of a PollOption. + * @memberof proto + * @interface IPollOption + * @property {string|null} [name] PollOption name + */ + + /** + * Constructs a new PollOption. + * @memberof proto + * @classdesc Represents a PollOption. + * @implements IPollOption + * @constructor + * @param {proto.IPollOption=} [properties] Properties to set + */ + function PollOption(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PollOption name. + * @member {string} name + * @memberof proto.PollOption + * @instance + */ + PollOption.prototype.name = ""; + + /** + * Creates a new PollOption instance using the specified properties. + * @function create + * @memberof proto.PollOption + * @static + * @param {proto.IPollOption=} [properties] Properties to set + * @returns {proto.PollOption} PollOption instance + */ + PollOption.create = function create(properties) { + return new PollOption(properties); + }; + + /** + * Encodes the specified PollOption message. Does not implicitly {@link proto.PollOption.verify|verify} messages. + * @function encode + * @memberof proto.PollOption + * @static + * @param {proto.IPollOption} message PollOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PollOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified PollOption message, length delimited. Does not implicitly {@link proto.PollOption.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.PollOption + * @static + * @param {proto.IPollOption} message PollOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PollOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PollOption message from the specified reader or buffer. + * @function decode + * @memberof proto.PollOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.PollOption} PollOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PollOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.PollOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PollOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.PollOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.PollOption} PollOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PollOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PollOption message. + * @function verify + * @memberof proto.PollOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PollOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a PollOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.PollOption + * @static + * @param {Object.} object Plain object + * @returns {proto.PollOption} PollOption + */ + PollOption.fromObject = function fromObject(object) { + if (object instanceof $root.proto.PollOption) + return object; + var message = new $root.proto.PollOption(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a PollOption message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.PollOption + * @static + * @param {proto.PollOption} message PollOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PollOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this PollOption to JSON. + * @function toJSON + * @memberof proto.PollOption + * @instance + * @returns {Object.} JSON object + */ + PollOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PollOption; + })(); + + proto.PollUpdate = (function() { + + /** + * Properties of a PollUpdate. + * @memberof proto + * @interface IPollUpdate + * @property {proto.IMessageKey|null} [pollUpdateMessageKey] PollUpdate pollUpdateMessageKey + * @property {proto.IPollVoteMessage|null} [vote] PollUpdate vote + */ + + /** + * Constructs a new PollUpdate. + * @memberof proto + * @classdesc Represents a PollUpdate. + * @implements IPollUpdate + * @constructor + * @param {proto.IPollUpdate=} [properties] Properties to set + */ + function PollUpdate(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PollUpdate pollUpdateMessageKey. + * @member {proto.IMessageKey|null|undefined} pollUpdateMessageKey + * @memberof proto.PollUpdate + * @instance + */ + PollUpdate.prototype.pollUpdateMessageKey = null; + + /** + * PollUpdate vote. + * @member {proto.IPollVoteMessage|null|undefined} vote + * @memberof proto.PollUpdate + * @instance + */ + PollUpdate.prototype.vote = null; + + /** + * Creates a new PollUpdate instance using the specified properties. + * @function create + * @memberof proto.PollUpdate + * @static + * @param {proto.IPollUpdate=} [properties] Properties to set + * @returns {proto.PollUpdate} PollUpdate instance + */ + PollUpdate.create = function create(properties) { + return new PollUpdate(properties); + }; + + /** + * Encodes the specified PollUpdate message. Does not implicitly {@link proto.PollUpdate.verify|verify} messages. + * @function encode + * @memberof proto.PollUpdate + * @static + * @param {proto.IPollUpdate} message PollUpdate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PollUpdate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pollUpdateMessageKey != null && Object.hasOwnProperty.call(message, "pollUpdateMessageKey")) + $root.proto.MessageKey.encode(message.pollUpdateMessageKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.vote != null && Object.hasOwnProperty.call(message, "vote")) + $root.proto.PollVoteMessage.encode(message.vote, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PollUpdate message, length delimited. Does not implicitly {@link proto.PollUpdate.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.PollUpdate + * @static + * @param {proto.IPollUpdate} message PollUpdate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PollUpdate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PollUpdate message from the specified reader or buffer. + * @function decode + * @memberof proto.PollUpdate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.PollUpdate} PollUpdate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PollUpdate.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.PollUpdate(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pollUpdateMessageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + case 2: + message.vote = $root.proto.PollVoteMessage.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PollUpdate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.PollUpdate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.PollUpdate} PollUpdate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PollUpdate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PollUpdate message. + * @function verify + * @memberof proto.PollUpdate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PollUpdate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pollUpdateMessageKey != null && message.hasOwnProperty("pollUpdateMessageKey")) { + var error = $root.proto.MessageKey.verify(message.pollUpdateMessageKey); + if (error) + return "pollUpdateMessageKey." + error; + } + if (message.vote != null && message.hasOwnProperty("vote")) { + var error = $root.proto.PollVoteMessage.verify(message.vote); + if (error) + return "vote." + error; + } + return null; + }; + + /** + * Creates a PollUpdate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.PollUpdate + * @static + * @param {Object.} object Plain object + * @returns {proto.PollUpdate} PollUpdate + */ + PollUpdate.fromObject = function fromObject(object) { + if (object instanceof $root.proto.PollUpdate) + return object; + var message = new $root.proto.PollUpdate(); + if (object.pollUpdateMessageKey != null) { + if (typeof object.pollUpdateMessageKey !== "object") + throw TypeError(".proto.PollUpdate.pollUpdateMessageKey: object expected"); + message.pollUpdateMessageKey = $root.proto.MessageKey.fromObject(object.pollUpdateMessageKey); + } + if (object.vote != null) { + if (typeof object.vote !== "object") + throw TypeError(".proto.PollUpdate.vote: object expected"); + message.vote = $root.proto.PollVoteMessage.fromObject(object.vote); + } + return message; + }; + + /** + * Creates a plain object from a PollUpdate message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.PollUpdate + * @static + * @param {proto.PollUpdate} message PollUpdate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PollUpdate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.pollUpdateMessageKey = null; + object.vote = null; + } + if (message.pollUpdateMessageKey != null && message.hasOwnProperty("pollUpdateMessageKey")) + object.pollUpdateMessageKey = $root.proto.MessageKey.toObject(message.pollUpdateMessageKey, options); + if (message.vote != null && message.hasOwnProperty("vote")) + object.vote = $root.proto.PollVoteMessage.toObject(message.vote, options); + return object; + }; + + /** + * Converts this PollUpdate to JSON. + * @function toJSON + * @memberof proto.PollUpdate + * @instance + * @returns {Object.} JSON object + */ + PollUpdate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PollUpdate; + })(); + proto.PollUpdateMessage = (function() { /** @@ -26580,6 +44213,7 @@ $root.proto = (function() { * @interface IPollUpdateMessage * @property {proto.IMessageKey|null} [pollCreationMessageKey] PollUpdateMessage pollCreationMessageKey * @property {proto.IPollEncValue|null} [vote] PollUpdateMessage vote + * @property {proto.IPollUpdateMessageMetadata|null} [metadata] PollUpdateMessage metadata */ /** @@ -26613,6 +44247,14 @@ $root.proto = (function() { */ PollUpdateMessage.prototype.vote = null; + /** + * PollUpdateMessage metadata. + * @member {proto.IPollUpdateMessageMetadata|null|undefined} metadata + * @memberof proto.PollUpdateMessage + * @instance + */ + PollUpdateMessage.prototype.metadata = null; + /** * Creates a new PollUpdateMessage instance using the specified properties. * @function create @@ -26641,6 +44283,8 @@ $root.proto = (function() { $root.proto.MessageKey.encode(message.pollCreationMessageKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.vote != null && Object.hasOwnProperty.call(message, "vote")) $root.proto.PollEncValue.encode(message.vote, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.proto.PollUpdateMessageMetadata.encode(message.metadata, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -26681,6 +44325,9 @@ $root.proto = (function() { case 2: message.vote = $root.proto.PollEncValue.decode(reader, reader.uint32()); break; + case 3: + message.metadata = $root.proto.PollUpdateMessageMetadata.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -26726,6 +44373,11 @@ $root.proto = (function() { if (error) return "vote." + error; } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.proto.PollUpdateMessageMetadata.verify(message.metadata); + if (error) + return "metadata." + error; + } return null; }; @@ -26751,6 +44403,11 @@ $root.proto = (function() { throw TypeError(".proto.PollUpdateMessage.vote: object expected"); message.vote = $root.proto.PollEncValue.fromObject(object.vote); } + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".proto.PollUpdateMessage.metadata: object expected"); + message.metadata = $root.proto.PollUpdateMessageMetadata.fromObject(object.metadata); + } return message; }; @@ -26770,11 +44427,14 @@ $root.proto = (function() { if (options.defaults) { object.pollCreationMessageKey = null; object.vote = null; + object.metadata = null; } if (message.pollCreationMessageKey != null && message.hasOwnProperty("pollCreationMessageKey")) object.pollCreationMessageKey = $root.proto.MessageKey.toObject(message.pollCreationMessageKey, options); if (message.vote != null && message.hasOwnProperty("vote")) object.vote = $root.proto.PollEncValue.toObject(message.vote, options); + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.proto.PollUpdateMessageMetadata.toObject(message.metadata, options); return object; }; @@ -26792,6 +44452,166 @@ $root.proto = (function() { return PollUpdateMessage; })(); + proto.PollUpdateMessageMetadata = (function() { + + /** + * Properties of a PollUpdateMessageMetadata. + * @memberof proto + * @interface IPollUpdateMessageMetadata + */ + + /** + * Constructs a new PollUpdateMessageMetadata. + * @memberof proto + * @classdesc Represents a PollUpdateMessageMetadata. + * @implements IPollUpdateMessageMetadata + * @constructor + * @param {proto.IPollUpdateMessageMetadata=} [properties] Properties to set + */ + function PollUpdateMessageMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new PollUpdateMessageMetadata instance using the specified properties. + * @function create + * @memberof proto.PollUpdateMessageMetadata + * @static + * @param {proto.IPollUpdateMessageMetadata=} [properties] Properties to set + * @returns {proto.PollUpdateMessageMetadata} PollUpdateMessageMetadata instance + */ + PollUpdateMessageMetadata.create = function create(properties) { + return new PollUpdateMessageMetadata(properties); + }; + + /** + * Encodes the specified PollUpdateMessageMetadata message. Does not implicitly {@link proto.PollUpdateMessageMetadata.verify|verify} messages. + * @function encode + * @memberof proto.PollUpdateMessageMetadata + * @static + * @param {proto.IPollUpdateMessageMetadata} message PollUpdateMessageMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PollUpdateMessageMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified PollUpdateMessageMetadata message, length delimited. Does not implicitly {@link proto.PollUpdateMessageMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.PollUpdateMessageMetadata + * @static + * @param {proto.IPollUpdateMessageMetadata} message PollUpdateMessageMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PollUpdateMessageMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PollUpdateMessageMetadata message from the specified reader or buffer. + * @function decode + * @memberof proto.PollUpdateMessageMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.PollUpdateMessageMetadata} PollUpdateMessageMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PollUpdateMessageMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.PollUpdateMessageMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PollUpdateMessageMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.PollUpdateMessageMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.PollUpdateMessageMetadata} PollUpdateMessageMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PollUpdateMessageMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PollUpdateMessageMetadata message. + * @function verify + * @memberof proto.PollUpdateMessageMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PollUpdateMessageMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a PollUpdateMessageMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.PollUpdateMessageMetadata + * @static + * @param {Object.} object Plain object + * @returns {proto.PollUpdateMessageMetadata} PollUpdateMessageMetadata + */ + PollUpdateMessageMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.proto.PollUpdateMessageMetadata) + return object; + return new $root.proto.PollUpdateMessageMetadata(); + }; + + /** + * Creates a plain object from a PollUpdateMessageMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.PollUpdateMessageMetadata + * @static + * @param {proto.PollUpdateMessageMetadata} message PollUpdateMessageMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PollUpdateMessageMetadata.toObject = function toObject() { + return {}; + }; + + /** + * Converts this PollUpdateMessageMetadata to JSON. + * @function toJSON + * @memberof proto.PollUpdateMessageMetadata + * @instance + * @returns {Object.} JSON object + */ + PollUpdateMessageMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PollUpdateMessageMetadata; + })(); + proto.PollVoteMessage = (function() { /** @@ -27035,6 +44855,459 @@ $root.proto = (function() { return PollVoteMessage; })(); + proto.PreKeyRecordStructure = (function() { + + /** + * Properties of a PreKeyRecordStructure. + * @memberof proto + * @interface IPreKeyRecordStructure + * @property {number|null} [id] PreKeyRecordStructure id + * @property {Uint8Array|null} [publicKey] PreKeyRecordStructure publicKey + * @property {Uint8Array|null} [privateKey] PreKeyRecordStructure privateKey + */ + + /** + * Constructs a new PreKeyRecordStructure. + * @memberof proto + * @classdesc Represents a PreKeyRecordStructure. + * @implements IPreKeyRecordStructure + * @constructor + * @param {proto.IPreKeyRecordStructure=} [properties] Properties to set + */ + function PreKeyRecordStructure(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PreKeyRecordStructure id. + * @member {number} id + * @memberof proto.PreKeyRecordStructure + * @instance + */ + PreKeyRecordStructure.prototype.id = 0; + + /** + * PreKeyRecordStructure publicKey. + * @member {Uint8Array} publicKey + * @memberof proto.PreKeyRecordStructure + * @instance + */ + PreKeyRecordStructure.prototype.publicKey = $util.newBuffer([]); + + /** + * PreKeyRecordStructure privateKey. + * @member {Uint8Array} privateKey + * @memberof proto.PreKeyRecordStructure + * @instance + */ + PreKeyRecordStructure.prototype.privateKey = $util.newBuffer([]); + + /** + * Creates a new PreKeyRecordStructure instance using the specified properties. + * @function create + * @memberof proto.PreKeyRecordStructure + * @static + * @param {proto.IPreKeyRecordStructure=} [properties] Properties to set + * @returns {proto.PreKeyRecordStructure} PreKeyRecordStructure instance + */ + PreKeyRecordStructure.create = function create(properties) { + return new PreKeyRecordStructure(properties); + }; + + /** + * Encodes the specified PreKeyRecordStructure message. Does not implicitly {@link proto.PreKeyRecordStructure.verify|verify} messages. + * @function encode + * @memberof proto.PreKeyRecordStructure + * @static + * @param {proto.IPreKeyRecordStructure} message PreKeyRecordStructure message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PreKeyRecordStructure.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.id); + if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.publicKey); + if (message.privateKey != null && Object.hasOwnProperty.call(message, "privateKey")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.privateKey); + return writer; + }; + + /** + * Encodes the specified PreKeyRecordStructure message, length delimited. Does not implicitly {@link proto.PreKeyRecordStructure.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.PreKeyRecordStructure + * @static + * @param {proto.IPreKeyRecordStructure} message PreKeyRecordStructure message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PreKeyRecordStructure.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PreKeyRecordStructure message from the specified reader or buffer. + * @function decode + * @memberof proto.PreKeyRecordStructure + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.PreKeyRecordStructure} PreKeyRecordStructure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PreKeyRecordStructure.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.PreKeyRecordStructure(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.uint32(); + break; + case 2: + message.publicKey = reader.bytes(); + break; + case 3: + message.privateKey = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PreKeyRecordStructure message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.PreKeyRecordStructure + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.PreKeyRecordStructure} PreKeyRecordStructure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PreKeyRecordStructure.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PreKeyRecordStructure message. + * @function verify + * @memberof proto.PreKeyRecordStructure + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PreKeyRecordStructure.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isInteger(message.id)) + return "id: integer expected"; + if (message.publicKey != null && message.hasOwnProperty("publicKey")) + if (!(message.publicKey && typeof message.publicKey.length === "number" || $util.isString(message.publicKey))) + return "publicKey: buffer expected"; + if (message.privateKey != null && message.hasOwnProperty("privateKey")) + if (!(message.privateKey && typeof message.privateKey.length === "number" || $util.isString(message.privateKey))) + return "privateKey: buffer expected"; + return null; + }; + + /** + * Creates a PreKeyRecordStructure message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.PreKeyRecordStructure + * @static + * @param {Object.} object Plain object + * @returns {proto.PreKeyRecordStructure} PreKeyRecordStructure + */ + PreKeyRecordStructure.fromObject = function fromObject(object) { + if (object instanceof $root.proto.PreKeyRecordStructure) + return object; + var message = new $root.proto.PreKeyRecordStructure(); + if (object.id != null) + message.id = object.id >>> 0; + if (object.publicKey != null) + if (typeof object.publicKey === "string") + $util.base64.decode(object.publicKey, message.publicKey = $util.newBuffer($util.base64.length(object.publicKey)), 0); + else if (object.publicKey.length) + message.publicKey = object.publicKey; + if (object.privateKey != null) + if (typeof object.privateKey === "string") + $util.base64.decode(object.privateKey, message.privateKey = $util.newBuffer($util.base64.length(object.privateKey)), 0); + else if (object.privateKey.length) + message.privateKey = object.privateKey; + return message; + }; + + /** + * Creates a plain object from a PreKeyRecordStructure message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.PreKeyRecordStructure + * @static + * @param {proto.PreKeyRecordStructure} message PreKeyRecordStructure + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PreKeyRecordStructure.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = 0; + if (options.bytes === String) + object.publicKey = ""; + else { + object.publicKey = []; + if (options.bytes !== Array) + object.publicKey = $util.newBuffer(object.publicKey); + } + if (options.bytes === String) + object.privateKey = ""; + else { + object.privateKey = []; + if (options.bytes !== Array) + object.privateKey = $util.newBuffer(object.privateKey); + } + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.publicKey != null && message.hasOwnProperty("publicKey")) + object.publicKey = options.bytes === String ? $util.base64.encode(message.publicKey, 0, message.publicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKey) : message.publicKey; + if (message.privateKey != null && message.hasOwnProperty("privateKey")) + object.privateKey = options.bytes === String ? $util.base64.encode(message.privateKey, 0, message.privateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.privateKey) : message.privateKey; + return object; + }; + + /** + * Converts this PreKeyRecordStructure to JSON. + * @function toJSON + * @memberof proto.PreKeyRecordStructure + * @instance + * @returns {Object.} JSON object + */ + PreKeyRecordStructure.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PreKeyRecordStructure; + })(); + + proto.PrimaryFeature = (function() { + + /** + * Properties of a PrimaryFeature. + * @memberof proto + * @interface IPrimaryFeature + * @property {Array.|null} [flags] PrimaryFeature flags + */ + + /** + * Constructs a new PrimaryFeature. + * @memberof proto + * @classdesc Represents a PrimaryFeature. + * @implements IPrimaryFeature + * @constructor + * @param {proto.IPrimaryFeature=} [properties] Properties to set + */ + function PrimaryFeature(properties) { + this.flags = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PrimaryFeature flags. + * @member {Array.} flags + * @memberof proto.PrimaryFeature + * @instance + */ + PrimaryFeature.prototype.flags = $util.emptyArray; + + /** + * Creates a new PrimaryFeature instance using the specified properties. + * @function create + * @memberof proto.PrimaryFeature + * @static + * @param {proto.IPrimaryFeature=} [properties] Properties to set + * @returns {proto.PrimaryFeature} PrimaryFeature instance + */ + PrimaryFeature.create = function create(properties) { + return new PrimaryFeature(properties); + }; + + /** + * Encodes the specified PrimaryFeature message. Does not implicitly {@link proto.PrimaryFeature.verify|verify} messages. + * @function encode + * @memberof proto.PrimaryFeature + * @static + * @param {proto.IPrimaryFeature} message PrimaryFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrimaryFeature.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.flags != null && message.flags.length) + for (var i = 0; i < message.flags.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.flags[i]); + return writer; + }; + + /** + * Encodes the specified PrimaryFeature message, length delimited. Does not implicitly {@link proto.PrimaryFeature.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.PrimaryFeature + * @static + * @param {proto.IPrimaryFeature} message PrimaryFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrimaryFeature.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PrimaryFeature message from the specified reader or buffer. + * @function decode + * @memberof proto.PrimaryFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.PrimaryFeature} PrimaryFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrimaryFeature.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.PrimaryFeature(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.flags && message.flags.length)) + message.flags = []; + message.flags.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PrimaryFeature message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.PrimaryFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.PrimaryFeature} PrimaryFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrimaryFeature.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PrimaryFeature message. + * @function verify + * @memberof proto.PrimaryFeature + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PrimaryFeature.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.flags != null && message.hasOwnProperty("flags")) { + if (!Array.isArray(message.flags)) + return "flags: array expected"; + for (var i = 0; i < message.flags.length; ++i) + if (!$util.isString(message.flags[i])) + return "flags: string[] expected"; + } + return null; + }; + + /** + * Creates a PrimaryFeature message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.PrimaryFeature + * @static + * @param {Object.} object Plain object + * @returns {proto.PrimaryFeature} PrimaryFeature + */ + PrimaryFeature.fromObject = function fromObject(object) { + if (object instanceof $root.proto.PrimaryFeature) + return object; + var message = new $root.proto.PrimaryFeature(); + if (object.flags) { + if (!Array.isArray(object.flags)) + throw TypeError(".proto.PrimaryFeature.flags: array expected"); + message.flags = []; + for (var i = 0; i < object.flags.length; ++i) + message.flags[i] = String(object.flags[i]); + } + return message; + }; + + /** + * Creates a plain object from a PrimaryFeature message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.PrimaryFeature + * @static + * @param {proto.PrimaryFeature} message PrimaryFeature + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PrimaryFeature.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.flags = []; + if (message.flags && message.flags.length) { + object.flags = []; + for (var j = 0; j < message.flags.length; ++j) + object.flags[j] = message.flags[j]; + } + return object; + }; + + /** + * Converts this PrimaryFeature to JSON. + * @function toJSON + * @memberof proto.PrimaryFeature + * @instance + * @returns {Object.} JSON object + */ + PrimaryFeature.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PrimaryFeature; + })(); + proto.Product = (function() { /** @@ -29196,6 +47469,696 @@ $root.proto = (function() { return ProtocolMessage; })(); + proto.PushNameSetting = (function() { + + /** + * Properties of a PushNameSetting. + * @memberof proto + * @interface IPushNameSetting + * @property {string|null} [name] PushNameSetting name + */ + + /** + * Constructs a new PushNameSetting. + * @memberof proto + * @classdesc Represents a PushNameSetting. + * @implements IPushNameSetting + * @constructor + * @param {proto.IPushNameSetting=} [properties] Properties to set + */ + function PushNameSetting(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PushNameSetting name. + * @member {string} name + * @memberof proto.PushNameSetting + * @instance + */ + PushNameSetting.prototype.name = ""; + + /** + * Creates a new PushNameSetting instance using the specified properties. + * @function create + * @memberof proto.PushNameSetting + * @static + * @param {proto.IPushNameSetting=} [properties] Properties to set + * @returns {proto.PushNameSetting} PushNameSetting instance + */ + PushNameSetting.create = function create(properties) { + return new PushNameSetting(properties); + }; + + /** + * Encodes the specified PushNameSetting message. Does not implicitly {@link proto.PushNameSetting.verify|verify} messages. + * @function encode + * @memberof proto.PushNameSetting + * @static + * @param {proto.IPushNameSetting} message PushNameSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PushNameSetting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified PushNameSetting message, length delimited. Does not implicitly {@link proto.PushNameSetting.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.PushNameSetting + * @static + * @param {proto.IPushNameSetting} message PushNameSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PushNameSetting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PushNameSetting message from the specified reader or buffer. + * @function decode + * @memberof proto.PushNameSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.PushNameSetting} PushNameSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PushNameSetting.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.PushNameSetting(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PushNameSetting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.PushNameSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.PushNameSetting} PushNameSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PushNameSetting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PushNameSetting message. + * @function verify + * @memberof proto.PushNameSetting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PushNameSetting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a PushNameSetting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.PushNameSetting + * @static + * @param {Object.} object Plain object + * @returns {proto.PushNameSetting} PushNameSetting + */ + PushNameSetting.fromObject = function fromObject(object) { + if (object instanceof $root.proto.PushNameSetting) + return object; + var message = new $root.proto.PushNameSetting(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a PushNameSetting message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.PushNameSetting + * @static + * @param {proto.PushNameSetting} message PushNameSetting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PushNameSetting.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this PushNameSetting to JSON. + * @function toJSON + * @memberof proto.PushNameSetting + * @instance + * @returns {Object.} JSON object + */ + PushNameSetting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PushNameSetting; + })(); + + proto.Pushname = (function() { + + /** + * Properties of a Pushname. + * @memberof proto + * @interface IPushname + * @property {string|null} [id] Pushname id + * @property {string|null} [pushname] Pushname pushname + */ + + /** + * Constructs a new Pushname. + * @memberof proto + * @classdesc Represents a Pushname. + * @implements IPushname + * @constructor + * @param {proto.IPushname=} [properties] Properties to set + */ + function Pushname(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Pushname id. + * @member {string} id + * @memberof proto.Pushname + * @instance + */ + Pushname.prototype.id = ""; + + /** + * Pushname pushname. + * @member {string} pushname + * @memberof proto.Pushname + * @instance + */ + Pushname.prototype.pushname = ""; + + /** + * Creates a new Pushname instance using the specified properties. + * @function create + * @memberof proto.Pushname + * @static + * @param {proto.IPushname=} [properties] Properties to set + * @returns {proto.Pushname} Pushname instance + */ + Pushname.create = function create(properties) { + return new Pushname(properties); + }; + + /** + * Encodes the specified Pushname message. Does not implicitly {@link proto.Pushname.verify|verify} messages. + * @function encode + * @memberof proto.Pushname + * @static + * @param {proto.IPushname} message Pushname message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Pushname.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.pushname != null && Object.hasOwnProperty.call(message, "pushname")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pushname); + return writer; + }; + + /** + * Encodes the specified Pushname message, length delimited. Does not implicitly {@link proto.Pushname.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Pushname + * @static + * @param {proto.IPushname} message Pushname message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Pushname.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Pushname message from the specified reader or buffer. + * @function decode + * @memberof proto.Pushname + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Pushname} Pushname + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Pushname.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Pushname(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.pushname = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Pushname message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Pushname + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Pushname} Pushname + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Pushname.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Pushname message. + * @function verify + * @memberof proto.Pushname + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Pushname.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.pushname != null && message.hasOwnProperty("pushname")) + if (!$util.isString(message.pushname)) + return "pushname: string expected"; + return null; + }; + + /** + * Creates a Pushname message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Pushname + * @static + * @param {Object.} object Plain object + * @returns {proto.Pushname} Pushname + */ + Pushname.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Pushname) + return object; + var message = new $root.proto.Pushname(); + if (object.id != null) + message.id = String(object.id); + if (object.pushname != null) + message.pushname = String(object.pushname); + return message; + }; + + /** + * Creates a plain object from a Pushname message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Pushname + * @static + * @param {proto.Pushname} message Pushname + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Pushname.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.pushname = ""; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.pushname != null && message.hasOwnProperty("pushname")) + object.pushname = message.pushname; + return object; + }; + + /** + * Converts this Pushname to JSON. + * @function toJSON + * @memberof proto.Pushname + * @instance + * @returns {Object.} JSON object + */ + Pushname.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Pushname; + })(); + + proto.QuickReplyAction = (function() { + + /** + * Properties of a QuickReplyAction. + * @memberof proto + * @interface IQuickReplyAction + * @property {string|null} [shortcut] QuickReplyAction shortcut + * @property {string|null} [message] QuickReplyAction message + * @property {Array.|null} [keywords] QuickReplyAction keywords + * @property {number|null} [count] QuickReplyAction count + * @property {boolean|null} [deleted] QuickReplyAction deleted + */ + + /** + * Constructs a new QuickReplyAction. + * @memberof proto + * @classdesc Represents a QuickReplyAction. + * @implements IQuickReplyAction + * @constructor + * @param {proto.IQuickReplyAction=} [properties] Properties to set + */ + function QuickReplyAction(properties) { + this.keywords = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QuickReplyAction shortcut. + * @member {string} shortcut + * @memberof proto.QuickReplyAction + * @instance + */ + QuickReplyAction.prototype.shortcut = ""; + + /** + * QuickReplyAction message. + * @member {string} message + * @memberof proto.QuickReplyAction + * @instance + */ + QuickReplyAction.prototype.message = ""; + + /** + * QuickReplyAction keywords. + * @member {Array.} keywords + * @memberof proto.QuickReplyAction + * @instance + */ + QuickReplyAction.prototype.keywords = $util.emptyArray; + + /** + * QuickReplyAction count. + * @member {number} count + * @memberof proto.QuickReplyAction + * @instance + */ + QuickReplyAction.prototype.count = 0; + + /** + * QuickReplyAction deleted. + * @member {boolean} deleted + * @memberof proto.QuickReplyAction + * @instance + */ + QuickReplyAction.prototype.deleted = false; + + /** + * Creates a new QuickReplyAction instance using the specified properties. + * @function create + * @memberof proto.QuickReplyAction + * @static + * @param {proto.IQuickReplyAction=} [properties] Properties to set + * @returns {proto.QuickReplyAction} QuickReplyAction instance + */ + QuickReplyAction.create = function create(properties) { + return new QuickReplyAction(properties); + }; + + /** + * Encodes the specified QuickReplyAction message. Does not implicitly {@link proto.QuickReplyAction.verify|verify} messages. + * @function encode + * @memberof proto.QuickReplyAction + * @static + * @param {proto.IQuickReplyAction} message QuickReplyAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuickReplyAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.shortcut != null && Object.hasOwnProperty.call(message, "shortcut")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.shortcut); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.keywords != null && message.keywords.length) + for (var i = 0; i < message.keywords.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.keywords[i]); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.count); + if (message.deleted != null && Object.hasOwnProperty.call(message, "deleted")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.deleted); + return writer; + }; + + /** + * Encodes the specified QuickReplyAction message, length delimited. Does not implicitly {@link proto.QuickReplyAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.QuickReplyAction + * @static + * @param {proto.IQuickReplyAction} message QuickReplyAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuickReplyAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuickReplyAction message from the specified reader or buffer. + * @function decode + * @memberof proto.QuickReplyAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.QuickReplyAction} QuickReplyAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuickReplyAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.QuickReplyAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.shortcut = reader.string(); + break; + case 2: + message.message = reader.string(); + break; + case 3: + if (!(message.keywords && message.keywords.length)) + message.keywords = []; + message.keywords.push(reader.string()); + break; + case 4: + message.count = reader.int32(); + break; + case 5: + message.deleted = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QuickReplyAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.QuickReplyAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.QuickReplyAction} QuickReplyAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuickReplyAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuickReplyAction message. + * @function verify + * @memberof proto.QuickReplyAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuickReplyAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.shortcut != null && message.hasOwnProperty("shortcut")) + if (!$util.isString(message.shortcut)) + return "shortcut: string expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.keywords != null && message.hasOwnProperty("keywords")) { + if (!Array.isArray(message.keywords)) + return "keywords: array expected"; + for (var i = 0; i < message.keywords.length; ++i) + if (!$util.isString(message.keywords[i])) + return "keywords: string[] expected"; + } + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count)) + return "count: integer expected"; + if (message.deleted != null && message.hasOwnProperty("deleted")) + if (typeof message.deleted !== "boolean") + return "deleted: boolean expected"; + return null; + }; + + /** + * Creates a QuickReplyAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.QuickReplyAction + * @static + * @param {Object.} object Plain object + * @returns {proto.QuickReplyAction} QuickReplyAction + */ + QuickReplyAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.QuickReplyAction) + return object; + var message = new $root.proto.QuickReplyAction(); + if (object.shortcut != null) + message.shortcut = String(object.shortcut); + if (object.message != null) + message.message = String(object.message); + if (object.keywords) { + if (!Array.isArray(object.keywords)) + throw TypeError(".proto.QuickReplyAction.keywords: array expected"); + message.keywords = []; + for (var i = 0; i < object.keywords.length; ++i) + message.keywords[i] = String(object.keywords[i]); + } + if (object.count != null) + message.count = object.count | 0; + if (object.deleted != null) + message.deleted = Boolean(object.deleted); + return message; + }; + + /** + * Creates a plain object from a QuickReplyAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.QuickReplyAction + * @static + * @param {proto.QuickReplyAction} message QuickReplyAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuickReplyAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.keywords = []; + if (options.defaults) { + object.shortcut = ""; + object.message = ""; + object.count = 0; + object.deleted = false; + } + if (message.shortcut != null && message.hasOwnProperty("shortcut")) + object.shortcut = message.shortcut; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.keywords && message.keywords.length) { + object.keywords = []; + for (var j = 0; j < message.keywords.length; ++j) + object.keywords[j] = message.keywords[j]; + } + if (message.count != null && message.hasOwnProperty("count")) + object.count = message.count; + if (message.deleted != null && message.hasOwnProperty("deleted")) + object.deleted = message.deleted; + return object; + }; + + /** + * Converts this QuickReplyAction to JSON. + * @function toJSON + * @memberof proto.QuickReplyAction + * @instance + * @returns {Object.} JSON object + */ + QuickReplyAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QuickReplyAction; + })(); + proto.QuickReplyButton = (function() { /** @@ -29411,6 +48374,301 @@ $root.proto = (function() { return QuickReplyButton; })(); + proto.Reaction = (function() { + + /** + * Properties of a Reaction. + * @memberof proto + * @interface IReaction + * @property {proto.IMessageKey|null} [key] Reaction key + * @property {string|null} [text] Reaction text + * @property {string|null} [groupingKey] Reaction groupingKey + * @property {number|Long|null} [senderTimestampMs] Reaction senderTimestampMs + * @property {boolean|null} [unread] Reaction unread + */ + + /** + * Constructs a new Reaction. + * @memberof proto + * @classdesc Represents a Reaction. + * @implements IReaction + * @constructor + * @param {proto.IReaction=} [properties] Properties to set + */ + function Reaction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Reaction key. + * @member {proto.IMessageKey|null|undefined} key + * @memberof proto.Reaction + * @instance + */ + Reaction.prototype.key = null; + + /** + * Reaction text. + * @member {string} text + * @memberof proto.Reaction + * @instance + */ + Reaction.prototype.text = ""; + + /** + * Reaction groupingKey. + * @member {string} groupingKey + * @memberof proto.Reaction + * @instance + */ + Reaction.prototype.groupingKey = ""; + + /** + * Reaction senderTimestampMs. + * @member {number|Long} senderTimestampMs + * @memberof proto.Reaction + * @instance + */ + Reaction.prototype.senderTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Reaction unread. + * @member {boolean} unread + * @memberof proto.Reaction + * @instance + */ + Reaction.prototype.unread = false; + + /** + * Creates a new Reaction instance using the specified properties. + * @function create + * @memberof proto.Reaction + * @static + * @param {proto.IReaction=} [properties] Properties to set + * @returns {proto.Reaction} Reaction instance + */ + Reaction.create = function create(properties) { + return new Reaction(properties); + }; + + /** + * Encodes the specified Reaction message. Does not implicitly {@link proto.Reaction.verify|verify} messages. + * @function encode + * @memberof proto.Reaction + * @static + * @param {proto.IReaction} message Reaction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Reaction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + $root.proto.MessageKey.encode(message.key, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.text); + if (message.groupingKey != null && Object.hasOwnProperty.call(message, "groupingKey")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.groupingKey); + if (message.senderTimestampMs != null && Object.hasOwnProperty.call(message, "senderTimestampMs")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.senderTimestampMs); + if (message.unread != null && Object.hasOwnProperty.call(message, "unread")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.unread); + return writer; + }; + + /** + * Encodes the specified Reaction message, length delimited. Does not implicitly {@link proto.Reaction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Reaction + * @static + * @param {proto.IReaction} message Reaction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Reaction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Reaction message from the specified reader or buffer. + * @function decode + * @memberof proto.Reaction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Reaction} Reaction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Reaction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Reaction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + case 2: + message.text = reader.string(); + break; + case 3: + message.groupingKey = reader.string(); + break; + case 4: + message.senderTimestampMs = reader.int64(); + break; + case 5: + message.unread = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Reaction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Reaction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Reaction} Reaction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Reaction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Reaction message. + * @function verify + * @memberof proto.Reaction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Reaction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) { + var error = $root.proto.MessageKey.verify(message.key); + if (error) + return "key." + error; + } + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + if (message.groupingKey != null && message.hasOwnProperty("groupingKey")) + if (!$util.isString(message.groupingKey)) + return "groupingKey: string expected"; + if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs")) + if (!$util.isInteger(message.senderTimestampMs) && !(message.senderTimestampMs && $util.isInteger(message.senderTimestampMs.low) && $util.isInteger(message.senderTimestampMs.high))) + return "senderTimestampMs: integer|Long expected"; + if (message.unread != null && message.hasOwnProperty("unread")) + if (typeof message.unread !== "boolean") + return "unread: boolean expected"; + return null; + }; + + /** + * Creates a Reaction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Reaction + * @static + * @param {Object.} object Plain object + * @returns {proto.Reaction} Reaction + */ + Reaction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Reaction) + return object; + var message = new $root.proto.Reaction(); + if (object.key != null) { + if (typeof object.key !== "object") + throw TypeError(".proto.Reaction.key: object expected"); + message.key = $root.proto.MessageKey.fromObject(object.key); + } + if (object.text != null) + message.text = String(object.text); + if (object.groupingKey != null) + message.groupingKey = String(object.groupingKey); + if (object.senderTimestampMs != null) + if ($util.Long) + (message.senderTimestampMs = $util.Long.fromValue(object.senderTimestampMs)).unsigned = false; + else if (typeof object.senderTimestampMs === "string") + message.senderTimestampMs = parseInt(object.senderTimestampMs, 10); + else if (typeof object.senderTimestampMs === "number") + message.senderTimestampMs = object.senderTimestampMs; + else if (typeof object.senderTimestampMs === "object") + message.senderTimestampMs = new $util.LongBits(object.senderTimestampMs.low >>> 0, object.senderTimestampMs.high >>> 0).toNumber(); + if (object.unread != null) + message.unread = Boolean(object.unread); + return message; + }; + + /** + * Creates a plain object from a Reaction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Reaction + * @static + * @param {proto.Reaction} message Reaction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Reaction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.key = null; + object.text = ""; + object.groupingKey = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.senderTimestampMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.senderTimestampMs = options.longs === String ? "0" : 0; + object.unread = false; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = $root.proto.MessageKey.toObject(message.key, options); + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + if (message.groupingKey != null && message.hasOwnProperty("groupingKey")) + object.groupingKey = message.groupingKey; + if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs")) + if (typeof message.senderTimestampMs === "number") + object.senderTimestampMs = options.longs === String ? String(message.senderTimestampMs) : message.senderTimestampMs; + else + object.senderTimestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.senderTimestampMs) : options.longs === Number ? new $util.LongBits(message.senderTimestampMs.low >>> 0, message.senderTimestampMs.high >>> 0).toNumber() : message.senderTimestampMs; + if (message.unread != null && message.hasOwnProperty("unread")) + object.unread = message.unread; + return object; + }; + + /** + * Converts this Reaction to JSON. + * @function toJSON + * @memberof proto.Reaction + * @instance + * @returns {Object.} JSON object + */ + Reaction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Reaction; + })(); + proto.ReactionMessage = (function() { /** @@ -29684,6 +48942,1398 @@ $root.proto = (function() { return ReactionMessage; })(); + proto.RecentEmojiWeight = (function() { + + /** + * Properties of a RecentEmojiWeight. + * @memberof proto + * @interface IRecentEmojiWeight + * @property {string|null} [emoji] RecentEmojiWeight emoji + * @property {number|null} [weight] RecentEmojiWeight weight + */ + + /** + * Constructs a new RecentEmojiWeight. + * @memberof proto + * @classdesc Represents a RecentEmojiWeight. + * @implements IRecentEmojiWeight + * @constructor + * @param {proto.IRecentEmojiWeight=} [properties] Properties to set + */ + function RecentEmojiWeight(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RecentEmojiWeight emoji. + * @member {string} emoji + * @memberof proto.RecentEmojiWeight + * @instance + */ + RecentEmojiWeight.prototype.emoji = ""; + + /** + * RecentEmojiWeight weight. + * @member {number} weight + * @memberof proto.RecentEmojiWeight + * @instance + */ + RecentEmojiWeight.prototype.weight = 0; + + /** + * Creates a new RecentEmojiWeight instance using the specified properties. + * @function create + * @memberof proto.RecentEmojiWeight + * @static + * @param {proto.IRecentEmojiWeight=} [properties] Properties to set + * @returns {proto.RecentEmojiWeight} RecentEmojiWeight instance + */ + RecentEmojiWeight.create = function create(properties) { + return new RecentEmojiWeight(properties); + }; + + /** + * Encodes the specified RecentEmojiWeight message. Does not implicitly {@link proto.RecentEmojiWeight.verify|verify} messages. + * @function encode + * @memberof proto.RecentEmojiWeight + * @static + * @param {proto.IRecentEmojiWeight} message RecentEmojiWeight message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecentEmojiWeight.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.emoji != null && Object.hasOwnProperty.call(message, "emoji")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.emoji); + if (message.weight != null && Object.hasOwnProperty.call(message, "weight")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.weight); + return writer; + }; + + /** + * Encodes the specified RecentEmojiWeight message, length delimited. Does not implicitly {@link proto.RecentEmojiWeight.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.RecentEmojiWeight + * @static + * @param {proto.IRecentEmojiWeight} message RecentEmojiWeight message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecentEmojiWeight.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RecentEmojiWeight message from the specified reader or buffer. + * @function decode + * @memberof proto.RecentEmojiWeight + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.RecentEmojiWeight} RecentEmojiWeight + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecentEmojiWeight.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.RecentEmojiWeight(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.emoji = reader.string(); + break; + case 2: + message.weight = reader.float(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RecentEmojiWeight message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.RecentEmojiWeight + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.RecentEmojiWeight} RecentEmojiWeight + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecentEmojiWeight.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RecentEmojiWeight message. + * @function verify + * @memberof proto.RecentEmojiWeight + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RecentEmojiWeight.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.emoji != null && message.hasOwnProperty("emoji")) + if (!$util.isString(message.emoji)) + return "emoji: string expected"; + if (message.weight != null && message.hasOwnProperty("weight")) + if (typeof message.weight !== "number") + return "weight: number expected"; + return null; + }; + + /** + * Creates a RecentEmojiWeight message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.RecentEmojiWeight + * @static + * @param {Object.} object Plain object + * @returns {proto.RecentEmojiWeight} RecentEmojiWeight + */ + RecentEmojiWeight.fromObject = function fromObject(object) { + if (object instanceof $root.proto.RecentEmojiWeight) + return object; + var message = new $root.proto.RecentEmojiWeight(); + if (object.emoji != null) + message.emoji = String(object.emoji); + if (object.weight != null) + message.weight = Number(object.weight); + return message; + }; + + /** + * Creates a plain object from a RecentEmojiWeight message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.RecentEmojiWeight + * @static + * @param {proto.RecentEmojiWeight} message RecentEmojiWeight + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RecentEmojiWeight.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.emoji = ""; + object.weight = 0; + } + if (message.emoji != null && message.hasOwnProperty("emoji")) + object.emoji = message.emoji; + if (message.weight != null && message.hasOwnProperty("weight")) + object.weight = options.json && !isFinite(message.weight) ? String(message.weight) : message.weight; + return object; + }; + + /** + * Converts this RecentEmojiWeight to JSON. + * @function toJSON + * @memberof proto.RecentEmojiWeight + * @instance + * @returns {Object.} JSON object + */ + RecentEmojiWeight.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RecentEmojiWeight; + })(); + + proto.RecentEmojiWeightsAction = (function() { + + /** + * Properties of a RecentEmojiWeightsAction. + * @memberof proto + * @interface IRecentEmojiWeightsAction + * @property {Array.|null} [weights] RecentEmojiWeightsAction weights + */ + + /** + * Constructs a new RecentEmojiWeightsAction. + * @memberof proto + * @classdesc Represents a RecentEmojiWeightsAction. + * @implements IRecentEmojiWeightsAction + * @constructor + * @param {proto.IRecentEmojiWeightsAction=} [properties] Properties to set + */ + function RecentEmojiWeightsAction(properties) { + this.weights = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RecentEmojiWeightsAction weights. + * @member {Array.} weights + * @memberof proto.RecentEmojiWeightsAction + * @instance + */ + RecentEmojiWeightsAction.prototype.weights = $util.emptyArray; + + /** + * Creates a new RecentEmojiWeightsAction instance using the specified properties. + * @function create + * @memberof proto.RecentEmojiWeightsAction + * @static + * @param {proto.IRecentEmojiWeightsAction=} [properties] Properties to set + * @returns {proto.RecentEmojiWeightsAction} RecentEmojiWeightsAction instance + */ + RecentEmojiWeightsAction.create = function create(properties) { + return new RecentEmojiWeightsAction(properties); + }; + + /** + * Encodes the specified RecentEmojiWeightsAction message. Does not implicitly {@link proto.RecentEmojiWeightsAction.verify|verify} messages. + * @function encode + * @memberof proto.RecentEmojiWeightsAction + * @static + * @param {proto.IRecentEmojiWeightsAction} message RecentEmojiWeightsAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecentEmojiWeightsAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.weights != null && message.weights.length) + for (var i = 0; i < message.weights.length; ++i) + $root.proto.RecentEmojiWeight.encode(message.weights[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RecentEmojiWeightsAction message, length delimited. Does not implicitly {@link proto.RecentEmojiWeightsAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.RecentEmojiWeightsAction + * @static + * @param {proto.IRecentEmojiWeightsAction} message RecentEmojiWeightsAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecentEmojiWeightsAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RecentEmojiWeightsAction message from the specified reader or buffer. + * @function decode + * @memberof proto.RecentEmojiWeightsAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.RecentEmojiWeightsAction} RecentEmojiWeightsAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecentEmojiWeightsAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.RecentEmojiWeightsAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.weights && message.weights.length)) + message.weights = []; + message.weights.push($root.proto.RecentEmojiWeight.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RecentEmojiWeightsAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.RecentEmojiWeightsAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.RecentEmojiWeightsAction} RecentEmojiWeightsAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecentEmojiWeightsAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RecentEmojiWeightsAction message. + * @function verify + * @memberof proto.RecentEmojiWeightsAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RecentEmojiWeightsAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.weights != null && message.hasOwnProperty("weights")) { + if (!Array.isArray(message.weights)) + return "weights: array expected"; + for (var i = 0; i < message.weights.length; ++i) { + var error = $root.proto.RecentEmojiWeight.verify(message.weights[i]); + if (error) + return "weights." + error; + } + } + return null; + }; + + /** + * Creates a RecentEmojiWeightsAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.RecentEmojiWeightsAction + * @static + * @param {Object.} object Plain object + * @returns {proto.RecentEmojiWeightsAction} RecentEmojiWeightsAction + */ + RecentEmojiWeightsAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.RecentEmojiWeightsAction) + return object; + var message = new $root.proto.RecentEmojiWeightsAction(); + if (object.weights) { + if (!Array.isArray(object.weights)) + throw TypeError(".proto.RecentEmojiWeightsAction.weights: array expected"); + message.weights = []; + for (var i = 0; i < object.weights.length; ++i) { + if (typeof object.weights[i] !== "object") + throw TypeError(".proto.RecentEmojiWeightsAction.weights: object expected"); + message.weights[i] = $root.proto.RecentEmojiWeight.fromObject(object.weights[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a RecentEmojiWeightsAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.RecentEmojiWeightsAction + * @static + * @param {proto.RecentEmojiWeightsAction} message RecentEmojiWeightsAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RecentEmojiWeightsAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.weights = []; + if (message.weights && message.weights.length) { + object.weights = []; + for (var j = 0; j < message.weights.length; ++j) + object.weights[j] = $root.proto.RecentEmojiWeight.toObject(message.weights[j], options); + } + return object; + }; + + /** + * Converts this RecentEmojiWeightsAction to JSON. + * @function toJSON + * @memberof proto.RecentEmojiWeightsAction + * @instance + * @returns {Object.} JSON object + */ + RecentEmojiWeightsAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RecentEmojiWeightsAction; + })(); + + proto.RecentStickerMetadata = (function() { + + /** + * Properties of a RecentStickerMetadata. + * @memberof proto + * @interface IRecentStickerMetadata + * @property {string|null} [directPath] RecentStickerMetadata directPath + * @property {string|null} [encFilehash] RecentStickerMetadata encFilehash + * @property {string|null} [mediaKey] RecentStickerMetadata mediaKey + * @property {string|null} [stanzaId] RecentStickerMetadata stanzaId + * @property {string|null} [chatJid] RecentStickerMetadata chatJid + * @property {string|null} [participant] RecentStickerMetadata participant + * @property {boolean|null} [isSentByMe] RecentStickerMetadata isSentByMe + */ + + /** + * Constructs a new RecentStickerMetadata. + * @memberof proto + * @classdesc Represents a RecentStickerMetadata. + * @implements IRecentStickerMetadata + * @constructor + * @param {proto.IRecentStickerMetadata=} [properties] Properties to set + */ + function RecentStickerMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RecentStickerMetadata directPath. + * @member {string} directPath + * @memberof proto.RecentStickerMetadata + * @instance + */ + RecentStickerMetadata.prototype.directPath = ""; + + /** + * RecentStickerMetadata encFilehash. + * @member {string} encFilehash + * @memberof proto.RecentStickerMetadata + * @instance + */ + RecentStickerMetadata.prototype.encFilehash = ""; + + /** + * RecentStickerMetadata mediaKey. + * @member {string} mediaKey + * @memberof proto.RecentStickerMetadata + * @instance + */ + RecentStickerMetadata.prototype.mediaKey = ""; + + /** + * RecentStickerMetadata stanzaId. + * @member {string} stanzaId + * @memberof proto.RecentStickerMetadata + * @instance + */ + RecentStickerMetadata.prototype.stanzaId = ""; + + /** + * RecentStickerMetadata chatJid. + * @member {string} chatJid + * @memberof proto.RecentStickerMetadata + * @instance + */ + RecentStickerMetadata.prototype.chatJid = ""; + + /** + * RecentStickerMetadata participant. + * @member {string} participant + * @memberof proto.RecentStickerMetadata + * @instance + */ + RecentStickerMetadata.prototype.participant = ""; + + /** + * RecentStickerMetadata isSentByMe. + * @member {boolean} isSentByMe + * @memberof proto.RecentStickerMetadata + * @instance + */ + RecentStickerMetadata.prototype.isSentByMe = false; + + /** + * Creates a new RecentStickerMetadata instance using the specified properties. + * @function create + * @memberof proto.RecentStickerMetadata + * @static + * @param {proto.IRecentStickerMetadata=} [properties] Properties to set + * @returns {proto.RecentStickerMetadata} RecentStickerMetadata instance + */ + RecentStickerMetadata.create = function create(properties) { + return new RecentStickerMetadata(properties); + }; + + /** + * Encodes the specified RecentStickerMetadata message. Does not implicitly {@link proto.RecentStickerMetadata.verify|verify} messages. + * @function encode + * @memberof proto.RecentStickerMetadata + * @static + * @param {proto.IRecentStickerMetadata} message RecentStickerMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecentStickerMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.directPath); + if (message.encFilehash != null && Object.hasOwnProperty.call(message, "encFilehash")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.encFilehash); + if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.mediaKey); + if (message.stanzaId != null && Object.hasOwnProperty.call(message, "stanzaId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.stanzaId); + if (message.chatJid != null && Object.hasOwnProperty.call(message, "chatJid")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.chatJid); + if (message.participant != null && Object.hasOwnProperty.call(message, "participant")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.participant); + if (message.isSentByMe != null && Object.hasOwnProperty.call(message, "isSentByMe")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.isSentByMe); + return writer; + }; + + /** + * Encodes the specified RecentStickerMetadata message, length delimited. Does not implicitly {@link proto.RecentStickerMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.RecentStickerMetadata + * @static + * @param {proto.IRecentStickerMetadata} message RecentStickerMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecentStickerMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RecentStickerMetadata message from the specified reader or buffer. + * @function decode + * @memberof proto.RecentStickerMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.RecentStickerMetadata} RecentStickerMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecentStickerMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.RecentStickerMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.directPath = reader.string(); + break; + case 2: + message.encFilehash = reader.string(); + break; + case 3: + message.mediaKey = reader.string(); + break; + case 4: + message.stanzaId = reader.string(); + break; + case 5: + message.chatJid = reader.string(); + break; + case 6: + message.participant = reader.string(); + break; + case 7: + message.isSentByMe = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RecentStickerMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.RecentStickerMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.RecentStickerMetadata} RecentStickerMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecentStickerMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RecentStickerMetadata message. + * @function verify + * @memberof proto.RecentStickerMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RecentStickerMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.directPath != null && message.hasOwnProperty("directPath")) + if (!$util.isString(message.directPath)) + return "directPath: string expected"; + if (message.encFilehash != null && message.hasOwnProperty("encFilehash")) + if (!$util.isString(message.encFilehash)) + return "encFilehash: string expected"; + if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) + if (!$util.isString(message.mediaKey)) + return "mediaKey: string expected"; + if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) + if (!$util.isString(message.stanzaId)) + return "stanzaId: string expected"; + if (message.chatJid != null && message.hasOwnProperty("chatJid")) + if (!$util.isString(message.chatJid)) + return "chatJid: string expected"; + if (message.participant != null && message.hasOwnProperty("participant")) + if (!$util.isString(message.participant)) + return "participant: string expected"; + if (message.isSentByMe != null && message.hasOwnProperty("isSentByMe")) + if (typeof message.isSentByMe !== "boolean") + return "isSentByMe: boolean expected"; + return null; + }; + + /** + * Creates a RecentStickerMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.RecentStickerMetadata + * @static + * @param {Object.} object Plain object + * @returns {proto.RecentStickerMetadata} RecentStickerMetadata + */ + RecentStickerMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.proto.RecentStickerMetadata) + return object; + var message = new $root.proto.RecentStickerMetadata(); + if (object.directPath != null) + message.directPath = String(object.directPath); + if (object.encFilehash != null) + message.encFilehash = String(object.encFilehash); + if (object.mediaKey != null) + message.mediaKey = String(object.mediaKey); + if (object.stanzaId != null) + message.stanzaId = String(object.stanzaId); + if (object.chatJid != null) + message.chatJid = String(object.chatJid); + if (object.participant != null) + message.participant = String(object.participant); + if (object.isSentByMe != null) + message.isSentByMe = Boolean(object.isSentByMe); + return message; + }; + + /** + * Creates a plain object from a RecentStickerMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.RecentStickerMetadata + * @static + * @param {proto.RecentStickerMetadata} message RecentStickerMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RecentStickerMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.directPath = ""; + object.encFilehash = ""; + object.mediaKey = ""; + object.stanzaId = ""; + object.chatJid = ""; + object.participant = ""; + object.isSentByMe = false; + } + if (message.directPath != null && message.hasOwnProperty("directPath")) + object.directPath = message.directPath; + if (message.encFilehash != null && message.hasOwnProperty("encFilehash")) + object.encFilehash = message.encFilehash; + if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) + object.mediaKey = message.mediaKey; + if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) + object.stanzaId = message.stanzaId; + if (message.chatJid != null && message.hasOwnProperty("chatJid")) + object.chatJid = message.chatJid; + if (message.participant != null && message.hasOwnProperty("participant")) + object.participant = message.participant; + if (message.isSentByMe != null && message.hasOwnProperty("isSentByMe")) + object.isSentByMe = message.isSentByMe; + return object; + }; + + /** + * Converts this RecentStickerMetadata to JSON. + * @function toJSON + * @memberof proto.RecentStickerMetadata + * @instance + * @returns {Object.} JSON object + */ + RecentStickerMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RecentStickerMetadata; + })(); + + proto.RecentStickerWeight = (function() { + + /** + * Properties of a RecentStickerWeight. + * @memberof proto + * @interface IRecentStickerWeight + * @property {string|null} [filehash] RecentStickerWeight filehash + * @property {number|null} [weight] RecentStickerWeight weight + */ + + /** + * Constructs a new RecentStickerWeight. + * @memberof proto + * @classdesc Represents a RecentStickerWeight. + * @implements IRecentStickerWeight + * @constructor + * @param {proto.IRecentStickerWeight=} [properties] Properties to set + */ + function RecentStickerWeight(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RecentStickerWeight filehash. + * @member {string} filehash + * @memberof proto.RecentStickerWeight + * @instance + */ + RecentStickerWeight.prototype.filehash = ""; + + /** + * RecentStickerWeight weight. + * @member {number} weight + * @memberof proto.RecentStickerWeight + * @instance + */ + RecentStickerWeight.prototype.weight = 0; + + /** + * Creates a new RecentStickerWeight instance using the specified properties. + * @function create + * @memberof proto.RecentStickerWeight + * @static + * @param {proto.IRecentStickerWeight=} [properties] Properties to set + * @returns {proto.RecentStickerWeight} RecentStickerWeight instance + */ + RecentStickerWeight.create = function create(properties) { + return new RecentStickerWeight(properties); + }; + + /** + * Encodes the specified RecentStickerWeight message. Does not implicitly {@link proto.RecentStickerWeight.verify|verify} messages. + * @function encode + * @memberof proto.RecentStickerWeight + * @static + * @param {proto.IRecentStickerWeight} message RecentStickerWeight message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecentStickerWeight.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filehash != null && Object.hasOwnProperty.call(message, "filehash")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filehash); + if (message.weight != null && Object.hasOwnProperty.call(message, "weight")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.weight); + return writer; + }; + + /** + * Encodes the specified RecentStickerWeight message, length delimited. Does not implicitly {@link proto.RecentStickerWeight.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.RecentStickerWeight + * @static + * @param {proto.IRecentStickerWeight} message RecentStickerWeight message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecentStickerWeight.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RecentStickerWeight message from the specified reader or buffer. + * @function decode + * @memberof proto.RecentStickerWeight + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.RecentStickerWeight} RecentStickerWeight + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecentStickerWeight.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.RecentStickerWeight(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.filehash = reader.string(); + break; + case 2: + message.weight = reader.float(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RecentStickerWeight message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.RecentStickerWeight + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.RecentStickerWeight} RecentStickerWeight + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecentStickerWeight.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RecentStickerWeight message. + * @function verify + * @memberof proto.RecentStickerWeight + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RecentStickerWeight.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.filehash != null && message.hasOwnProperty("filehash")) + if (!$util.isString(message.filehash)) + return "filehash: string expected"; + if (message.weight != null && message.hasOwnProperty("weight")) + if (typeof message.weight !== "number") + return "weight: number expected"; + return null; + }; + + /** + * Creates a RecentStickerWeight message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.RecentStickerWeight + * @static + * @param {Object.} object Plain object + * @returns {proto.RecentStickerWeight} RecentStickerWeight + */ + RecentStickerWeight.fromObject = function fromObject(object) { + if (object instanceof $root.proto.RecentStickerWeight) + return object; + var message = new $root.proto.RecentStickerWeight(); + if (object.filehash != null) + message.filehash = String(object.filehash); + if (object.weight != null) + message.weight = Number(object.weight); + return message; + }; + + /** + * Creates a plain object from a RecentStickerWeight message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.RecentStickerWeight + * @static + * @param {proto.RecentStickerWeight} message RecentStickerWeight + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RecentStickerWeight.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filehash = ""; + object.weight = 0; + } + if (message.filehash != null && message.hasOwnProperty("filehash")) + object.filehash = message.filehash; + if (message.weight != null && message.hasOwnProperty("weight")) + object.weight = options.json && !isFinite(message.weight) ? String(message.weight) : message.weight; + return object; + }; + + /** + * Converts this RecentStickerWeight to JSON. + * @function toJSON + * @memberof proto.RecentStickerWeight + * @instance + * @returns {Object.} JSON object + */ + RecentStickerWeight.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RecentStickerWeight; + })(); + + proto.RecentStickerWeightsAction = (function() { + + /** + * Properties of a RecentStickerWeightsAction. + * @memberof proto + * @interface IRecentStickerWeightsAction + * @property {Array.|null} [weights] RecentStickerWeightsAction weights + */ + + /** + * Constructs a new RecentStickerWeightsAction. + * @memberof proto + * @classdesc Represents a RecentStickerWeightsAction. + * @implements IRecentStickerWeightsAction + * @constructor + * @param {proto.IRecentStickerWeightsAction=} [properties] Properties to set + */ + function RecentStickerWeightsAction(properties) { + this.weights = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RecentStickerWeightsAction weights. + * @member {Array.} weights + * @memberof proto.RecentStickerWeightsAction + * @instance + */ + RecentStickerWeightsAction.prototype.weights = $util.emptyArray; + + /** + * Creates a new RecentStickerWeightsAction instance using the specified properties. + * @function create + * @memberof proto.RecentStickerWeightsAction + * @static + * @param {proto.IRecentStickerWeightsAction=} [properties] Properties to set + * @returns {proto.RecentStickerWeightsAction} RecentStickerWeightsAction instance + */ + RecentStickerWeightsAction.create = function create(properties) { + return new RecentStickerWeightsAction(properties); + }; + + /** + * Encodes the specified RecentStickerWeightsAction message. Does not implicitly {@link proto.RecentStickerWeightsAction.verify|verify} messages. + * @function encode + * @memberof proto.RecentStickerWeightsAction + * @static + * @param {proto.IRecentStickerWeightsAction} message RecentStickerWeightsAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecentStickerWeightsAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.weights != null && message.weights.length) + for (var i = 0; i < message.weights.length; ++i) + $root.proto.RecentStickerWeight.encode(message.weights[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RecentStickerWeightsAction message, length delimited. Does not implicitly {@link proto.RecentStickerWeightsAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.RecentStickerWeightsAction + * @static + * @param {proto.IRecentStickerWeightsAction} message RecentStickerWeightsAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecentStickerWeightsAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RecentStickerWeightsAction message from the specified reader or buffer. + * @function decode + * @memberof proto.RecentStickerWeightsAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.RecentStickerWeightsAction} RecentStickerWeightsAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecentStickerWeightsAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.RecentStickerWeightsAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.weights && message.weights.length)) + message.weights = []; + message.weights.push($root.proto.RecentStickerWeight.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RecentStickerWeightsAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.RecentStickerWeightsAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.RecentStickerWeightsAction} RecentStickerWeightsAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecentStickerWeightsAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RecentStickerWeightsAction message. + * @function verify + * @memberof proto.RecentStickerWeightsAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RecentStickerWeightsAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.weights != null && message.hasOwnProperty("weights")) { + if (!Array.isArray(message.weights)) + return "weights: array expected"; + for (var i = 0; i < message.weights.length; ++i) { + var error = $root.proto.RecentStickerWeight.verify(message.weights[i]); + if (error) + return "weights." + error; + } + } + return null; + }; + + /** + * Creates a RecentStickerWeightsAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.RecentStickerWeightsAction + * @static + * @param {Object.} object Plain object + * @returns {proto.RecentStickerWeightsAction} RecentStickerWeightsAction + */ + RecentStickerWeightsAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.RecentStickerWeightsAction) + return object; + var message = new $root.proto.RecentStickerWeightsAction(); + if (object.weights) { + if (!Array.isArray(object.weights)) + throw TypeError(".proto.RecentStickerWeightsAction.weights: array expected"); + message.weights = []; + for (var i = 0; i < object.weights.length; ++i) { + if (typeof object.weights[i] !== "object") + throw TypeError(".proto.RecentStickerWeightsAction.weights: object expected"); + message.weights[i] = $root.proto.RecentStickerWeight.fromObject(object.weights[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a RecentStickerWeightsAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.RecentStickerWeightsAction + * @static + * @param {proto.RecentStickerWeightsAction} message RecentStickerWeightsAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RecentStickerWeightsAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.weights = []; + if (message.weights && message.weights.length) { + object.weights = []; + for (var j = 0; j < message.weights.length; ++j) + object.weights[j] = $root.proto.RecentStickerWeight.toObject(message.weights[j], options); + } + return object; + }; + + /** + * Converts this RecentStickerWeightsAction to JSON. + * @function toJSON + * @memberof proto.RecentStickerWeightsAction + * @instance + * @returns {Object.} JSON object + */ + RecentStickerWeightsAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RecentStickerWeightsAction; + })(); + + proto.RecordStructure = (function() { + + /** + * Properties of a RecordStructure. + * @memberof proto + * @interface IRecordStructure + * @property {proto.ISessionStructure|null} [currentSession] RecordStructure currentSession + * @property {Array.|null} [previousSessions] RecordStructure previousSessions + */ + + /** + * Constructs a new RecordStructure. + * @memberof proto + * @classdesc Represents a RecordStructure. + * @implements IRecordStructure + * @constructor + * @param {proto.IRecordStructure=} [properties] Properties to set + */ + function RecordStructure(properties) { + this.previousSessions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RecordStructure currentSession. + * @member {proto.ISessionStructure|null|undefined} currentSession + * @memberof proto.RecordStructure + * @instance + */ + RecordStructure.prototype.currentSession = null; + + /** + * RecordStructure previousSessions. + * @member {Array.} previousSessions + * @memberof proto.RecordStructure + * @instance + */ + RecordStructure.prototype.previousSessions = $util.emptyArray; + + /** + * Creates a new RecordStructure instance using the specified properties. + * @function create + * @memberof proto.RecordStructure + * @static + * @param {proto.IRecordStructure=} [properties] Properties to set + * @returns {proto.RecordStructure} RecordStructure instance + */ + RecordStructure.create = function create(properties) { + return new RecordStructure(properties); + }; + + /** + * Encodes the specified RecordStructure message. Does not implicitly {@link proto.RecordStructure.verify|verify} messages. + * @function encode + * @memberof proto.RecordStructure + * @static + * @param {proto.IRecordStructure} message RecordStructure message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecordStructure.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.currentSession != null && Object.hasOwnProperty.call(message, "currentSession")) + $root.proto.SessionStructure.encode(message.currentSession, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.previousSessions != null && message.previousSessions.length) + for (var i = 0; i < message.previousSessions.length; ++i) + $root.proto.SessionStructure.encode(message.previousSessions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RecordStructure message, length delimited. Does not implicitly {@link proto.RecordStructure.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.RecordStructure + * @static + * @param {proto.IRecordStructure} message RecordStructure message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecordStructure.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RecordStructure message from the specified reader or buffer. + * @function decode + * @memberof proto.RecordStructure + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.RecordStructure} RecordStructure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecordStructure.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.RecordStructure(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.currentSession = $root.proto.SessionStructure.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.previousSessions && message.previousSessions.length)) + message.previousSessions = []; + message.previousSessions.push($root.proto.SessionStructure.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RecordStructure message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.RecordStructure + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.RecordStructure} RecordStructure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecordStructure.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RecordStructure message. + * @function verify + * @memberof proto.RecordStructure + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RecordStructure.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.currentSession != null && message.hasOwnProperty("currentSession")) { + var error = $root.proto.SessionStructure.verify(message.currentSession); + if (error) + return "currentSession." + error; + } + if (message.previousSessions != null && message.hasOwnProperty("previousSessions")) { + if (!Array.isArray(message.previousSessions)) + return "previousSessions: array expected"; + for (var i = 0; i < message.previousSessions.length; ++i) { + var error = $root.proto.SessionStructure.verify(message.previousSessions[i]); + if (error) + return "previousSessions." + error; + } + } + return null; + }; + + /** + * Creates a RecordStructure message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.RecordStructure + * @static + * @param {Object.} object Plain object + * @returns {proto.RecordStructure} RecordStructure + */ + RecordStructure.fromObject = function fromObject(object) { + if (object instanceof $root.proto.RecordStructure) + return object; + var message = new $root.proto.RecordStructure(); + if (object.currentSession != null) { + if (typeof object.currentSession !== "object") + throw TypeError(".proto.RecordStructure.currentSession: object expected"); + message.currentSession = $root.proto.SessionStructure.fromObject(object.currentSession); + } + if (object.previousSessions) { + if (!Array.isArray(object.previousSessions)) + throw TypeError(".proto.RecordStructure.previousSessions: array expected"); + message.previousSessions = []; + for (var i = 0; i < object.previousSessions.length; ++i) { + if (typeof object.previousSessions[i] !== "object") + throw TypeError(".proto.RecordStructure.previousSessions: object expected"); + message.previousSessions[i] = $root.proto.SessionStructure.fromObject(object.previousSessions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a RecordStructure message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.RecordStructure + * @static + * @param {proto.RecordStructure} message RecordStructure + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RecordStructure.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.previousSessions = []; + if (options.defaults) + object.currentSession = null; + if (message.currentSession != null && message.hasOwnProperty("currentSession")) + object.currentSession = $root.proto.SessionStructure.toObject(message.currentSession, options); + if (message.previousSessions && message.previousSessions.length) { + object.previousSessions = []; + for (var j = 0; j < message.previousSessions.length; ++j) + object.previousSessions[j] = $root.proto.SessionStructure.toObject(message.previousSessions[j], options); + } + return object; + }; + + /** + * Converts this RecordStructure to JSON. + * @function toJSON + * @memberof proto.RecordStructure + * @instance + * @returns {Object.} JSON object + */ + RecordStructure.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RecordStructure; + })(); + proto.RequestPaymentMessage = (function() { /** @@ -30510,25 +51160,24 @@ $root.proto = (function() { return Section; })(); - proto.SenderKeyDistributionMessage = (function() { + proto.SecurityNotificationSetting = (function() { /** - * Properties of a SenderKeyDistributionMessage. + * Properties of a SecurityNotificationSetting. * @memberof proto - * @interface ISenderKeyDistributionMessage - * @property {string|null} [groupId] SenderKeyDistributionMessage groupId - * @property {Uint8Array|null} [axolotlSenderKeyDistributionMessage] SenderKeyDistributionMessage axolotlSenderKeyDistributionMessage + * @interface ISecurityNotificationSetting + * @property {boolean|null} [showNotification] SecurityNotificationSetting showNotification */ /** - * Constructs a new SenderKeyDistributionMessage. + * Constructs a new SecurityNotificationSetting. * @memberof proto - * @classdesc Represents a SenderKeyDistributionMessage. - * @implements ISenderKeyDistributionMessage + * @classdesc Represents a SecurityNotificationSetting. + * @implements ISecurityNotificationSetting * @constructor - * @param {proto.ISenderKeyDistributionMessage=} [properties] Properties to set + * @param {proto.ISecurityNotificationSetting=} [properties] Properties to set */ - function SenderKeyDistributionMessage(properties) { + function SecurityNotificationSetting(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -30536,88 +51185,75 @@ $root.proto = (function() { } /** - * SenderKeyDistributionMessage groupId. - * @member {string} groupId - * @memberof proto.SenderKeyDistributionMessage + * SecurityNotificationSetting showNotification. + * @member {boolean} showNotification + * @memberof proto.SecurityNotificationSetting * @instance */ - SenderKeyDistributionMessage.prototype.groupId = ""; + SecurityNotificationSetting.prototype.showNotification = false; /** - * SenderKeyDistributionMessage axolotlSenderKeyDistributionMessage. - * @member {Uint8Array} axolotlSenderKeyDistributionMessage - * @memberof proto.SenderKeyDistributionMessage - * @instance - */ - SenderKeyDistributionMessage.prototype.axolotlSenderKeyDistributionMessage = $util.newBuffer([]); - - /** - * Creates a new SenderKeyDistributionMessage instance using the specified properties. + * Creates a new SecurityNotificationSetting instance using the specified properties. * @function create - * @memberof proto.SenderKeyDistributionMessage + * @memberof proto.SecurityNotificationSetting * @static - * @param {proto.ISenderKeyDistributionMessage=} [properties] Properties to set - * @returns {proto.SenderKeyDistributionMessage} SenderKeyDistributionMessage instance + * @param {proto.ISecurityNotificationSetting=} [properties] Properties to set + * @returns {proto.SecurityNotificationSetting} SecurityNotificationSetting instance */ - SenderKeyDistributionMessage.create = function create(properties) { - return new SenderKeyDistributionMessage(properties); + SecurityNotificationSetting.create = function create(properties) { + return new SecurityNotificationSetting(properties); }; /** - * Encodes the specified SenderKeyDistributionMessage message. Does not implicitly {@link proto.SenderKeyDistributionMessage.verify|verify} messages. + * Encodes the specified SecurityNotificationSetting message. Does not implicitly {@link proto.SecurityNotificationSetting.verify|verify} messages. * @function encode - * @memberof proto.SenderKeyDistributionMessage + * @memberof proto.SecurityNotificationSetting * @static - * @param {proto.ISenderKeyDistributionMessage} message SenderKeyDistributionMessage message or plain object to encode + * @param {proto.ISecurityNotificationSetting} message SecurityNotificationSetting message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SenderKeyDistributionMessage.encode = function encode(message, writer) { + SecurityNotificationSetting.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.groupId != null && Object.hasOwnProperty.call(message, "groupId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.groupId); - if (message.axolotlSenderKeyDistributionMessage != null && Object.hasOwnProperty.call(message, "axolotlSenderKeyDistributionMessage")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.axolotlSenderKeyDistributionMessage); + if (message.showNotification != null && Object.hasOwnProperty.call(message, "showNotification")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.showNotification); return writer; }; /** - * Encodes the specified SenderKeyDistributionMessage message, length delimited. Does not implicitly {@link proto.SenderKeyDistributionMessage.verify|verify} messages. + * Encodes the specified SecurityNotificationSetting message, length delimited. Does not implicitly {@link proto.SecurityNotificationSetting.verify|verify} messages. * @function encodeDelimited - * @memberof proto.SenderKeyDistributionMessage + * @memberof proto.SecurityNotificationSetting * @static - * @param {proto.ISenderKeyDistributionMessage} message SenderKeyDistributionMessage message or plain object to encode + * @param {proto.ISecurityNotificationSetting} message SecurityNotificationSetting message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SenderKeyDistributionMessage.encodeDelimited = function encodeDelimited(message, writer) { + SecurityNotificationSetting.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SenderKeyDistributionMessage message from the specified reader or buffer. + * Decodes a SecurityNotificationSetting message from the specified reader or buffer. * @function decode - * @memberof proto.SenderKeyDistributionMessage + * @memberof proto.SecurityNotificationSetting * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.SenderKeyDistributionMessage} SenderKeyDistributionMessage + * @returns {proto.SecurityNotificationSetting} SecurityNotificationSetting * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SenderKeyDistributionMessage.decode = function decode(reader, length) { + SecurityNotificationSetting.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.SenderKeyDistributionMessage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.SecurityNotificationSetting(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.groupId = reader.string(); - break; - case 2: - message.axolotlSenderKeyDistributionMessage = reader.bytes(); + message.showNotification = reader.bool(); break; default: reader.skipType(tag & 7); @@ -30628,105 +51264,87 @@ $root.proto = (function() { }; /** - * Decodes a SenderKeyDistributionMessage message from the specified reader or buffer, length delimited. + * Decodes a SecurityNotificationSetting message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.SenderKeyDistributionMessage + * @memberof proto.SecurityNotificationSetting * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.SenderKeyDistributionMessage} SenderKeyDistributionMessage + * @returns {proto.SecurityNotificationSetting} SecurityNotificationSetting * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SenderKeyDistributionMessage.decodeDelimited = function decodeDelimited(reader) { + SecurityNotificationSetting.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SenderKeyDistributionMessage message. + * Verifies a SecurityNotificationSetting message. * @function verify - * @memberof proto.SenderKeyDistributionMessage + * @memberof proto.SecurityNotificationSetting * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SenderKeyDistributionMessage.verify = function verify(message) { + SecurityNotificationSetting.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.groupId != null && message.hasOwnProperty("groupId")) - if (!$util.isString(message.groupId)) - return "groupId: string expected"; - if (message.axolotlSenderKeyDistributionMessage != null && message.hasOwnProperty("axolotlSenderKeyDistributionMessage")) - if (!(message.axolotlSenderKeyDistributionMessage && typeof message.axolotlSenderKeyDistributionMessage.length === "number" || $util.isString(message.axolotlSenderKeyDistributionMessage))) - return "axolotlSenderKeyDistributionMessage: buffer expected"; + if (message.showNotification != null && message.hasOwnProperty("showNotification")) + if (typeof message.showNotification !== "boolean") + return "showNotification: boolean expected"; return null; }; /** - * Creates a SenderKeyDistributionMessage message from a plain object. Also converts values to their respective internal types. + * Creates a SecurityNotificationSetting message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.SenderKeyDistributionMessage + * @memberof proto.SecurityNotificationSetting * @static * @param {Object.} object Plain object - * @returns {proto.SenderKeyDistributionMessage} SenderKeyDistributionMessage + * @returns {proto.SecurityNotificationSetting} SecurityNotificationSetting */ - SenderKeyDistributionMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.SenderKeyDistributionMessage) + SecurityNotificationSetting.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SecurityNotificationSetting) return object; - var message = new $root.proto.SenderKeyDistributionMessage(); - if (object.groupId != null) - message.groupId = String(object.groupId); - if (object.axolotlSenderKeyDistributionMessage != null) - if (typeof object.axolotlSenderKeyDistributionMessage === "string") - $util.base64.decode(object.axolotlSenderKeyDistributionMessage, message.axolotlSenderKeyDistributionMessage = $util.newBuffer($util.base64.length(object.axolotlSenderKeyDistributionMessage)), 0); - else if (object.axolotlSenderKeyDistributionMessage.length) - message.axolotlSenderKeyDistributionMessage = object.axolotlSenderKeyDistributionMessage; + var message = new $root.proto.SecurityNotificationSetting(); + if (object.showNotification != null) + message.showNotification = Boolean(object.showNotification); return message; }; /** - * Creates a plain object from a SenderKeyDistributionMessage message. Also converts values to other types if specified. + * Creates a plain object from a SecurityNotificationSetting message. Also converts values to other types if specified. * @function toObject - * @memberof proto.SenderKeyDistributionMessage + * @memberof proto.SecurityNotificationSetting * @static - * @param {proto.SenderKeyDistributionMessage} message SenderKeyDistributionMessage + * @param {proto.SecurityNotificationSetting} message SecurityNotificationSetting * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SenderKeyDistributionMessage.toObject = function toObject(message, options) { + SecurityNotificationSetting.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.groupId = ""; - if (options.bytes === String) - object.axolotlSenderKeyDistributionMessage = ""; - else { - object.axolotlSenderKeyDistributionMessage = []; - if (options.bytes !== Array) - object.axolotlSenderKeyDistributionMessage = $util.newBuffer(object.axolotlSenderKeyDistributionMessage); - } - } - if (message.groupId != null && message.hasOwnProperty("groupId")) - object.groupId = message.groupId; - if (message.axolotlSenderKeyDistributionMessage != null && message.hasOwnProperty("axolotlSenderKeyDistributionMessage")) - object.axolotlSenderKeyDistributionMessage = options.bytes === String ? $util.base64.encode(message.axolotlSenderKeyDistributionMessage, 0, message.axolotlSenderKeyDistributionMessage.length) : options.bytes === Array ? Array.prototype.slice.call(message.axolotlSenderKeyDistributionMessage) : message.axolotlSenderKeyDistributionMessage; + if (options.defaults) + object.showNotification = false; + if (message.showNotification != null && message.hasOwnProperty("showNotification")) + object.showNotification = message.showNotification; return object; }; /** - * Converts this SenderKeyDistributionMessage to JSON. + * Converts this SecurityNotificationSetting to JSON. * @function toJSON - * @memberof proto.SenderKeyDistributionMessage + * @memberof proto.SecurityNotificationSetting * @instance * @returns {Object.} JSON object */ - SenderKeyDistributionMessage.prototype.toJSON = function toJSON() { + SecurityNotificationSetting.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SenderKeyDistributionMessage; + return SecurityNotificationSetting; })(); proto.SendPaymentMessage = (function() { @@ -30976,6 +51594,2356 @@ $root.proto = (function() { return SendPaymentMessage; })(); + proto.SenderChainKey = (function() { + + /** + * Properties of a SenderChainKey. + * @memberof proto + * @interface ISenderChainKey + * @property {number|null} [iteration] SenderChainKey iteration + * @property {Uint8Array|null} [seed] SenderChainKey seed + */ + + /** + * Constructs a new SenderChainKey. + * @memberof proto + * @classdesc Represents a SenderChainKey. + * @implements ISenderChainKey + * @constructor + * @param {proto.ISenderChainKey=} [properties] Properties to set + */ + function SenderChainKey(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SenderChainKey iteration. + * @member {number} iteration + * @memberof proto.SenderChainKey + * @instance + */ + SenderChainKey.prototype.iteration = 0; + + /** + * SenderChainKey seed. + * @member {Uint8Array} seed + * @memberof proto.SenderChainKey + * @instance + */ + SenderChainKey.prototype.seed = $util.newBuffer([]); + + /** + * Creates a new SenderChainKey instance using the specified properties. + * @function create + * @memberof proto.SenderChainKey + * @static + * @param {proto.ISenderChainKey=} [properties] Properties to set + * @returns {proto.SenderChainKey} SenderChainKey instance + */ + SenderChainKey.create = function create(properties) { + return new SenderChainKey(properties); + }; + + /** + * Encodes the specified SenderChainKey message. Does not implicitly {@link proto.SenderChainKey.verify|verify} messages. + * @function encode + * @memberof proto.SenderChainKey + * @static + * @param {proto.ISenderChainKey} message SenderChainKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SenderChainKey.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.iteration != null && Object.hasOwnProperty.call(message, "iteration")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.iteration); + if (message.seed != null && Object.hasOwnProperty.call(message, "seed")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.seed); + return writer; + }; + + /** + * Encodes the specified SenderChainKey message, length delimited. Does not implicitly {@link proto.SenderChainKey.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SenderChainKey + * @static + * @param {proto.ISenderChainKey} message SenderChainKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SenderChainKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SenderChainKey message from the specified reader or buffer. + * @function decode + * @memberof proto.SenderChainKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SenderChainKey} SenderChainKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SenderChainKey.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.SenderChainKey(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.iteration = reader.uint32(); + break; + case 2: + message.seed = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SenderChainKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SenderChainKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SenderChainKey} SenderChainKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SenderChainKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SenderChainKey message. + * @function verify + * @memberof proto.SenderChainKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SenderChainKey.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.iteration != null && message.hasOwnProperty("iteration")) + if (!$util.isInteger(message.iteration)) + return "iteration: integer expected"; + if (message.seed != null && message.hasOwnProperty("seed")) + if (!(message.seed && typeof message.seed.length === "number" || $util.isString(message.seed))) + return "seed: buffer expected"; + return null; + }; + + /** + * Creates a SenderChainKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SenderChainKey + * @static + * @param {Object.} object Plain object + * @returns {proto.SenderChainKey} SenderChainKey + */ + SenderChainKey.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SenderChainKey) + return object; + var message = new $root.proto.SenderChainKey(); + if (object.iteration != null) + message.iteration = object.iteration >>> 0; + if (object.seed != null) + if (typeof object.seed === "string") + $util.base64.decode(object.seed, message.seed = $util.newBuffer($util.base64.length(object.seed)), 0); + else if (object.seed.length) + message.seed = object.seed; + return message; + }; + + /** + * Creates a plain object from a SenderChainKey message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SenderChainKey + * @static + * @param {proto.SenderChainKey} message SenderChainKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SenderChainKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.iteration = 0; + if (options.bytes === String) + object.seed = ""; + else { + object.seed = []; + if (options.bytes !== Array) + object.seed = $util.newBuffer(object.seed); + } + } + if (message.iteration != null && message.hasOwnProperty("iteration")) + object.iteration = message.iteration; + if (message.seed != null && message.hasOwnProperty("seed")) + object.seed = options.bytes === String ? $util.base64.encode(message.seed, 0, message.seed.length) : options.bytes === Array ? Array.prototype.slice.call(message.seed) : message.seed; + return object; + }; + + /** + * Converts this SenderChainKey to JSON. + * @function toJSON + * @memberof proto.SenderChainKey + * @instance + * @returns {Object.} JSON object + */ + SenderChainKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SenderChainKey; + })(); + + proto.SenderKeyDistributionMessage = (function() { + + /** + * Properties of a SenderKeyDistributionMessage. + * @memberof proto + * @interface ISenderKeyDistributionMessage + * @property {string|null} [groupId] SenderKeyDistributionMessage groupId + * @property {Uint8Array|null} [axolotlSenderKeyDistributionMessage] SenderKeyDistributionMessage axolotlSenderKeyDistributionMessage + */ + + /** + * Constructs a new SenderKeyDistributionMessage. + * @memberof proto + * @classdesc Represents a SenderKeyDistributionMessage. + * @implements ISenderKeyDistributionMessage + * @constructor + * @param {proto.ISenderKeyDistributionMessage=} [properties] Properties to set + */ + function SenderKeyDistributionMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SenderKeyDistributionMessage groupId. + * @member {string} groupId + * @memberof proto.SenderKeyDistributionMessage + * @instance + */ + SenderKeyDistributionMessage.prototype.groupId = ""; + + /** + * SenderKeyDistributionMessage axolotlSenderKeyDistributionMessage. + * @member {Uint8Array} axolotlSenderKeyDistributionMessage + * @memberof proto.SenderKeyDistributionMessage + * @instance + */ + SenderKeyDistributionMessage.prototype.axolotlSenderKeyDistributionMessage = $util.newBuffer([]); + + /** + * Creates a new SenderKeyDistributionMessage instance using the specified properties. + * @function create + * @memberof proto.SenderKeyDistributionMessage + * @static + * @param {proto.ISenderKeyDistributionMessage=} [properties] Properties to set + * @returns {proto.SenderKeyDistributionMessage} SenderKeyDistributionMessage instance + */ + SenderKeyDistributionMessage.create = function create(properties) { + return new SenderKeyDistributionMessage(properties); + }; + + /** + * Encodes the specified SenderKeyDistributionMessage message. Does not implicitly {@link proto.SenderKeyDistributionMessage.verify|verify} messages. + * @function encode + * @memberof proto.SenderKeyDistributionMessage + * @static + * @param {proto.ISenderKeyDistributionMessage} message SenderKeyDistributionMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SenderKeyDistributionMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.groupId != null && Object.hasOwnProperty.call(message, "groupId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.groupId); + if (message.axolotlSenderKeyDistributionMessage != null && Object.hasOwnProperty.call(message, "axolotlSenderKeyDistributionMessage")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.axolotlSenderKeyDistributionMessage); + return writer; + }; + + /** + * Encodes the specified SenderKeyDistributionMessage message, length delimited. Does not implicitly {@link proto.SenderKeyDistributionMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SenderKeyDistributionMessage + * @static + * @param {proto.ISenderKeyDistributionMessage} message SenderKeyDistributionMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SenderKeyDistributionMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SenderKeyDistributionMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.SenderKeyDistributionMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SenderKeyDistributionMessage} SenderKeyDistributionMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SenderKeyDistributionMessage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.SenderKeyDistributionMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.groupId = reader.string(); + break; + case 2: + message.axolotlSenderKeyDistributionMessage = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SenderKeyDistributionMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SenderKeyDistributionMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SenderKeyDistributionMessage} SenderKeyDistributionMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SenderKeyDistributionMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SenderKeyDistributionMessage message. + * @function verify + * @memberof proto.SenderKeyDistributionMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SenderKeyDistributionMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.groupId != null && message.hasOwnProperty("groupId")) + if (!$util.isString(message.groupId)) + return "groupId: string expected"; + if (message.axolotlSenderKeyDistributionMessage != null && message.hasOwnProperty("axolotlSenderKeyDistributionMessage")) + if (!(message.axolotlSenderKeyDistributionMessage && typeof message.axolotlSenderKeyDistributionMessage.length === "number" || $util.isString(message.axolotlSenderKeyDistributionMessage))) + return "axolotlSenderKeyDistributionMessage: buffer expected"; + return null; + }; + + /** + * Creates a SenderKeyDistributionMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SenderKeyDistributionMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.SenderKeyDistributionMessage} SenderKeyDistributionMessage + */ + SenderKeyDistributionMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SenderKeyDistributionMessage) + return object; + var message = new $root.proto.SenderKeyDistributionMessage(); + if (object.groupId != null) + message.groupId = String(object.groupId); + if (object.axolotlSenderKeyDistributionMessage != null) + if (typeof object.axolotlSenderKeyDistributionMessage === "string") + $util.base64.decode(object.axolotlSenderKeyDistributionMessage, message.axolotlSenderKeyDistributionMessage = $util.newBuffer($util.base64.length(object.axolotlSenderKeyDistributionMessage)), 0); + else if (object.axolotlSenderKeyDistributionMessage.length) + message.axolotlSenderKeyDistributionMessage = object.axolotlSenderKeyDistributionMessage; + return message; + }; + + /** + * Creates a plain object from a SenderKeyDistributionMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SenderKeyDistributionMessage + * @static + * @param {proto.SenderKeyDistributionMessage} message SenderKeyDistributionMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SenderKeyDistributionMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.groupId = ""; + if (options.bytes === String) + object.axolotlSenderKeyDistributionMessage = ""; + else { + object.axolotlSenderKeyDistributionMessage = []; + if (options.bytes !== Array) + object.axolotlSenderKeyDistributionMessage = $util.newBuffer(object.axolotlSenderKeyDistributionMessage); + } + } + if (message.groupId != null && message.hasOwnProperty("groupId")) + object.groupId = message.groupId; + if (message.axolotlSenderKeyDistributionMessage != null && message.hasOwnProperty("axolotlSenderKeyDistributionMessage")) + object.axolotlSenderKeyDistributionMessage = options.bytes === String ? $util.base64.encode(message.axolotlSenderKeyDistributionMessage, 0, message.axolotlSenderKeyDistributionMessage.length) : options.bytes === Array ? Array.prototype.slice.call(message.axolotlSenderKeyDistributionMessage) : message.axolotlSenderKeyDistributionMessage; + return object; + }; + + /** + * Converts this SenderKeyDistributionMessage to JSON. + * @function toJSON + * @memberof proto.SenderKeyDistributionMessage + * @instance + * @returns {Object.} JSON object + */ + SenderKeyDistributionMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SenderKeyDistributionMessage; + })(); + + proto.SenderKeyRecordStructure = (function() { + + /** + * Properties of a SenderKeyRecordStructure. + * @memberof proto + * @interface ISenderKeyRecordStructure + * @property {Array.|null} [senderKeyStates] SenderKeyRecordStructure senderKeyStates + */ + + /** + * Constructs a new SenderKeyRecordStructure. + * @memberof proto + * @classdesc Represents a SenderKeyRecordStructure. + * @implements ISenderKeyRecordStructure + * @constructor + * @param {proto.ISenderKeyRecordStructure=} [properties] Properties to set + */ + function SenderKeyRecordStructure(properties) { + this.senderKeyStates = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SenderKeyRecordStructure senderKeyStates. + * @member {Array.} senderKeyStates + * @memberof proto.SenderKeyRecordStructure + * @instance + */ + SenderKeyRecordStructure.prototype.senderKeyStates = $util.emptyArray; + + /** + * Creates a new SenderKeyRecordStructure instance using the specified properties. + * @function create + * @memberof proto.SenderKeyRecordStructure + * @static + * @param {proto.ISenderKeyRecordStructure=} [properties] Properties to set + * @returns {proto.SenderKeyRecordStructure} SenderKeyRecordStructure instance + */ + SenderKeyRecordStructure.create = function create(properties) { + return new SenderKeyRecordStructure(properties); + }; + + /** + * Encodes the specified SenderKeyRecordStructure message. Does not implicitly {@link proto.SenderKeyRecordStructure.verify|verify} messages. + * @function encode + * @memberof proto.SenderKeyRecordStructure + * @static + * @param {proto.ISenderKeyRecordStructure} message SenderKeyRecordStructure message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SenderKeyRecordStructure.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.senderKeyStates != null && message.senderKeyStates.length) + for (var i = 0; i < message.senderKeyStates.length; ++i) + $root.proto.SenderKeyStateStructure.encode(message.senderKeyStates[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SenderKeyRecordStructure message, length delimited. Does not implicitly {@link proto.SenderKeyRecordStructure.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SenderKeyRecordStructure + * @static + * @param {proto.ISenderKeyRecordStructure} message SenderKeyRecordStructure message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SenderKeyRecordStructure.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SenderKeyRecordStructure message from the specified reader or buffer. + * @function decode + * @memberof proto.SenderKeyRecordStructure + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SenderKeyRecordStructure} SenderKeyRecordStructure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SenderKeyRecordStructure.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.SenderKeyRecordStructure(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.senderKeyStates && message.senderKeyStates.length)) + message.senderKeyStates = []; + message.senderKeyStates.push($root.proto.SenderKeyStateStructure.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SenderKeyRecordStructure message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SenderKeyRecordStructure + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SenderKeyRecordStructure} SenderKeyRecordStructure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SenderKeyRecordStructure.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SenderKeyRecordStructure message. + * @function verify + * @memberof proto.SenderKeyRecordStructure + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SenderKeyRecordStructure.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.senderKeyStates != null && message.hasOwnProperty("senderKeyStates")) { + if (!Array.isArray(message.senderKeyStates)) + return "senderKeyStates: array expected"; + for (var i = 0; i < message.senderKeyStates.length; ++i) { + var error = $root.proto.SenderKeyStateStructure.verify(message.senderKeyStates[i]); + if (error) + return "senderKeyStates." + error; + } + } + return null; + }; + + /** + * Creates a SenderKeyRecordStructure message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SenderKeyRecordStructure + * @static + * @param {Object.} object Plain object + * @returns {proto.SenderKeyRecordStructure} SenderKeyRecordStructure + */ + SenderKeyRecordStructure.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SenderKeyRecordStructure) + return object; + var message = new $root.proto.SenderKeyRecordStructure(); + if (object.senderKeyStates) { + if (!Array.isArray(object.senderKeyStates)) + throw TypeError(".proto.SenderKeyRecordStructure.senderKeyStates: array expected"); + message.senderKeyStates = []; + for (var i = 0; i < object.senderKeyStates.length; ++i) { + if (typeof object.senderKeyStates[i] !== "object") + throw TypeError(".proto.SenderKeyRecordStructure.senderKeyStates: object expected"); + message.senderKeyStates[i] = $root.proto.SenderKeyStateStructure.fromObject(object.senderKeyStates[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SenderKeyRecordStructure message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SenderKeyRecordStructure + * @static + * @param {proto.SenderKeyRecordStructure} message SenderKeyRecordStructure + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SenderKeyRecordStructure.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.senderKeyStates = []; + if (message.senderKeyStates && message.senderKeyStates.length) { + object.senderKeyStates = []; + for (var j = 0; j < message.senderKeyStates.length; ++j) + object.senderKeyStates[j] = $root.proto.SenderKeyStateStructure.toObject(message.senderKeyStates[j], options); + } + return object; + }; + + /** + * Converts this SenderKeyRecordStructure to JSON. + * @function toJSON + * @memberof proto.SenderKeyRecordStructure + * @instance + * @returns {Object.} JSON object + */ + SenderKeyRecordStructure.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SenderKeyRecordStructure; + })(); + + proto.SenderKeyStateStructure = (function() { + + /** + * Properties of a SenderKeyStateStructure. + * @memberof proto + * @interface ISenderKeyStateStructure + * @property {number|null} [senderKeyId] SenderKeyStateStructure senderKeyId + * @property {proto.ISenderChainKey|null} [senderChainKey] SenderKeyStateStructure senderChainKey + * @property {proto.ISenderSigningKey|null} [senderSigningKey] SenderKeyStateStructure senderSigningKey + * @property {Array.|null} [senderMessageKeys] SenderKeyStateStructure senderMessageKeys + */ + + /** + * Constructs a new SenderKeyStateStructure. + * @memberof proto + * @classdesc Represents a SenderKeyStateStructure. + * @implements ISenderKeyStateStructure + * @constructor + * @param {proto.ISenderKeyStateStructure=} [properties] Properties to set + */ + function SenderKeyStateStructure(properties) { + this.senderMessageKeys = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SenderKeyStateStructure senderKeyId. + * @member {number} senderKeyId + * @memberof proto.SenderKeyStateStructure + * @instance + */ + SenderKeyStateStructure.prototype.senderKeyId = 0; + + /** + * SenderKeyStateStructure senderChainKey. + * @member {proto.ISenderChainKey|null|undefined} senderChainKey + * @memberof proto.SenderKeyStateStructure + * @instance + */ + SenderKeyStateStructure.prototype.senderChainKey = null; + + /** + * SenderKeyStateStructure senderSigningKey. + * @member {proto.ISenderSigningKey|null|undefined} senderSigningKey + * @memberof proto.SenderKeyStateStructure + * @instance + */ + SenderKeyStateStructure.prototype.senderSigningKey = null; + + /** + * SenderKeyStateStructure senderMessageKeys. + * @member {Array.} senderMessageKeys + * @memberof proto.SenderKeyStateStructure + * @instance + */ + SenderKeyStateStructure.prototype.senderMessageKeys = $util.emptyArray; + + /** + * Creates a new SenderKeyStateStructure instance using the specified properties. + * @function create + * @memberof proto.SenderKeyStateStructure + * @static + * @param {proto.ISenderKeyStateStructure=} [properties] Properties to set + * @returns {proto.SenderKeyStateStructure} SenderKeyStateStructure instance + */ + SenderKeyStateStructure.create = function create(properties) { + return new SenderKeyStateStructure(properties); + }; + + /** + * Encodes the specified SenderKeyStateStructure message. Does not implicitly {@link proto.SenderKeyStateStructure.verify|verify} messages. + * @function encode + * @memberof proto.SenderKeyStateStructure + * @static + * @param {proto.ISenderKeyStateStructure} message SenderKeyStateStructure message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SenderKeyStateStructure.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.senderKeyId != null && Object.hasOwnProperty.call(message, "senderKeyId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.senderKeyId); + if (message.senderChainKey != null && Object.hasOwnProperty.call(message, "senderChainKey")) + $root.proto.SenderChainKey.encode(message.senderChainKey, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.senderSigningKey != null && Object.hasOwnProperty.call(message, "senderSigningKey")) + $root.proto.SenderSigningKey.encode(message.senderSigningKey, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.senderMessageKeys != null && message.senderMessageKeys.length) + for (var i = 0; i < message.senderMessageKeys.length; ++i) + $root.proto.SenderMessageKey.encode(message.senderMessageKeys[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SenderKeyStateStructure message, length delimited. Does not implicitly {@link proto.SenderKeyStateStructure.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SenderKeyStateStructure + * @static + * @param {proto.ISenderKeyStateStructure} message SenderKeyStateStructure message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SenderKeyStateStructure.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SenderKeyStateStructure message from the specified reader or buffer. + * @function decode + * @memberof proto.SenderKeyStateStructure + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SenderKeyStateStructure} SenderKeyStateStructure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SenderKeyStateStructure.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.SenderKeyStateStructure(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.senderKeyId = reader.uint32(); + break; + case 2: + message.senderChainKey = $root.proto.SenderChainKey.decode(reader, reader.uint32()); + break; + case 3: + message.senderSigningKey = $root.proto.SenderSigningKey.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.senderMessageKeys && message.senderMessageKeys.length)) + message.senderMessageKeys = []; + message.senderMessageKeys.push($root.proto.SenderMessageKey.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SenderKeyStateStructure message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SenderKeyStateStructure + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SenderKeyStateStructure} SenderKeyStateStructure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SenderKeyStateStructure.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SenderKeyStateStructure message. + * @function verify + * @memberof proto.SenderKeyStateStructure + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SenderKeyStateStructure.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.senderKeyId != null && message.hasOwnProperty("senderKeyId")) + if (!$util.isInteger(message.senderKeyId)) + return "senderKeyId: integer expected"; + if (message.senderChainKey != null && message.hasOwnProperty("senderChainKey")) { + var error = $root.proto.SenderChainKey.verify(message.senderChainKey); + if (error) + return "senderChainKey." + error; + } + if (message.senderSigningKey != null && message.hasOwnProperty("senderSigningKey")) { + var error = $root.proto.SenderSigningKey.verify(message.senderSigningKey); + if (error) + return "senderSigningKey." + error; + } + if (message.senderMessageKeys != null && message.hasOwnProperty("senderMessageKeys")) { + if (!Array.isArray(message.senderMessageKeys)) + return "senderMessageKeys: array expected"; + for (var i = 0; i < message.senderMessageKeys.length; ++i) { + var error = $root.proto.SenderMessageKey.verify(message.senderMessageKeys[i]); + if (error) + return "senderMessageKeys." + error; + } + } + return null; + }; + + /** + * Creates a SenderKeyStateStructure message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SenderKeyStateStructure + * @static + * @param {Object.} object Plain object + * @returns {proto.SenderKeyStateStructure} SenderKeyStateStructure + */ + SenderKeyStateStructure.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SenderKeyStateStructure) + return object; + var message = new $root.proto.SenderKeyStateStructure(); + if (object.senderKeyId != null) + message.senderKeyId = object.senderKeyId >>> 0; + if (object.senderChainKey != null) { + if (typeof object.senderChainKey !== "object") + throw TypeError(".proto.SenderKeyStateStructure.senderChainKey: object expected"); + message.senderChainKey = $root.proto.SenderChainKey.fromObject(object.senderChainKey); + } + if (object.senderSigningKey != null) { + if (typeof object.senderSigningKey !== "object") + throw TypeError(".proto.SenderKeyStateStructure.senderSigningKey: object expected"); + message.senderSigningKey = $root.proto.SenderSigningKey.fromObject(object.senderSigningKey); + } + if (object.senderMessageKeys) { + if (!Array.isArray(object.senderMessageKeys)) + throw TypeError(".proto.SenderKeyStateStructure.senderMessageKeys: array expected"); + message.senderMessageKeys = []; + for (var i = 0; i < object.senderMessageKeys.length; ++i) { + if (typeof object.senderMessageKeys[i] !== "object") + throw TypeError(".proto.SenderKeyStateStructure.senderMessageKeys: object expected"); + message.senderMessageKeys[i] = $root.proto.SenderMessageKey.fromObject(object.senderMessageKeys[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SenderKeyStateStructure message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SenderKeyStateStructure + * @static + * @param {proto.SenderKeyStateStructure} message SenderKeyStateStructure + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SenderKeyStateStructure.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.senderMessageKeys = []; + if (options.defaults) { + object.senderKeyId = 0; + object.senderChainKey = null; + object.senderSigningKey = null; + } + if (message.senderKeyId != null && message.hasOwnProperty("senderKeyId")) + object.senderKeyId = message.senderKeyId; + if (message.senderChainKey != null && message.hasOwnProperty("senderChainKey")) + object.senderChainKey = $root.proto.SenderChainKey.toObject(message.senderChainKey, options); + if (message.senderSigningKey != null && message.hasOwnProperty("senderSigningKey")) + object.senderSigningKey = $root.proto.SenderSigningKey.toObject(message.senderSigningKey, options); + if (message.senderMessageKeys && message.senderMessageKeys.length) { + object.senderMessageKeys = []; + for (var j = 0; j < message.senderMessageKeys.length; ++j) + object.senderMessageKeys[j] = $root.proto.SenderMessageKey.toObject(message.senderMessageKeys[j], options); + } + return object; + }; + + /** + * Converts this SenderKeyStateStructure to JSON. + * @function toJSON + * @memberof proto.SenderKeyStateStructure + * @instance + * @returns {Object.} JSON object + */ + SenderKeyStateStructure.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SenderKeyStateStructure; + })(); + + proto.SenderMessageKey = (function() { + + /** + * Properties of a SenderMessageKey. + * @memberof proto + * @interface ISenderMessageKey + * @property {number|null} [iteration] SenderMessageKey iteration + * @property {Uint8Array|null} [seed] SenderMessageKey seed + */ + + /** + * Constructs a new SenderMessageKey. + * @memberof proto + * @classdesc Represents a SenderMessageKey. + * @implements ISenderMessageKey + * @constructor + * @param {proto.ISenderMessageKey=} [properties] Properties to set + */ + function SenderMessageKey(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SenderMessageKey iteration. + * @member {number} iteration + * @memberof proto.SenderMessageKey + * @instance + */ + SenderMessageKey.prototype.iteration = 0; + + /** + * SenderMessageKey seed. + * @member {Uint8Array} seed + * @memberof proto.SenderMessageKey + * @instance + */ + SenderMessageKey.prototype.seed = $util.newBuffer([]); + + /** + * Creates a new SenderMessageKey instance using the specified properties. + * @function create + * @memberof proto.SenderMessageKey + * @static + * @param {proto.ISenderMessageKey=} [properties] Properties to set + * @returns {proto.SenderMessageKey} SenderMessageKey instance + */ + SenderMessageKey.create = function create(properties) { + return new SenderMessageKey(properties); + }; + + /** + * Encodes the specified SenderMessageKey message. Does not implicitly {@link proto.SenderMessageKey.verify|verify} messages. + * @function encode + * @memberof proto.SenderMessageKey + * @static + * @param {proto.ISenderMessageKey} message SenderMessageKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SenderMessageKey.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.iteration != null && Object.hasOwnProperty.call(message, "iteration")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.iteration); + if (message.seed != null && Object.hasOwnProperty.call(message, "seed")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.seed); + return writer; + }; + + /** + * Encodes the specified SenderMessageKey message, length delimited. Does not implicitly {@link proto.SenderMessageKey.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SenderMessageKey + * @static + * @param {proto.ISenderMessageKey} message SenderMessageKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SenderMessageKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SenderMessageKey message from the specified reader or buffer. + * @function decode + * @memberof proto.SenderMessageKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SenderMessageKey} SenderMessageKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SenderMessageKey.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.SenderMessageKey(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.iteration = reader.uint32(); + break; + case 2: + message.seed = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SenderMessageKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SenderMessageKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SenderMessageKey} SenderMessageKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SenderMessageKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SenderMessageKey message. + * @function verify + * @memberof proto.SenderMessageKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SenderMessageKey.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.iteration != null && message.hasOwnProperty("iteration")) + if (!$util.isInteger(message.iteration)) + return "iteration: integer expected"; + if (message.seed != null && message.hasOwnProperty("seed")) + if (!(message.seed && typeof message.seed.length === "number" || $util.isString(message.seed))) + return "seed: buffer expected"; + return null; + }; + + /** + * Creates a SenderMessageKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SenderMessageKey + * @static + * @param {Object.} object Plain object + * @returns {proto.SenderMessageKey} SenderMessageKey + */ + SenderMessageKey.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SenderMessageKey) + return object; + var message = new $root.proto.SenderMessageKey(); + if (object.iteration != null) + message.iteration = object.iteration >>> 0; + if (object.seed != null) + if (typeof object.seed === "string") + $util.base64.decode(object.seed, message.seed = $util.newBuffer($util.base64.length(object.seed)), 0); + else if (object.seed.length) + message.seed = object.seed; + return message; + }; + + /** + * Creates a plain object from a SenderMessageKey message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SenderMessageKey + * @static + * @param {proto.SenderMessageKey} message SenderMessageKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SenderMessageKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.iteration = 0; + if (options.bytes === String) + object.seed = ""; + else { + object.seed = []; + if (options.bytes !== Array) + object.seed = $util.newBuffer(object.seed); + } + } + if (message.iteration != null && message.hasOwnProperty("iteration")) + object.iteration = message.iteration; + if (message.seed != null && message.hasOwnProperty("seed")) + object.seed = options.bytes === String ? $util.base64.encode(message.seed, 0, message.seed.length) : options.bytes === Array ? Array.prototype.slice.call(message.seed) : message.seed; + return object; + }; + + /** + * Converts this SenderMessageKey to JSON. + * @function toJSON + * @memberof proto.SenderMessageKey + * @instance + * @returns {Object.} JSON object + */ + SenderMessageKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SenderMessageKey; + })(); + + proto.SenderSigningKey = (function() { + + /** + * Properties of a SenderSigningKey. + * @memberof proto + * @interface ISenderSigningKey + * @property {Uint8Array|null} ["public"] SenderSigningKey public + * @property {Uint8Array|null} ["private"] SenderSigningKey private + */ + + /** + * Constructs a new SenderSigningKey. + * @memberof proto + * @classdesc Represents a SenderSigningKey. + * @implements ISenderSigningKey + * @constructor + * @param {proto.ISenderSigningKey=} [properties] Properties to set + */ + function SenderSigningKey(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SenderSigningKey public. + * @member {Uint8Array} public + * @memberof proto.SenderSigningKey + * @instance + */ + SenderSigningKey.prototype["public"] = $util.newBuffer([]); + + /** + * SenderSigningKey private. + * @member {Uint8Array} private + * @memberof proto.SenderSigningKey + * @instance + */ + SenderSigningKey.prototype["private"] = $util.newBuffer([]); + + /** + * Creates a new SenderSigningKey instance using the specified properties. + * @function create + * @memberof proto.SenderSigningKey + * @static + * @param {proto.ISenderSigningKey=} [properties] Properties to set + * @returns {proto.SenderSigningKey} SenderSigningKey instance + */ + SenderSigningKey.create = function create(properties) { + return new SenderSigningKey(properties); + }; + + /** + * Encodes the specified SenderSigningKey message. Does not implicitly {@link proto.SenderSigningKey.verify|verify} messages. + * @function encode + * @memberof proto.SenderSigningKey + * @static + * @param {proto.ISenderSigningKey} message SenderSigningKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SenderSigningKey.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message["public"] != null && Object.hasOwnProperty.call(message, "public")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message["public"]); + if (message["private"] != null && Object.hasOwnProperty.call(message, "private")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message["private"]); + return writer; + }; + + /** + * Encodes the specified SenderSigningKey message, length delimited. Does not implicitly {@link proto.SenderSigningKey.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SenderSigningKey + * @static + * @param {proto.ISenderSigningKey} message SenderSigningKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SenderSigningKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SenderSigningKey message from the specified reader or buffer. + * @function decode + * @memberof proto.SenderSigningKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SenderSigningKey} SenderSigningKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SenderSigningKey.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.SenderSigningKey(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message["public"] = reader.bytes(); + break; + case 2: + message["private"] = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SenderSigningKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SenderSigningKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SenderSigningKey} SenderSigningKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SenderSigningKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SenderSigningKey message. + * @function verify + * @memberof proto.SenderSigningKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SenderSigningKey.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message["public"] != null && message.hasOwnProperty("public")) + if (!(message["public"] && typeof message["public"].length === "number" || $util.isString(message["public"]))) + return "public: buffer expected"; + if (message["private"] != null && message.hasOwnProperty("private")) + if (!(message["private"] && typeof message["private"].length === "number" || $util.isString(message["private"]))) + return "private: buffer expected"; + return null; + }; + + /** + * Creates a SenderSigningKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SenderSigningKey + * @static + * @param {Object.} object Plain object + * @returns {proto.SenderSigningKey} SenderSigningKey + */ + SenderSigningKey.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SenderSigningKey) + return object; + var message = new $root.proto.SenderSigningKey(); + if (object["public"] != null) + if (typeof object["public"] === "string") + $util.base64.decode(object["public"], message["public"] = $util.newBuffer($util.base64.length(object["public"])), 0); + else if (object["public"].length) + message["public"] = object["public"]; + if (object["private"] != null) + if (typeof object["private"] === "string") + $util.base64.decode(object["private"], message["private"] = $util.newBuffer($util.base64.length(object["private"])), 0); + else if (object["private"].length) + message["private"] = object["private"]; + return message; + }; + + /** + * Creates a plain object from a SenderSigningKey message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SenderSigningKey + * @static + * @param {proto.SenderSigningKey} message SenderSigningKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SenderSigningKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object["public"] = ""; + else { + object["public"] = []; + if (options.bytes !== Array) + object["public"] = $util.newBuffer(object["public"]); + } + if (options.bytes === String) + object["private"] = ""; + else { + object["private"] = []; + if (options.bytes !== Array) + object["private"] = $util.newBuffer(object["private"]); + } + } + if (message["public"] != null && message.hasOwnProperty("public")) + object["public"] = options.bytes === String ? $util.base64.encode(message["public"], 0, message["public"].length) : options.bytes === Array ? Array.prototype.slice.call(message["public"]) : message["public"]; + if (message["private"] != null && message.hasOwnProperty("private")) + object["private"] = options.bytes === String ? $util.base64.encode(message["private"], 0, message["private"].length) : options.bytes === Array ? Array.prototype.slice.call(message["private"]) : message["private"]; + return object; + }; + + /** + * Converts this SenderSigningKey to JSON. + * @function toJSON + * @memberof proto.SenderSigningKey + * @instance + * @returns {Object.} JSON object + */ + SenderSigningKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SenderSigningKey; + })(); + + proto.ServerErrorReceipt = (function() { + + /** + * Properties of a ServerErrorReceipt. + * @memberof proto + * @interface IServerErrorReceipt + * @property {string|null} [stanzaId] ServerErrorReceipt stanzaId + */ + + /** + * Constructs a new ServerErrorReceipt. + * @memberof proto + * @classdesc Represents a ServerErrorReceipt. + * @implements IServerErrorReceipt + * @constructor + * @param {proto.IServerErrorReceipt=} [properties] Properties to set + */ + function ServerErrorReceipt(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServerErrorReceipt stanzaId. + * @member {string} stanzaId + * @memberof proto.ServerErrorReceipt + * @instance + */ + ServerErrorReceipt.prototype.stanzaId = ""; + + /** + * Creates a new ServerErrorReceipt instance using the specified properties. + * @function create + * @memberof proto.ServerErrorReceipt + * @static + * @param {proto.IServerErrorReceipt=} [properties] Properties to set + * @returns {proto.ServerErrorReceipt} ServerErrorReceipt instance + */ + ServerErrorReceipt.create = function create(properties) { + return new ServerErrorReceipt(properties); + }; + + /** + * Encodes the specified ServerErrorReceipt message. Does not implicitly {@link proto.ServerErrorReceipt.verify|verify} messages. + * @function encode + * @memberof proto.ServerErrorReceipt + * @static + * @param {proto.IServerErrorReceipt} message ServerErrorReceipt message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServerErrorReceipt.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.stanzaId != null && Object.hasOwnProperty.call(message, "stanzaId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.stanzaId); + return writer; + }; + + /** + * Encodes the specified ServerErrorReceipt message, length delimited. Does not implicitly {@link proto.ServerErrorReceipt.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ServerErrorReceipt + * @static + * @param {proto.IServerErrorReceipt} message ServerErrorReceipt message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServerErrorReceipt.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServerErrorReceipt message from the specified reader or buffer. + * @function decode + * @memberof proto.ServerErrorReceipt + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ServerErrorReceipt} ServerErrorReceipt + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServerErrorReceipt.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ServerErrorReceipt(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.stanzaId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServerErrorReceipt message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ServerErrorReceipt + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ServerErrorReceipt} ServerErrorReceipt + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServerErrorReceipt.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServerErrorReceipt message. + * @function verify + * @memberof proto.ServerErrorReceipt + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServerErrorReceipt.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) + if (!$util.isString(message.stanzaId)) + return "stanzaId: string expected"; + return null; + }; + + /** + * Creates a ServerErrorReceipt message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ServerErrorReceipt + * @static + * @param {Object.} object Plain object + * @returns {proto.ServerErrorReceipt} ServerErrorReceipt + */ + ServerErrorReceipt.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ServerErrorReceipt) + return object; + var message = new $root.proto.ServerErrorReceipt(); + if (object.stanzaId != null) + message.stanzaId = String(object.stanzaId); + return message; + }; + + /** + * Creates a plain object from a ServerErrorReceipt message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ServerErrorReceipt + * @static + * @param {proto.ServerErrorReceipt} message ServerErrorReceipt + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServerErrorReceipt.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.stanzaId = ""; + if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) + object.stanzaId = message.stanzaId; + return object; + }; + + /** + * Converts this ServerErrorReceipt to JSON. + * @function toJSON + * @memberof proto.ServerErrorReceipt + * @instance + * @returns {Object.} JSON object + */ + ServerErrorReceipt.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ServerErrorReceipt; + })(); + + proto.ServerHello = (function() { + + /** + * Properties of a ServerHello. + * @memberof proto + * @interface IServerHello + * @property {Uint8Array|null} [ephemeral] ServerHello ephemeral + * @property {Uint8Array|null} ["static"] ServerHello static + * @property {Uint8Array|null} [payload] ServerHello payload + */ + + /** + * Constructs a new ServerHello. + * @memberof proto + * @classdesc Represents a ServerHello. + * @implements IServerHello + * @constructor + * @param {proto.IServerHello=} [properties] Properties to set + */ + function ServerHello(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServerHello ephemeral. + * @member {Uint8Array} ephemeral + * @memberof proto.ServerHello + * @instance + */ + ServerHello.prototype.ephemeral = $util.newBuffer([]); + + /** + * ServerHello static. + * @member {Uint8Array} static + * @memberof proto.ServerHello + * @instance + */ + ServerHello.prototype["static"] = $util.newBuffer([]); + + /** + * ServerHello payload. + * @member {Uint8Array} payload + * @memberof proto.ServerHello + * @instance + */ + ServerHello.prototype.payload = $util.newBuffer([]); + + /** + * Creates a new ServerHello instance using the specified properties. + * @function create + * @memberof proto.ServerHello + * @static + * @param {proto.IServerHello=} [properties] Properties to set + * @returns {proto.ServerHello} ServerHello instance + */ + ServerHello.create = function create(properties) { + return new ServerHello(properties); + }; + + /** + * Encodes the specified ServerHello message. Does not implicitly {@link proto.ServerHello.verify|verify} messages. + * @function encode + * @memberof proto.ServerHello + * @static + * @param {proto.IServerHello} message ServerHello message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServerHello.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ephemeral != null && Object.hasOwnProperty.call(message, "ephemeral")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.ephemeral); + if (message["static"] != null && Object.hasOwnProperty.call(message, "static")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message["static"]); + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.payload); + return writer; + }; + + /** + * Encodes the specified ServerHello message, length delimited. Does not implicitly {@link proto.ServerHello.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ServerHello + * @static + * @param {proto.IServerHello} message ServerHello message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServerHello.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServerHello message from the specified reader or buffer. + * @function decode + * @memberof proto.ServerHello + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ServerHello} ServerHello + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServerHello.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ServerHello(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.ephemeral = reader.bytes(); + break; + case 2: + message["static"] = reader.bytes(); + break; + case 3: + message.payload = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServerHello message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ServerHello + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ServerHello} ServerHello + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServerHello.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServerHello message. + * @function verify + * @memberof proto.ServerHello + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServerHello.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ephemeral != null && message.hasOwnProperty("ephemeral")) + if (!(message.ephemeral && typeof message.ephemeral.length === "number" || $util.isString(message.ephemeral))) + return "ephemeral: buffer expected"; + if (message["static"] != null && message.hasOwnProperty("static")) + if (!(message["static"] && typeof message["static"].length === "number" || $util.isString(message["static"]))) + return "static: buffer expected"; + if (message.payload != null && message.hasOwnProperty("payload")) + if (!(message.payload && typeof message.payload.length === "number" || $util.isString(message.payload))) + return "payload: buffer expected"; + return null; + }; + + /** + * Creates a ServerHello message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ServerHello + * @static + * @param {Object.} object Plain object + * @returns {proto.ServerHello} ServerHello + */ + ServerHello.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ServerHello) + return object; + var message = new $root.proto.ServerHello(); + if (object.ephemeral != null) + if (typeof object.ephemeral === "string") + $util.base64.decode(object.ephemeral, message.ephemeral = $util.newBuffer($util.base64.length(object.ephemeral)), 0); + else if (object.ephemeral.length) + message.ephemeral = object.ephemeral; + if (object["static"] != null) + if (typeof object["static"] === "string") + $util.base64.decode(object["static"], message["static"] = $util.newBuffer($util.base64.length(object["static"])), 0); + else if (object["static"].length) + message["static"] = object["static"]; + if (object.payload != null) + if (typeof object.payload === "string") + $util.base64.decode(object.payload, message.payload = $util.newBuffer($util.base64.length(object.payload)), 0); + else if (object.payload.length) + message.payload = object.payload; + return message; + }; + + /** + * Creates a plain object from a ServerHello message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ServerHello + * @static + * @param {proto.ServerHello} message ServerHello + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServerHello.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.ephemeral = ""; + else { + object.ephemeral = []; + if (options.bytes !== Array) + object.ephemeral = $util.newBuffer(object.ephemeral); + } + if (options.bytes === String) + object["static"] = ""; + else { + object["static"] = []; + if (options.bytes !== Array) + object["static"] = $util.newBuffer(object["static"]); + } + if (options.bytes === String) + object.payload = ""; + else { + object.payload = []; + if (options.bytes !== Array) + object.payload = $util.newBuffer(object.payload); + } + } + if (message.ephemeral != null && message.hasOwnProperty("ephemeral")) + object.ephemeral = options.bytes === String ? $util.base64.encode(message.ephemeral, 0, message.ephemeral.length) : options.bytes === Array ? Array.prototype.slice.call(message.ephemeral) : message.ephemeral; + if (message["static"] != null && message.hasOwnProperty("static")) + object["static"] = options.bytes === String ? $util.base64.encode(message["static"], 0, message["static"].length) : options.bytes === Array ? Array.prototype.slice.call(message["static"]) : message["static"]; + if (message.payload != null && message.hasOwnProperty("payload")) + object.payload = options.bytes === String ? $util.base64.encode(message.payload, 0, message.payload.length) : options.bytes === Array ? Array.prototype.slice.call(message.payload) : message.payload; + return object; + }; + + /** + * Converts this ServerHello to JSON. + * @function toJSON + * @memberof proto.ServerHello + * @instance + * @returns {Object.} JSON object + */ + ServerHello.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ServerHello; + })(); + + proto.SessionStructure = (function() { + + /** + * Properties of a SessionStructure. + * @memberof proto + * @interface ISessionStructure + * @property {number|null} [sessionVersion] SessionStructure sessionVersion + * @property {Uint8Array|null} [localIdentityPublic] SessionStructure localIdentityPublic + * @property {Uint8Array|null} [remoteIdentityPublic] SessionStructure remoteIdentityPublic + * @property {Uint8Array|null} [rootKey] SessionStructure rootKey + * @property {number|null} [previousCounter] SessionStructure previousCounter + * @property {proto.IChain|null} [senderChain] SessionStructure senderChain + * @property {Array.|null} [receiverChains] SessionStructure receiverChains + * @property {proto.IPendingKeyExchange|null} [pendingKeyExchange] SessionStructure pendingKeyExchange + * @property {proto.IPendingPreKey|null} [pendingPreKey] SessionStructure pendingPreKey + * @property {number|null} [remoteRegistrationId] SessionStructure remoteRegistrationId + * @property {number|null} [localRegistrationId] SessionStructure localRegistrationId + * @property {boolean|null} [needsRefresh] SessionStructure needsRefresh + * @property {Uint8Array|null} [aliceBaseKey] SessionStructure aliceBaseKey + */ + + /** + * Constructs a new SessionStructure. + * @memberof proto + * @classdesc Represents a SessionStructure. + * @implements ISessionStructure + * @constructor + * @param {proto.ISessionStructure=} [properties] Properties to set + */ + function SessionStructure(properties) { + this.receiverChains = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SessionStructure sessionVersion. + * @member {number} sessionVersion + * @memberof proto.SessionStructure + * @instance + */ + SessionStructure.prototype.sessionVersion = 0; + + /** + * SessionStructure localIdentityPublic. + * @member {Uint8Array} localIdentityPublic + * @memberof proto.SessionStructure + * @instance + */ + SessionStructure.prototype.localIdentityPublic = $util.newBuffer([]); + + /** + * SessionStructure remoteIdentityPublic. + * @member {Uint8Array} remoteIdentityPublic + * @memberof proto.SessionStructure + * @instance + */ + SessionStructure.prototype.remoteIdentityPublic = $util.newBuffer([]); + + /** + * SessionStructure rootKey. + * @member {Uint8Array} rootKey + * @memberof proto.SessionStructure + * @instance + */ + SessionStructure.prototype.rootKey = $util.newBuffer([]); + + /** + * SessionStructure previousCounter. + * @member {number} previousCounter + * @memberof proto.SessionStructure + * @instance + */ + SessionStructure.prototype.previousCounter = 0; + + /** + * SessionStructure senderChain. + * @member {proto.IChain|null|undefined} senderChain + * @memberof proto.SessionStructure + * @instance + */ + SessionStructure.prototype.senderChain = null; + + /** + * SessionStructure receiverChains. + * @member {Array.} receiverChains + * @memberof proto.SessionStructure + * @instance + */ + SessionStructure.prototype.receiverChains = $util.emptyArray; + + /** + * SessionStructure pendingKeyExchange. + * @member {proto.IPendingKeyExchange|null|undefined} pendingKeyExchange + * @memberof proto.SessionStructure + * @instance + */ + SessionStructure.prototype.pendingKeyExchange = null; + + /** + * SessionStructure pendingPreKey. + * @member {proto.IPendingPreKey|null|undefined} pendingPreKey + * @memberof proto.SessionStructure + * @instance + */ + SessionStructure.prototype.pendingPreKey = null; + + /** + * SessionStructure remoteRegistrationId. + * @member {number} remoteRegistrationId + * @memberof proto.SessionStructure + * @instance + */ + SessionStructure.prototype.remoteRegistrationId = 0; + + /** + * SessionStructure localRegistrationId. + * @member {number} localRegistrationId + * @memberof proto.SessionStructure + * @instance + */ + SessionStructure.prototype.localRegistrationId = 0; + + /** + * SessionStructure needsRefresh. + * @member {boolean} needsRefresh + * @memberof proto.SessionStructure + * @instance + */ + SessionStructure.prototype.needsRefresh = false; + + /** + * SessionStructure aliceBaseKey. + * @member {Uint8Array} aliceBaseKey + * @memberof proto.SessionStructure + * @instance + */ + SessionStructure.prototype.aliceBaseKey = $util.newBuffer([]); + + /** + * Creates a new SessionStructure instance using the specified properties. + * @function create + * @memberof proto.SessionStructure + * @static + * @param {proto.ISessionStructure=} [properties] Properties to set + * @returns {proto.SessionStructure} SessionStructure instance + */ + SessionStructure.create = function create(properties) { + return new SessionStructure(properties); + }; + + /** + * Encodes the specified SessionStructure message. Does not implicitly {@link proto.SessionStructure.verify|verify} messages. + * @function encode + * @memberof proto.SessionStructure + * @static + * @param {proto.ISessionStructure} message SessionStructure message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionStructure.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sessionVersion != null && Object.hasOwnProperty.call(message, "sessionVersion")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.sessionVersion); + if (message.localIdentityPublic != null && Object.hasOwnProperty.call(message, "localIdentityPublic")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.localIdentityPublic); + if (message.remoteIdentityPublic != null && Object.hasOwnProperty.call(message, "remoteIdentityPublic")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.remoteIdentityPublic); + if (message.rootKey != null && Object.hasOwnProperty.call(message, "rootKey")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.rootKey); + if (message.previousCounter != null && Object.hasOwnProperty.call(message, "previousCounter")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.previousCounter); + if (message.senderChain != null && Object.hasOwnProperty.call(message, "senderChain")) + $root.proto.Chain.encode(message.senderChain, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.receiverChains != null && message.receiverChains.length) + for (var i = 0; i < message.receiverChains.length; ++i) + $root.proto.Chain.encode(message.receiverChains[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.pendingKeyExchange != null && Object.hasOwnProperty.call(message, "pendingKeyExchange")) + $root.proto.PendingKeyExchange.encode(message.pendingKeyExchange, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.pendingPreKey != null && Object.hasOwnProperty.call(message, "pendingPreKey")) + $root.proto.PendingPreKey.encode(message.pendingPreKey, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.remoteRegistrationId != null && Object.hasOwnProperty.call(message, "remoteRegistrationId")) + writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.remoteRegistrationId); + if (message.localRegistrationId != null && Object.hasOwnProperty.call(message, "localRegistrationId")) + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.localRegistrationId); + if (message.needsRefresh != null && Object.hasOwnProperty.call(message, "needsRefresh")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.needsRefresh); + if (message.aliceBaseKey != null && Object.hasOwnProperty.call(message, "aliceBaseKey")) + writer.uint32(/* id 13, wireType 2 =*/106).bytes(message.aliceBaseKey); + return writer; + }; + + /** + * Encodes the specified SessionStructure message, length delimited. Does not implicitly {@link proto.SessionStructure.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SessionStructure + * @static + * @param {proto.ISessionStructure} message SessionStructure message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionStructure.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SessionStructure message from the specified reader or buffer. + * @function decode + * @memberof proto.SessionStructure + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SessionStructure} SessionStructure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionStructure.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.SessionStructure(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sessionVersion = reader.uint32(); + break; + case 2: + message.localIdentityPublic = reader.bytes(); + break; + case 3: + message.remoteIdentityPublic = reader.bytes(); + break; + case 4: + message.rootKey = reader.bytes(); + break; + case 5: + message.previousCounter = reader.uint32(); + break; + case 6: + message.senderChain = $root.proto.Chain.decode(reader, reader.uint32()); + break; + case 7: + if (!(message.receiverChains && message.receiverChains.length)) + message.receiverChains = []; + message.receiverChains.push($root.proto.Chain.decode(reader, reader.uint32())); + break; + case 8: + message.pendingKeyExchange = $root.proto.PendingKeyExchange.decode(reader, reader.uint32()); + break; + case 9: + message.pendingPreKey = $root.proto.PendingPreKey.decode(reader, reader.uint32()); + break; + case 10: + message.remoteRegistrationId = reader.uint32(); + break; + case 11: + message.localRegistrationId = reader.uint32(); + break; + case 12: + message.needsRefresh = reader.bool(); + break; + case 13: + message.aliceBaseKey = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SessionStructure message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SessionStructure + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SessionStructure} SessionStructure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionStructure.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SessionStructure message. + * @function verify + * @memberof proto.SessionStructure + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SessionStructure.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sessionVersion != null && message.hasOwnProperty("sessionVersion")) + if (!$util.isInteger(message.sessionVersion)) + return "sessionVersion: integer expected"; + if (message.localIdentityPublic != null && message.hasOwnProperty("localIdentityPublic")) + if (!(message.localIdentityPublic && typeof message.localIdentityPublic.length === "number" || $util.isString(message.localIdentityPublic))) + return "localIdentityPublic: buffer expected"; + if (message.remoteIdentityPublic != null && message.hasOwnProperty("remoteIdentityPublic")) + if (!(message.remoteIdentityPublic && typeof message.remoteIdentityPublic.length === "number" || $util.isString(message.remoteIdentityPublic))) + return "remoteIdentityPublic: buffer expected"; + if (message.rootKey != null && message.hasOwnProperty("rootKey")) + if (!(message.rootKey && typeof message.rootKey.length === "number" || $util.isString(message.rootKey))) + return "rootKey: buffer expected"; + if (message.previousCounter != null && message.hasOwnProperty("previousCounter")) + if (!$util.isInteger(message.previousCounter)) + return "previousCounter: integer expected"; + if (message.senderChain != null && message.hasOwnProperty("senderChain")) { + var error = $root.proto.Chain.verify(message.senderChain); + if (error) + return "senderChain." + error; + } + if (message.receiverChains != null && message.hasOwnProperty("receiverChains")) { + if (!Array.isArray(message.receiverChains)) + return "receiverChains: array expected"; + for (var i = 0; i < message.receiverChains.length; ++i) { + var error = $root.proto.Chain.verify(message.receiverChains[i]); + if (error) + return "receiverChains." + error; + } + } + if (message.pendingKeyExchange != null && message.hasOwnProperty("pendingKeyExchange")) { + var error = $root.proto.PendingKeyExchange.verify(message.pendingKeyExchange); + if (error) + return "pendingKeyExchange." + error; + } + if (message.pendingPreKey != null && message.hasOwnProperty("pendingPreKey")) { + var error = $root.proto.PendingPreKey.verify(message.pendingPreKey); + if (error) + return "pendingPreKey." + error; + } + if (message.remoteRegistrationId != null && message.hasOwnProperty("remoteRegistrationId")) + if (!$util.isInteger(message.remoteRegistrationId)) + return "remoteRegistrationId: integer expected"; + if (message.localRegistrationId != null && message.hasOwnProperty("localRegistrationId")) + if (!$util.isInteger(message.localRegistrationId)) + return "localRegistrationId: integer expected"; + if (message.needsRefresh != null && message.hasOwnProperty("needsRefresh")) + if (typeof message.needsRefresh !== "boolean") + return "needsRefresh: boolean expected"; + if (message.aliceBaseKey != null && message.hasOwnProperty("aliceBaseKey")) + if (!(message.aliceBaseKey && typeof message.aliceBaseKey.length === "number" || $util.isString(message.aliceBaseKey))) + return "aliceBaseKey: buffer expected"; + return null; + }; + + /** + * Creates a SessionStructure message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SessionStructure + * @static + * @param {Object.} object Plain object + * @returns {proto.SessionStructure} SessionStructure + */ + SessionStructure.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SessionStructure) + return object; + var message = new $root.proto.SessionStructure(); + if (object.sessionVersion != null) + message.sessionVersion = object.sessionVersion >>> 0; + if (object.localIdentityPublic != null) + if (typeof object.localIdentityPublic === "string") + $util.base64.decode(object.localIdentityPublic, message.localIdentityPublic = $util.newBuffer($util.base64.length(object.localIdentityPublic)), 0); + else if (object.localIdentityPublic.length) + message.localIdentityPublic = object.localIdentityPublic; + if (object.remoteIdentityPublic != null) + if (typeof object.remoteIdentityPublic === "string") + $util.base64.decode(object.remoteIdentityPublic, message.remoteIdentityPublic = $util.newBuffer($util.base64.length(object.remoteIdentityPublic)), 0); + else if (object.remoteIdentityPublic.length) + message.remoteIdentityPublic = object.remoteIdentityPublic; + if (object.rootKey != null) + if (typeof object.rootKey === "string") + $util.base64.decode(object.rootKey, message.rootKey = $util.newBuffer($util.base64.length(object.rootKey)), 0); + else if (object.rootKey.length) + message.rootKey = object.rootKey; + if (object.previousCounter != null) + message.previousCounter = object.previousCounter >>> 0; + if (object.senderChain != null) { + if (typeof object.senderChain !== "object") + throw TypeError(".proto.SessionStructure.senderChain: object expected"); + message.senderChain = $root.proto.Chain.fromObject(object.senderChain); + } + if (object.receiverChains) { + if (!Array.isArray(object.receiverChains)) + throw TypeError(".proto.SessionStructure.receiverChains: array expected"); + message.receiverChains = []; + for (var i = 0; i < object.receiverChains.length; ++i) { + if (typeof object.receiverChains[i] !== "object") + throw TypeError(".proto.SessionStructure.receiverChains: object expected"); + message.receiverChains[i] = $root.proto.Chain.fromObject(object.receiverChains[i]); + } + } + if (object.pendingKeyExchange != null) { + if (typeof object.pendingKeyExchange !== "object") + throw TypeError(".proto.SessionStructure.pendingKeyExchange: object expected"); + message.pendingKeyExchange = $root.proto.PendingKeyExchange.fromObject(object.pendingKeyExchange); + } + if (object.pendingPreKey != null) { + if (typeof object.pendingPreKey !== "object") + throw TypeError(".proto.SessionStructure.pendingPreKey: object expected"); + message.pendingPreKey = $root.proto.PendingPreKey.fromObject(object.pendingPreKey); + } + if (object.remoteRegistrationId != null) + message.remoteRegistrationId = object.remoteRegistrationId >>> 0; + if (object.localRegistrationId != null) + message.localRegistrationId = object.localRegistrationId >>> 0; + if (object.needsRefresh != null) + message.needsRefresh = Boolean(object.needsRefresh); + if (object.aliceBaseKey != null) + if (typeof object.aliceBaseKey === "string") + $util.base64.decode(object.aliceBaseKey, message.aliceBaseKey = $util.newBuffer($util.base64.length(object.aliceBaseKey)), 0); + else if (object.aliceBaseKey.length) + message.aliceBaseKey = object.aliceBaseKey; + return message; + }; + + /** + * Creates a plain object from a SessionStructure message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SessionStructure + * @static + * @param {proto.SessionStructure} message SessionStructure + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SessionStructure.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.receiverChains = []; + if (options.defaults) { + object.sessionVersion = 0; + if (options.bytes === String) + object.localIdentityPublic = ""; + else { + object.localIdentityPublic = []; + if (options.bytes !== Array) + object.localIdentityPublic = $util.newBuffer(object.localIdentityPublic); + } + if (options.bytes === String) + object.remoteIdentityPublic = ""; + else { + object.remoteIdentityPublic = []; + if (options.bytes !== Array) + object.remoteIdentityPublic = $util.newBuffer(object.remoteIdentityPublic); + } + if (options.bytes === String) + object.rootKey = ""; + else { + object.rootKey = []; + if (options.bytes !== Array) + object.rootKey = $util.newBuffer(object.rootKey); + } + object.previousCounter = 0; + object.senderChain = null; + object.pendingKeyExchange = null; + object.pendingPreKey = null; + object.remoteRegistrationId = 0; + object.localRegistrationId = 0; + object.needsRefresh = false; + if (options.bytes === String) + object.aliceBaseKey = ""; + else { + object.aliceBaseKey = []; + if (options.bytes !== Array) + object.aliceBaseKey = $util.newBuffer(object.aliceBaseKey); + } + } + if (message.sessionVersion != null && message.hasOwnProperty("sessionVersion")) + object.sessionVersion = message.sessionVersion; + if (message.localIdentityPublic != null && message.hasOwnProperty("localIdentityPublic")) + object.localIdentityPublic = options.bytes === String ? $util.base64.encode(message.localIdentityPublic, 0, message.localIdentityPublic.length) : options.bytes === Array ? Array.prototype.slice.call(message.localIdentityPublic) : message.localIdentityPublic; + if (message.remoteIdentityPublic != null && message.hasOwnProperty("remoteIdentityPublic")) + object.remoteIdentityPublic = options.bytes === String ? $util.base64.encode(message.remoteIdentityPublic, 0, message.remoteIdentityPublic.length) : options.bytes === Array ? Array.prototype.slice.call(message.remoteIdentityPublic) : message.remoteIdentityPublic; + if (message.rootKey != null && message.hasOwnProperty("rootKey")) + object.rootKey = options.bytes === String ? $util.base64.encode(message.rootKey, 0, message.rootKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.rootKey) : message.rootKey; + if (message.previousCounter != null && message.hasOwnProperty("previousCounter")) + object.previousCounter = message.previousCounter; + if (message.senderChain != null && message.hasOwnProperty("senderChain")) + object.senderChain = $root.proto.Chain.toObject(message.senderChain, options); + if (message.receiverChains && message.receiverChains.length) { + object.receiverChains = []; + for (var j = 0; j < message.receiverChains.length; ++j) + object.receiverChains[j] = $root.proto.Chain.toObject(message.receiverChains[j], options); + } + if (message.pendingKeyExchange != null && message.hasOwnProperty("pendingKeyExchange")) + object.pendingKeyExchange = $root.proto.PendingKeyExchange.toObject(message.pendingKeyExchange, options); + if (message.pendingPreKey != null && message.hasOwnProperty("pendingPreKey")) + object.pendingPreKey = $root.proto.PendingPreKey.toObject(message.pendingPreKey, options); + if (message.remoteRegistrationId != null && message.hasOwnProperty("remoteRegistrationId")) + object.remoteRegistrationId = message.remoteRegistrationId; + if (message.localRegistrationId != null && message.hasOwnProperty("localRegistrationId")) + object.localRegistrationId = message.localRegistrationId; + if (message.needsRefresh != null && message.hasOwnProperty("needsRefresh")) + object.needsRefresh = message.needsRefresh; + if (message.aliceBaseKey != null && message.hasOwnProperty("aliceBaseKey")) + object.aliceBaseKey = options.bytes === String ? $util.base64.encode(message.aliceBaseKey, 0, message.aliceBaseKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.aliceBaseKey) : message.aliceBaseKey; + return object; + }; + + /** + * Converts this SessionStructure to JSON. + * @function toJSON + * @memberof proto.SessionStructure + * @instance + * @returns {Object.} JSON object + */ + SessionStructure.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SessionStructure; + })(); + proto.ShopMessage = (function() { /** @@ -31249,6 +54217,323 @@ $root.proto = (function() { return ShopMessage; })(); + proto.SignedPreKeyRecordStructure = (function() { + + /** + * Properties of a SignedPreKeyRecordStructure. + * @memberof proto + * @interface ISignedPreKeyRecordStructure + * @property {number|null} [id] SignedPreKeyRecordStructure id + * @property {Uint8Array|null} [publicKey] SignedPreKeyRecordStructure publicKey + * @property {Uint8Array|null} [privateKey] SignedPreKeyRecordStructure privateKey + * @property {Uint8Array|null} [signature] SignedPreKeyRecordStructure signature + * @property {number|Long|null} [timestamp] SignedPreKeyRecordStructure timestamp + */ + + /** + * Constructs a new SignedPreKeyRecordStructure. + * @memberof proto + * @classdesc Represents a SignedPreKeyRecordStructure. + * @implements ISignedPreKeyRecordStructure + * @constructor + * @param {proto.ISignedPreKeyRecordStructure=} [properties] Properties to set + */ + function SignedPreKeyRecordStructure(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SignedPreKeyRecordStructure id. + * @member {number} id + * @memberof proto.SignedPreKeyRecordStructure + * @instance + */ + SignedPreKeyRecordStructure.prototype.id = 0; + + /** + * SignedPreKeyRecordStructure publicKey. + * @member {Uint8Array} publicKey + * @memberof proto.SignedPreKeyRecordStructure + * @instance + */ + SignedPreKeyRecordStructure.prototype.publicKey = $util.newBuffer([]); + + /** + * SignedPreKeyRecordStructure privateKey. + * @member {Uint8Array} privateKey + * @memberof proto.SignedPreKeyRecordStructure + * @instance + */ + SignedPreKeyRecordStructure.prototype.privateKey = $util.newBuffer([]); + + /** + * SignedPreKeyRecordStructure signature. + * @member {Uint8Array} signature + * @memberof proto.SignedPreKeyRecordStructure + * @instance + */ + SignedPreKeyRecordStructure.prototype.signature = $util.newBuffer([]); + + /** + * SignedPreKeyRecordStructure timestamp. + * @member {number|Long} timestamp + * @memberof proto.SignedPreKeyRecordStructure + * @instance + */ + SignedPreKeyRecordStructure.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new SignedPreKeyRecordStructure instance using the specified properties. + * @function create + * @memberof proto.SignedPreKeyRecordStructure + * @static + * @param {proto.ISignedPreKeyRecordStructure=} [properties] Properties to set + * @returns {proto.SignedPreKeyRecordStructure} SignedPreKeyRecordStructure instance + */ + SignedPreKeyRecordStructure.create = function create(properties) { + return new SignedPreKeyRecordStructure(properties); + }; + + /** + * Encodes the specified SignedPreKeyRecordStructure message. Does not implicitly {@link proto.SignedPreKeyRecordStructure.verify|verify} messages. + * @function encode + * @memberof proto.SignedPreKeyRecordStructure + * @static + * @param {proto.ISignedPreKeyRecordStructure} message SignedPreKeyRecordStructure message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SignedPreKeyRecordStructure.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.id); + if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.publicKey); + if (message.privateKey != null && Object.hasOwnProperty.call(message, "privateKey")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.privateKey); + if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.signature); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + writer.uint32(/* id 5, wireType 1 =*/41).fixed64(message.timestamp); + return writer; + }; + + /** + * Encodes the specified SignedPreKeyRecordStructure message, length delimited. Does not implicitly {@link proto.SignedPreKeyRecordStructure.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SignedPreKeyRecordStructure + * @static + * @param {proto.ISignedPreKeyRecordStructure} message SignedPreKeyRecordStructure message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SignedPreKeyRecordStructure.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SignedPreKeyRecordStructure message from the specified reader or buffer. + * @function decode + * @memberof proto.SignedPreKeyRecordStructure + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SignedPreKeyRecordStructure} SignedPreKeyRecordStructure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SignedPreKeyRecordStructure.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.SignedPreKeyRecordStructure(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.uint32(); + break; + case 2: + message.publicKey = reader.bytes(); + break; + case 3: + message.privateKey = reader.bytes(); + break; + case 4: + message.signature = reader.bytes(); + break; + case 5: + message.timestamp = reader.fixed64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SignedPreKeyRecordStructure message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SignedPreKeyRecordStructure + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SignedPreKeyRecordStructure} SignedPreKeyRecordStructure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SignedPreKeyRecordStructure.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SignedPreKeyRecordStructure message. + * @function verify + * @memberof proto.SignedPreKeyRecordStructure + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SignedPreKeyRecordStructure.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isInteger(message.id)) + return "id: integer expected"; + if (message.publicKey != null && message.hasOwnProperty("publicKey")) + if (!(message.publicKey && typeof message.publicKey.length === "number" || $util.isString(message.publicKey))) + return "publicKey: buffer expected"; + if (message.privateKey != null && message.hasOwnProperty("privateKey")) + if (!(message.privateKey && typeof message.privateKey.length === "number" || $util.isString(message.privateKey))) + return "privateKey: buffer expected"; + if (message.signature != null && message.hasOwnProperty("signature")) + if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) + return "signature: buffer expected"; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) + return "timestamp: integer|Long expected"; + return null; + }; + + /** + * Creates a SignedPreKeyRecordStructure message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SignedPreKeyRecordStructure + * @static + * @param {Object.} object Plain object + * @returns {proto.SignedPreKeyRecordStructure} SignedPreKeyRecordStructure + */ + SignedPreKeyRecordStructure.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SignedPreKeyRecordStructure) + return object; + var message = new $root.proto.SignedPreKeyRecordStructure(); + if (object.id != null) + message.id = object.id >>> 0; + if (object.publicKey != null) + if (typeof object.publicKey === "string") + $util.base64.decode(object.publicKey, message.publicKey = $util.newBuffer($util.base64.length(object.publicKey)), 0); + else if (object.publicKey.length) + message.publicKey = object.publicKey; + if (object.privateKey != null) + if (typeof object.privateKey === "string") + $util.base64.decode(object.privateKey, message.privateKey = $util.newBuffer($util.base64.length(object.privateKey)), 0); + else if (object.privateKey.length) + message.privateKey = object.privateKey; + if (object.signature != null) + if (typeof object.signature === "string") + $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); + else if (object.signature.length) + message.signature = object.signature; + if (object.timestamp != null) + if ($util.Long) + (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = false; + else if (typeof object.timestamp === "string") + message.timestamp = parseInt(object.timestamp, 10); + else if (typeof object.timestamp === "number") + message.timestamp = object.timestamp; + else if (typeof object.timestamp === "object") + message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a SignedPreKeyRecordStructure message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SignedPreKeyRecordStructure + * @static + * @param {proto.SignedPreKeyRecordStructure} message SignedPreKeyRecordStructure + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SignedPreKeyRecordStructure.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = 0; + if (options.bytes === String) + object.publicKey = ""; + else { + object.publicKey = []; + if (options.bytes !== Array) + object.publicKey = $util.newBuffer(object.publicKey); + } + if (options.bytes === String) + object.privateKey = ""; + else { + object.privateKey = []; + if (options.bytes !== Array) + object.privateKey = $util.newBuffer(object.privateKey); + } + if (options.bytes === String) + object.signature = ""; + else { + object.signature = []; + if (options.bytes !== Array) + object.signature = $util.newBuffer(object.signature); + } + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.timestamp = options.longs === String ? "0" : 0; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.publicKey != null && message.hasOwnProperty("publicKey")) + object.publicKey = options.bytes === String ? $util.base64.encode(message.publicKey, 0, message.publicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKey) : message.publicKey; + if (message.privateKey != null && message.hasOwnProperty("privateKey")) + object.privateKey = options.bytes === String ? $util.base64.encode(message.privateKey, 0, message.privateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.privateKey) : message.privateKey; + if (message.signature != null && message.hasOwnProperty("signature")) + object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (typeof message.timestamp === "number") + object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; + else + object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() : message.timestamp; + return object; + }; + + /** + * Converts this SignedPreKeyRecordStructure to JSON. + * @function toJSON + * @memberof proto.SignedPreKeyRecordStructure + * @instance + * @returns {Object.} JSON object + */ + SignedPreKeyRecordStructure.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SignedPreKeyRecordStructure; + })(); + proto.SingleSelectReply = (function() { /** @@ -31436,6 +54721,431 @@ $root.proto = (function() { return SingleSelectReply; })(); + proto.StarAction = (function() { + + /** + * Properties of a StarAction. + * @memberof proto + * @interface IStarAction + * @property {boolean|null} [starred] StarAction starred + */ + + /** + * Constructs a new StarAction. + * @memberof proto + * @classdesc Represents a StarAction. + * @implements IStarAction + * @constructor + * @param {proto.IStarAction=} [properties] Properties to set + */ + function StarAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StarAction starred. + * @member {boolean} starred + * @memberof proto.StarAction + * @instance + */ + StarAction.prototype.starred = false; + + /** + * Creates a new StarAction instance using the specified properties. + * @function create + * @memberof proto.StarAction + * @static + * @param {proto.IStarAction=} [properties] Properties to set + * @returns {proto.StarAction} StarAction instance + */ + StarAction.create = function create(properties) { + return new StarAction(properties); + }; + + /** + * Encodes the specified StarAction message. Does not implicitly {@link proto.StarAction.verify|verify} messages. + * @function encode + * @memberof proto.StarAction + * @static + * @param {proto.IStarAction} message StarAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StarAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.starred != null && Object.hasOwnProperty.call(message, "starred")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.starred); + return writer; + }; + + /** + * Encodes the specified StarAction message, length delimited. Does not implicitly {@link proto.StarAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.StarAction + * @static + * @param {proto.IStarAction} message StarAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StarAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StarAction message from the specified reader or buffer. + * @function decode + * @memberof proto.StarAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.StarAction} StarAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StarAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.StarAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.starred = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StarAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.StarAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.StarAction} StarAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StarAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StarAction message. + * @function verify + * @memberof proto.StarAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StarAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.starred != null && message.hasOwnProperty("starred")) + if (typeof message.starred !== "boolean") + return "starred: boolean expected"; + return null; + }; + + /** + * Creates a StarAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.StarAction + * @static + * @param {Object.} object Plain object + * @returns {proto.StarAction} StarAction + */ + StarAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.StarAction) + return object; + var message = new $root.proto.StarAction(); + if (object.starred != null) + message.starred = Boolean(object.starred); + return message; + }; + + /** + * Creates a plain object from a StarAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.StarAction + * @static + * @param {proto.StarAction} message StarAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StarAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.starred = false; + if (message.starred != null && message.hasOwnProperty("starred")) + object.starred = message.starred; + return object; + }; + + /** + * Converts this StarAction to JSON. + * @function toJSON + * @memberof proto.StarAction + * @instance + * @returns {Object.} JSON object + */ + StarAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return StarAction; + })(); + + proto.StatusPSA = (function() { + + /** + * Properties of a StatusPSA. + * @memberof proto + * @interface IStatusPSA + * @property {number|Long} campaignId StatusPSA campaignId + * @property {number|Long|null} [campaignExpirationTimestamp] StatusPSA campaignExpirationTimestamp + */ + + /** + * Constructs a new StatusPSA. + * @memberof proto + * @classdesc Represents a StatusPSA. + * @implements IStatusPSA + * @constructor + * @param {proto.IStatusPSA=} [properties] Properties to set + */ + function StatusPSA(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StatusPSA campaignId. + * @member {number|Long} campaignId + * @memberof proto.StatusPSA + * @instance + */ + StatusPSA.prototype.campaignId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * StatusPSA campaignExpirationTimestamp. + * @member {number|Long} campaignExpirationTimestamp + * @memberof proto.StatusPSA + * @instance + */ + StatusPSA.prototype.campaignExpirationTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new StatusPSA instance using the specified properties. + * @function create + * @memberof proto.StatusPSA + * @static + * @param {proto.IStatusPSA=} [properties] Properties to set + * @returns {proto.StatusPSA} StatusPSA instance + */ + StatusPSA.create = function create(properties) { + return new StatusPSA(properties); + }; + + /** + * Encodes the specified StatusPSA message. Does not implicitly {@link proto.StatusPSA.verify|verify} messages. + * @function encode + * @memberof proto.StatusPSA + * @static + * @param {proto.IStatusPSA} message StatusPSA message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StatusPSA.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 44, wireType 0 =*/352).uint64(message.campaignId); + if (message.campaignExpirationTimestamp != null && Object.hasOwnProperty.call(message, "campaignExpirationTimestamp")) + writer.uint32(/* id 45, wireType 0 =*/360).uint64(message.campaignExpirationTimestamp); + return writer; + }; + + /** + * Encodes the specified StatusPSA message, length delimited. Does not implicitly {@link proto.StatusPSA.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.StatusPSA + * @static + * @param {proto.IStatusPSA} message StatusPSA message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StatusPSA.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StatusPSA message from the specified reader or buffer. + * @function decode + * @memberof proto.StatusPSA + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.StatusPSA} StatusPSA + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StatusPSA.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.StatusPSA(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 44: + message.campaignId = reader.uint64(); + break; + case 45: + message.campaignExpirationTimestamp = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("campaignId")) + throw $util.ProtocolError("missing required 'campaignId'", { instance: message }); + return message; + }; + + /** + * Decodes a StatusPSA message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.StatusPSA + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.StatusPSA} StatusPSA + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StatusPSA.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StatusPSA message. + * @function verify + * @memberof proto.StatusPSA + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StatusPSA.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isInteger(message.campaignId) && !(message.campaignId && $util.isInteger(message.campaignId.low) && $util.isInteger(message.campaignId.high))) + return "campaignId: integer|Long expected"; + if (message.campaignExpirationTimestamp != null && message.hasOwnProperty("campaignExpirationTimestamp")) + if (!$util.isInteger(message.campaignExpirationTimestamp) && !(message.campaignExpirationTimestamp && $util.isInteger(message.campaignExpirationTimestamp.low) && $util.isInteger(message.campaignExpirationTimestamp.high))) + return "campaignExpirationTimestamp: integer|Long expected"; + return null; + }; + + /** + * Creates a StatusPSA message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.StatusPSA + * @static + * @param {Object.} object Plain object + * @returns {proto.StatusPSA} StatusPSA + */ + StatusPSA.fromObject = function fromObject(object) { + if (object instanceof $root.proto.StatusPSA) + return object; + var message = new $root.proto.StatusPSA(); + if (object.campaignId != null) + if ($util.Long) + (message.campaignId = $util.Long.fromValue(object.campaignId)).unsigned = true; + else if (typeof object.campaignId === "string") + message.campaignId = parseInt(object.campaignId, 10); + else if (typeof object.campaignId === "number") + message.campaignId = object.campaignId; + else if (typeof object.campaignId === "object") + message.campaignId = new $util.LongBits(object.campaignId.low >>> 0, object.campaignId.high >>> 0).toNumber(true); + if (object.campaignExpirationTimestamp != null) + if ($util.Long) + (message.campaignExpirationTimestamp = $util.Long.fromValue(object.campaignExpirationTimestamp)).unsigned = true; + else if (typeof object.campaignExpirationTimestamp === "string") + message.campaignExpirationTimestamp = parseInt(object.campaignExpirationTimestamp, 10); + else if (typeof object.campaignExpirationTimestamp === "number") + message.campaignExpirationTimestamp = object.campaignExpirationTimestamp; + else if (typeof object.campaignExpirationTimestamp === "object") + message.campaignExpirationTimestamp = new $util.LongBits(object.campaignExpirationTimestamp.low >>> 0, object.campaignExpirationTimestamp.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a StatusPSA message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.StatusPSA + * @static + * @param {proto.StatusPSA} message StatusPSA + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StatusPSA.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.campaignId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.campaignId = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.campaignExpirationTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.campaignExpirationTimestamp = options.longs === String ? "0" : 0; + } + if (message.campaignId != null && message.hasOwnProperty("campaignId")) + if (typeof message.campaignId === "number") + object.campaignId = options.longs === String ? String(message.campaignId) : message.campaignId; + else + object.campaignId = options.longs === String ? $util.Long.prototype.toString.call(message.campaignId) : options.longs === Number ? new $util.LongBits(message.campaignId.low >>> 0, message.campaignId.high >>> 0).toNumber(true) : message.campaignId; + if (message.campaignExpirationTimestamp != null && message.hasOwnProperty("campaignExpirationTimestamp")) + if (typeof message.campaignExpirationTimestamp === "number") + object.campaignExpirationTimestamp = options.longs === String ? String(message.campaignExpirationTimestamp) : message.campaignExpirationTimestamp; + else + object.campaignExpirationTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.campaignExpirationTimestamp) : options.longs === Number ? new $util.LongBits(message.campaignExpirationTimestamp.low >>> 0, message.campaignExpirationTimestamp.high >>> 0).toNumber(true) : message.campaignExpirationTimestamp; + return object; + }; + + /** + * Converts this StatusPSA to JSON. + * @function toJSON + * @memberof proto.StatusPSA + * @instance + * @returns {Object.} JSON object + */ + StatusPSA.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return StatusPSA; + })(); + proto.StickerMessage = (function() { /** @@ -32273,27 +55983,26 @@ $root.proto = (function() { return StickerSyncRMRMessage; })(); - proto.TemplateButton = (function() { + proto.SubscriptionAction = (function() { /** - * Properties of a TemplateButton. + * Properties of a SubscriptionAction. * @memberof proto - * @interface ITemplateButton - * @property {number|null} [index] TemplateButton index - * @property {proto.IQuickReplyButton|null} [quickReplyButton] TemplateButton quickReplyButton - * @property {proto.IURLButton|null} [urlButton] TemplateButton urlButton - * @property {proto.ICallButton|null} [callButton] TemplateButton callButton + * @interface ISubscriptionAction + * @property {boolean|null} [isDeactivated] SubscriptionAction isDeactivated + * @property {boolean|null} [isAutoRenewing] SubscriptionAction isAutoRenewing + * @property {number|Long|null} [expirationDate] SubscriptionAction expirationDate */ /** - * Constructs a new TemplateButton. + * Constructs a new SubscriptionAction. * @memberof proto - * @classdesc Represents a TemplateButton. - * @implements ITemplateButton + * @classdesc Represents a SubscriptionAction. + * @implements ISubscriptionAction * @constructor - * @param {proto.ITemplateButton=} [properties] Properties to set + * @param {proto.ISubscriptionAction=} [properties] Properties to set */ - function TemplateButton(properties) { + function SubscriptionAction(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -32301,128 +56010,101 @@ $root.proto = (function() { } /** - * TemplateButton index. - * @member {number} index - * @memberof proto.TemplateButton + * SubscriptionAction isDeactivated. + * @member {boolean} isDeactivated + * @memberof proto.SubscriptionAction * @instance */ - TemplateButton.prototype.index = 0; + SubscriptionAction.prototype.isDeactivated = false; /** - * TemplateButton quickReplyButton. - * @member {proto.IQuickReplyButton|null|undefined} quickReplyButton - * @memberof proto.TemplateButton + * SubscriptionAction isAutoRenewing. + * @member {boolean} isAutoRenewing + * @memberof proto.SubscriptionAction * @instance */ - TemplateButton.prototype.quickReplyButton = null; + SubscriptionAction.prototype.isAutoRenewing = false; /** - * TemplateButton urlButton. - * @member {proto.IURLButton|null|undefined} urlButton - * @memberof proto.TemplateButton + * SubscriptionAction expirationDate. + * @member {number|Long} expirationDate + * @memberof proto.SubscriptionAction * @instance */ - TemplateButton.prototype.urlButton = null; + SubscriptionAction.prototype.expirationDate = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * TemplateButton callButton. - * @member {proto.ICallButton|null|undefined} callButton - * @memberof proto.TemplateButton - * @instance - */ - TemplateButton.prototype.callButton = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * TemplateButton button. - * @member {"quickReplyButton"|"urlButton"|"callButton"|undefined} button - * @memberof proto.TemplateButton - * @instance - */ - Object.defineProperty(TemplateButton.prototype, "button", { - get: $util.oneOfGetter($oneOfFields = ["quickReplyButton", "urlButton", "callButton"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new TemplateButton instance using the specified properties. + * Creates a new SubscriptionAction instance using the specified properties. * @function create - * @memberof proto.TemplateButton + * @memberof proto.SubscriptionAction * @static - * @param {proto.ITemplateButton=} [properties] Properties to set - * @returns {proto.TemplateButton} TemplateButton instance + * @param {proto.ISubscriptionAction=} [properties] Properties to set + * @returns {proto.SubscriptionAction} SubscriptionAction instance */ - TemplateButton.create = function create(properties) { - return new TemplateButton(properties); + SubscriptionAction.create = function create(properties) { + return new SubscriptionAction(properties); }; /** - * Encodes the specified TemplateButton message. Does not implicitly {@link proto.TemplateButton.verify|verify} messages. + * Encodes the specified SubscriptionAction message. Does not implicitly {@link proto.SubscriptionAction.verify|verify} messages. * @function encode - * @memberof proto.TemplateButton + * @memberof proto.SubscriptionAction * @static - * @param {proto.ITemplateButton} message TemplateButton message or plain object to encode + * @param {proto.ISubscriptionAction} message SubscriptionAction message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TemplateButton.encode = function encode(message, writer) { + SubscriptionAction.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.quickReplyButton != null && Object.hasOwnProperty.call(message, "quickReplyButton")) - $root.proto.QuickReplyButton.encode(message.quickReplyButton, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.urlButton != null && Object.hasOwnProperty.call(message, "urlButton")) - $root.proto.URLButton.encode(message.urlButton, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.callButton != null && Object.hasOwnProperty.call(message, "callButton")) - $root.proto.CallButton.encode(message.callButton, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.index != null && Object.hasOwnProperty.call(message, "index")) - writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.index); + if (message.isDeactivated != null && Object.hasOwnProperty.call(message, "isDeactivated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isDeactivated); + if (message.isAutoRenewing != null && Object.hasOwnProperty.call(message, "isAutoRenewing")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isAutoRenewing); + if (message.expirationDate != null && Object.hasOwnProperty.call(message, "expirationDate")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.expirationDate); return writer; }; /** - * Encodes the specified TemplateButton message, length delimited. Does not implicitly {@link proto.TemplateButton.verify|verify} messages. + * Encodes the specified SubscriptionAction message, length delimited. Does not implicitly {@link proto.SubscriptionAction.verify|verify} messages. * @function encodeDelimited - * @memberof proto.TemplateButton + * @memberof proto.SubscriptionAction * @static - * @param {proto.ITemplateButton} message TemplateButton message or plain object to encode + * @param {proto.ISubscriptionAction} message SubscriptionAction message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TemplateButton.encodeDelimited = function encodeDelimited(message, writer) { + SubscriptionAction.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TemplateButton message from the specified reader or buffer. + * Decodes a SubscriptionAction message from the specified reader or buffer. * @function decode - * @memberof proto.TemplateButton + * @memberof proto.SubscriptionAction * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.TemplateButton} TemplateButton + * @returns {proto.SubscriptionAction} SubscriptionAction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TemplateButton.decode = function decode(reader, length) { + SubscriptionAction.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.TemplateButton(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.SubscriptionAction(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: - message.index = reader.uint32(); - break; case 1: - message.quickReplyButton = $root.proto.QuickReplyButton.decode(reader, reader.uint32()); + message.isDeactivated = reader.bool(); break; case 2: - message.urlButton = $root.proto.URLButton.decode(reader, reader.uint32()); + message.isAutoRenewing = reader.bool(); break; case 3: - message.callButton = $root.proto.CallButton.decode(reader, reader.uint32()); + message.expirationDate = reader.int64(); break; default: reader.skipType(tag & 7); @@ -32433,1771 +56115,141 @@ $root.proto = (function() { }; /** - * Decodes a TemplateButton message from the specified reader or buffer, length delimited. + * Decodes a SubscriptionAction message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.TemplateButton + * @memberof proto.SubscriptionAction * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.TemplateButton} TemplateButton + * @returns {proto.SubscriptionAction} SubscriptionAction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TemplateButton.decodeDelimited = function decodeDelimited(reader) { + SubscriptionAction.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TemplateButton message. + * Verifies a SubscriptionAction message. * @function verify - * @memberof proto.TemplateButton + * @memberof proto.SubscriptionAction * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TemplateButton.verify = function verify(message) { + SubscriptionAction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.index != null && message.hasOwnProperty("index")) - if (!$util.isInteger(message.index)) - return "index: integer expected"; - if (message.quickReplyButton != null && message.hasOwnProperty("quickReplyButton")) { - properties.button = 1; - { - var error = $root.proto.QuickReplyButton.verify(message.quickReplyButton); - if (error) - return "quickReplyButton." + error; - } - } - if (message.urlButton != null && message.hasOwnProperty("urlButton")) { - if (properties.button === 1) - return "button: multiple values"; - properties.button = 1; - { - var error = $root.proto.URLButton.verify(message.urlButton); - if (error) - return "urlButton." + error; - } - } - if (message.callButton != null && message.hasOwnProperty("callButton")) { - if (properties.button === 1) - return "button: multiple values"; - properties.button = 1; - { - var error = $root.proto.CallButton.verify(message.callButton); - if (error) - return "callButton." + error; - } - } + if (message.isDeactivated != null && message.hasOwnProperty("isDeactivated")) + if (typeof message.isDeactivated !== "boolean") + return "isDeactivated: boolean expected"; + if (message.isAutoRenewing != null && message.hasOwnProperty("isAutoRenewing")) + if (typeof message.isAutoRenewing !== "boolean") + return "isAutoRenewing: boolean expected"; + if (message.expirationDate != null && message.hasOwnProperty("expirationDate")) + if (!$util.isInteger(message.expirationDate) && !(message.expirationDate && $util.isInteger(message.expirationDate.low) && $util.isInteger(message.expirationDate.high))) + return "expirationDate: integer|Long expected"; return null; }; /** - * Creates a TemplateButton message from a plain object. Also converts values to their respective internal types. + * Creates a SubscriptionAction message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.TemplateButton + * @memberof proto.SubscriptionAction * @static * @param {Object.} object Plain object - * @returns {proto.TemplateButton} TemplateButton + * @returns {proto.SubscriptionAction} SubscriptionAction */ - TemplateButton.fromObject = function fromObject(object) { - if (object instanceof $root.proto.TemplateButton) + SubscriptionAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SubscriptionAction) return object; - var message = new $root.proto.TemplateButton(); - if (object.index != null) - message.index = object.index >>> 0; - if (object.quickReplyButton != null) { - if (typeof object.quickReplyButton !== "object") - throw TypeError(".proto.TemplateButton.quickReplyButton: object expected"); - message.quickReplyButton = $root.proto.QuickReplyButton.fromObject(object.quickReplyButton); - } - if (object.urlButton != null) { - if (typeof object.urlButton !== "object") - throw TypeError(".proto.TemplateButton.urlButton: object expected"); - message.urlButton = $root.proto.URLButton.fromObject(object.urlButton); - } - if (object.callButton != null) { - if (typeof object.callButton !== "object") - throw TypeError(".proto.TemplateButton.callButton: object expected"); - message.callButton = $root.proto.CallButton.fromObject(object.callButton); - } - return message; - }; - - /** - * Creates a plain object from a TemplateButton message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.TemplateButton - * @static - * @param {proto.TemplateButton} message TemplateButton - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TemplateButton.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.index = 0; - if (message.quickReplyButton != null && message.hasOwnProperty("quickReplyButton")) { - object.quickReplyButton = $root.proto.QuickReplyButton.toObject(message.quickReplyButton, options); - if (options.oneofs) - object.button = "quickReplyButton"; - } - if (message.urlButton != null && message.hasOwnProperty("urlButton")) { - object.urlButton = $root.proto.URLButton.toObject(message.urlButton, options); - if (options.oneofs) - object.button = "urlButton"; - } - if (message.callButton != null && message.hasOwnProperty("callButton")) { - object.callButton = $root.proto.CallButton.toObject(message.callButton, options); - if (options.oneofs) - object.button = "callButton"; - } - if (message.index != null && message.hasOwnProperty("index")) - object.index = message.index; - return object; - }; - - /** - * Converts this TemplateButton to JSON. - * @function toJSON - * @memberof proto.TemplateButton - * @instance - * @returns {Object.} JSON object - */ - TemplateButton.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TemplateButton; - })(); - - proto.TemplateButtonReplyMessage = (function() { - - /** - * Properties of a TemplateButtonReplyMessage. - * @memberof proto - * @interface ITemplateButtonReplyMessage - * @property {string|null} [selectedId] TemplateButtonReplyMessage selectedId - * @property {string|null} [selectedDisplayText] TemplateButtonReplyMessage selectedDisplayText - * @property {proto.IContextInfo|null} [contextInfo] TemplateButtonReplyMessage contextInfo - * @property {number|null} [selectedIndex] TemplateButtonReplyMessage selectedIndex - */ - - /** - * Constructs a new TemplateButtonReplyMessage. - * @memberof proto - * @classdesc Represents a TemplateButtonReplyMessage. - * @implements ITemplateButtonReplyMessage - * @constructor - * @param {proto.ITemplateButtonReplyMessage=} [properties] Properties to set - */ - function TemplateButtonReplyMessage(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TemplateButtonReplyMessage selectedId. - * @member {string} selectedId - * @memberof proto.TemplateButtonReplyMessage - * @instance - */ - TemplateButtonReplyMessage.prototype.selectedId = ""; - - /** - * TemplateButtonReplyMessage selectedDisplayText. - * @member {string} selectedDisplayText - * @memberof proto.TemplateButtonReplyMessage - * @instance - */ - TemplateButtonReplyMessage.prototype.selectedDisplayText = ""; - - /** - * TemplateButtonReplyMessage contextInfo. - * @member {proto.IContextInfo|null|undefined} contextInfo - * @memberof proto.TemplateButtonReplyMessage - * @instance - */ - TemplateButtonReplyMessage.prototype.contextInfo = null; - - /** - * TemplateButtonReplyMessage selectedIndex. - * @member {number} selectedIndex - * @memberof proto.TemplateButtonReplyMessage - * @instance - */ - TemplateButtonReplyMessage.prototype.selectedIndex = 0; - - /** - * Creates a new TemplateButtonReplyMessage instance using the specified properties. - * @function create - * @memberof proto.TemplateButtonReplyMessage - * @static - * @param {proto.ITemplateButtonReplyMessage=} [properties] Properties to set - * @returns {proto.TemplateButtonReplyMessage} TemplateButtonReplyMessage instance - */ - TemplateButtonReplyMessage.create = function create(properties) { - return new TemplateButtonReplyMessage(properties); - }; - - /** - * Encodes the specified TemplateButtonReplyMessage message. Does not implicitly {@link proto.TemplateButtonReplyMessage.verify|verify} messages. - * @function encode - * @memberof proto.TemplateButtonReplyMessage - * @static - * @param {proto.ITemplateButtonReplyMessage} message TemplateButtonReplyMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TemplateButtonReplyMessage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selectedId != null && Object.hasOwnProperty.call(message, "selectedId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selectedId); - if (message.selectedDisplayText != null && Object.hasOwnProperty.call(message, "selectedDisplayText")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.selectedDisplayText); - if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) - $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.selectedIndex != null && Object.hasOwnProperty.call(message, "selectedIndex")) - writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.selectedIndex); - return writer; - }; - - /** - * Encodes the specified TemplateButtonReplyMessage message, length delimited. Does not implicitly {@link proto.TemplateButtonReplyMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.TemplateButtonReplyMessage - * @static - * @param {proto.ITemplateButtonReplyMessage} message TemplateButtonReplyMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TemplateButtonReplyMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TemplateButtonReplyMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.TemplateButtonReplyMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.TemplateButtonReplyMessage} TemplateButtonReplyMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TemplateButtonReplyMessage.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.TemplateButtonReplyMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selectedId = reader.string(); - break; - case 2: - message.selectedDisplayText = reader.string(); - break; - case 3: - message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); - break; - case 4: - message.selectedIndex = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TemplateButtonReplyMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.TemplateButtonReplyMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.TemplateButtonReplyMessage} TemplateButtonReplyMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TemplateButtonReplyMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TemplateButtonReplyMessage message. - * @function verify - * @memberof proto.TemplateButtonReplyMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TemplateButtonReplyMessage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.selectedId != null && message.hasOwnProperty("selectedId")) - if (!$util.isString(message.selectedId)) - return "selectedId: string expected"; - if (message.selectedDisplayText != null && message.hasOwnProperty("selectedDisplayText")) - if (!$util.isString(message.selectedDisplayText)) - return "selectedDisplayText: string expected"; - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { - var error = $root.proto.ContextInfo.verify(message.contextInfo); - if (error) - return "contextInfo." + error; - } - if (message.selectedIndex != null && message.hasOwnProperty("selectedIndex")) - if (!$util.isInteger(message.selectedIndex)) - return "selectedIndex: integer expected"; - return null; - }; - - /** - * Creates a TemplateButtonReplyMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.TemplateButtonReplyMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.TemplateButtonReplyMessage} TemplateButtonReplyMessage - */ - TemplateButtonReplyMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.TemplateButtonReplyMessage) - return object; - var message = new $root.proto.TemplateButtonReplyMessage(); - if (object.selectedId != null) - message.selectedId = String(object.selectedId); - if (object.selectedDisplayText != null) - message.selectedDisplayText = String(object.selectedDisplayText); - if (object.contextInfo != null) { - if (typeof object.contextInfo !== "object") - throw TypeError(".proto.TemplateButtonReplyMessage.contextInfo: object expected"); - message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); - } - if (object.selectedIndex != null) - message.selectedIndex = object.selectedIndex >>> 0; - return message; - }; - - /** - * Creates a plain object from a TemplateButtonReplyMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.TemplateButtonReplyMessage - * @static - * @param {proto.TemplateButtonReplyMessage} message TemplateButtonReplyMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TemplateButtonReplyMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.selectedId = ""; - object.selectedDisplayText = ""; - object.contextInfo = null; - object.selectedIndex = 0; - } - if (message.selectedId != null && message.hasOwnProperty("selectedId")) - object.selectedId = message.selectedId; - if (message.selectedDisplayText != null && message.hasOwnProperty("selectedDisplayText")) - object.selectedDisplayText = message.selectedDisplayText; - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) - object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); - if (message.selectedIndex != null && message.hasOwnProperty("selectedIndex")) - object.selectedIndex = message.selectedIndex; - return object; - }; - - /** - * Converts this TemplateButtonReplyMessage to JSON. - * @function toJSON - * @memberof proto.TemplateButtonReplyMessage - * @instance - * @returns {Object.} JSON object - */ - TemplateButtonReplyMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TemplateButtonReplyMessage; - })(); - - proto.TemplateMessage = (function() { - - /** - * Properties of a TemplateMessage. - * @memberof proto - * @interface ITemplateMessage - * @property {proto.IContextInfo|null} [contextInfo] TemplateMessage contextInfo - * @property {proto.IHydratedFourRowTemplate|null} [hydratedTemplate] TemplateMessage hydratedTemplate - * @property {proto.IFourRowTemplate|null} [fourRowTemplate] TemplateMessage fourRowTemplate - * @property {proto.IHydratedFourRowTemplate|null} [hydratedFourRowTemplate] TemplateMessage hydratedFourRowTemplate - */ - - /** - * Constructs a new TemplateMessage. - * @memberof proto - * @classdesc Represents a TemplateMessage. - * @implements ITemplateMessage - * @constructor - * @param {proto.ITemplateMessage=} [properties] Properties to set - */ - function TemplateMessage(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TemplateMessage contextInfo. - * @member {proto.IContextInfo|null|undefined} contextInfo - * @memberof proto.TemplateMessage - * @instance - */ - TemplateMessage.prototype.contextInfo = null; - - /** - * TemplateMessage hydratedTemplate. - * @member {proto.IHydratedFourRowTemplate|null|undefined} hydratedTemplate - * @memberof proto.TemplateMessage - * @instance - */ - TemplateMessage.prototype.hydratedTemplate = null; - - /** - * TemplateMessage fourRowTemplate. - * @member {proto.IFourRowTemplate|null|undefined} fourRowTemplate - * @memberof proto.TemplateMessage - * @instance - */ - TemplateMessage.prototype.fourRowTemplate = null; - - /** - * TemplateMessage hydratedFourRowTemplate. - * @member {proto.IHydratedFourRowTemplate|null|undefined} hydratedFourRowTemplate - * @memberof proto.TemplateMessage - * @instance - */ - TemplateMessage.prototype.hydratedFourRowTemplate = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * TemplateMessage format. - * @member {"fourRowTemplate"|"hydratedFourRowTemplate"|undefined} format - * @memberof proto.TemplateMessage - * @instance - */ - Object.defineProperty(TemplateMessage.prototype, "format", { - get: $util.oneOfGetter($oneOfFields = ["fourRowTemplate", "hydratedFourRowTemplate"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new TemplateMessage instance using the specified properties. - * @function create - * @memberof proto.TemplateMessage - * @static - * @param {proto.ITemplateMessage=} [properties] Properties to set - * @returns {proto.TemplateMessage} TemplateMessage instance - */ - TemplateMessage.create = function create(properties) { - return new TemplateMessage(properties); - }; - - /** - * Encodes the specified TemplateMessage message. Does not implicitly {@link proto.TemplateMessage.verify|verify} messages. - * @function encode - * @memberof proto.TemplateMessage - * @static - * @param {proto.ITemplateMessage} message TemplateMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TemplateMessage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fourRowTemplate != null && Object.hasOwnProperty.call(message, "fourRowTemplate")) - $root.proto.FourRowTemplate.encode(message.fourRowTemplate, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.hydratedFourRowTemplate != null && Object.hasOwnProperty.call(message, "hydratedFourRowTemplate")) - $root.proto.HydratedFourRowTemplate.encode(message.hydratedFourRowTemplate, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) - $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.hydratedTemplate != null && Object.hasOwnProperty.call(message, "hydratedTemplate")) - $root.proto.HydratedFourRowTemplate.encode(message.hydratedTemplate, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified TemplateMessage message, length delimited. Does not implicitly {@link proto.TemplateMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.TemplateMessage - * @static - * @param {proto.ITemplateMessage} message TemplateMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TemplateMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TemplateMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.TemplateMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.TemplateMessage} TemplateMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TemplateMessage.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.TemplateMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: - message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); - break; - case 4: - message.hydratedTemplate = $root.proto.HydratedFourRowTemplate.decode(reader, reader.uint32()); - break; - case 1: - message.fourRowTemplate = $root.proto.FourRowTemplate.decode(reader, reader.uint32()); - break; - case 2: - message.hydratedFourRowTemplate = $root.proto.HydratedFourRowTemplate.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TemplateMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.TemplateMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.TemplateMessage} TemplateMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TemplateMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TemplateMessage message. - * @function verify - * @memberof proto.TemplateMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TemplateMessage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { - var error = $root.proto.ContextInfo.verify(message.contextInfo); - if (error) - return "contextInfo." + error; - } - if (message.hydratedTemplate != null && message.hasOwnProperty("hydratedTemplate")) { - var error = $root.proto.HydratedFourRowTemplate.verify(message.hydratedTemplate); - if (error) - return "hydratedTemplate." + error; - } - if (message.fourRowTemplate != null && message.hasOwnProperty("fourRowTemplate")) { - properties.format = 1; - { - var error = $root.proto.FourRowTemplate.verify(message.fourRowTemplate); - if (error) - return "fourRowTemplate." + error; - } - } - if (message.hydratedFourRowTemplate != null && message.hasOwnProperty("hydratedFourRowTemplate")) { - if (properties.format === 1) - return "format: multiple values"; - properties.format = 1; - { - var error = $root.proto.HydratedFourRowTemplate.verify(message.hydratedFourRowTemplate); - if (error) - return "hydratedFourRowTemplate." + error; - } - } - return null; - }; - - /** - * Creates a TemplateMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.TemplateMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.TemplateMessage} TemplateMessage - */ - TemplateMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.TemplateMessage) - return object; - var message = new $root.proto.TemplateMessage(); - if (object.contextInfo != null) { - if (typeof object.contextInfo !== "object") - throw TypeError(".proto.TemplateMessage.contextInfo: object expected"); - message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); - } - if (object.hydratedTemplate != null) { - if (typeof object.hydratedTemplate !== "object") - throw TypeError(".proto.TemplateMessage.hydratedTemplate: object expected"); - message.hydratedTemplate = $root.proto.HydratedFourRowTemplate.fromObject(object.hydratedTemplate); - } - if (object.fourRowTemplate != null) { - if (typeof object.fourRowTemplate !== "object") - throw TypeError(".proto.TemplateMessage.fourRowTemplate: object expected"); - message.fourRowTemplate = $root.proto.FourRowTemplate.fromObject(object.fourRowTemplate); - } - if (object.hydratedFourRowTemplate != null) { - if (typeof object.hydratedFourRowTemplate !== "object") - throw TypeError(".proto.TemplateMessage.hydratedFourRowTemplate: object expected"); - message.hydratedFourRowTemplate = $root.proto.HydratedFourRowTemplate.fromObject(object.hydratedFourRowTemplate); - } - return message; - }; - - /** - * Creates a plain object from a TemplateMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.TemplateMessage - * @static - * @param {proto.TemplateMessage} message TemplateMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TemplateMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.contextInfo = null; - object.hydratedTemplate = null; - } - if (message.fourRowTemplate != null && message.hasOwnProperty("fourRowTemplate")) { - object.fourRowTemplate = $root.proto.FourRowTemplate.toObject(message.fourRowTemplate, options); - if (options.oneofs) - object.format = "fourRowTemplate"; - } - if (message.hydratedFourRowTemplate != null && message.hasOwnProperty("hydratedFourRowTemplate")) { - object.hydratedFourRowTemplate = $root.proto.HydratedFourRowTemplate.toObject(message.hydratedFourRowTemplate, options); - if (options.oneofs) - object.format = "hydratedFourRowTemplate"; - } - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) - object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); - if (message.hydratedTemplate != null && message.hasOwnProperty("hydratedTemplate")) - object.hydratedTemplate = $root.proto.HydratedFourRowTemplate.toObject(message.hydratedTemplate, options); - return object; - }; - - /** - * Converts this TemplateMessage to JSON. - * @function toJSON - * @memberof proto.TemplateMessage - * @instance - * @returns {Object.} JSON object - */ - TemplateMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TemplateMessage; - })(); - - proto.URLButton = (function() { - - /** - * Properties of a URLButton. - * @memberof proto - * @interface IURLButton - * @property {proto.IHighlyStructuredMessage|null} [displayText] URLButton displayText - * @property {proto.IHighlyStructuredMessage|null} [url] URLButton url - */ - - /** - * Constructs a new URLButton. - * @memberof proto - * @classdesc Represents a URLButton. - * @implements IURLButton - * @constructor - * @param {proto.IURLButton=} [properties] Properties to set - */ - function URLButton(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * URLButton displayText. - * @member {proto.IHighlyStructuredMessage|null|undefined} displayText - * @memberof proto.URLButton - * @instance - */ - URLButton.prototype.displayText = null; - - /** - * URLButton url. - * @member {proto.IHighlyStructuredMessage|null|undefined} url - * @memberof proto.URLButton - * @instance - */ - URLButton.prototype.url = null; - - /** - * Creates a new URLButton instance using the specified properties. - * @function create - * @memberof proto.URLButton - * @static - * @param {proto.IURLButton=} [properties] Properties to set - * @returns {proto.URLButton} URLButton instance - */ - URLButton.create = function create(properties) { - return new URLButton(properties); - }; - - /** - * Encodes the specified URLButton message. Does not implicitly {@link proto.URLButton.verify|verify} messages. - * @function encode - * @memberof proto.URLButton - * @static - * @param {proto.IURLButton} message URLButton message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - URLButton.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayText != null && Object.hasOwnProperty.call(message, "displayText")) - $root.proto.HighlyStructuredMessage.encode(message.displayText, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.url != null && Object.hasOwnProperty.call(message, "url")) - $root.proto.HighlyStructuredMessage.encode(message.url, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified URLButton message, length delimited. Does not implicitly {@link proto.URLButton.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.URLButton - * @static - * @param {proto.IURLButton} message URLButton message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - URLButton.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a URLButton message from the specified reader or buffer. - * @function decode - * @memberof proto.URLButton - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.URLButton} URLButton - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - URLButton.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.URLButton(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.displayText = $root.proto.HighlyStructuredMessage.decode(reader, reader.uint32()); - break; - case 2: - message.url = $root.proto.HighlyStructuredMessage.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a URLButton message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.URLButton - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.URLButton} URLButton - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - URLButton.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a URLButton message. - * @function verify - * @memberof proto.URLButton - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - URLButton.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayText != null && message.hasOwnProperty("displayText")) { - var error = $root.proto.HighlyStructuredMessage.verify(message.displayText); - if (error) - return "displayText." + error; - } - if (message.url != null && message.hasOwnProperty("url")) { - var error = $root.proto.HighlyStructuredMessage.verify(message.url); - if (error) - return "url." + error; - } - return null; - }; - - /** - * Creates a URLButton message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.URLButton - * @static - * @param {Object.} object Plain object - * @returns {proto.URLButton} URLButton - */ - URLButton.fromObject = function fromObject(object) { - if (object instanceof $root.proto.URLButton) - return object; - var message = new $root.proto.URLButton(); - if (object.displayText != null) { - if (typeof object.displayText !== "object") - throw TypeError(".proto.URLButton.displayText: object expected"); - message.displayText = $root.proto.HighlyStructuredMessage.fromObject(object.displayText); - } - if (object.url != null) { - if (typeof object.url !== "object") - throw TypeError(".proto.URLButton.url: object expected"); - message.url = $root.proto.HighlyStructuredMessage.fromObject(object.url); - } - return message; - }; - - /** - * Creates a plain object from a URLButton message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.URLButton - * @static - * @param {proto.URLButton} message URLButton - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - URLButton.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayText = null; - object.url = null; - } - if (message.displayText != null && message.hasOwnProperty("displayText")) - object.displayText = $root.proto.HighlyStructuredMessage.toObject(message.displayText, options); - if (message.url != null && message.hasOwnProperty("url")) - object.url = $root.proto.HighlyStructuredMessage.toObject(message.url, options); - return object; - }; - - /** - * Converts this URLButton to JSON. - * @function toJSON - * @memberof proto.URLButton - * @instance - * @returns {Object.} JSON object - */ - URLButton.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return URLButton; - })(); - - proto.VideoMessage = (function() { - - /** - * Properties of a VideoMessage. - * @memberof proto - * @interface IVideoMessage - * @property {string|null} [url] VideoMessage url - * @property {string|null} [mimetype] VideoMessage mimetype - * @property {Uint8Array|null} [fileSha256] VideoMessage fileSha256 - * @property {number|Long|null} [fileLength] VideoMessage fileLength - * @property {number|null} [seconds] VideoMessage seconds - * @property {Uint8Array|null} [mediaKey] VideoMessage mediaKey - * @property {string|null} [caption] VideoMessage caption - * @property {boolean|null} [gifPlayback] VideoMessage gifPlayback - * @property {number|null} [height] VideoMessage height - * @property {number|null} [width] VideoMessage width - * @property {Uint8Array|null} [fileEncSha256] VideoMessage fileEncSha256 - * @property {Array.|null} [interactiveAnnotations] VideoMessage interactiveAnnotations - * @property {string|null} [directPath] VideoMessage directPath - * @property {number|Long|null} [mediaKeyTimestamp] VideoMessage mediaKeyTimestamp - * @property {Uint8Array|null} [jpegThumbnail] VideoMessage jpegThumbnail - * @property {proto.IContextInfo|null} [contextInfo] VideoMessage contextInfo - * @property {Uint8Array|null} [streamingSidecar] VideoMessage streamingSidecar - * @property {proto.VideoMessage.VideoMessageAttribution|null} [gifAttribution] VideoMessage gifAttribution - * @property {boolean|null} [viewOnce] VideoMessage viewOnce - * @property {string|null} [thumbnailDirectPath] VideoMessage thumbnailDirectPath - * @property {Uint8Array|null} [thumbnailSha256] VideoMessage thumbnailSha256 - * @property {Uint8Array|null} [thumbnailEncSha256] VideoMessage thumbnailEncSha256 - * @property {string|null} [staticUrl] VideoMessage staticUrl - */ - - /** - * Constructs a new VideoMessage. - * @memberof proto - * @classdesc Represents a VideoMessage. - * @implements IVideoMessage - * @constructor - * @param {proto.IVideoMessage=} [properties] Properties to set - */ - function VideoMessage(properties) { - this.interactiveAnnotations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VideoMessage url. - * @member {string} url - * @memberof proto.VideoMessage - * @instance - */ - VideoMessage.prototype.url = ""; - - /** - * VideoMessage mimetype. - * @member {string} mimetype - * @memberof proto.VideoMessage - * @instance - */ - VideoMessage.prototype.mimetype = ""; - - /** - * VideoMessage fileSha256. - * @member {Uint8Array} fileSha256 - * @memberof proto.VideoMessage - * @instance - */ - VideoMessage.prototype.fileSha256 = $util.newBuffer([]); - - /** - * VideoMessage fileLength. - * @member {number|Long} fileLength - * @memberof proto.VideoMessage - * @instance - */ - VideoMessage.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * VideoMessage seconds. - * @member {number} seconds - * @memberof proto.VideoMessage - * @instance - */ - VideoMessage.prototype.seconds = 0; - - /** - * VideoMessage mediaKey. - * @member {Uint8Array} mediaKey - * @memberof proto.VideoMessage - * @instance - */ - VideoMessage.prototype.mediaKey = $util.newBuffer([]); - - /** - * VideoMessage caption. - * @member {string} caption - * @memberof proto.VideoMessage - * @instance - */ - VideoMessage.prototype.caption = ""; - - /** - * VideoMessage gifPlayback. - * @member {boolean} gifPlayback - * @memberof proto.VideoMessage - * @instance - */ - VideoMessage.prototype.gifPlayback = false; - - /** - * VideoMessage height. - * @member {number} height - * @memberof proto.VideoMessage - * @instance - */ - VideoMessage.prototype.height = 0; - - /** - * VideoMessage width. - * @member {number} width - * @memberof proto.VideoMessage - * @instance - */ - VideoMessage.prototype.width = 0; - - /** - * VideoMessage fileEncSha256. - * @member {Uint8Array} fileEncSha256 - * @memberof proto.VideoMessage - * @instance - */ - VideoMessage.prototype.fileEncSha256 = $util.newBuffer([]); - - /** - * VideoMessage interactiveAnnotations. - * @member {Array.} interactiveAnnotations - * @memberof proto.VideoMessage - * @instance - */ - VideoMessage.prototype.interactiveAnnotations = $util.emptyArray; - - /** - * VideoMessage directPath. - * @member {string} directPath - * @memberof proto.VideoMessage - * @instance - */ - VideoMessage.prototype.directPath = ""; - - /** - * VideoMessage mediaKeyTimestamp. - * @member {number|Long} mediaKeyTimestamp - * @memberof proto.VideoMessage - * @instance - */ - VideoMessage.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * VideoMessage jpegThumbnail. - * @member {Uint8Array} jpegThumbnail - * @memberof proto.VideoMessage - * @instance - */ - VideoMessage.prototype.jpegThumbnail = $util.newBuffer([]); - - /** - * VideoMessage contextInfo. - * @member {proto.IContextInfo|null|undefined} contextInfo - * @memberof proto.VideoMessage - * @instance - */ - VideoMessage.prototype.contextInfo = null; - - /** - * VideoMessage streamingSidecar. - * @member {Uint8Array} streamingSidecar - * @memberof proto.VideoMessage - * @instance - */ - VideoMessage.prototype.streamingSidecar = $util.newBuffer([]); - - /** - * VideoMessage gifAttribution. - * @member {proto.VideoMessage.VideoMessageAttribution} gifAttribution - * @memberof proto.VideoMessage - * @instance - */ - VideoMessage.prototype.gifAttribution = 0; - - /** - * VideoMessage viewOnce. - * @member {boolean} viewOnce - * @memberof proto.VideoMessage - * @instance - */ - VideoMessage.prototype.viewOnce = false; - - /** - * VideoMessage thumbnailDirectPath. - * @member {string} thumbnailDirectPath - * @memberof proto.VideoMessage - * @instance - */ - VideoMessage.prototype.thumbnailDirectPath = ""; - - /** - * VideoMessage thumbnailSha256. - * @member {Uint8Array} thumbnailSha256 - * @memberof proto.VideoMessage - * @instance - */ - VideoMessage.prototype.thumbnailSha256 = $util.newBuffer([]); - - /** - * VideoMessage thumbnailEncSha256. - * @member {Uint8Array} thumbnailEncSha256 - * @memberof proto.VideoMessage - * @instance - */ - VideoMessage.prototype.thumbnailEncSha256 = $util.newBuffer([]); - - /** - * VideoMessage staticUrl. - * @member {string} staticUrl - * @memberof proto.VideoMessage - * @instance - */ - VideoMessage.prototype.staticUrl = ""; - - /** - * Creates a new VideoMessage instance using the specified properties. - * @function create - * @memberof proto.VideoMessage - * @static - * @param {proto.IVideoMessage=} [properties] Properties to set - * @returns {proto.VideoMessage} VideoMessage instance - */ - VideoMessage.create = function create(properties) { - return new VideoMessage(properties); - }; - - /** - * Encodes the specified VideoMessage message. Does not implicitly {@link proto.VideoMessage.verify|verify} messages. - * @function encode - * @memberof proto.VideoMessage - * @static - * @param {proto.IVideoMessage} message VideoMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VideoMessage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.url != null && Object.hasOwnProperty.call(message, "url")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.url); - if (message.mimetype != null && Object.hasOwnProperty.call(message, "mimetype")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.mimetype); - if (message.fileSha256 != null && Object.hasOwnProperty.call(message, "fileSha256")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.fileSha256); - if (message.fileLength != null && Object.hasOwnProperty.call(message, "fileLength")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.fileLength); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.seconds); - if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey")) - writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.mediaKey); - if (message.caption != null && Object.hasOwnProperty.call(message, "caption")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.caption); - if (message.gifPlayback != null && Object.hasOwnProperty.call(message, "gifPlayback")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.gifPlayback); - if (message.height != null && Object.hasOwnProperty.call(message, "height")) - writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.height); - if (message.width != null && Object.hasOwnProperty.call(message, "width")) - writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.width); - if (message.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256")) - writer.uint32(/* id 11, wireType 2 =*/90).bytes(message.fileEncSha256); - if (message.interactiveAnnotations != null && message.interactiveAnnotations.length) - for (var i = 0; i < message.interactiveAnnotations.length; ++i) - $root.proto.InteractiveAnnotation.encode(message.interactiveAnnotations[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.directPath); - if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp")) - writer.uint32(/* id 14, wireType 0 =*/112).int64(message.mediaKeyTimestamp); - if (message.jpegThumbnail != null && Object.hasOwnProperty.call(message, "jpegThumbnail")) - writer.uint32(/* id 16, wireType 2 =*/130).bytes(message.jpegThumbnail); - if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) - $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.streamingSidecar != null && Object.hasOwnProperty.call(message, "streamingSidecar")) - writer.uint32(/* id 18, wireType 2 =*/146).bytes(message.streamingSidecar); - if (message.gifAttribution != null && Object.hasOwnProperty.call(message, "gifAttribution")) - writer.uint32(/* id 19, wireType 0 =*/152).int32(message.gifAttribution); - if (message.viewOnce != null && Object.hasOwnProperty.call(message, "viewOnce")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.viewOnce); - if (message.thumbnailDirectPath != null && Object.hasOwnProperty.call(message, "thumbnailDirectPath")) - writer.uint32(/* id 21, wireType 2 =*/170).string(message.thumbnailDirectPath); - if (message.thumbnailSha256 != null && Object.hasOwnProperty.call(message, "thumbnailSha256")) - writer.uint32(/* id 22, wireType 2 =*/178).bytes(message.thumbnailSha256); - if (message.thumbnailEncSha256 != null && Object.hasOwnProperty.call(message, "thumbnailEncSha256")) - writer.uint32(/* id 23, wireType 2 =*/186).bytes(message.thumbnailEncSha256); - if (message.staticUrl != null && Object.hasOwnProperty.call(message, "staticUrl")) - writer.uint32(/* id 24, wireType 2 =*/194).string(message.staticUrl); - return writer; - }; - - /** - * Encodes the specified VideoMessage message, length delimited. Does not implicitly {@link proto.VideoMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.VideoMessage - * @static - * @param {proto.IVideoMessage} message VideoMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VideoMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VideoMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.VideoMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.VideoMessage} VideoMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VideoMessage.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.VideoMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.url = reader.string(); - break; - case 2: - message.mimetype = reader.string(); - break; - case 3: - message.fileSha256 = reader.bytes(); - break; - case 4: - message.fileLength = reader.uint64(); - break; - case 5: - message.seconds = reader.uint32(); - break; - case 6: - message.mediaKey = reader.bytes(); - break; - case 7: - message.caption = reader.string(); - break; - case 8: - message.gifPlayback = reader.bool(); - break; - case 9: - message.height = reader.uint32(); - break; - case 10: - message.width = reader.uint32(); - break; - case 11: - message.fileEncSha256 = reader.bytes(); - break; - case 12: - if (!(message.interactiveAnnotations && message.interactiveAnnotations.length)) - message.interactiveAnnotations = []; - message.interactiveAnnotations.push($root.proto.InteractiveAnnotation.decode(reader, reader.uint32())); - break; - case 13: - message.directPath = reader.string(); - break; - case 14: - message.mediaKeyTimestamp = reader.int64(); - break; - case 16: - message.jpegThumbnail = reader.bytes(); - break; - case 17: - message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); - break; - case 18: - message.streamingSidecar = reader.bytes(); - break; - case 19: - message.gifAttribution = reader.int32(); - break; - case 20: - message.viewOnce = reader.bool(); - break; - case 21: - message.thumbnailDirectPath = reader.string(); - break; - case 22: - message.thumbnailSha256 = reader.bytes(); - break; - case 23: - message.thumbnailEncSha256 = reader.bytes(); - break; - case 24: - message.staticUrl = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VideoMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.VideoMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.VideoMessage} VideoMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VideoMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VideoMessage message. - * @function verify - * @memberof proto.VideoMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VideoMessage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.url != null && message.hasOwnProperty("url")) - if (!$util.isString(message.url)) - return "url: string expected"; - if (message.mimetype != null && message.hasOwnProperty("mimetype")) - if (!$util.isString(message.mimetype)) - return "mimetype: string expected"; - if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) - if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256))) - return "fileSha256: buffer expected"; - if (message.fileLength != null && message.hasOwnProperty("fileLength")) - if (!$util.isInteger(message.fileLength) && !(message.fileLength && $util.isInteger(message.fileLength.low) && $util.isInteger(message.fileLength.high))) - return "fileLength: integer|Long expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds)) - return "seconds: integer expected"; - if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) - if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey))) - return "mediaKey: buffer expected"; - if (message.caption != null && message.hasOwnProperty("caption")) - if (!$util.isString(message.caption)) - return "caption: string expected"; - if (message.gifPlayback != null && message.hasOwnProperty("gifPlayback")) - if (typeof message.gifPlayback !== "boolean") - return "gifPlayback: boolean expected"; - if (message.height != null && message.hasOwnProperty("height")) - if (!$util.isInteger(message.height)) - return "height: integer expected"; - if (message.width != null && message.hasOwnProperty("width")) - if (!$util.isInteger(message.width)) - return "width: integer expected"; - if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) - if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256))) - return "fileEncSha256: buffer expected"; - if (message.interactiveAnnotations != null && message.hasOwnProperty("interactiveAnnotations")) { - if (!Array.isArray(message.interactiveAnnotations)) - return "interactiveAnnotations: array expected"; - for (var i = 0; i < message.interactiveAnnotations.length; ++i) { - var error = $root.proto.InteractiveAnnotation.verify(message.interactiveAnnotations[i]); - if (error) - return "interactiveAnnotations." + error; - } - } - if (message.directPath != null && message.hasOwnProperty("directPath")) - if (!$util.isString(message.directPath)) - return "directPath: string expected"; - if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) - if (!$util.isInteger(message.mediaKeyTimestamp) && !(message.mediaKeyTimestamp && $util.isInteger(message.mediaKeyTimestamp.low) && $util.isInteger(message.mediaKeyTimestamp.high))) - return "mediaKeyTimestamp: integer|Long expected"; - if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) - if (!(message.jpegThumbnail && typeof message.jpegThumbnail.length === "number" || $util.isString(message.jpegThumbnail))) - return "jpegThumbnail: buffer expected"; - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { - var error = $root.proto.ContextInfo.verify(message.contextInfo); - if (error) - return "contextInfo." + error; - } - if (message.streamingSidecar != null && message.hasOwnProperty("streamingSidecar")) - if (!(message.streamingSidecar && typeof message.streamingSidecar.length === "number" || $util.isString(message.streamingSidecar))) - return "streamingSidecar: buffer expected"; - if (message.gifAttribution != null && message.hasOwnProperty("gifAttribution")) - switch (message.gifAttribution) { - default: - return "gifAttribution: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.viewOnce != null && message.hasOwnProperty("viewOnce")) - if (typeof message.viewOnce !== "boolean") - return "viewOnce: boolean expected"; - if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath")) - if (!$util.isString(message.thumbnailDirectPath)) - return "thumbnailDirectPath: string expected"; - if (message.thumbnailSha256 != null && message.hasOwnProperty("thumbnailSha256")) - if (!(message.thumbnailSha256 && typeof message.thumbnailSha256.length === "number" || $util.isString(message.thumbnailSha256))) - return "thumbnailSha256: buffer expected"; - if (message.thumbnailEncSha256 != null && message.hasOwnProperty("thumbnailEncSha256")) - if (!(message.thumbnailEncSha256 && typeof message.thumbnailEncSha256.length === "number" || $util.isString(message.thumbnailEncSha256))) - return "thumbnailEncSha256: buffer expected"; - if (message.staticUrl != null && message.hasOwnProperty("staticUrl")) - if (!$util.isString(message.staticUrl)) - return "staticUrl: string expected"; - return null; - }; - - /** - * Creates a VideoMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.VideoMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.VideoMessage} VideoMessage - */ - VideoMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.VideoMessage) - return object; - var message = new $root.proto.VideoMessage(); - if (object.url != null) - message.url = String(object.url); - if (object.mimetype != null) - message.mimetype = String(object.mimetype); - if (object.fileSha256 != null) - if (typeof object.fileSha256 === "string") - $util.base64.decode(object.fileSha256, message.fileSha256 = $util.newBuffer($util.base64.length(object.fileSha256)), 0); - else if (object.fileSha256.length) - message.fileSha256 = object.fileSha256; - if (object.fileLength != null) + var message = new $root.proto.SubscriptionAction(); + if (object.isDeactivated != null) + message.isDeactivated = Boolean(object.isDeactivated); + if (object.isAutoRenewing != null) + message.isAutoRenewing = Boolean(object.isAutoRenewing); + if (object.expirationDate != null) if ($util.Long) - (message.fileLength = $util.Long.fromValue(object.fileLength)).unsigned = true; - else if (typeof object.fileLength === "string") - message.fileLength = parseInt(object.fileLength, 10); - else if (typeof object.fileLength === "number") - message.fileLength = object.fileLength; - else if (typeof object.fileLength === "object") - message.fileLength = new $util.LongBits(object.fileLength.low >>> 0, object.fileLength.high >>> 0).toNumber(true); - if (object.seconds != null) - message.seconds = object.seconds >>> 0; - if (object.mediaKey != null) - if (typeof object.mediaKey === "string") - $util.base64.decode(object.mediaKey, message.mediaKey = $util.newBuffer($util.base64.length(object.mediaKey)), 0); - else if (object.mediaKey.length) - message.mediaKey = object.mediaKey; - if (object.caption != null) - message.caption = String(object.caption); - if (object.gifPlayback != null) - message.gifPlayback = Boolean(object.gifPlayback); - if (object.height != null) - message.height = object.height >>> 0; - if (object.width != null) - message.width = object.width >>> 0; - if (object.fileEncSha256 != null) - if (typeof object.fileEncSha256 === "string") - $util.base64.decode(object.fileEncSha256, message.fileEncSha256 = $util.newBuffer($util.base64.length(object.fileEncSha256)), 0); - else if (object.fileEncSha256.length) - message.fileEncSha256 = object.fileEncSha256; - if (object.interactiveAnnotations) { - if (!Array.isArray(object.interactiveAnnotations)) - throw TypeError(".proto.VideoMessage.interactiveAnnotations: array expected"); - message.interactiveAnnotations = []; - for (var i = 0; i < object.interactiveAnnotations.length; ++i) { - if (typeof object.interactiveAnnotations[i] !== "object") - throw TypeError(".proto.VideoMessage.interactiveAnnotations: object expected"); - message.interactiveAnnotations[i] = $root.proto.InteractiveAnnotation.fromObject(object.interactiveAnnotations[i]); - } - } - if (object.directPath != null) - message.directPath = String(object.directPath); - if (object.mediaKeyTimestamp != null) - if ($util.Long) - (message.mediaKeyTimestamp = $util.Long.fromValue(object.mediaKeyTimestamp)).unsigned = false; - else if (typeof object.mediaKeyTimestamp === "string") - message.mediaKeyTimestamp = parseInt(object.mediaKeyTimestamp, 10); - else if (typeof object.mediaKeyTimestamp === "number") - message.mediaKeyTimestamp = object.mediaKeyTimestamp; - else if (typeof object.mediaKeyTimestamp === "object") - message.mediaKeyTimestamp = new $util.LongBits(object.mediaKeyTimestamp.low >>> 0, object.mediaKeyTimestamp.high >>> 0).toNumber(); - if (object.jpegThumbnail != null) - if (typeof object.jpegThumbnail === "string") - $util.base64.decode(object.jpegThumbnail, message.jpegThumbnail = $util.newBuffer($util.base64.length(object.jpegThumbnail)), 0); - else if (object.jpegThumbnail.length) - message.jpegThumbnail = object.jpegThumbnail; - if (object.contextInfo != null) { - if (typeof object.contextInfo !== "object") - throw TypeError(".proto.VideoMessage.contextInfo: object expected"); - message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); - } - if (object.streamingSidecar != null) - if (typeof object.streamingSidecar === "string") - $util.base64.decode(object.streamingSidecar, message.streamingSidecar = $util.newBuffer($util.base64.length(object.streamingSidecar)), 0); - else if (object.streamingSidecar.length) - message.streamingSidecar = object.streamingSidecar; - switch (object.gifAttribution) { - case "NONE": - case 0: - message.gifAttribution = 0; - break; - case "GIPHY": - case 1: - message.gifAttribution = 1; - break; - case "TENOR": - case 2: - message.gifAttribution = 2; - break; - } - if (object.viewOnce != null) - message.viewOnce = Boolean(object.viewOnce); - if (object.thumbnailDirectPath != null) - message.thumbnailDirectPath = String(object.thumbnailDirectPath); - if (object.thumbnailSha256 != null) - if (typeof object.thumbnailSha256 === "string") - $util.base64.decode(object.thumbnailSha256, message.thumbnailSha256 = $util.newBuffer($util.base64.length(object.thumbnailSha256)), 0); - else if (object.thumbnailSha256.length) - message.thumbnailSha256 = object.thumbnailSha256; - if (object.thumbnailEncSha256 != null) - if (typeof object.thumbnailEncSha256 === "string") - $util.base64.decode(object.thumbnailEncSha256, message.thumbnailEncSha256 = $util.newBuffer($util.base64.length(object.thumbnailEncSha256)), 0); - else if (object.thumbnailEncSha256.length) - message.thumbnailEncSha256 = object.thumbnailEncSha256; - if (object.staticUrl != null) - message.staticUrl = String(object.staticUrl); + (message.expirationDate = $util.Long.fromValue(object.expirationDate)).unsigned = false; + else if (typeof object.expirationDate === "string") + message.expirationDate = parseInt(object.expirationDate, 10); + else if (typeof object.expirationDate === "number") + message.expirationDate = object.expirationDate; + else if (typeof object.expirationDate === "object") + message.expirationDate = new $util.LongBits(object.expirationDate.low >>> 0, object.expirationDate.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a VideoMessage message. Also converts values to other types if specified. + * Creates a plain object from a SubscriptionAction message. Also converts values to other types if specified. * @function toObject - * @memberof proto.VideoMessage + * @memberof proto.SubscriptionAction * @static - * @param {proto.VideoMessage} message VideoMessage + * @param {proto.SubscriptionAction} message SubscriptionAction * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VideoMessage.toObject = function toObject(message, options) { + SubscriptionAction.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.interactiveAnnotations = []; if (options.defaults) { - object.url = ""; - object.mimetype = ""; - if (options.bytes === String) - object.fileSha256 = ""; - else { - object.fileSha256 = []; - if (options.bytes !== Array) - object.fileSha256 = $util.newBuffer(object.fileSha256); - } - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.fileLength = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.fileLength = options.longs === String ? "0" : 0; - object.seconds = 0; - if (options.bytes === String) - object.mediaKey = ""; - else { - object.mediaKey = []; - if (options.bytes !== Array) - object.mediaKey = $util.newBuffer(object.mediaKey); - } - object.caption = ""; - object.gifPlayback = false; - object.height = 0; - object.width = 0; - if (options.bytes === String) - object.fileEncSha256 = ""; - else { - object.fileEncSha256 = []; - if (options.bytes !== Array) - object.fileEncSha256 = $util.newBuffer(object.fileEncSha256); - } - object.directPath = ""; + object.isDeactivated = false; + object.isAutoRenewing = false; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.mediaKeyTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.expirationDate = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.mediaKeyTimestamp = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.jpegThumbnail = ""; - else { - object.jpegThumbnail = []; - if (options.bytes !== Array) - object.jpegThumbnail = $util.newBuffer(object.jpegThumbnail); - } - object.contextInfo = null; - if (options.bytes === String) - object.streamingSidecar = ""; - else { - object.streamingSidecar = []; - if (options.bytes !== Array) - object.streamingSidecar = $util.newBuffer(object.streamingSidecar); - } - object.gifAttribution = options.enums === String ? "NONE" : 0; - object.viewOnce = false; - object.thumbnailDirectPath = ""; - if (options.bytes === String) - object.thumbnailSha256 = ""; - else { - object.thumbnailSha256 = []; - if (options.bytes !== Array) - object.thumbnailSha256 = $util.newBuffer(object.thumbnailSha256); - } - if (options.bytes === String) - object.thumbnailEncSha256 = ""; - else { - object.thumbnailEncSha256 = []; - if (options.bytes !== Array) - object.thumbnailEncSha256 = $util.newBuffer(object.thumbnailEncSha256); - } - object.staticUrl = ""; + object.expirationDate = options.longs === String ? "0" : 0; } - if (message.url != null && message.hasOwnProperty("url")) - object.url = message.url; - if (message.mimetype != null && message.hasOwnProperty("mimetype")) - object.mimetype = message.mimetype; - if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) - object.fileSha256 = options.bytes === String ? $util.base64.encode(message.fileSha256, 0, message.fileSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileSha256) : message.fileSha256; - if (message.fileLength != null && message.hasOwnProperty("fileLength")) - if (typeof message.fileLength === "number") - object.fileLength = options.longs === String ? String(message.fileLength) : message.fileLength; + if (message.isDeactivated != null && message.hasOwnProperty("isDeactivated")) + object.isDeactivated = message.isDeactivated; + if (message.isAutoRenewing != null && message.hasOwnProperty("isAutoRenewing")) + object.isAutoRenewing = message.isAutoRenewing; + if (message.expirationDate != null && message.hasOwnProperty("expirationDate")) + if (typeof message.expirationDate === "number") + object.expirationDate = options.longs === String ? String(message.expirationDate) : message.expirationDate; else - object.fileLength = options.longs === String ? $util.Long.prototype.toString.call(message.fileLength) : options.longs === Number ? new $util.LongBits(message.fileLength.low >>> 0, message.fileLength.high >>> 0).toNumber(true) : message.fileLength; - if (message.seconds != null && message.hasOwnProperty("seconds")) - object.seconds = message.seconds; - if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) - object.mediaKey = options.bytes === String ? $util.base64.encode(message.mediaKey, 0, message.mediaKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.mediaKey) : message.mediaKey; - if (message.caption != null && message.hasOwnProperty("caption")) - object.caption = message.caption; - if (message.gifPlayback != null && message.hasOwnProperty("gifPlayback")) - object.gifPlayback = message.gifPlayback; - if (message.height != null && message.hasOwnProperty("height")) - object.height = message.height; - if (message.width != null && message.hasOwnProperty("width")) - object.width = message.width; - if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) - object.fileEncSha256 = options.bytes === String ? $util.base64.encode(message.fileEncSha256, 0, message.fileEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileEncSha256) : message.fileEncSha256; - if (message.interactiveAnnotations && message.interactiveAnnotations.length) { - object.interactiveAnnotations = []; - for (var j = 0; j < message.interactiveAnnotations.length; ++j) - object.interactiveAnnotations[j] = $root.proto.InteractiveAnnotation.toObject(message.interactiveAnnotations[j], options); - } - if (message.directPath != null && message.hasOwnProperty("directPath")) - object.directPath = message.directPath; - if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) - if (typeof message.mediaKeyTimestamp === "number") - object.mediaKeyTimestamp = options.longs === String ? String(message.mediaKeyTimestamp) : message.mediaKeyTimestamp; - else - object.mediaKeyTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.mediaKeyTimestamp) : options.longs === Number ? new $util.LongBits(message.mediaKeyTimestamp.low >>> 0, message.mediaKeyTimestamp.high >>> 0).toNumber() : message.mediaKeyTimestamp; - if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) - object.jpegThumbnail = options.bytes === String ? $util.base64.encode(message.jpegThumbnail, 0, message.jpegThumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.jpegThumbnail) : message.jpegThumbnail; - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) - object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); - if (message.streamingSidecar != null && message.hasOwnProperty("streamingSidecar")) - object.streamingSidecar = options.bytes === String ? $util.base64.encode(message.streamingSidecar, 0, message.streamingSidecar.length) : options.bytes === Array ? Array.prototype.slice.call(message.streamingSidecar) : message.streamingSidecar; - if (message.gifAttribution != null && message.hasOwnProperty("gifAttribution")) - object.gifAttribution = options.enums === String ? $root.proto.VideoMessage.VideoMessageAttribution[message.gifAttribution] : message.gifAttribution; - if (message.viewOnce != null && message.hasOwnProperty("viewOnce")) - object.viewOnce = message.viewOnce; - if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath")) - object.thumbnailDirectPath = message.thumbnailDirectPath; - if (message.thumbnailSha256 != null && message.hasOwnProperty("thumbnailSha256")) - object.thumbnailSha256 = options.bytes === String ? $util.base64.encode(message.thumbnailSha256, 0, message.thumbnailSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.thumbnailSha256) : message.thumbnailSha256; - if (message.thumbnailEncSha256 != null && message.hasOwnProperty("thumbnailEncSha256")) - object.thumbnailEncSha256 = options.bytes === String ? $util.base64.encode(message.thumbnailEncSha256, 0, message.thumbnailEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.thumbnailEncSha256) : message.thumbnailEncSha256; - if (message.staticUrl != null && message.hasOwnProperty("staticUrl")) - object.staticUrl = message.staticUrl; + object.expirationDate = options.longs === String ? $util.Long.prototype.toString.call(message.expirationDate) : options.longs === Number ? new $util.LongBits(message.expirationDate.low >>> 0, message.expirationDate.high >>> 0).toNumber() : message.expirationDate; return object; }; /** - * Converts this VideoMessage to JSON. + * Converts this SubscriptionAction to JSON. * @function toJSON - * @memberof proto.VideoMessage + * @memberof proto.SubscriptionAction * @instance * @returns {Object.} JSON object */ - VideoMessage.prototype.toJSON = function toJSON() { + SubscriptionAction.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * VideoMessageAttribution enum. - * @name proto.VideoMessage.VideoMessageAttribution - * @enum {number} - * @property {number} NONE=0 NONE value - * @property {number} GIPHY=1 GIPHY value - * @property {number} TENOR=2 TENOR value - */ - VideoMessage.VideoMessageAttribution = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NONE"] = 0; - values[valuesById[1] = "GIPHY"] = 1; - values[valuesById[2] = "TENOR"] = 2; - return values; - })(); - - return VideoMessage; + return SubscriptionAction; })(); - proto.EphemeralSetting = (function() { + proto.SyncActionData = (function() { /** - * Properties of an EphemeralSetting. + * Properties of a SyncActionData. * @memberof proto - * @interface IEphemeralSetting - * @property {number|null} [duration] EphemeralSetting duration - * @property {number|Long|null} [timestamp] EphemeralSetting timestamp + * @interface ISyncActionData + * @property {Uint8Array|null} [index] SyncActionData index + * @property {proto.ISyncActionValue|null} [value] SyncActionData value + * @property {Uint8Array|null} [padding] SyncActionData padding + * @property {number|null} [version] SyncActionData version */ /** - * Constructs a new EphemeralSetting. + * Constructs a new SyncActionData. * @memberof proto - * @classdesc Represents an EphemeralSetting. - * @implements IEphemeralSetting + * @classdesc Represents a SyncActionData. + * @implements ISyncActionData * @constructor - * @param {proto.IEphemeralSetting=} [properties] Properties to set + * @param {proto.ISyncActionData=} [properties] Properties to set */ - function EphemeralSetting(properties) { + function SyncActionData(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -34205,88 +56257,114 @@ $root.proto = (function() { } /** - * EphemeralSetting duration. - * @member {number} duration - * @memberof proto.EphemeralSetting + * SyncActionData index. + * @member {Uint8Array} index + * @memberof proto.SyncActionData * @instance */ - EphemeralSetting.prototype.duration = 0; + SyncActionData.prototype.index = $util.newBuffer([]); /** - * EphemeralSetting timestamp. - * @member {number|Long} timestamp - * @memberof proto.EphemeralSetting + * SyncActionData value. + * @member {proto.ISyncActionValue|null|undefined} value + * @memberof proto.SyncActionData * @instance */ - EphemeralSetting.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + SyncActionData.prototype.value = null; /** - * Creates a new EphemeralSetting instance using the specified properties. + * SyncActionData padding. + * @member {Uint8Array} padding + * @memberof proto.SyncActionData + * @instance + */ + SyncActionData.prototype.padding = $util.newBuffer([]); + + /** + * SyncActionData version. + * @member {number} version + * @memberof proto.SyncActionData + * @instance + */ + SyncActionData.prototype.version = 0; + + /** + * Creates a new SyncActionData instance using the specified properties. * @function create - * @memberof proto.EphemeralSetting + * @memberof proto.SyncActionData * @static - * @param {proto.IEphemeralSetting=} [properties] Properties to set - * @returns {proto.EphemeralSetting} EphemeralSetting instance + * @param {proto.ISyncActionData=} [properties] Properties to set + * @returns {proto.SyncActionData} SyncActionData instance */ - EphemeralSetting.create = function create(properties) { - return new EphemeralSetting(properties); + SyncActionData.create = function create(properties) { + return new SyncActionData(properties); }; /** - * Encodes the specified EphemeralSetting message. Does not implicitly {@link proto.EphemeralSetting.verify|verify} messages. + * Encodes the specified SyncActionData message. Does not implicitly {@link proto.SyncActionData.verify|verify} messages. * @function encode - * @memberof proto.EphemeralSetting + * @memberof proto.SyncActionData * @static - * @param {proto.IEphemeralSetting} message EphemeralSetting message or plain object to encode + * @param {proto.ISyncActionData} message SyncActionData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EphemeralSetting.encode = function encode(message, writer) { + SyncActionData.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) - writer.uint32(/* id 1, wireType 5 =*/13).sfixed32(message.duration); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - writer.uint32(/* id 2, wireType 1 =*/17).sfixed64(message.timestamp); + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.index); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.proto.SyncActionValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.padding != null && Object.hasOwnProperty.call(message, "padding")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.padding); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.version); return writer; }; /** - * Encodes the specified EphemeralSetting message, length delimited. Does not implicitly {@link proto.EphemeralSetting.verify|verify} messages. + * Encodes the specified SyncActionData message, length delimited. Does not implicitly {@link proto.SyncActionData.verify|verify} messages. * @function encodeDelimited - * @memberof proto.EphemeralSetting + * @memberof proto.SyncActionData * @static - * @param {proto.IEphemeralSetting} message EphemeralSetting message or plain object to encode + * @param {proto.ISyncActionData} message SyncActionData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EphemeralSetting.encodeDelimited = function encodeDelimited(message, writer) { + SyncActionData.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EphemeralSetting message from the specified reader or buffer. + * Decodes a SyncActionData message from the specified reader or buffer. * @function decode - * @memberof proto.EphemeralSetting + * @memberof proto.SyncActionData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.EphemeralSetting} EphemeralSetting + * @returns {proto.SyncActionData} SyncActionData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EphemeralSetting.decode = function decode(reader, length) { + SyncActionData.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.EphemeralSetting(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.SyncActionData(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.duration = reader.sfixed32(); + message.index = reader.bytes(); break; case 2: - message.timestamp = reader.sfixed64(); + message.value = $root.proto.SyncActionValue.decode(reader, reader.uint32()); + break; + case 3: + message.padding = reader.bytes(); + break; + case 4: + message.version = reader.int32(); break; default: reader.skipType(tag & 7); @@ -34297,35 +56375,286 @@ $root.proto = (function() { }; /** - * Decodes an EphemeralSetting message from the specified reader or buffer, length delimited. + * Decodes a SyncActionData message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.EphemeralSetting + * @memberof proto.SyncActionData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.EphemeralSetting} EphemeralSetting + * @returns {proto.SyncActionData} SyncActionData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EphemeralSetting.decodeDelimited = function decodeDelimited(reader) { + SyncActionData.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EphemeralSetting message. + * Verifies a SyncActionData message. * @function verify - * @memberof proto.EphemeralSetting + * @memberof proto.SyncActionData * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EphemeralSetting.verify = function verify(message) { + SyncActionData.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.duration != null && message.hasOwnProperty("duration")) - if (!$util.isInteger(message.duration)) - return "duration: integer expected"; + if (message.index != null && message.hasOwnProperty("index")) + if (!(message.index && typeof message.index.length === "number" || $util.isString(message.index))) + return "index: buffer expected"; + if (message.value != null && message.hasOwnProperty("value")) { + var error = $root.proto.SyncActionValue.verify(message.value); + if (error) + return "value." + error; + } + if (message.padding != null && message.hasOwnProperty("padding")) + if (!(message.padding && typeof message.padding.length === "number" || $util.isString(message.padding))) + return "padding: buffer expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version)) + return "version: integer expected"; + return null; + }; + + /** + * Creates a SyncActionData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SyncActionData + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionData} SyncActionData + */ + SyncActionData.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionData) + return object; + var message = new $root.proto.SyncActionData(); + if (object.index != null) + if (typeof object.index === "string") + $util.base64.decode(object.index, message.index = $util.newBuffer($util.base64.length(object.index)), 0); + else if (object.index.length) + message.index = object.index; + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".proto.SyncActionData.value: object expected"); + message.value = $root.proto.SyncActionValue.fromObject(object.value); + } + if (object.padding != null) + if (typeof object.padding === "string") + $util.base64.decode(object.padding, message.padding = $util.newBuffer($util.base64.length(object.padding)), 0); + else if (object.padding.length) + message.padding = object.padding; + if (object.version != null) + message.version = object.version | 0; + return message; + }; + + /** + * Creates a plain object from a SyncActionData message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SyncActionData + * @static + * @param {proto.SyncActionData} message SyncActionData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SyncActionData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.index = ""; + else { + object.index = []; + if (options.bytes !== Array) + object.index = $util.newBuffer(object.index); + } + object.value = null; + if (options.bytes === String) + object.padding = ""; + else { + object.padding = []; + if (options.bytes !== Array) + object.padding = $util.newBuffer(object.padding); + } + object.version = 0; + } + if (message.index != null && message.hasOwnProperty("index")) + object.index = options.bytes === String ? $util.base64.encode(message.index, 0, message.index.length) : options.bytes === Array ? Array.prototype.slice.call(message.index) : message.index; + if (message.value != null && message.hasOwnProperty("value")) + object.value = $root.proto.SyncActionValue.toObject(message.value, options); + if (message.padding != null && message.hasOwnProperty("padding")) + object.padding = options.bytes === String ? $util.base64.encode(message.padding, 0, message.padding.length) : options.bytes === Array ? Array.prototype.slice.call(message.padding) : message.padding; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; + + /** + * Converts this SyncActionData to JSON. + * @function toJSON + * @memberof proto.SyncActionData + * @instance + * @returns {Object.} JSON object + */ + SyncActionData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SyncActionData; + })(); + + proto.SyncActionMessage = (function() { + + /** + * Properties of a SyncActionMessage. + * @memberof proto + * @interface ISyncActionMessage + * @property {proto.IMessageKey|null} [key] SyncActionMessage key + * @property {number|Long|null} [timestamp] SyncActionMessage timestamp + */ + + /** + * Constructs a new SyncActionMessage. + * @memberof proto + * @classdesc Represents a SyncActionMessage. + * @implements ISyncActionMessage + * @constructor + * @param {proto.ISyncActionMessage=} [properties] Properties to set + */ + function SyncActionMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SyncActionMessage key. + * @member {proto.IMessageKey|null|undefined} key + * @memberof proto.SyncActionMessage + * @instance + */ + SyncActionMessage.prototype.key = null; + + /** + * SyncActionMessage timestamp. + * @member {number|Long} timestamp + * @memberof proto.SyncActionMessage + * @instance + */ + SyncActionMessage.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new SyncActionMessage instance using the specified properties. + * @function create + * @memberof proto.SyncActionMessage + * @static + * @param {proto.ISyncActionMessage=} [properties] Properties to set + * @returns {proto.SyncActionMessage} SyncActionMessage instance + */ + SyncActionMessage.create = function create(properties) { + return new SyncActionMessage(properties); + }; + + /** + * Encodes the specified SyncActionMessage message. Does not implicitly {@link proto.SyncActionMessage.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionMessage + * @static + * @param {proto.ISyncActionMessage} message SyncActionMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SyncActionMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + $root.proto.MessageKey.encode(message.key, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.timestamp); + return writer; + }; + + /** + * Encodes the specified SyncActionMessage message, length delimited. Does not implicitly {@link proto.SyncActionMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionMessage + * @static + * @param {proto.ISyncActionMessage} message SyncActionMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SyncActionMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SyncActionMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.SyncActionMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionMessage} SyncActionMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SyncActionMessage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.SyncActionMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + case 2: + message.timestamp = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SyncActionMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SyncActionMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionMessage} SyncActionMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SyncActionMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SyncActionMessage message. + * @function verify + * @memberof proto.SyncActionMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SyncActionMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) { + var error = $root.proto.MessageKey.verify(message.key); + if (error) + return "key." + error; + } if (message.timestamp != null && message.hasOwnProperty("timestamp")) if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) return "timestamp: integer|Long expected"; @@ -34333,19 +56662,22 @@ $root.proto = (function() { }; /** - * Creates an EphemeralSetting message from a plain object. Also converts values to their respective internal types. + * Creates a SyncActionMessage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.EphemeralSetting + * @memberof proto.SyncActionMessage * @static * @param {Object.} object Plain object - * @returns {proto.EphemeralSetting} EphemeralSetting + * @returns {proto.SyncActionMessage} SyncActionMessage */ - EphemeralSetting.fromObject = function fromObject(object) { - if (object instanceof $root.proto.EphemeralSetting) + SyncActionMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionMessage) return object; - var message = new $root.proto.EphemeralSetting(); - if (object.duration != null) - message.duration = object.duration | 0; + var message = new $root.proto.SyncActionMessage(); + if (object.key != null) { + if (typeof object.key !== "object") + throw TypeError(".proto.SyncActionMessage.key: object expected"); + message.key = $root.proto.MessageKey.fromObject(object.key); + } if (object.timestamp != null) if ($util.Long) (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = false; @@ -34359,28 +56691,28 @@ $root.proto = (function() { }; /** - * Creates a plain object from an EphemeralSetting message. Also converts values to other types if specified. + * Creates a plain object from a SyncActionMessage message. Also converts values to other types if specified. * @function toObject - * @memberof proto.EphemeralSetting + * @memberof proto.SyncActionMessage * @static - * @param {proto.EphemeralSetting} message EphemeralSetting + * @param {proto.SyncActionMessage} message SyncActionMessage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EphemeralSetting.toObject = function toObject(message, options) { + SyncActionMessage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.duration = 0; + object.key = null; if ($util.Long) { var long = new $util.Long(0, 0, false); object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.timestamp = options.longs === String ? "0" : 0; } - if (message.duration != null && message.hasOwnProperty("duration")) - object.duration = message.duration; + if (message.key != null && message.hasOwnProperty("key")) + object.key = $root.proto.MessageKey.toObject(message.key, options); if (message.timestamp != null && message.hasOwnProperty("timestamp")) if (typeof message.timestamp === "number") object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; @@ -34390,321 +56722,40 @@ $root.proto = (function() { }; /** - * Converts this EphemeralSetting to JSON. + * Converts this SyncActionMessage to JSON. * @function toJSON - * @memberof proto.EphemeralSetting + * @memberof proto.SyncActionMessage * @instance * @returns {Object.} JSON object */ - EphemeralSetting.prototype.toJSON = function toJSON() { + SyncActionMessage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return EphemeralSetting; + return SyncActionMessage; })(); - proto.AutoDownloadSettings = (function() { + proto.SyncActionMessageRange = (function() { /** - * Properties of an AutoDownloadSettings. + * Properties of a SyncActionMessageRange. * @memberof proto - * @interface IAutoDownloadSettings - * @property {boolean|null} [downloadImages] AutoDownloadSettings downloadImages - * @property {boolean|null} [downloadAudio] AutoDownloadSettings downloadAudio - * @property {boolean|null} [downloadVideo] AutoDownloadSettings downloadVideo - * @property {boolean|null} [downloadDocuments] AutoDownloadSettings downloadDocuments + * @interface ISyncActionMessageRange + * @property {number|Long|null} [lastMessageTimestamp] SyncActionMessageRange lastMessageTimestamp + * @property {number|Long|null} [lastSystemMessageTimestamp] SyncActionMessageRange lastSystemMessageTimestamp + * @property {Array.|null} [messages] SyncActionMessageRange messages */ /** - * Constructs a new AutoDownloadSettings. + * Constructs a new SyncActionMessageRange. * @memberof proto - * @classdesc Represents an AutoDownloadSettings. - * @implements IAutoDownloadSettings + * @classdesc Represents a SyncActionMessageRange. + * @implements ISyncActionMessageRange * @constructor - * @param {proto.IAutoDownloadSettings=} [properties] Properties to set + * @param {proto.ISyncActionMessageRange=} [properties] Properties to set */ - function AutoDownloadSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AutoDownloadSettings downloadImages. - * @member {boolean} downloadImages - * @memberof proto.AutoDownloadSettings - * @instance - */ - AutoDownloadSettings.prototype.downloadImages = false; - - /** - * AutoDownloadSettings downloadAudio. - * @member {boolean} downloadAudio - * @memberof proto.AutoDownloadSettings - * @instance - */ - AutoDownloadSettings.prototype.downloadAudio = false; - - /** - * AutoDownloadSettings downloadVideo. - * @member {boolean} downloadVideo - * @memberof proto.AutoDownloadSettings - * @instance - */ - AutoDownloadSettings.prototype.downloadVideo = false; - - /** - * AutoDownloadSettings downloadDocuments. - * @member {boolean} downloadDocuments - * @memberof proto.AutoDownloadSettings - * @instance - */ - AutoDownloadSettings.prototype.downloadDocuments = false; - - /** - * Creates a new AutoDownloadSettings instance using the specified properties. - * @function create - * @memberof proto.AutoDownloadSettings - * @static - * @param {proto.IAutoDownloadSettings=} [properties] Properties to set - * @returns {proto.AutoDownloadSettings} AutoDownloadSettings instance - */ - AutoDownloadSettings.create = function create(properties) { - return new AutoDownloadSettings(properties); - }; - - /** - * Encodes the specified AutoDownloadSettings message. Does not implicitly {@link proto.AutoDownloadSettings.verify|verify} messages. - * @function encode - * @memberof proto.AutoDownloadSettings - * @static - * @param {proto.IAutoDownloadSettings} message AutoDownloadSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AutoDownloadSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.downloadImages != null && Object.hasOwnProperty.call(message, "downloadImages")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.downloadImages); - if (message.downloadAudio != null && Object.hasOwnProperty.call(message, "downloadAudio")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.downloadAudio); - if (message.downloadVideo != null && Object.hasOwnProperty.call(message, "downloadVideo")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.downloadVideo); - if (message.downloadDocuments != null && Object.hasOwnProperty.call(message, "downloadDocuments")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.downloadDocuments); - return writer; - }; - - /** - * Encodes the specified AutoDownloadSettings message, length delimited. Does not implicitly {@link proto.AutoDownloadSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.AutoDownloadSettings - * @static - * @param {proto.IAutoDownloadSettings} message AutoDownloadSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AutoDownloadSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AutoDownloadSettings message from the specified reader or buffer. - * @function decode - * @memberof proto.AutoDownloadSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.AutoDownloadSettings} AutoDownloadSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AutoDownloadSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.AutoDownloadSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.downloadImages = reader.bool(); - break; - case 2: - message.downloadAudio = reader.bool(); - break; - case 3: - message.downloadVideo = reader.bool(); - break; - case 4: - message.downloadDocuments = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AutoDownloadSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.AutoDownloadSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.AutoDownloadSettings} AutoDownloadSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AutoDownloadSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AutoDownloadSettings message. - * @function verify - * @memberof proto.AutoDownloadSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AutoDownloadSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.downloadImages != null && message.hasOwnProperty("downloadImages")) - if (typeof message.downloadImages !== "boolean") - return "downloadImages: boolean expected"; - if (message.downloadAudio != null && message.hasOwnProperty("downloadAudio")) - if (typeof message.downloadAudio !== "boolean") - return "downloadAudio: boolean expected"; - if (message.downloadVideo != null && message.hasOwnProperty("downloadVideo")) - if (typeof message.downloadVideo !== "boolean") - return "downloadVideo: boolean expected"; - if (message.downloadDocuments != null && message.hasOwnProperty("downloadDocuments")) - if (typeof message.downloadDocuments !== "boolean") - return "downloadDocuments: boolean expected"; - return null; - }; - - /** - * Creates an AutoDownloadSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.AutoDownloadSettings - * @static - * @param {Object.} object Plain object - * @returns {proto.AutoDownloadSettings} AutoDownloadSettings - */ - AutoDownloadSettings.fromObject = function fromObject(object) { - if (object instanceof $root.proto.AutoDownloadSettings) - return object; - var message = new $root.proto.AutoDownloadSettings(); - if (object.downloadImages != null) - message.downloadImages = Boolean(object.downloadImages); - if (object.downloadAudio != null) - message.downloadAudio = Boolean(object.downloadAudio); - if (object.downloadVideo != null) - message.downloadVideo = Boolean(object.downloadVideo); - if (object.downloadDocuments != null) - message.downloadDocuments = Boolean(object.downloadDocuments); - return message; - }; - - /** - * Creates a plain object from an AutoDownloadSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.AutoDownloadSettings - * @static - * @param {proto.AutoDownloadSettings} message AutoDownloadSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AutoDownloadSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.downloadImages = false; - object.downloadAudio = false; - object.downloadVideo = false; - object.downloadDocuments = false; - } - if (message.downloadImages != null && message.hasOwnProperty("downloadImages")) - object.downloadImages = message.downloadImages; - if (message.downloadAudio != null && message.hasOwnProperty("downloadAudio")) - object.downloadAudio = message.downloadAudio; - if (message.downloadVideo != null && message.hasOwnProperty("downloadVideo")) - object.downloadVideo = message.downloadVideo; - if (message.downloadDocuments != null && message.hasOwnProperty("downloadDocuments")) - object.downloadDocuments = message.downloadDocuments; - return object; - }; - - /** - * Converts this AutoDownloadSettings to JSON. - * @function toJSON - * @memberof proto.AutoDownloadSettings - * @instance - * @returns {Object.} JSON object - */ - AutoDownloadSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return AutoDownloadSettings; - })(); - - proto.Conversation = (function() { - - /** - * Properties of a Conversation. - * @memberof proto - * @interface IConversation - * @property {string} id Conversation id - * @property {Array.|null} [messages] Conversation messages - * @property {string|null} [newJid] Conversation newJid - * @property {string|null} [oldJid] Conversation oldJid - * @property {number|Long|null} [lastMsgTimestamp] Conversation lastMsgTimestamp - * @property {number|null} [unreadCount] Conversation unreadCount - * @property {boolean|null} [readOnly] Conversation readOnly - * @property {boolean|null} [endOfHistoryTransfer] Conversation endOfHistoryTransfer - * @property {number|null} [ephemeralExpiration] Conversation ephemeralExpiration - * @property {number|Long|null} [ephemeralSettingTimestamp] Conversation ephemeralSettingTimestamp - * @property {proto.Conversation.ConversationEndOfHistoryTransferType|null} [endOfHistoryTransferType] Conversation endOfHistoryTransferType - * @property {number|Long|null} [conversationTimestamp] Conversation conversationTimestamp - * @property {string|null} [name] Conversation name - * @property {string|null} [pHash] Conversation pHash - * @property {boolean|null} [notSpam] Conversation notSpam - * @property {boolean|null} [archived] Conversation archived - * @property {proto.IDisappearingMode|null} [disappearingMode] Conversation disappearingMode - * @property {number|null} [unreadMentionCount] Conversation unreadMentionCount - * @property {boolean|null} [markedAsUnread] Conversation markedAsUnread - * @property {Array.|null} [participant] Conversation participant - * @property {Uint8Array|null} [tcToken] Conversation tcToken - * @property {number|Long|null} [tcTokenTimestamp] Conversation tcTokenTimestamp - * @property {Uint8Array|null} [contactPrimaryIdentityKey] Conversation contactPrimaryIdentityKey - * @property {number|null} [pinned] Conversation pinned - * @property {number|Long|null} [muteEndTime] Conversation muteEndTime - * @property {proto.IWallpaperSettings|null} [wallpaper] Conversation wallpaper - * @property {proto.MediaVisibility|null} [mediaVisibility] Conversation mediaVisibility - * @property {number|Long|null} [tcTokenSenderTimestamp] Conversation tcTokenSenderTimestamp - * @property {boolean|null} [suspended] Conversation suspended - */ - - /** - * Constructs a new Conversation. - * @memberof proto - * @classdesc Represents a Conversation. - * @implements IConversation - * @constructor - * @param {proto.IConversation=} [properties] Properties to set - */ - function Conversation(properties) { + function SyncActionMessageRange(properties) { this.messages = []; - this.participant = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -34712,4711 +56763,305 @@ $root.proto = (function() { } /** - * Conversation id. - * @member {string} id - * @memberof proto.Conversation + * SyncActionMessageRange lastMessageTimestamp. + * @member {number|Long} lastMessageTimestamp + * @memberof proto.SyncActionMessageRange * @instance */ - Conversation.prototype.id = ""; + SyncActionMessageRange.prototype.lastMessageTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Conversation messages. - * @member {Array.} messages - * @memberof proto.Conversation + * SyncActionMessageRange lastSystemMessageTimestamp. + * @member {number|Long} lastSystemMessageTimestamp + * @memberof proto.SyncActionMessageRange * @instance */ - Conversation.prototype.messages = $util.emptyArray; + SyncActionMessageRange.prototype.lastSystemMessageTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Conversation newJid. - * @member {string} newJid - * @memberof proto.Conversation + * SyncActionMessageRange messages. + * @member {Array.} messages + * @memberof proto.SyncActionMessageRange * @instance */ - Conversation.prototype.newJid = ""; + SyncActionMessageRange.prototype.messages = $util.emptyArray; /** - * Conversation oldJid. - * @member {string} oldJid - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.oldJid = ""; - - /** - * Conversation lastMsgTimestamp. - * @member {number|Long} lastMsgTimestamp - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.lastMsgTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Conversation unreadCount. - * @member {number} unreadCount - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.unreadCount = 0; - - /** - * Conversation readOnly. - * @member {boolean} readOnly - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.readOnly = false; - - /** - * Conversation endOfHistoryTransfer. - * @member {boolean} endOfHistoryTransfer - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.endOfHistoryTransfer = false; - - /** - * Conversation ephemeralExpiration. - * @member {number} ephemeralExpiration - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.ephemeralExpiration = 0; - - /** - * Conversation ephemeralSettingTimestamp. - * @member {number|Long} ephemeralSettingTimestamp - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.ephemeralSettingTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Conversation endOfHistoryTransferType. - * @member {proto.Conversation.ConversationEndOfHistoryTransferType} endOfHistoryTransferType - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.endOfHistoryTransferType = 0; - - /** - * Conversation conversationTimestamp. - * @member {number|Long} conversationTimestamp - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.conversationTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Conversation name. - * @member {string} name - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.name = ""; - - /** - * Conversation pHash. - * @member {string} pHash - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.pHash = ""; - - /** - * Conversation notSpam. - * @member {boolean} notSpam - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.notSpam = false; - - /** - * Conversation archived. - * @member {boolean} archived - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.archived = false; - - /** - * Conversation disappearingMode. - * @member {proto.IDisappearingMode|null|undefined} disappearingMode - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.disappearingMode = null; - - /** - * Conversation unreadMentionCount. - * @member {number} unreadMentionCount - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.unreadMentionCount = 0; - - /** - * Conversation markedAsUnread. - * @member {boolean} markedAsUnread - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.markedAsUnread = false; - - /** - * Conversation participant. - * @member {Array.} participant - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.participant = $util.emptyArray; - - /** - * Conversation tcToken. - * @member {Uint8Array} tcToken - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.tcToken = $util.newBuffer([]); - - /** - * Conversation tcTokenTimestamp. - * @member {number|Long} tcTokenTimestamp - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.tcTokenTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Conversation contactPrimaryIdentityKey. - * @member {Uint8Array} contactPrimaryIdentityKey - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.contactPrimaryIdentityKey = $util.newBuffer([]); - - /** - * Conversation pinned. - * @member {number} pinned - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.pinned = 0; - - /** - * Conversation muteEndTime. - * @member {number|Long} muteEndTime - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.muteEndTime = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Conversation wallpaper. - * @member {proto.IWallpaperSettings|null|undefined} wallpaper - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.wallpaper = null; - - /** - * Conversation mediaVisibility. - * @member {proto.MediaVisibility} mediaVisibility - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.mediaVisibility = 0; - - /** - * Conversation tcTokenSenderTimestamp. - * @member {number|Long} tcTokenSenderTimestamp - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.tcTokenSenderTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Conversation suspended. - * @member {boolean} suspended - * @memberof proto.Conversation - * @instance - */ - Conversation.prototype.suspended = false; - - /** - * Creates a new Conversation instance using the specified properties. + * Creates a new SyncActionMessageRange instance using the specified properties. * @function create - * @memberof proto.Conversation + * @memberof proto.SyncActionMessageRange * @static - * @param {proto.IConversation=} [properties] Properties to set - * @returns {proto.Conversation} Conversation instance + * @param {proto.ISyncActionMessageRange=} [properties] Properties to set + * @returns {proto.SyncActionMessageRange} SyncActionMessageRange instance */ - Conversation.create = function create(properties) { - return new Conversation(properties); + SyncActionMessageRange.create = function create(properties) { + return new SyncActionMessageRange(properties); }; /** - * Encodes the specified Conversation message. Does not implicitly {@link proto.Conversation.verify|verify} messages. + * Encodes the specified SyncActionMessageRange message. Does not implicitly {@link proto.SyncActionMessageRange.verify|verify} messages. * @function encode - * @memberof proto.Conversation + * @memberof proto.SyncActionMessageRange * @static - * @param {proto.IConversation} message Conversation message or plain object to encode + * @param {proto.ISyncActionMessageRange} message SyncActionMessageRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Conversation.encode = function encode(message, writer) { + SyncActionMessageRange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.lastMessageTimestamp != null && Object.hasOwnProperty.call(message, "lastMessageTimestamp")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.lastMessageTimestamp); + if (message.lastSystemMessageTimestamp != null && Object.hasOwnProperty.call(message, "lastSystemMessageTimestamp")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.lastSystemMessageTimestamp); if (message.messages != null && message.messages.length) for (var i = 0; i < message.messages.length; ++i) - $root.proto.HistorySyncMsg.encode(message.messages[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.newJid != null && Object.hasOwnProperty.call(message, "newJid")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.newJid); - if (message.oldJid != null && Object.hasOwnProperty.call(message, "oldJid")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.oldJid); - if (message.lastMsgTimestamp != null && Object.hasOwnProperty.call(message, "lastMsgTimestamp")) - writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.lastMsgTimestamp); - if (message.unreadCount != null && Object.hasOwnProperty.call(message, "unreadCount")) - writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.unreadCount); - if (message.readOnly != null && Object.hasOwnProperty.call(message, "readOnly")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.readOnly); - if (message.endOfHistoryTransfer != null && Object.hasOwnProperty.call(message, "endOfHistoryTransfer")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.endOfHistoryTransfer); - if (message.ephemeralExpiration != null && Object.hasOwnProperty.call(message, "ephemeralExpiration")) - writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.ephemeralExpiration); - if (message.ephemeralSettingTimestamp != null && Object.hasOwnProperty.call(message, "ephemeralSettingTimestamp")) - writer.uint32(/* id 10, wireType 0 =*/80).int64(message.ephemeralSettingTimestamp); - if (message.endOfHistoryTransferType != null && Object.hasOwnProperty.call(message, "endOfHistoryTransferType")) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.endOfHistoryTransferType); - if (message.conversationTimestamp != null && Object.hasOwnProperty.call(message, "conversationTimestamp")) - writer.uint32(/* id 12, wireType 0 =*/96).uint64(message.conversationTimestamp); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.name); - if (message.pHash != null && Object.hasOwnProperty.call(message, "pHash")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.pHash); - if (message.notSpam != null && Object.hasOwnProperty.call(message, "notSpam")) - writer.uint32(/* id 15, wireType 0 =*/120).bool(message.notSpam); - if (message.archived != null && Object.hasOwnProperty.call(message, "archived")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.archived); - if (message.disappearingMode != null && Object.hasOwnProperty.call(message, "disappearingMode")) - $root.proto.DisappearingMode.encode(message.disappearingMode, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.unreadMentionCount != null && Object.hasOwnProperty.call(message, "unreadMentionCount")) - writer.uint32(/* id 18, wireType 0 =*/144).uint32(message.unreadMentionCount); - if (message.markedAsUnread != null && Object.hasOwnProperty.call(message, "markedAsUnread")) - writer.uint32(/* id 19, wireType 0 =*/152).bool(message.markedAsUnread); - if (message.participant != null && message.participant.length) - for (var i = 0; i < message.participant.length; ++i) - $root.proto.GroupParticipant.encode(message.participant[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.tcToken != null && Object.hasOwnProperty.call(message, "tcToken")) - writer.uint32(/* id 21, wireType 2 =*/170).bytes(message.tcToken); - if (message.tcTokenTimestamp != null && Object.hasOwnProperty.call(message, "tcTokenTimestamp")) - writer.uint32(/* id 22, wireType 0 =*/176).uint64(message.tcTokenTimestamp); - if (message.contactPrimaryIdentityKey != null && Object.hasOwnProperty.call(message, "contactPrimaryIdentityKey")) - writer.uint32(/* id 23, wireType 2 =*/186).bytes(message.contactPrimaryIdentityKey); - if (message.pinned != null && Object.hasOwnProperty.call(message, "pinned")) - writer.uint32(/* id 24, wireType 0 =*/192).uint32(message.pinned); - if (message.muteEndTime != null && Object.hasOwnProperty.call(message, "muteEndTime")) - writer.uint32(/* id 25, wireType 0 =*/200).uint64(message.muteEndTime); - if (message.wallpaper != null && Object.hasOwnProperty.call(message, "wallpaper")) - $root.proto.WallpaperSettings.encode(message.wallpaper, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.mediaVisibility != null && Object.hasOwnProperty.call(message, "mediaVisibility")) - writer.uint32(/* id 27, wireType 0 =*/216).int32(message.mediaVisibility); - if (message.tcTokenSenderTimestamp != null && Object.hasOwnProperty.call(message, "tcTokenSenderTimestamp")) - writer.uint32(/* id 28, wireType 0 =*/224).uint64(message.tcTokenSenderTimestamp); - if (message.suspended != null && Object.hasOwnProperty.call(message, "suspended")) - writer.uint32(/* id 29, wireType 0 =*/232).bool(message.suspended); + $root.proto.SyncActionMessage.encode(message.messages[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified Conversation message, length delimited. Does not implicitly {@link proto.Conversation.verify|verify} messages. + * Encodes the specified SyncActionMessageRange message, length delimited. Does not implicitly {@link proto.SyncActionMessageRange.verify|verify} messages. * @function encodeDelimited - * @memberof proto.Conversation + * @memberof proto.SyncActionMessageRange * @static - * @param {proto.IConversation} message Conversation message or plain object to encode + * @param {proto.ISyncActionMessageRange} message SyncActionMessageRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Conversation.encodeDelimited = function encodeDelimited(message, writer) { + SyncActionMessageRange.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Conversation message from the specified reader or buffer. + * Decodes a SyncActionMessageRange message from the specified reader or buffer. * @function decode - * @memberof proto.Conversation + * @memberof proto.SyncActionMessageRange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.Conversation} Conversation + * @returns {proto.SyncActionMessageRange} SyncActionMessageRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Conversation.decode = function decode(reader, length) { + SyncActionMessageRange.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Conversation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.SyncActionMessageRange(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.id = reader.string(); + message.lastMessageTimestamp = reader.int64(); break; case 2: - if (!(message.messages && message.messages.length)) - message.messages = []; - message.messages.push($root.proto.HistorySyncMsg.decode(reader, reader.uint32())); + message.lastSystemMessageTimestamp = reader.int64(); break; case 3: - message.newJid = reader.string(); - break; - case 4: - message.oldJid = reader.string(); - break; - case 5: - message.lastMsgTimestamp = reader.uint64(); - break; - case 6: - message.unreadCount = reader.uint32(); - break; - case 7: - message.readOnly = reader.bool(); - break; - case 8: - message.endOfHistoryTransfer = reader.bool(); - break; - case 9: - message.ephemeralExpiration = reader.uint32(); - break; - case 10: - message.ephemeralSettingTimestamp = reader.int64(); - break; - case 11: - message.endOfHistoryTransferType = reader.int32(); - break; - case 12: - message.conversationTimestamp = reader.uint64(); - break; - case 13: - message.name = reader.string(); - break; - case 14: - message.pHash = reader.string(); - break; - case 15: - message.notSpam = reader.bool(); - break; - case 16: - message.archived = reader.bool(); - break; - case 17: - message.disappearingMode = $root.proto.DisappearingMode.decode(reader, reader.uint32()); - break; - case 18: - message.unreadMentionCount = reader.uint32(); - break; - case 19: - message.markedAsUnread = reader.bool(); - break; - case 20: - if (!(message.participant && message.participant.length)) - message.participant = []; - message.participant.push($root.proto.GroupParticipant.decode(reader, reader.uint32())); - break; - case 21: - message.tcToken = reader.bytes(); - break; - case 22: - message.tcTokenTimestamp = reader.uint64(); - break; - case 23: - message.contactPrimaryIdentityKey = reader.bytes(); - break; - case 24: - message.pinned = reader.uint32(); - break; - case 25: - message.muteEndTime = reader.uint64(); - break; - case 26: - message.wallpaper = $root.proto.WallpaperSettings.decode(reader, reader.uint32()); - break; - case 27: - message.mediaVisibility = reader.int32(); - break; - case 28: - message.tcTokenSenderTimestamp = reader.uint64(); - break; - case 29: - message.suspended = reader.bool(); + if (!(message.messages && message.messages.length)) + message.messages = []; + message.messages.push($root.proto.SyncActionMessage.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } - if (!message.hasOwnProperty("id")) - throw $util.ProtocolError("missing required 'id'", { instance: message }); return message; }; /** - * Decodes a Conversation message from the specified reader or buffer, length delimited. + * Decodes a SyncActionMessageRange message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.Conversation + * @memberof proto.SyncActionMessageRange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Conversation} Conversation + * @returns {proto.SyncActionMessageRange} SyncActionMessageRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Conversation.decodeDelimited = function decodeDelimited(reader) { + SyncActionMessageRange.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Conversation message. + * Verifies a SyncActionMessageRange message. * @function verify - * @memberof proto.Conversation + * @memberof proto.SyncActionMessageRange * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Conversation.verify = function verify(message) { + SyncActionMessageRange.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (!$util.isString(message.id)) - return "id: string expected"; + if (message.lastMessageTimestamp != null && message.hasOwnProperty("lastMessageTimestamp")) + if (!$util.isInteger(message.lastMessageTimestamp) && !(message.lastMessageTimestamp && $util.isInteger(message.lastMessageTimestamp.low) && $util.isInteger(message.lastMessageTimestamp.high))) + return "lastMessageTimestamp: integer|Long expected"; + if (message.lastSystemMessageTimestamp != null && message.hasOwnProperty("lastSystemMessageTimestamp")) + if (!$util.isInteger(message.lastSystemMessageTimestamp) && !(message.lastSystemMessageTimestamp && $util.isInteger(message.lastSystemMessageTimestamp.low) && $util.isInteger(message.lastSystemMessageTimestamp.high))) + return "lastSystemMessageTimestamp: integer|Long expected"; if (message.messages != null && message.hasOwnProperty("messages")) { if (!Array.isArray(message.messages)) return "messages: array expected"; for (var i = 0; i < message.messages.length; ++i) { - var error = $root.proto.HistorySyncMsg.verify(message.messages[i]); + var error = $root.proto.SyncActionMessage.verify(message.messages[i]); if (error) return "messages." + error; } } - if (message.newJid != null && message.hasOwnProperty("newJid")) - if (!$util.isString(message.newJid)) - return "newJid: string expected"; - if (message.oldJid != null && message.hasOwnProperty("oldJid")) - if (!$util.isString(message.oldJid)) - return "oldJid: string expected"; - if (message.lastMsgTimestamp != null && message.hasOwnProperty("lastMsgTimestamp")) - if (!$util.isInteger(message.lastMsgTimestamp) && !(message.lastMsgTimestamp && $util.isInteger(message.lastMsgTimestamp.low) && $util.isInteger(message.lastMsgTimestamp.high))) - return "lastMsgTimestamp: integer|Long expected"; - if (message.unreadCount != null && message.hasOwnProperty("unreadCount")) - if (!$util.isInteger(message.unreadCount)) - return "unreadCount: integer expected"; - if (message.readOnly != null && message.hasOwnProperty("readOnly")) - if (typeof message.readOnly !== "boolean") - return "readOnly: boolean expected"; - if (message.endOfHistoryTransfer != null && message.hasOwnProperty("endOfHistoryTransfer")) - if (typeof message.endOfHistoryTransfer !== "boolean") - return "endOfHistoryTransfer: boolean expected"; - if (message.ephemeralExpiration != null && message.hasOwnProperty("ephemeralExpiration")) - if (!$util.isInteger(message.ephemeralExpiration)) - return "ephemeralExpiration: integer expected"; - if (message.ephemeralSettingTimestamp != null && message.hasOwnProperty("ephemeralSettingTimestamp")) - if (!$util.isInteger(message.ephemeralSettingTimestamp) && !(message.ephemeralSettingTimestamp && $util.isInteger(message.ephemeralSettingTimestamp.low) && $util.isInteger(message.ephemeralSettingTimestamp.high))) - return "ephemeralSettingTimestamp: integer|Long expected"; - if (message.endOfHistoryTransferType != null && message.hasOwnProperty("endOfHistoryTransferType")) - switch (message.endOfHistoryTransferType) { - default: - return "endOfHistoryTransferType: enum value expected"; - case 0: - case 1: - break; - } - if (message.conversationTimestamp != null && message.hasOwnProperty("conversationTimestamp")) - if (!$util.isInteger(message.conversationTimestamp) && !(message.conversationTimestamp && $util.isInteger(message.conversationTimestamp.low) && $util.isInteger(message.conversationTimestamp.high))) - return "conversationTimestamp: integer|Long expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.pHash != null && message.hasOwnProperty("pHash")) - if (!$util.isString(message.pHash)) - return "pHash: string expected"; - if (message.notSpam != null && message.hasOwnProperty("notSpam")) - if (typeof message.notSpam !== "boolean") - return "notSpam: boolean expected"; - if (message.archived != null && message.hasOwnProperty("archived")) - if (typeof message.archived !== "boolean") - return "archived: boolean expected"; - if (message.disappearingMode != null && message.hasOwnProperty("disappearingMode")) { - var error = $root.proto.DisappearingMode.verify(message.disappearingMode); - if (error) - return "disappearingMode." + error; - } - if (message.unreadMentionCount != null && message.hasOwnProperty("unreadMentionCount")) - if (!$util.isInteger(message.unreadMentionCount)) - return "unreadMentionCount: integer expected"; - if (message.markedAsUnread != null && message.hasOwnProperty("markedAsUnread")) - if (typeof message.markedAsUnread !== "boolean") - return "markedAsUnread: boolean expected"; - if (message.participant != null && message.hasOwnProperty("participant")) { - if (!Array.isArray(message.participant)) - return "participant: array expected"; - for (var i = 0; i < message.participant.length; ++i) { - var error = $root.proto.GroupParticipant.verify(message.participant[i]); - if (error) - return "participant." + error; - } - } - if (message.tcToken != null && message.hasOwnProperty("tcToken")) - if (!(message.tcToken && typeof message.tcToken.length === "number" || $util.isString(message.tcToken))) - return "tcToken: buffer expected"; - if (message.tcTokenTimestamp != null && message.hasOwnProperty("tcTokenTimestamp")) - if (!$util.isInteger(message.tcTokenTimestamp) && !(message.tcTokenTimestamp && $util.isInteger(message.tcTokenTimestamp.low) && $util.isInteger(message.tcTokenTimestamp.high))) - return "tcTokenTimestamp: integer|Long expected"; - if (message.contactPrimaryIdentityKey != null && message.hasOwnProperty("contactPrimaryIdentityKey")) - if (!(message.contactPrimaryIdentityKey && typeof message.contactPrimaryIdentityKey.length === "number" || $util.isString(message.contactPrimaryIdentityKey))) - return "contactPrimaryIdentityKey: buffer expected"; - if (message.pinned != null && message.hasOwnProperty("pinned")) - if (!$util.isInteger(message.pinned)) - return "pinned: integer expected"; - if (message.muteEndTime != null && message.hasOwnProperty("muteEndTime")) - if (!$util.isInteger(message.muteEndTime) && !(message.muteEndTime && $util.isInteger(message.muteEndTime.low) && $util.isInteger(message.muteEndTime.high))) - return "muteEndTime: integer|Long expected"; - if (message.wallpaper != null && message.hasOwnProperty("wallpaper")) { - var error = $root.proto.WallpaperSettings.verify(message.wallpaper); - if (error) - return "wallpaper." + error; - } - if (message.mediaVisibility != null && message.hasOwnProperty("mediaVisibility")) - switch (message.mediaVisibility) { - default: - return "mediaVisibility: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.tcTokenSenderTimestamp != null && message.hasOwnProperty("tcTokenSenderTimestamp")) - if (!$util.isInteger(message.tcTokenSenderTimestamp) && !(message.tcTokenSenderTimestamp && $util.isInteger(message.tcTokenSenderTimestamp.low) && $util.isInteger(message.tcTokenSenderTimestamp.high))) - return "tcTokenSenderTimestamp: integer|Long expected"; - if (message.suspended != null && message.hasOwnProperty("suspended")) - if (typeof message.suspended !== "boolean") - return "suspended: boolean expected"; return null; }; /** - * Creates a Conversation message from a plain object. Also converts values to their respective internal types. + * Creates a SyncActionMessageRange message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.Conversation + * @memberof proto.SyncActionMessageRange * @static * @param {Object.} object Plain object - * @returns {proto.Conversation} Conversation + * @returns {proto.SyncActionMessageRange} SyncActionMessageRange */ - Conversation.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Conversation) + SyncActionMessageRange.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionMessageRange) return object; - var message = new $root.proto.Conversation(); - if (object.id != null) - message.id = String(object.id); + var message = new $root.proto.SyncActionMessageRange(); + if (object.lastMessageTimestamp != null) + if ($util.Long) + (message.lastMessageTimestamp = $util.Long.fromValue(object.lastMessageTimestamp)).unsigned = false; + else if (typeof object.lastMessageTimestamp === "string") + message.lastMessageTimestamp = parseInt(object.lastMessageTimestamp, 10); + else if (typeof object.lastMessageTimestamp === "number") + message.lastMessageTimestamp = object.lastMessageTimestamp; + else if (typeof object.lastMessageTimestamp === "object") + message.lastMessageTimestamp = new $util.LongBits(object.lastMessageTimestamp.low >>> 0, object.lastMessageTimestamp.high >>> 0).toNumber(); + if (object.lastSystemMessageTimestamp != null) + if ($util.Long) + (message.lastSystemMessageTimestamp = $util.Long.fromValue(object.lastSystemMessageTimestamp)).unsigned = false; + else if (typeof object.lastSystemMessageTimestamp === "string") + message.lastSystemMessageTimestamp = parseInt(object.lastSystemMessageTimestamp, 10); + else if (typeof object.lastSystemMessageTimestamp === "number") + message.lastSystemMessageTimestamp = object.lastSystemMessageTimestamp; + else if (typeof object.lastSystemMessageTimestamp === "object") + message.lastSystemMessageTimestamp = new $util.LongBits(object.lastSystemMessageTimestamp.low >>> 0, object.lastSystemMessageTimestamp.high >>> 0).toNumber(); if (object.messages) { if (!Array.isArray(object.messages)) - throw TypeError(".proto.Conversation.messages: array expected"); + throw TypeError(".proto.SyncActionMessageRange.messages: array expected"); message.messages = []; for (var i = 0; i < object.messages.length; ++i) { if (typeof object.messages[i] !== "object") - throw TypeError(".proto.Conversation.messages: object expected"); - message.messages[i] = $root.proto.HistorySyncMsg.fromObject(object.messages[i]); + throw TypeError(".proto.SyncActionMessageRange.messages: object expected"); + message.messages[i] = $root.proto.SyncActionMessage.fromObject(object.messages[i]); } } - if (object.newJid != null) - message.newJid = String(object.newJid); - if (object.oldJid != null) - message.oldJid = String(object.oldJid); - if (object.lastMsgTimestamp != null) - if ($util.Long) - (message.lastMsgTimestamp = $util.Long.fromValue(object.lastMsgTimestamp)).unsigned = true; - else if (typeof object.lastMsgTimestamp === "string") - message.lastMsgTimestamp = parseInt(object.lastMsgTimestamp, 10); - else if (typeof object.lastMsgTimestamp === "number") - message.lastMsgTimestamp = object.lastMsgTimestamp; - else if (typeof object.lastMsgTimestamp === "object") - message.lastMsgTimestamp = new $util.LongBits(object.lastMsgTimestamp.low >>> 0, object.lastMsgTimestamp.high >>> 0).toNumber(true); - if (object.unreadCount != null) - message.unreadCount = object.unreadCount >>> 0; - if (object.readOnly != null) - message.readOnly = Boolean(object.readOnly); - if (object.endOfHistoryTransfer != null) - message.endOfHistoryTransfer = Boolean(object.endOfHistoryTransfer); - if (object.ephemeralExpiration != null) - message.ephemeralExpiration = object.ephemeralExpiration >>> 0; - if (object.ephemeralSettingTimestamp != null) - if ($util.Long) - (message.ephemeralSettingTimestamp = $util.Long.fromValue(object.ephemeralSettingTimestamp)).unsigned = false; - else if (typeof object.ephemeralSettingTimestamp === "string") - message.ephemeralSettingTimestamp = parseInt(object.ephemeralSettingTimestamp, 10); - else if (typeof object.ephemeralSettingTimestamp === "number") - message.ephemeralSettingTimestamp = object.ephemeralSettingTimestamp; - else if (typeof object.ephemeralSettingTimestamp === "object") - message.ephemeralSettingTimestamp = new $util.LongBits(object.ephemeralSettingTimestamp.low >>> 0, object.ephemeralSettingTimestamp.high >>> 0).toNumber(); - switch (object.endOfHistoryTransferType) { - case "COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY": - case 0: - message.endOfHistoryTransferType = 0; - break; - case "COMPLETE_AND_NO_MORE_MESSAGE_REMAIN_ON_PRIMARY": - case 1: - message.endOfHistoryTransferType = 1; - break; - } - if (object.conversationTimestamp != null) - if ($util.Long) - (message.conversationTimestamp = $util.Long.fromValue(object.conversationTimestamp)).unsigned = true; - else if (typeof object.conversationTimestamp === "string") - message.conversationTimestamp = parseInt(object.conversationTimestamp, 10); - else if (typeof object.conversationTimestamp === "number") - message.conversationTimestamp = object.conversationTimestamp; - else if (typeof object.conversationTimestamp === "object") - message.conversationTimestamp = new $util.LongBits(object.conversationTimestamp.low >>> 0, object.conversationTimestamp.high >>> 0).toNumber(true); - if (object.name != null) - message.name = String(object.name); - if (object.pHash != null) - message.pHash = String(object.pHash); - if (object.notSpam != null) - message.notSpam = Boolean(object.notSpam); - if (object.archived != null) - message.archived = Boolean(object.archived); - if (object.disappearingMode != null) { - if (typeof object.disappearingMode !== "object") - throw TypeError(".proto.Conversation.disappearingMode: object expected"); - message.disappearingMode = $root.proto.DisappearingMode.fromObject(object.disappearingMode); - } - if (object.unreadMentionCount != null) - message.unreadMentionCount = object.unreadMentionCount >>> 0; - if (object.markedAsUnread != null) - message.markedAsUnread = Boolean(object.markedAsUnread); - if (object.participant) { - if (!Array.isArray(object.participant)) - throw TypeError(".proto.Conversation.participant: array expected"); - message.participant = []; - for (var i = 0; i < object.participant.length; ++i) { - if (typeof object.participant[i] !== "object") - throw TypeError(".proto.Conversation.participant: object expected"); - message.participant[i] = $root.proto.GroupParticipant.fromObject(object.participant[i]); - } - } - if (object.tcToken != null) - if (typeof object.tcToken === "string") - $util.base64.decode(object.tcToken, message.tcToken = $util.newBuffer($util.base64.length(object.tcToken)), 0); - else if (object.tcToken.length) - message.tcToken = object.tcToken; - if (object.tcTokenTimestamp != null) - if ($util.Long) - (message.tcTokenTimestamp = $util.Long.fromValue(object.tcTokenTimestamp)).unsigned = true; - else if (typeof object.tcTokenTimestamp === "string") - message.tcTokenTimestamp = parseInt(object.tcTokenTimestamp, 10); - else if (typeof object.tcTokenTimestamp === "number") - message.tcTokenTimestamp = object.tcTokenTimestamp; - else if (typeof object.tcTokenTimestamp === "object") - message.tcTokenTimestamp = new $util.LongBits(object.tcTokenTimestamp.low >>> 0, object.tcTokenTimestamp.high >>> 0).toNumber(true); - if (object.contactPrimaryIdentityKey != null) - if (typeof object.contactPrimaryIdentityKey === "string") - $util.base64.decode(object.contactPrimaryIdentityKey, message.contactPrimaryIdentityKey = $util.newBuffer($util.base64.length(object.contactPrimaryIdentityKey)), 0); - else if (object.contactPrimaryIdentityKey.length) - message.contactPrimaryIdentityKey = object.contactPrimaryIdentityKey; - if (object.pinned != null) - message.pinned = object.pinned >>> 0; - if (object.muteEndTime != null) - if ($util.Long) - (message.muteEndTime = $util.Long.fromValue(object.muteEndTime)).unsigned = true; - else if (typeof object.muteEndTime === "string") - message.muteEndTime = parseInt(object.muteEndTime, 10); - else if (typeof object.muteEndTime === "number") - message.muteEndTime = object.muteEndTime; - else if (typeof object.muteEndTime === "object") - message.muteEndTime = new $util.LongBits(object.muteEndTime.low >>> 0, object.muteEndTime.high >>> 0).toNumber(true); - if (object.wallpaper != null) { - if (typeof object.wallpaper !== "object") - throw TypeError(".proto.Conversation.wallpaper: object expected"); - message.wallpaper = $root.proto.WallpaperSettings.fromObject(object.wallpaper); - } - switch (object.mediaVisibility) { - case "DEFAULT": - case 0: - message.mediaVisibility = 0; - break; - case "OFF": - case 1: - message.mediaVisibility = 1; - break; - case "ON": - case 2: - message.mediaVisibility = 2; - break; - } - if (object.tcTokenSenderTimestamp != null) - if ($util.Long) - (message.tcTokenSenderTimestamp = $util.Long.fromValue(object.tcTokenSenderTimestamp)).unsigned = true; - else if (typeof object.tcTokenSenderTimestamp === "string") - message.tcTokenSenderTimestamp = parseInt(object.tcTokenSenderTimestamp, 10); - else if (typeof object.tcTokenSenderTimestamp === "number") - message.tcTokenSenderTimestamp = object.tcTokenSenderTimestamp; - else if (typeof object.tcTokenSenderTimestamp === "object") - message.tcTokenSenderTimestamp = new $util.LongBits(object.tcTokenSenderTimestamp.low >>> 0, object.tcTokenSenderTimestamp.high >>> 0).toNumber(true); - if (object.suspended != null) - message.suspended = Boolean(object.suspended); return message; }; /** - * Creates a plain object from a Conversation message. Also converts values to other types if specified. + * Creates a plain object from a SyncActionMessageRange message. Also converts values to other types if specified. * @function toObject - * @memberof proto.Conversation + * @memberof proto.SyncActionMessageRange * @static - * @param {proto.Conversation} message Conversation + * @param {proto.SyncActionMessageRange} message SyncActionMessageRange * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Conversation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.messages = []; - object.participant = []; - } - if (options.defaults) { - object.id = ""; - object.newJid = ""; - object.oldJid = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.lastMsgTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.lastMsgTimestamp = options.longs === String ? "0" : 0; - object.unreadCount = 0; - object.readOnly = false; - object.endOfHistoryTransfer = false; - object.ephemeralExpiration = 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.ephemeralSettingTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.ephemeralSettingTimestamp = options.longs === String ? "0" : 0; - object.endOfHistoryTransferType = options.enums === String ? "COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.conversationTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.conversationTimestamp = options.longs === String ? "0" : 0; - object.name = ""; - object.pHash = ""; - object.notSpam = false; - object.archived = false; - object.disappearingMode = null; - object.unreadMentionCount = 0; - object.markedAsUnread = false; - if (options.bytes === String) - object.tcToken = ""; - else { - object.tcToken = []; - if (options.bytes !== Array) - object.tcToken = $util.newBuffer(object.tcToken); - } - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.tcTokenTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.tcTokenTimestamp = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.contactPrimaryIdentityKey = ""; - else { - object.contactPrimaryIdentityKey = []; - if (options.bytes !== Array) - object.contactPrimaryIdentityKey = $util.newBuffer(object.contactPrimaryIdentityKey); - } - object.pinned = 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.muteEndTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.muteEndTime = options.longs === String ? "0" : 0; - object.wallpaper = null; - object.mediaVisibility = options.enums === String ? "DEFAULT" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.tcTokenSenderTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.tcTokenSenderTimestamp = options.longs === String ? "0" : 0; - object.suspended = false; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.messages && message.messages.length) { - object.messages = []; - for (var j = 0; j < message.messages.length; ++j) - object.messages[j] = $root.proto.HistorySyncMsg.toObject(message.messages[j], options); - } - if (message.newJid != null && message.hasOwnProperty("newJid")) - object.newJid = message.newJid; - if (message.oldJid != null && message.hasOwnProperty("oldJid")) - object.oldJid = message.oldJid; - if (message.lastMsgTimestamp != null && message.hasOwnProperty("lastMsgTimestamp")) - if (typeof message.lastMsgTimestamp === "number") - object.lastMsgTimestamp = options.longs === String ? String(message.lastMsgTimestamp) : message.lastMsgTimestamp; - else - object.lastMsgTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.lastMsgTimestamp) : options.longs === Number ? new $util.LongBits(message.lastMsgTimestamp.low >>> 0, message.lastMsgTimestamp.high >>> 0).toNumber(true) : message.lastMsgTimestamp; - if (message.unreadCount != null && message.hasOwnProperty("unreadCount")) - object.unreadCount = message.unreadCount; - if (message.readOnly != null && message.hasOwnProperty("readOnly")) - object.readOnly = message.readOnly; - if (message.endOfHistoryTransfer != null && message.hasOwnProperty("endOfHistoryTransfer")) - object.endOfHistoryTransfer = message.endOfHistoryTransfer; - if (message.ephemeralExpiration != null && message.hasOwnProperty("ephemeralExpiration")) - object.ephemeralExpiration = message.ephemeralExpiration; - if (message.ephemeralSettingTimestamp != null && message.hasOwnProperty("ephemeralSettingTimestamp")) - if (typeof message.ephemeralSettingTimestamp === "number") - object.ephemeralSettingTimestamp = options.longs === String ? String(message.ephemeralSettingTimestamp) : message.ephemeralSettingTimestamp; - else - object.ephemeralSettingTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.ephemeralSettingTimestamp) : options.longs === Number ? new $util.LongBits(message.ephemeralSettingTimestamp.low >>> 0, message.ephemeralSettingTimestamp.high >>> 0).toNumber() : message.ephemeralSettingTimestamp; - if (message.endOfHistoryTransferType != null && message.hasOwnProperty("endOfHistoryTransferType")) - object.endOfHistoryTransferType = options.enums === String ? $root.proto.Conversation.ConversationEndOfHistoryTransferType[message.endOfHistoryTransferType] : message.endOfHistoryTransferType; - if (message.conversationTimestamp != null && message.hasOwnProperty("conversationTimestamp")) - if (typeof message.conversationTimestamp === "number") - object.conversationTimestamp = options.longs === String ? String(message.conversationTimestamp) : message.conversationTimestamp; - else - object.conversationTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.conversationTimestamp) : options.longs === Number ? new $util.LongBits(message.conversationTimestamp.low >>> 0, message.conversationTimestamp.high >>> 0).toNumber(true) : message.conversationTimestamp; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.pHash != null && message.hasOwnProperty("pHash")) - object.pHash = message.pHash; - if (message.notSpam != null && message.hasOwnProperty("notSpam")) - object.notSpam = message.notSpam; - if (message.archived != null && message.hasOwnProperty("archived")) - object.archived = message.archived; - if (message.disappearingMode != null && message.hasOwnProperty("disappearingMode")) - object.disappearingMode = $root.proto.DisappearingMode.toObject(message.disappearingMode, options); - if (message.unreadMentionCount != null && message.hasOwnProperty("unreadMentionCount")) - object.unreadMentionCount = message.unreadMentionCount; - if (message.markedAsUnread != null && message.hasOwnProperty("markedAsUnread")) - object.markedAsUnread = message.markedAsUnread; - if (message.participant && message.participant.length) { - object.participant = []; - for (var j = 0; j < message.participant.length; ++j) - object.participant[j] = $root.proto.GroupParticipant.toObject(message.participant[j], options); - } - if (message.tcToken != null && message.hasOwnProperty("tcToken")) - object.tcToken = options.bytes === String ? $util.base64.encode(message.tcToken, 0, message.tcToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.tcToken) : message.tcToken; - if (message.tcTokenTimestamp != null && message.hasOwnProperty("tcTokenTimestamp")) - if (typeof message.tcTokenTimestamp === "number") - object.tcTokenTimestamp = options.longs === String ? String(message.tcTokenTimestamp) : message.tcTokenTimestamp; - else - object.tcTokenTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.tcTokenTimestamp) : options.longs === Number ? new $util.LongBits(message.tcTokenTimestamp.low >>> 0, message.tcTokenTimestamp.high >>> 0).toNumber(true) : message.tcTokenTimestamp; - if (message.contactPrimaryIdentityKey != null && message.hasOwnProperty("contactPrimaryIdentityKey")) - object.contactPrimaryIdentityKey = options.bytes === String ? $util.base64.encode(message.contactPrimaryIdentityKey, 0, message.contactPrimaryIdentityKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.contactPrimaryIdentityKey) : message.contactPrimaryIdentityKey; - if (message.pinned != null && message.hasOwnProperty("pinned")) - object.pinned = message.pinned; - if (message.muteEndTime != null && message.hasOwnProperty("muteEndTime")) - if (typeof message.muteEndTime === "number") - object.muteEndTime = options.longs === String ? String(message.muteEndTime) : message.muteEndTime; - else - object.muteEndTime = options.longs === String ? $util.Long.prototype.toString.call(message.muteEndTime) : options.longs === Number ? new $util.LongBits(message.muteEndTime.low >>> 0, message.muteEndTime.high >>> 0).toNumber(true) : message.muteEndTime; - if (message.wallpaper != null && message.hasOwnProperty("wallpaper")) - object.wallpaper = $root.proto.WallpaperSettings.toObject(message.wallpaper, options); - if (message.mediaVisibility != null && message.hasOwnProperty("mediaVisibility")) - object.mediaVisibility = options.enums === String ? $root.proto.MediaVisibility[message.mediaVisibility] : message.mediaVisibility; - if (message.tcTokenSenderTimestamp != null && message.hasOwnProperty("tcTokenSenderTimestamp")) - if (typeof message.tcTokenSenderTimestamp === "number") - object.tcTokenSenderTimestamp = options.longs === String ? String(message.tcTokenSenderTimestamp) : message.tcTokenSenderTimestamp; - else - object.tcTokenSenderTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.tcTokenSenderTimestamp) : options.longs === Number ? new $util.LongBits(message.tcTokenSenderTimestamp.low >>> 0, message.tcTokenSenderTimestamp.high >>> 0).toNumber(true) : message.tcTokenSenderTimestamp; - if (message.suspended != null && message.hasOwnProperty("suspended")) - object.suspended = message.suspended; - return object; - }; - - /** - * Converts this Conversation to JSON. - * @function toJSON - * @memberof proto.Conversation - * @instance - * @returns {Object.} JSON object - */ - Conversation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * ConversationEndOfHistoryTransferType enum. - * @name proto.Conversation.ConversationEndOfHistoryTransferType - * @enum {number} - * @property {number} COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY=0 COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY value - * @property {number} COMPLETE_AND_NO_MORE_MESSAGE_REMAIN_ON_PRIMARY=1 COMPLETE_AND_NO_MORE_MESSAGE_REMAIN_ON_PRIMARY value - */ - Conversation.ConversationEndOfHistoryTransferType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY"] = 0; - values[valuesById[1] = "COMPLETE_AND_NO_MORE_MESSAGE_REMAIN_ON_PRIMARY"] = 1; - return values; - })(); - - return Conversation; - })(); - - proto.GlobalSettings = (function() { - - /** - * Properties of a GlobalSettings. - * @memberof proto - * @interface IGlobalSettings - * @property {proto.IWallpaperSettings|null} [lightThemeWallpaper] GlobalSettings lightThemeWallpaper - * @property {proto.MediaVisibility|null} [mediaVisibility] GlobalSettings mediaVisibility - * @property {proto.IWallpaperSettings|null} [darkThemeWallpaper] GlobalSettings darkThemeWallpaper - * @property {proto.IAutoDownloadSettings|null} [autoDownloadWiFi] GlobalSettings autoDownloadWiFi - * @property {proto.IAutoDownloadSettings|null} [autoDownloadCellular] GlobalSettings autoDownloadCellular - * @property {proto.IAutoDownloadSettings|null} [autoDownloadRoaming] GlobalSettings autoDownloadRoaming - * @property {boolean|null} [showIndividualNotificationsPreview] GlobalSettings showIndividualNotificationsPreview - * @property {boolean|null} [showGroupNotificationsPreview] GlobalSettings showGroupNotificationsPreview - */ - - /** - * Constructs a new GlobalSettings. - * @memberof proto - * @classdesc Represents a GlobalSettings. - * @implements IGlobalSettings - * @constructor - * @param {proto.IGlobalSettings=} [properties] Properties to set - */ - function GlobalSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GlobalSettings lightThemeWallpaper. - * @member {proto.IWallpaperSettings|null|undefined} lightThemeWallpaper - * @memberof proto.GlobalSettings - * @instance - */ - GlobalSettings.prototype.lightThemeWallpaper = null; - - /** - * GlobalSettings mediaVisibility. - * @member {proto.MediaVisibility} mediaVisibility - * @memberof proto.GlobalSettings - * @instance - */ - GlobalSettings.prototype.mediaVisibility = 0; - - /** - * GlobalSettings darkThemeWallpaper. - * @member {proto.IWallpaperSettings|null|undefined} darkThemeWallpaper - * @memberof proto.GlobalSettings - * @instance - */ - GlobalSettings.prototype.darkThemeWallpaper = null; - - /** - * GlobalSettings autoDownloadWiFi. - * @member {proto.IAutoDownloadSettings|null|undefined} autoDownloadWiFi - * @memberof proto.GlobalSettings - * @instance - */ - GlobalSettings.prototype.autoDownloadWiFi = null; - - /** - * GlobalSettings autoDownloadCellular. - * @member {proto.IAutoDownloadSettings|null|undefined} autoDownloadCellular - * @memberof proto.GlobalSettings - * @instance - */ - GlobalSettings.prototype.autoDownloadCellular = null; - - /** - * GlobalSettings autoDownloadRoaming. - * @member {proto.IAutoDownloadSettings|null|undefined} autoDownloadRoaming - * @memberof proto.GlobalSettings - * @instance - */ - GlobalSettings.prototype.autoDownloadRoaming = null; - - /** - * GlobalSettings showIndividualNotificationsPreview. - * @member {boolean} showIndividualNotificationsPreview - * @memberof proto.GlobalSettings - * @instance - */ - GlobalSettings.prototype.showIndividualNotificationsPreview = false; - - /** - * GlobalSettings showGroupNotificationsPreview. - * @member {boolean} showGroupNotificationsPreview - * @memberof proto.GlobalSettings - * @instance - */ - GlobalSettings.prototype.showGroupNotificationsPreview = false; - - /** - * Creates a new GlobalSettings instance using the specified properties. - * @function create - * @memberof proto.GlobalSettings - * @static - * @param {proto.IGlobalSettings=} [properties] Properties to set - * @returns {proto.GlobalSettings} GlobalSettings instance - */ - GlobalSettings.create = function create(properties) { - return new GlobalSettings(properties); - }; - - /** - * Encodes the specified GlobalSettings message. Does not implicitly {@link proto.GlobalSettings.verify|verify} messages. - * @function encode - * @memberof proto.GlobalSettings - * @static - * @param {proto.IGlobalSettings} message GlobalSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GlobalSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.lightThemeWallpaper != null && Object.hasOwnProperty.call(message, "lightThemeWallpaper")) - $root.proto.WallpaperSettings.encode(message.lightThemeWallpaper, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.mediaVisibility != null && Object.hasOwnProperty.call(message, "mediaVisibility")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.mediaVisibility); - if (message.darkThemeWallpaper != null && Object.hasOwnProperty.call(message, "darkThemeWallpaper")) - $root.proto.WallpaperSettings.encode(message.darkThemeWallpaper, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.autoDownloadWiFi != null && Object.hasOwnProperty.call(message, "autoDownloadWiFi")) - $root.proto.AutoDownloadSettings.encode(message.autoDownloadWiFi, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.autoDownloadCellular != null && Object.hasOwnProperty.call(message, "autoDownloadCellular")) - $root.proto.AutoDownloadSettings.encode(message.autoDownloadCellular, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.autoDownloadRoaming != null && Object.hasOwnProperty.call(message, "autoDownloadRoaming")) - $root.proto.AutoDownloadSettings.encode(message.autoDownloadRoaming, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.showIndividualNotificationsPreview != null && Object.hasOwnProperty.call(message, "showIndividualNotificationsPreview")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.showIndividualNotificationsPreview); - if (message.showGroupNotificationsPreview != null && Object.hasOwnProperty.call(message, "showGroupNotificationsPreview")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.showGroupNotificationsPreview); - return writer; - }; - - /** - * Encodes the specified GlobalSettings message, length delimited. Does not implicitly {@link proto.GlobalSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.GlobalSettings - * @static - * @param {proto.IGlobalSettings} message GlobalSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GlobalSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GlobalSettings message from the specified reader or buffer. - * @function decode - * @memberof proto.GlobalSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.GlobalSettings} GlobalSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GlobalSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.GlobalSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.lightThemeWallpaper = $root.proto.WallpaperSettings.decode(reader, reader.uint32()); - break; - case 2: - message.mediaVisibility = reader.int32(); - break; - case 3: - message.darkThemeWallpaper = $root.proto.WallpaperSettings.decode(reader, reader.uint32()); - break; - case 4: - message.autoDownloadWiFi = $root.proto.AutoDownloadSettings.decode(reader, reader.uint32()); - break; - case 5: - message.autoDownloadCellular = $root.proto.AutoDownloadSettings.decode(reader, reader.uint32()); - break; - case 6: - message.autoDownloadRoaming = $root.proto.AutoDownloadSettings.decode(reader, reader.uint32()); - break; - case 7: - message.showIndividualNotificationsPreview = reader.bool(); - break; - case 8: - message.showGroupNotificationsPreview = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GlobalSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.GlobalSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.GlobalSettings} GlobalSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GlobalSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GlobalSettings message. - * @function verify - * @memberof proto.GlobalSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GlobalSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.lightThemeWallpaper != null && message.hasOwnProperty("lightThemeWallpaper")) { - var error = $root.proto.WallpaperSettings.verify(message.lightThemeWallpaper); - if (error) - return "lightThemeWallpaper." + error; - } - if (message.mediaVisibility != null && message.hasOwnProperty("mediaVisibility")) - switch (message.mediaVisibility) { - default: - return "mediaVisibility: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.darkThemeWallpaper != null && message.hasOwnProperty("darkThemeWallpaper")) { - var error = $root.proto.WallpaperSettings.verify(message.darkThemeWallpaper); - if (error) - return "darkThemeWallpaper." + error; - } - if (message.autoDownloadWiFi != null && message.hasOwnProperty("autoDownloadWiFi")) { - var error = $root.proto.AutoDownloadSettings.verify(message.autoDownloadWiFi); - if (error) - return "autoDownloadWiFi." + error; - } - if (message.autoDownloadCellular != null && message.hasOwnProperty("autoDownloadCellular")) { - var error = $root.proto.AutoDownloadSettings.verify(message.autoDownloadCellular); - if (error) - return "autoDownloadCellular." + error; - } - if (message.autoDownloadRoaming != null && message.hasOwnProperty("autoDownloadRoaming")) { - var error = $root.proto.AutoDownloadSettings.verify(message.autoDownloadRoaming); - if (error) - return "autoDownloadRoaming." + error; - } - if (message.showIndividualNotificationsPreview != null && message.hasOwnProperty("showIndividualNotificationsPreview")) - if (typeof message.showIndividualNotificationsPreview !== "boolean") - return "showIndividualNotificationsPreview: boolean expected"; - if (message.showGroupNotificationsPreview != null && message.hasOwnProperty("showGroupNotificationsPreview")) - if (typeof message.showGroupNotificationsPreview !== "boolean") - return "showGroupNotificationsPreview: boolean expected"; - return null; - }; - - /** - * Creates a GlobalSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.GlobalSettings - * @static - * @param {Object.} object Plain object - * @returns {proto.GlobalSettings} GlobalSettings - */ - GlobalSettings.fromObject = function fromObject(object) { - if (object instanceof $root.proto.GlobalSettings) - return object; - var message = new $root.proto.GlobalSettings(); - if (object.lightThemeWallpaper != null) { - if (typeof object.lightThemeWallpaper !== "object") - throw TypeError(".proto.GlobalSettings.lightThemeWallpaper: object expected"); - message.lightThemeWallpaper = $root.proto.WallpaperSettings.fromObject(object.lightThemeWallpaper); - } - switch (object.mediaVisibility) { - case "DEFAULT": - case 0: - message.mediaVisibility = 0; - break; - case "OFF": - case 1: - message.mediaVisibility = 1; - break; - case "ON": - case 2: - message.mediaVisibility = 2; - break; - } - if (object.darkThemeWallpaper != null) { - if (typeof object.darkThemeWallpaper !== "object") - throw TypeError(".proto.GlobalSettings.darkThemeWallpaper: object expected"); - message.darkThemeWallpaper = $root.proto.WallpaperSettings.fromObject(object.darkThemeWallpaper); - } - if (object.autoDownloadWiFi != null) { - if (typeof object.autoDownloadWiFi !== "object") - throw TypeError(".proto.GlobalSettings.autoDownloadWiFi: object expected"); - message.autoDownloadWiFi = $root.proto.AutoDownloadSettings.fromObject(object.autoDownloadWiFi); - } - if (object.autoDownloadCellular != null) { - if (typeof object.autoDownloadCellular !== "object") - throw TypeError(".proto.GlobalSettings.autoDownloadCellular: object expected"); - message.autoDownloadCellular = $root.proto.AutoDownloadSettings.fromObject(object.autoDownloadCellular); - } - if (object.autoDownloadRoaming != null) { - if (typeof object.autoDownloadRoaming !== "object") - throw TypeError(".proto.GlobalSettings.autoDownloadRoaming: object expected"); - message.autoDownloadRoaming = $root.proto.AutoDownloadSettings.fromObject(object.autoDownloadRoaming); - } - if (object.showIndividualNotificationsPreview != null) - message.showIndividualNotificationsPreview = Boolean(object.showIndividualNotificationsPreview); - if (object.showGroupNotificationsPreview != null) - message.showGroupNotificationsPreview = Boolean(object.showGroupNotificationsPreview); - return message; - }; - - /** - * Creates a plain object from a GlobalSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.GlobalSettings - * @static - * @param {proto.GlobalSettings} message GlobalSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GlobalSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.lightThemeWallpaper = null; - object.mediaVisibility = options.enums === String ? "DEFAULT" : 0; - object.darkThemeWallpaper = null; - object.autoDownloadWiFi = null; - object.autoDownloadCellular = null; - object.autoDownloadRoaming = null; - object.showIndividualNotificationsPreview = false; - object.showGroupNotificationsPreview = false; - } - if (message.lightThemeWallpaper != null && message.hasOwnProperty("lightThemeWallpaper")) - object.lightThemeWallpaper = $root.proto.WallpaperSettings.toObject(message.lightThemeWallpaper, options); - if (message.mediaVisibility != null && message.hasOwnProperty("mediaVisibility")) - object.mediaVisibility = options.enums === String ? $root.proto.MediaVisibility[message.mediaVisibility] : message.mediaVisibility; - if (message.darkThemeWallpaper != null && message.hasOwnProperty("darkThemeWallpaper")) - object.darkThemeWallpaper = $root.proto.WallpaperSettings.toObject(message.darkThemeWallpaper, options); - if (message.autoDownloadWiFi != null && message.hasOwnProperty("autoDownloadWiFi")) - object.autoDownloadWiFi = $root.proto.AutoDownloadSettings.toObject(message.autoDownloadWiFi, options); - if (message.autoDownloadCellular != null && message.hasOwnProperty("autoDownloadCellular")) - object.autoDownloadCellular = $root.proto.AutoDownloadSettings.toObject(message.autoDownloadCellular, options); - if (message.autoDownloadRoaming != null && message.hasOwnProperty("autoDownloadRoaming")) - object.autoDownloadRoaming = $root.proto.AutoDownloadSettings.toObject(message.autoDownloadRoaming, options); - if (message.showIndividualNotificationsPreview != null && message.hasOwnProperty("showIndividualNotificationsPreview")) - object.showIndividualNotificationsPreview = message.showIndividualNotificationsPreview; - if (message.showGroupNotificationsPreview != null && message.hasOwnProperty("showGroupNotificationsPreview")) - object.showGroupNotificationsPreview = message.showGroupNotificationsPreview; - return object; - }; - - /** - * Converts this GlobalSettings to JSON. - * @function toJSON - * @memberof proto.GlobalSettings - * @instance - * @returns {Object.} JSON object - */ - GlobalSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GlobalSettings; - })(); - - proto.GroupParticipant = (function() { - - /** - * Properties of a GroupParticipant. - * @memberof proto - * @interface IGroupParticipant - * @property {string} userJid GroupParticipant userJid - * @property {proto.GroupParticipant.GroupParticipantRank|null} [rank] GroupParticipant rank - */ - - /** - * Constructs a new GroupParticipant. - * @memberof proto - * @classdesc Represents a GroupParticipant. - * @implements IGroupParticipant - * @constructor - * @param {proto.IGroupParticipant=} [properties] Properties to set - */ - function GroupParticipant(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GroupParticipant userJid. - * @member {string} userJid - * @memberof proto.GroupParticipant - * @instance - */ - GroupParticipant.prototype.userJid = ""; - - /** - * GroupParticipant rank. - * @member {proto.GroupParticipant.GroupParticipantRank} rank - * @memberof proto.GroupParticipant - * @instance - */ - GroupParticipant.prototype.rank = 0; - - /** - * Creates a new GroupParticipant instance using the specified properties. - * @function create - * @memberof proto.GroupParticipant - * @static - * @param {proto.IGroupParticipant=} [properties] Properties to set - * @returns {proto.GroupParticipant} GroupParticipant instance - */ - GroupParticipant.create = function create(properties) { - return new GroupParticipant(properties); - }; - - /** - * Encodes the specified GroupParticipant message. Does not implicitly {@link proto.GroupParticipant.verify|verify} messages. - * @function encode - * @memberof proto.GroupParticipant - * @static - * @param {proto.IGroupParticipant} message GroupParticipant message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GroupParticipant.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - writer.uint32(/* id 1, wireType 2 =*/10).string(message.userJid); - if (message.rank != null && Object.hasOwnProperty.call(message, "rank")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.rank); - return writer; - }; - - /** - * Encodes the specified GroupParticipant message, length delimited. Does not implicitly {@link proto.GroupParticipant.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.GroupParticipant - * @static - * @param {proto.IGroupParticipant} message GroupParticipant message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GroupParticipant.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GroupParticipant message from the specified reader or buffer. - * @function decode - * @memberof proto.GroupParticipant - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.GroupParticipant} GroupParticipant - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GroupParticipant.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.GroupParticipant(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.userJid = reader.string(); - break; - case 2: - message.rank = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - if (!message.hasOwnProperty("userJid")) - throw $util.ProtocolError("missing required 'userJid'", { instance: message }); - return message; - }; - - /** - * Decodes a GroupParticipant message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.GroupParticipant - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.GroupParticipant} GroupParticipant - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GroupParticipant.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GroupParticipant message. - * @function verify - * @memberof proto.GroupParticipant - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GroupParticipant.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (!$util.isString(message.userJid)) - return "userJid: string expected"; - if (message.rank != null && message.hasOwnProperty("rank")) - switch (message.rank) { - default: - return "rank: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a GroupParticipant message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.GroupParticipant - * @static - * @param {Object.} object Plain object - * @returns {proto.GroupParticipant} GroupParticipant - */ - GroupParticipant.fromObject = function fromObject(object) { - if (object instanceof $root.proto.GroupParticipant) - return object; - var message = new $root.proto.GroupParticipant(); - if (object.userJid != null) - message.userJid = String(object.userJid); - switch (object.rank) { - case "REGULAR": - case 0: - message.rank = 0; - break; - case "ADMIN": - case 1: - message.rank = 1; - break; - case "SUPERADMIN": - case 2: - message.rank = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a GroupParticipant message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.GroupParticipant - * @static - * @param {proto.GroupParticipant} message GroupParticipant - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GroupParticipant.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.userJid = ""; - object.rank = options.enums === String ? "REGULAR" : 0; - } - if (message.userJid != null && message.hasOwnProperty("userJid")) - object.userJid = message.userJid; - if (message.rank != null && message.hasOwnProperty("rank")) - object.rank = options.enums === String ? $root.proto.GroupParticipant.GroupParticipantRank[message.rank] : message.rank; - return object; - }; - - /** - * Converts this GroupParticipant to JSON. - * @function toJSON - * @memberof proto.GroupParticipant - * @instance - * @returns {Object.} JSON object - */ - GroupParticipant.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * GroupParticipantRank enum. - * @name proto.GroupParticipant.GroupParticipantRank - * @enum {number} - * @property {number} REGULAR=0 REGULAR value - * @property {number} ADMIN=1 ADMIN value - * @property {number} SUPERADMIN=2 SUPERADMIN value - */ - GroupParticipant.GroupParticipantRank = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REGULAR"] = 0; - values[valuesById[1] = "ADMIN"] = 1; - values[valuesById[2] = "SUPERADMIN"] = 2; - return values; - })(); - - return GroupParticipant; - })(); - - proto.HistorySync = (function() { - - /** - * Properties of a HistorySync. - * @memberof proto - * @interface IHistorySync - * @property {proto.HistorySync.HistorySyncHistorySyncType} syncType HistorySync syncType - * @property {Array.|null} [conversations] HistorySync conversations - * @property {Array.|null} [statusV3Messages] HistorySync statusV3Messages - * @property {number|null} [chunkOrder] HistorySync chunkOrder - * @property {number|null} [progress] HistorySync progress - * @property {Array.|null} [pushnames] HistorySync pushnames - * @property {proto.IGlobalSettings|null} [globalSettings] HistorySync globalSettings - * @property {Uint8Array|null} [threadIdUserSecret] HistorySync threadIdUserSecret - * @property {number|null} [threadDsTimeframeOffset] HistorySync threadDsTimeframeOffset - */ - - /** - * Constructs a new HistorySync. - * @memberof proto - * @classdesc Represents a HistorySync. - * @implements IHistorySync - * @constructor - * @param {proto.IHistorySync=} [properties] Properties to set - */ - function HistorySync(properties) { - this.conversations = []; - this.statusV3Messages = []; - this.pushnames = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HistorySync syncType. - * @member {proto.HistorySync.HistorySyncHistorySyncType} syncType - * @memberof proto.HistorySync - * @instance - */ - HistorySync.prototype.syncType = 0; - - /** - * HistorySync conversations. - * @member {Array.} conversations - * @memberof proto.HistorySync - * @instance - */ - HistorySync.prototype.conversations = $util.emptyArray; - - /** - * HistorySync statusV3Messages. - * @member {Array.} statusV3Messages - * @memberof proto.HistorySync - * @instance - */ - HistorySync.prototype.statusV3Messages = $util.emptyArray; - - /** - * HistorySync chunkOrder. - * @member {number} chunkOrder - * @memberof proto.HistorySync - * @instance - */ - HistorySync.prototype.chunkOrder = 0; - - /** - * HistorySync progress. - * @member {number} progress - * @memberof proto.HistorySync - * @instance - */ - HistorySync.prototype.progress = 0; - - /** - * HistorySync pushnames. - * @member {Array.} pushnames - * @memberof proto.HistorySync - * @instance - */ - HistorySync.prototype.pushnames = $util.emptyArray; - - /** - * HistorySync globalSettings. - * @member {proto.IGlobalSettings|null|undefined} globalSettings - * @memberof proto.HistorySync - * @instance - */ - HistorySync.prototype.globalSettings = null; - - /** - * HistorySync threadIdUserSecret. - * @member {Uint8Array} threadIdUserSecret - * @memberof proto.HistorySync - * @instance - */ - HistorySync.prototype.threadIdUserSecret = $util.newBuffer([]); - - /** - * HistorySync threadDsTimeframeOffset. - * @member {number} threadDsTimeframeOffset - * @memberof proto.HistorySync - * @instance - */ - HistorySync.prototype.threadDsTimeframeOffset = 0; - - /** - * Creates a new HistorySync instance using the specified properties. - * @function create - * @memberof proto.HistorySync - * @static - * @param {proto.IHistorySync=} [properties] Properties to set - * @returns {proto.HistorySync} HistorySync instance - */ - HistorySync.create = function create(properties) { - return new HistorySync(properties); - }; - - /** - * Encodes the specified HistorySync message. Does not implicitly {@link proto.HistorySync.verify|verify} messages. - * @function encode - * @memberof proto.HistorySync - * @static - * @param {proto.IHistorySync} message HistorySync message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HistorySync.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.syncType); - if (message.conversations != null && message.conversations.length) - for (var i = 0; i < message.conversations.length; ++i) - $root.proto.Conversation.encode(message.conversations[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.statusV3Messages != null && message.statusV3Messages.length) - for (var i = 0; i < message.statusV3Messages.length; ++i) - $root.proto.WebMessageInfo.encode(message.statusV3Messages[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.chunkOrder != null && Object.hasOwnProperty.call(message, "chunkOrder")) - writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.chunkOrder); - if (message.progress != null && Object.hasOwnProperty.call(message, "progress")) - writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.progress); - if (message.pushnames != null && message.pushnames.length) - for (var i = 0; i < message.pushnames.length; ++i) - $root.proto.Pushname.encode(message.pushnames[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.globalSettings != null && Object.hasOwnProperty.call(message, "globalSettings")) - $root.proto.GlobalSettings.encode(message.globalSettings, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.threadIdUserSecret != null && Object.hasOwnProperty.call(message, "threadIdUserSecret")) - writer.uint32(/* id 9, wireType 2 =*/74).bytes(message.threadIdUserSecret); - if (message.threadDsTimeframeOffset != null && Object.hasOwnProperty.call(message, "threadDsTimeframeOffset")) - writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.threadDsTimeframeOffset); - return writer; - }; - - /** - * Encodes the specified HistorySync message, length delimited. Does not implicitly {@link proto.HistorySync.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.HistorySync - * @static - * @param {proto.IHistorySync} message HistorySync message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HistorySync.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HistorySync message from the specified reader or buffer. - * @function decode - * @memberof proto.HistorySync - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.HistorySync} HistorySync - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HistorySync.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.HistorySync(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.syncType = reader.int32(); - break; - case 2: - if (!(message.conversations && message.conversations.length)) - message.conversations = []; - message.conversations.push($root.proto.Conversation.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.statusV3Messages && message.statusV3Messages.length)) - message.statusV3Messages = []; - message.statusV3Messages.push($root.proto.WebMessageInfo.decode(reader, reader.uint32())); - break; - case 5: - message.chunkOrder = reader.uint32(); - break; - case 6: - message.progress = reader.uint32(); - break; - case 7: - if (!(message.pushnames && message.pushnames.length)) - message.pushnames = []; - message.pushnames.push($root.proto.Pushname.decode(reader, reader.uint32())); - break; - case 8: - message.globalSettings = $root.proto.GlobalSettings.decode(reader, reader.uint32()); - break; - case 9: - message.threadIdUserSecret = reader.bytes(); - break; - case 10: - message.threadDsTimeframeOffset = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - if (!message.hasOwnProperty("syncType")) - throw $util.ProtocolError("missing required 'syncType'", { instance: message }); - return message; - }; - - /** - * Decodes a HistorySync message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.HistorySync - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.HistorySync} HistorySync - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HistorySync.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HistorySync message. - * @function verify - * @memberof proto.HistorySync - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HistorySync.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - switch (message.syncType) { - default: - return "syncType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.conversations != null && message.hasOwnProperty("conversations")) { - if (!Array.isArray(message.conversations)) - return "conversations: array expected"; - for (var i = 0; i < message.conversations.length; ++i) { - var error = $root.proto.Conversation.verify(message.conversations[i]); - if (error) - return "conversations." + error; - } - } - if (message.statusV3Messages != null && message.hasOwnProperty("statusV3Messages")) { - if (!Array.isArray(message.statusV3Messages)) - return "statusV3Messages: array expected"; - for (var i = 0; i < message.statusV3Messages.length; ++i) { - var error = $root.proto.WebMessageInfo.verify(message.statusV3Messages[i]); - if (error) - return "statusV3Messages." + error; - } - } - if (message.chunkOrder != null && message.hasOwnProperty("chunkOrder")) - if (!$util.isInteger(message.chunkOrder)) - return "chunkOrder: integer expected"; - if (message.progress != null && message.hasOwnProperty("progress")) - if (!$util.isInteger(message.progress)) - return "progress: integer expected"; - if (message.pushnames != null && message.hasOwnProperty("pushnames")) { - if (!Array.isArray(message.pushnames)) - return "pushnames: array expected"; - for (var i = 0; i < message.pushnames.length; ++i) { - var error = $root.proto.Pushname.verify(message.pushnames[i]); - if (error) - return "pushnames." + error; - } - } - if (message.globalSettings != null && message.hasOwnProperty("globalSettings")) { - var error = $root.proto.GlobalSettings.verify(message.globalSettings); - if (error) - return "globalSettings." + error; - } - if (message.threadIdUserSecret != null && message.hasOwnProperty("threadIdUserSecret")) - if (!(message.threadIdUserSecret && typeof message.threadIdUserSecret.length === "number" || $util.isString(message.threadIdUserSecret))) - return "threadIdUserSecret: buffer expected"; - if (message.threadDsTimeframeOffset != null && message.hasOwnProperty("threadDsTimeframeOffset")) - if (!$util.isInteger(message.threadDsTimeframeOffset)) - return "threadDsTimeframeOffset: integer expected"; - return null; - }; - - /** - * Creates a HistorySync message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.HistorySync - * @static - * @param {Object.} object Plain object - * @returns {proto.HistorySync} HistorySync - */ - HistorySync.fromObject = function fromObject(object) { - if (object instanceof $root.proto.HistorySync) - return object; - var message = new $root.proto.HistorySync(); - switch (object.syncType) { - case "INITIAL_BOOTSTRAP": - case 0: - message.syncType = 0; - break; - case "INITIAL_STATUS_V3": - case 1: - message.syncType = 1; - break; - case "FULL": - case 2: - message.syncType = 2; - break; - case "RECENT": - case 3: - message.syncType = 3; - break; - case "PUSH_NAME": - case 4: - message.syncType = 4; - break; - } - if (object.conversations) { - if (!Array.isArray(object.conversations)) - throw TypeError(".proto.HistorySync.conversations: array expected"); - message.conversations = []; - for (var i = 0; i < object.conversations.length; ++i) { - if (typeof object.conversations[i] !== "object") - throw TypeError(".proto.HistorySync.conversations: object expected"); - message.conversations[i] = $root.proto.Conversation.fromObject(object.conversations[i]); - } - } - if (object.statusV3Messages) { - if (!Array.isArray(object.statusV3Messages)) - throw TypeError(".proto.HistorySync.statusV3Messages: array expected"); - message.statusV3Messages = []; - for (var i = 0; i < object.statusV3Messages.length; ++i) { - if (typeof object.statusV3Messages[i] !== "object") - throw TypeError(".proto.HistorySync.statusV3Messages: object expected"); - message.statusV3Messages[i] = $root.proto.WebMessageInfo.fromObject(object.statusV3Messages[i]); - } - } - if (object.chunkOrder != null) - message.chunkOrder = object.chunkOrder >>> 0; - if (object.progress != null) - message.progress = object.progress >>> 0; - if (object.pushnames) { - if (!Array.isArray(object.pushnames)) - throw TypeError(".proto.HistorySync.pushnames: array expected"); - message.pushnames = []; - for (var i = 0; i < object.pushnames.length; ++i) { - if (typeof object.pushnames[i] !== "object") - throw TypeError(".proto.HistorySync.pushnames: object expected"); - message.pushnames[i] = $root.proto.Pushname.fromObject(object.pushnames[i]); - } - } - if (object.globalSettings != null) { - if (typeof object.globalSettings !== "object") - throw TypeError(".proto.HistorySync.globalSettings: object expected"); - message.globalSettings = $root.proto.GlobalSettings.fromObject(object.globalSettings); - } - if (object.threadIdUserSecret != null) - if (typeof object.threadIdUserSecret === "string") - $util.base64.decode(object.threadIdUserSecret, message.threadIdUserSecret = $util.newBuffer($util.base64.length(object.threadIdUserSecret)), 0); - else if (object.threadIdUserSecret.length) - message.threadIdUserSecret = object.threadIdUserSecret; - if (object.threadDsTimeframeOffset != null) - message.threadDsTimeframeOffset = object.threadDsTimeframeOffset >>> 0; - return message; - }; - - /** - * Creates a plain object from a HistorySync message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.HistorySync - * @static - * @param {proto.HistorySync} message HistorySync - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HistorySync.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.conversations = []; - object.statusV3Messages = []; - object.pushnames = []; - } - if (options.defaults) { - object.syncType = options.enums === String ? "INITIAL_BOOTSTRAP" : 0; - object.chunkOrder = 0; - object.progress = 0; - object.globalSettings = null; - if (options.bytes === String) - object.threadIdUserSecret = ""; - else { - object.threadIdUserSecret = []; - if (options.bytes !== Array) - object.threadIdUserSecret = $util.newBuffer(object.threadIdUserSecret); - } - object.threadDsTimeframeOffset = 0; - } - if (message.syncType != null && message.hasOwnProperty("syncType")) - object.syncType = options.enums === String ? $root.proto.HistorySync.HistorySyncHistorySyncType[message.syncType] : message.syncType; - if (message.conversations && message.conversations.length) { - object.conversations = []; - for (var j = 0; j < message.conversations.length; ++j) - object.conversations[j] = $root.proto.Conversation.toObject(message.conversations[j], options); - } - if (message.statusV3Messages && message.statusV3Messages.length) { - object.statusV3Messages = []; - for (var j = 0; j < message.statusV3Messages.length; ++j) - object.statusV3Messages[j] = $root.proto.WebMessageInfo.toObject(message.statusV3Messages[j], options); - } - if (message.chunkOrder != null && message.hasOwnProperty("chunkOrder")) - object.chunkOrder = message.chunkOrder; - if (message.progress != null && message.hasOwnProperty("progress")) - object.progress = message.progress; - if (message.pushnames && message.pushnames.length) { - object.pushnames = []; - for (var j = 0; j < message.pushnames.length; ++j) - object.pushnames[j] = $root.proto.Pushname.toObject(message.pushnames[j], options); - } - if (message.globalSettings != null && message.hasOwnProperty("globalSettings")) - object.globalSettings = $root.proto.GlobalSettings.toObject(message.globalSettings, options); - if (message.threadIdUserSecret != null && message.hasOwnProperty("threadIdUserSecret")) - object.threadIdUserSecret = options.bytes === String ? $util.base64.encode(message.threadIdUserSecret, 0, message.threadIdUserSecret.length) : options.bytes === Array ? Array.prototype.slice.call(message.threadIdUserSecret) : message.threadIdUserSecret; - if (message.threadDsTimeframeOffset != null && message.hasOwnProperty("threadDsTimeframeOffset")) - object.threadDsTimeframeOffset = message.threadDsTimeframeOffset; - return object; - }; - - /** - * Converts this HistorySync to JSON. - * @function toJSON - * @memberof proto.HistorySync - * @instance - * @returns {Object.} JSON object - */ - HistorySync.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * HistorySyncHistorySyncType enum. - * @name proto.HistorySync.HistorySyncHistorySyncType - * @enum {number} - * @property {number} INITIAL_BOOTSTRAP=0 INITIAL_BOOTSTRAP value - * @property {number} INITIAL_STATUS_V3=1 INITIAL_STATUS_V3 value - * @property {number} FULL=2 FULL value - * @property {number} RECENT=3 RECENT value - * @property {number} PUSH_NAME=4 PUSH_NAME value - */ - HistorySync.HistorySyncHistorySyncType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "INITIAL_BOOTSTRAP"] = 0; - values[valuesById[1] = "INITIAL_STATUS_V3"] = 1; - values[valuesById[2] = "FULL"] = 2; - values[valuesById[3] = "RECENT"] = 3; - values[valuesById[4] = "PUSH_NAME"] = 4; - return values; - })(); - - return HistorySync; - })(); - - proto.HistorySyncMsg = (function() { - - /** - * Properties of a HistorySyncMsg. - * @memberof proto - * @interface IHistorySyncMsg - * @property {proto.IWebMessageInfo|null} [message] HistorySyncMsg message - * @property {number|Long|null} [msgOrderId] HistorySyncMsg msgOrderId - */ - - /** - * Constructs a new HistorySyncMsg. - * @memberof proto - * @classdesc Represents a HistorySyncMsg. - * @implements IHistorySyncMsg - * @constructor - * @param {proto.IHistorySyncMsg=} [properties] Properties to set - */ - function HistorySyncMsg(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HistorySyncMsg message. - * @member {proto.IWebMessageInfo|null|undefined} message - * @memberof proto.HistorySyncMsg - * @instance - */ - HistorySyncMsg.prototype.message = null; - - /** - * HistorySyncMsg msgOrderId. - * @member {number|Long} msgOrderId - * @memberof proto.HistorySyncMsg - * @instance - */ - HistorySyncMsg.prototype.msgOrderId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Creates a new HistorySyncMsg instance using the specified properties. - * @function create - * @memberof proto.HistorySyncMsg - * @static - * @param {proto.IHistorySyncMsg=} [properties] Properties to set - * @returns {proto.HistorySyncMsg} HistorySyncMsg instance - */ - HistorySyncMsg.create = function create(properties) { - return new HistorySyncMsg(properties); - }; - - /** - * Encodes the specified HistorySyncMsg message. Does not implicitly {@link proto.HistorySyncMsg.verify|verify} messages. - * @function encode - * @memberof proto.HistorySyncMsg - * @static - * @param {proto.IHistorySyncMsg} message HistorySyncMsg message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HistorySyncMsg.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - $root.proto.WebMessageInfo.encode(message.message, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.msgOrderId != null && Object.hasOwnProperty.call(message, "msgOrderId")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.msgOrderId); - return writer; - }; - - /** - * Encodes the specified HistorySyncMsg message, length delimited. Does not implicitly {@link proto.HistorySyncMsg.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.HistorySyncMsg - * @static - * @param {proto.IHistorySyncMsg} message HistorySyncMsg message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HistorySyncMsg.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HistorySyncMsg message from the specified reader or buffer. - * @function decode - * @memberof proto.HistorySyncMsg - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.HistorySyncMsg} HistorySyncMsg - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HistorySyncMsg.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.HistorySyncMsg(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message = $root.proto.WebMessageInfo.decode(reader, reader.uint32()); - break; - case 2: - message.msgOrderId = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HistorySyncMsg message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.HistorySyncMsg - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.HistorySyncMsg} HistorySyncMsg - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HistorySyncMsg.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HistorySyncMsg message. - * @function verify - * @memberof proto.HistorySyncMsg - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HistorySyncMsg.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.message != null && message.hasOwnProperty("message")) { - var error = $root.proto.WebMessageInfo.verify(message.message); - if (error) - return "message." + error; - } - if (message.msgOrderId != null && message.hasOwnProperty("msgOrderId")) - if (!$util.isInteger(message.msgOrderId) && !(message.msgOrderId && $util.isInteger(message.msgOrderId.low) && $util.isInteger(message.msgOrderId.high))) - return "msgOrderId: integer|Long expected"; - return null; - }; - - /** - * Creates a HistorySyncMsg message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.HistorySyncMsg - * @static - * @param {Object.} object Plain object - * @returns {proto.HistorySyncMsg} HistorySyncMsg - */ - HistorySyncMsg.fromObject = function fromObject(object) { - if (object instanceof $root.proto.HistorySyncMsg) - return object; - var message = new $root.proto.HistorySyncMsg(); - if (object.message != null) { - if (typeof object.message !== "object") - throw TypeError(".proto.HistorySyncMsg.message: object expected"); - message.message = $root.proto.WebMessageInfo.fromObject(object.message); - } - if (object.msgOrderId != null) - if ($util.Long) - (message.msgOrderId = $util.Long.fromValue(object.msgOrderId)).unsigned = true; - else if (typeof object.msgOrderId === "string") - message.msgOrderId = parseInt(object.msgOrderId, 10); - else if (typeof object.msgOrderId === "number") - message.msgOrderId = object.msgOrderId; - else if (typeof object.msgOrderId === "object") - message.msgOrderId = new $util.LongBits(object.msgOrderId.low >>> 0, object.msgOrderId.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a HistorySyncMsg message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.HistorySyncMsg - * @static - * @param {proto.HistorySyncMsg} message HistorySyncMsg - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HistorySyncMsg.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.message = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.msgOrderId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.msgOrderId = options.longs === String ? "0" : 0; - } - if (message.message != null && message.hasOwnProperty("message")) - object.message = $root.proto.WebMessageInfo.toObject(message.message, options); - if (message.msgOrderId != null && message.hasOwnProperty("msgOrderId")) - if (typeof message.msgOrderId === "number") - object.msgOrderId = options.longs === String ? String(message.msgOrderId) : message.msgOrderId; - else - object.msgOrderId = options.longs === String ? $util.Long.prototype.toString.call(message.msgOrderId) : options.longs === Number ? new $util.LongBits(message.msgOrderId.low >>> 0, message.msgOrderId.high >>> 0).toNumber(true) : message.msgOrderId; - return object; - }; - - /** - * Converts this HistorySyncMsg to JSON. - * @function toJSON - * @memberof proto.HistorySyncMsg - * @instance - * @returns {Object.} JSON object - */ - HistorySyncMsg.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return HistorySyncMsg; - })(); - - /** - * MediaVisibility enum. - * @name proto.MediaVisibility - * @enum {number} - * @property {number} DEFAULT=0 DEFAULT value - * @property {number} OFF=1 OFF value - * @property {number} ON=2 ON value - */ - proto.MediaVisibility = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DEFAULT"] = 0; - values[valuesById[1] = "OFF"] = 1; - values[valuesById[2] = "ON"] = 2; - return values; - })(); - - proto.Pushname = (function() { - - /** - * Properties of a Pushname. - * @memberof proto - * @interface IPushname - * @property {string|null} [id] Pushname id - * @property {string|null} [pushname] Pushname pushname - */ - - /** - * Constructs a new Pushname. - * @memberof proto - * @classdesc Represents a Pushname. - * @implements IPushname - * @constructor - * @param {proto.IPushname=} [properties] Properties to set - */ - function Pushname(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Pushname id. - * @member {string} id - * @memberof proto.Pushname - * @instance - */ - Pushname.prototype.id = ""; - - /** - * Pushname pushname. - * @member {string} pushname - * @memberof proto.Pushname - * @instance - */ - Pushname.prototype.pushname = ""; - - /** - * Creates a new Pushname instance using the specified properties. - * @function create - * @memberof proto.Pushname - * @static - * @param {proto.IPushname=} [properties] Properties to set - * @returns {proto.Pushname} Pushname instance - */ - Pushname.create = function create(properties) { - return new Pushname(properties); - }; - - /** - * Encodes the specified Pushname message. Does not implicitly {@link proto.Pushname.verify|verify} messages. - * @function encode - * @memberof proto.Pushname - * @static - * @param {proto.IPushname} message Pushname message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Pushname.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.pushname != null && Object.hasOwnProperty.call(message, "pushname")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pushname); - return writer; - }; - - /** - * Encodes the specified Pushname message, length delimited. Does not implicitly {@link proto.Pushname.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.Pushname - * @static - * @param {proto.IPushname} message Pushname message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Pushname.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Pushname message from the specified reader or buffer. - * @function decode - * @memberof proto.Pushname - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.Pushname} Pushname - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Pushname.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Pushname(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.pushname = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Pushname message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.Pushname - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Pushname} Pushname - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Pushname.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Pushname message. - * @function verify - * @memberof proto.Pushname - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Pushname.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.pushname != null && message.hasOwnProperty("pushname")) - if (!$util.isString(message.pushname)) - return "pushname: string expected"; - return null; - }; - - /** - * Creates a Pushname message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.Pushname - * @static - * @param {Object.} object Plain object - * @returns {proto.Pushname} Pushname - */ - Pushname.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Pushname) - return object; - var message = new $root.proto.Pushname(); - if (object.id != null) - message.id = String(object.id); - if (object.pushname != null) - message.pushname = String(object.pushname); - return message; - }; - - /** - * Creates a plain object from a Pushname message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.Pushname - * @static - * @param {proto.Pushname} message Pushname - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Pushname.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.id = ""; - object.pushname = ""; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.pushname != null && message.hasOwnProperty("pushname")) - object.pushname = message.pushname; - return object; - }; - - /** - * Converts this Pushname to JSON. - * @function toJSON - * @memberof proto.Pushname - * @instance - * @returns {Object.} JSON object - */ - Pushname.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Pushname; - })(); - - proto.WallpaperSettings = (function() { - - /** - * Properties of a WallpaperSettings. - * @memberof proto - * @interface IWallpaperSettings - * @property {string|null} [filename] WallpaperSettings filename - * @property {number|null} [opacity] WallpaperSettings opacity - */ - - /** - * Constructs a new WallpaperSettings. - * @memberof proto - * @classdesc Represents a WallpaperSettings. - * @implements IWallpaperSettings - * @constructor - * @param {proto.IWallpaperSettings=} [properties] Properties to set - */ - function WallpaperSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WallpaperSettings filename. - * @member {string} filename - * @memberof proto.WallpaperSettings - * @instance - */ - WallpaperSettings.prototype.filename = ""; - - /** - * WallpaperSettings opacity. - * @member {number} opacity - * @memberof proto.WallpaperSettings - * @instance - */ - WallpaperSettings.prototype.opacity = 0; - - /** - * Creates a new WallpaperSettings instance using the specified properties. - * @function create - * @memberof proto.WallpaperSettings - * @static - * @param {proto.IWallpaperSettings=} [properties] Properties to set - * @returns {proto.WallpaperSettings} WallpaperSettings instance - */ - WallpaperSettings.create = function create(properties) { - return new WallpaperSettings(properties); - }; - - /** - * Encodes the specified WallpaperSettings message. Does not implicitly {@link proto.WallpaperSettings.verify|verify} messages. - * @function encode - * @memberof proto.WallpaperSettings - * @static - * @param {proto.IWallpaperSettings} message WallpaperSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WallpaperSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.filename != null && Object.hasOwnProperty.call(message, "filename")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.filename); - if (message.opacity != null && Object.hasOwnProperty.call(message, "opacity")) - writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.opacity); - return writer; - }; - - /** - * Encodes the specified WallpaperSettings message, length delimited. Does not implicitly {@link proto.WallpaperSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.WallpaperSettings - * @static - * @param {proto.IWallpaperSettings} message WallpaperSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WallpaperSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WallpaperSettings message from the specified reader or buffer. - * @function decode - * @memberof proto.WallpaperSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.WallpaperSettings} WallpaperSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WallpaperSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.WallpaperSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.filename = reader.string(); - break; - case 2: - message.opacity = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WallpaperSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.WallpaperSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.WallpaperSettings} WallpaperSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WallpaperSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WallpaperSettings message. - * @function verify - * @memberof proto.WallpaperSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WallpaperSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.filename != null && message.hasOwnProperty("filename")) - if (!$util.isString(message.filename)) - return "filename: string expected"; - if (message.opacity != null && message.hasOwnProperty("opacity")) - if (!$util.isInteger(message.opacity)) - return "opacity: integer expected"; - return null; - }; - - /** - * Creates a WallpaperSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.WallpaperSettings - * @static - * @param {Object.} object Plain object - * @returns {proto.WallpaperSettings} WallpaperSettings - */ - WallpaperSettings.fromObject = function fromObject(object) { - if (object instanceof $root.proto.WallpaperSettings) - return object; - var message = new $root.proto.WallpaperSettings(); - if (object.filename != null) - message.filename = String(object.filename); - if (object.opacity != null) - message.opacity = object.opacity >>> 0; - return message; - }; - - /** - * Creates a plain object from a WallpaperSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.WallpaperSettings - * @static - * @param {proto.WallpaperSettings} message WallpaperSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WallpaperSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.filename = ""; - object.opacity = 0; - } - if (message.filename != null && message.hasOwnProperty("filename")) - object.filename = message.filename; - if (message.opacity != null && message.hasOwnProperty("opacity")) - object.opacity = message.opacity; - return object; - }; - - /** - * Converts this WallpaperSettings to JSON. - * @function toJSON - * @memberof proto.WallpaperSettings - * @instance - * @returns {Object.} JSON object - */ - WallpaperSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return WallpaperSettings; - })(); - - proto.MsgOpaqueData = (function() { - - /** - * Properties of a MsgOpaqueData. - * @memberof proto - * @interface IMsgOpaqueData - * @property {string|null} [body] MsgOpaqueData body - * @property {string|null} [caption] MsgOpaqueData caption - * @property {number|null} [lng] MsgOpaqueData lng - * @property {boolean|null} [isLive] MsgOpaqueData isLive - * @property {number|null} [lat] MsgOpaqueData lat - * @property {number|null} [paymentAmount1000] MsgOpaqueData paymentAmount1000 - * @property {string|null} [paymentNoteMsgBody] MsgOpaqueData paymentNoteMsgBody - * @property {string|null} [canonicalUrl] MsgOpaqueData canonicalUrl - * @property {string|null} [matchedText] MsgOpaqueData matchedText - * @property {string|null} [title] MsgOpaqueData title - * @property {string|null} [description] MsgOpaqueData description - * @property {Uint8Array|null} [futureproofBuffer] MsgOpaqueData futureproofBuffer - * @property {string|null} [clientUrl] MsgOpaqueData clientUrl - * @property {string|null} [loc] MsgOpaqueData loc - * @property {string|null} [pollName] MsgOpaqueData pollName - * @property {Array.|null} [pollOptions] MsgOpaqueData pollOptions - * @property {Uint8Array|null} [pollEncKey] MsgOpaqueData pollEncKey - * @property {number|null} [pollSelectableOptionsCount] MsgOpaqueData pollSelectableOptionsCount - */ - - /** - * Constructs a new MsgOpaqueData. - * @memberof proto - * @classdesc Represents a MsgOpaqueData. - * @implements IMsgOpaqueData - * @constructor - * @param {proto.IMsgOpaqueData=} [properties] Properties to set - */ - function MsgOpaqueData(properties) { - this.pollOptions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgOpaqueData body. - * @member {string} body - * @memberof proto.MsgOpaqueData - * @instance - */ - MsgOpaqueData.prototype.body = ""; - - /** - * MsgOpaqueData caption. - * @member {string} caption - * @memberof proto.MsgOpaqueData - * @instance - */ - MsgOpaqueData.prototype.caption = ""; - - /** - * MsgOpaqueData lng. - * @member {number} lng - * @memberof proto.MsgOpaqueData - * @instance - */ - MsgOpaqueData.prototype.lng = 0; - - /** - * MsgOpaqueData isLive. - * @member {boolean} isLive - * @memberof proto.MsgOpaqueData - * @instance - */ - MsgOpaqueData.prototype.isLive = false; - - /** - * MsgOpaqueData lat. - * @member {number} lat - * @memberof proto.MsgOpaqueData - * @instance - */ - MsgOpaqueData.prototype.lat = 0; - - /** - * MsgOpaqueData paymentAmount1000. - * @member {number} paymentAmount1000 - * @memberof proto.MsgOpaqueData - * @instance - */ - MsgOpaqueData.prototype.paymentAmount1000 = 0; - - /** - * MsgOpaqueData paymentNoteMsgBody. - * @member {string} paymentNoteMsgBody - * @memberof proto.MsgOpaqueData - * @instance - */ - MsgOpaqueData.prototype.paymentNoteMsgBody = ""; - - /** - * MsgOpaqueData canonicalUrl. - * @member {string} canonicalUrl - * @memberof proto.MsgOpaqueData - * @instance - */ - MsgOpaqueData.prototype.canonicalUrl = ""; - - /** - * MsgOpaqueData matchedText. - * @member {string} matchedText - * @memberof proto.MsgOpaqueData - * @instance - */ - MsgOpaqueData.prototype.matchedText = ""; - - /** - * MsgOpaqueData title. - * @member {string} title - * @memberof proto.MsgOpaqueData - * @instance - */ - MsgOpaqueData.prototype.title = ""; - - /** - * MsgOpaqueData description. - * @member {string} description - * @memberof proto.MsgOpaqueData - * @instance - */ - MsgOpaqueData.prototype.description = ""; - - /** - * MsgOpaqueData futureproofBuffer. - * @member {Uint8Array} futureproofBuffer - * @memberof proto.MsgOpaqueData - * @instance - */ - MsgOpaqueData.prototype.futureproofBuffer = $util.newBuffer([]); - - /** - * MsgOpaqueData clientUrl. - * @member {string} clientUrl - * @memberof proto.MsgOpaqueData - * @instance - */ - MsgOpaqueData.prototype.clientUrl = ""; - - /** - * MsgOpaqueData loc. - * @member {string} loc - * @memberof proto.MsgOpaqueData - * @instance - */ - MsgOpaqueData.prototype.loc = ""; - - /** - * MsgOpaqueData pollName. - * @member {string} pollName - * @memberof proto.MsgOpaqueData - * @instance - */ - MsgOpaqueData.prototype.pollName = ""; - - /** - * MsgOpaqueData pollOptions. - * @member {Array.} pollOptions - * @memberof proto.MsgOpaqueData - * @instance - */ - MsgOpaqueData.prototype.pollOptions = $util.emptyArray; - - /** - * MsgOpaqueData pollEncKey. - * @member {Uint8Array} pollEncKey - * @memberof proto.MsgOpaqueData - * @instance - */ - MsgOpaqueData.prototype.pollEncKey = $util.newBuffer([]); - - /** - * MsgOpaqueData pollSelectableOptionsCount. - * @member {number} pollSelectableOptionsCount - * @memberof proto.MsgOpaqueData - * @instance - */ - MsgOpaqueData.prototype.pollSelectableOptionsCount = 0; - - /** - * Creates a new MsgOpaqueData instance using the specified properties. - * @function create - * @memberof proto.MsgOpaqueData - * @static - * @param {proto.IMsgOpaqueData=} [properties] Properties to set - * @returns {proto.MsgOpaqueData} MsgOpaqueData instance - */ - MsgOpaqueData.create = function create(properties) { - return new MsgOpaqueData(properties); - }; - - /** - * Encodes the specified MsgOpaqueData message. Does not implicitly {@link proto.MsgOpaqueData.verify|verify} messages. - * @function encode - * @memberof proto.MsgOpaqueData - * @static - * @param {proto.IMsgOpaqueData} message MsgOpaqueData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgOpaqueData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.body); - if (message.caption != null && Object.hasOwnProperty.call(message, "caption")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.caption); - if (message.lng != null && Object.hasOwnProperty.call(message, "lng")) - writer.uint32(/* id 5, wireType 1 =*/41).double(message.lng); - if (message.isLive != null && Object.hasOwnProperty.call(message, "isLive")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.isLive); - if (message.lat != null && Object.hasOwnProperty.call(message, "lat")) - writer.uint32(/* id 7, wireType 1 =*/57).double(message.lat); - if (message.paymentAmount1000 != null && Object.hasOwnProperty.call(message, "paymentAmount1000")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.paymentAmount1000); - if (message.paymentNoteMsgBody != null && Object.hasOwnProperty.call(message, "paymentNoteMsgBody")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.paymentNoteMsgBody); - if (message.canonicalUrl != null && Object.hasOwnProperty.call(message, "canonicalUrl")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.canonicalUrl); - if (message.matchedText != null && Object.hasOwnProperty.call(message, "matchedText")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.matchedText); - if (message.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.title); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.description); - if (message.futureproofBuffer != null && Object.hasOwnProperty.call(message, "futureproofBuffer")) - writer.uint32(/* id 14, wireType 2 =*/114).bytes(message.futureproofBuffer); - if (message.clientUrl != null && Object.hasOwnProperty.call(message, "clientUrl")) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.clientUrl); - if (message.loc != null && Object.hasOwnProperty.call(message, "loc")) - writer.uint32(/* id 16, wireType 2 =*/130).string(message.loc); - if (message.pollName != null && Object.hasOwnProperty.call(message, "pollName")) - writer.uint32(/* id 17, wireType 2 =*/138).string(message.pollName); - if (message.pollOptions != null && message.pollOptions.length) - for (var i = 0; i < message.pollOptions.length; ++i) - $root.proto.PollOption.encode(message.pollOptions[i], writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.pollEncKey != null && Object.hasOwnProperty.call(message, "pollEncKey")) - writer.uint32(/* id 19, wireType 2 =*/154).bytes(message.pollEncKey); - if (message.pollSelectableOptionsCount != null && Object.hasOwnProperty.call(message, "pollSelectableOptionsCount")) - writer.uint32(/* id 20, wireType 0 =*/160).uint32(message.pollSelectableOptionsCount); - return writer; - }; - - /** - * Encodes the specified MsgOpaqueData message, length delimited. Does not implicitly {@link proto.MsgOpaqueData.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.MsgOpaqueData - * @static - * @param {proto.IMsgOpaqueData} message MsgOpaqueData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgOpaqueData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgOpaqueData message from the specified reader or buffer. - * @function decode - * @memberof proto.MsgOpaqueData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.MsgOpaqueData} MsgOpaqueData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgOpaqueData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.MsgOpaqueData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.body = reader.string(); - break; - case 3: - message.caption = reader.string(); - break; - case 5: - message.lng = reader.double(); - break; - case 6: - message.isLive = reader.bool(); - break; - case 7: - message.lat = reader.double(); - break; - case 8: - message.paymentAmount1000 = reader.int32(); - break; - case 9: - message.paymentNoteMsgBody = reader.string(); - break; - case 10: - message.canonicalUrl = reader.string(); - break; - case 11: - message.matchedText = reader.string(); - break; - case 12: - message.title = reader.string(); - break; - case 13: - message.description = reader.string(); - break; - case 14: - message.futureproofBuffer = reader.bytes(); - break; - case 15: - message.clientUrl = reader.string(); - break; - case 16: - message.loc = reader.string(); - break; - case 17: - message.pollName = reader.string(); - break; - case 18: - if (!(message.pollOptions && message.pollOptions.length)) - message.pollOptions = []; - message.pollOptions.push($root.proto.PollOption.decode(reader, reader.uint32())); - break; - case 19: - message.pollEncKey = reader.bytes(); - break; - case 20: - message.pollSelectableOptionsCount = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgOpaqueData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.MsgOpaqueData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.MsgOpaqueData} MsgOpaqueData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgOpaqueData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgOpaqueData message. - * @function verify - * @memberof proto.MsgOpaqueData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgOpaqueData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.caption != null && message.hasOwnProperty("caption")) - if (!$util.isString(message.caption)) - return "caption: string expected"; - if (message.lng != null && message.hasOwnProperty("lng")) - if (typeof message.lng !== "number") - return "lng: number expected"; - if (message.isLive != null && message.hasOwnProperty("isLive")) - if (typeof message.isLive !== "boolean") - return "isLive: boolean expected"; - if (message.lat != null && message.hasOwnProperty("lat")) - if (typeof message.lat !== "number") - return "lat: number expected"; - if (message.paymentAmount1000 != null && message.hasOwnProperty("paymentAmount1000")) - if (!$util.isInteger(message.paymentAmount1000)) - return "paymentAmount1000: integer expected"; - if (message.paymentNoteMsgBody != null && message.hasOwnProperty("paymentNoteMsgBody")) - if (!$util.isString(message.paymentNoteMsgBody)) - return "paymentNoteMsgBody: string expected"; - if (message.canonicalUrl != null && message.hasOwnProperty("canonicalUrl")) - if (!$util.isString(message.canonicalUrl)) - return "canonicalUrl: string expected"; - if (message.matchedText != null && message.hasOwnProperty("matchedText")) - if (!$util.isString(message.matchedText)) - return "matchedText: string expected"; - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.futureproofBuffer != null && message.hasOwnProperty("futureproofBuffer")) - if (!(message.futureproofBuffer && typeof message.futureproofBuffer.length === "number" || $util.isString(message.futureproofBuffer))) - return "futureproofBuffer: buffer expected"; - if (message.clientUrl != null && message.hasOwnProperty("clientUrl")) - if (!$util.isString(message.clientUrl)) - return "clientUrl: string expected"; - if (message.loc != null && message.hasOwnProperty("loc")) - if (!$util.isString(message.loc)) - return "loc: string expected"; - if (message.pollName != null && message.hasOwnProperty("pollName")) - if (!$util.isString(message.pollName)) - return "pollName: string expected"; - if (message.pollOptions != null && message.hasOwnProperty("pollOptions")) { - if (!Array.isArray(message.pollOptions)) - return "pollOptions: array expected"; - for (var i = 0; i < message.pollOptions.length; ++i) { - var error = $root.proto.PollOption.verify(message.pollOptions[i]); - if (error) - return "pollOptions." + error; - } - } - if (message.pollEncKey != null && message.hasOwnProperty("pollEncKey")) - if (!(message.pollEncKey && typeof message.pollEncKey.length === "number" || $util.isString(message.pollEncKey))) - return "pollEncKey: buffer expected"; - if (message.pollSelectableOptionsCount != null && message.hasOwnProperty("pollSelectableOptionsCount")) - if (!$util.isInteger(message.pollSelectableOptionsCount)) - return "pollSelectableOptionsCount: integer expected"; - return null; - }; - - /** - * Creates a MsgOpaqueData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.MsgOpaqueData - * @static - * @param {Object.} object Plain object - * @returns {proto.MsgOpaqueData} MsgOpaqueData - */ - MsgOpaqueData.fromObject = function fromObject(object) { - if (object instanceof $root.proto.MsgOpaqueData) - return object; - var message = new $root.proto.MsgOpaqueData(); - if (object.body != null) - message.body = String(object.body); - if (object.caption != null) - message.caption = String(object.caption); - if (object.lng != null) - message.lng = Number(object.lng); - if (object.isLive != null) - message.isLive = Boolean(object.isLive); - if (object.lat != null) - message.lat = Number(object.lat); - if (object.paymentAmount1000 != null) - message.paymentAmount1000 = object.paymentAmount1000 | 0; - if (object.paymentNoteMsgBody != null) - message.paymentNoteMsgBody = String(object.paymentNoteMsgBody); - if (object.canonicalUrl != null) - message.canonicalUrl = String(object.canonicalUrl); - if (object.matchedText != null) - message.matchedText = String(object.matchedText); - if (object.title != null) - message.title = String(object.title); - if (object.description != null) - message.description = String(object.description); - if (object.futureproofBuffer != null) - if (typeof object.futureproofBuffer === "string") - $util.base64.decode(object.futureproofBuffer, message.futureproofBuffer = $util.newBuffer($util.base64.length(object.futureproofBuffer)), 0); - else if (object.futureproofBuffer.length) - message.futureproofBuffer = object.futureproofBuffer; - if (object.clientUrl != null) - message.clientUrl = String(object.clientUrl); - if (object.loc != null) - message.loc = String(object.loc); - if (object.pollName != null) - message.pollName = String(object.pollName); - if (object.pollOptions) { - if (!Array.isArray(object.pollOptions)) - throw TypeError(".proto.MsgOpaqueData.pollOptions: array expected"); - message.pollOptions = []; - for (var i = 0; i < object.pollOptions.length; ++i) { - if (typeof object.pollOptions[i] !== "object") - throw TypeError(".proto.MsgOpaqueData.pollOptions: object expected"); - message.pollOptions[i] = $root.proto.PollOption.fromObject(object.pollOptions[i]); - } - } - if (object.pollEncKey != null) - if (typeof object.pollEncKey === "string") - $util.base64.decode(object.pollEncKey, message.pollEncKey = $util.newBuffer($util.base64.length(object.pollEncKey)), 0); - else if (object.pollEncKey.length) - message.pollEncKey = object.pollEncKey; - if (object.pollSelectableOptionsCount != null) - message.pollSelectableOptionsCount = object.pollSelectableOptionsCount >>> 0; - return message; - }; - - /** - * Creates a plain object from a MsgOpaqueData message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.MsgOpaqueData - * @static - * @param {proto.MsgOpaqueData} message MsgOpaqueData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgOpaqueData.toObject = function toObject(message, options) { + SyncActionMessageRange.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.pollOptions = []; - if (options.defaults) { - object.body = ""; - object.caption = ""; - object.lng = 0; - object.isLive = false; - object.lat = 0; - object.paymentAmount1000 = 0; - object.paymentNoteMsgBody = ""; - object.canonicalUrl = ""; - object.matchedText = ""; - object.title = ""; - object.description = ""; - if (options.bytes === String) - object.futureproofBuffer = ""; - else { - object.futureproofBuffer = []; - if (options.bytes !== Array) - object.futureproofBuffer = $util.newBuffer(object.futureproofBuffer); - } - object.clientUrl = ""; - object.loc = ""; - object.pollName = ""; - if (options.bytes === String) - object.pollEncKey = ""; - else { - object.pollEncKey = []; - if (options.bytes !== Array) - object.pollEncKey = $util.newBuffer(object.pollEncKey); - } - object.pollSelectableOptionsCount = 0; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.caption != null && message.hasOwnProperty("caption")) - object.caption = message.caption; - if (message.lng != null && message.hasOwnProperty("lng")) - object.lng = options.json && !isFinite(message.lng) ? String(message.lng) : message.lng; - if (message.isLive != null && message.hasOwnProperty("isLive")) - object.isLive = message.isLive; - if (message.lat != null && message.hasOwnProperty("lat")) - object.lat = options.json && !isFinite(message.lat) ? String(message.lat) : message.lat; - if (message.paymentAmount1000 != null && message.hasOwnProperty("paymentAmount1000")) - object.paymentAmount1000 = message.paymentAmount1000; - if (message.paymentNoteMsgBody != null && message.hasOwnProperty("paymentNoteMsgBody")) - object.paymentNoteMsgBody = message.paymentNoteMsgBody; - if (message.canonicalUrl != null && message.hasOwnProperty("canonicalUrl")) - object.canonicalUrl = message.canonicalUrl; - if (message.matchedText != null && message.hasOwnProperty("matchedText")) - object.matchedText = message.matchedText; - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.futureproofBuffer != null && message.hasOwnProperty("futureproofBuffer")) - object.futureproofBuffer = options.bytes === String ? $util.base64.encode(message.futureproofBuffer, 0, message.futureproofBuffer.length) : options.bytes === Array ? Array.prototype.slice.call(message.futureproofBuffer) : message.futureproofBuffer; - if (message.clientUrl != null && message.hasOwnProperty("clientUrl")) - object.clientUrl = message.clientUrl; - if (message.loc != null && message.hasOwnProperty("loc")) - object.loc = message.loc; - if (message.pollName != null && message.hasOwnProperty("pollName")) - object.pollName = message.pollName; - if (message.pollOptions && message.pollOptions.length) { - object.pollOptions = []; - for (var j = 0; j < message.pollOptions.length; ++j) - object.pollOptions[j] = $root.proto.PollOption.toObject(message.pollOptions[j], options); - } - if (message.pollEncKey != null && message.hasOwnProperty("pollEncKey")) - object.pollEncKey = options.bytes === String ? $util.base64.encode(message.pollEncKey, 0, message.pollEncKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.pollEncKey) : message.pollEncKey; - if (message.pollSelectableOptionsCount != null && message.hasOwnProperty("pollSelectableOptionsCount")) - object.pollSelectableOptionsCount = message.pollSelectableOptionsCount; - return object; - }; - - /** - * Converts this MsgOpaqueData to JSON. - * @function toJSON - * @memberof proto.MsgOpaqueData - * @instance - * @returns {Object.} JSON object - */ - MsgOpaqueData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgOpaqueData; - })(); - - proto.MsgRowOpaqueData = (function() { - - /** - * Properties of a MsgRowOpaqueData. - * @memberof proto - * @interface IMsgRowOpaqueData - * @property {proto.IMsgOpaqueData|null} [currentMsg] MsgRowOpaqueData currentMsg - * @property {proto.IMsgOpaqueData|null} [quotedMsg] MsgRowOpaqueData quotedMsg - */ - - /** - * Constructs a new MsgRowOpaqueData. - * @memberof proto - * @classdesc Represents a MsgRowOpaqueData. - * @implements IMsgRowOpaqueData - * @constructor - * @param {proto.IMsgRowOpaqueData=} [properties] Properties to set - */ - function MsgRowOpaqueData(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgRowOpaqueData currentMsg. - * @member {proto.IMsgOpaqueData|null|undefined} currentMsg - * @memberof proto.MsgRowOpaqueData - * @instance - */ - MsgRowOpaqueData.prototype.currentMsg = null; - - /** - * MsgRowOpaqueData quotedMsg. - * @member {proto.IMsgOpaqueData|null|undefined} quotedMsg - * @memberof proto.MsgRowOpaqueData - * @instance - */ - MsgRowOpaqueData.prototype.quotedMsg = null; - - /** - * Creates a new MsgRowOpaqueData instance using the specified properties. - * @function create - * @memberof proto.MsgRowOpaqueData - * @static - * @param {proto.IMsgRowOpaqueData=} [properties] Properties to set - * @returns {proto.MsgRowOpaqueData} MsgRowOpaqueData instance - */ - MsgRowOpaqueData.create = function create(properties) { - return new MsgRowOpaqueData(properties); - }; - - /** - * Encodes the specified MsgRowOpaqueData message. Does not implicitly {@link proto.MsgRowOpaqueData.verify|verify} messages. - * @function encode - * @memberof proto.MsgRowOpaqueData - * @static - * @param {proto.IMsgRowOpaqueData} message MsgRowOpaqueData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRowOpaqueData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.currentMsg != null && Object.hasOwnProperty.call(message, "currentMsg")) - $root.proto.MsgOpaqueData.encode(message.currentMsg, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.quotedMsg != null && Object.hasOwnProperty.call(message, "quotedMsg")) - $root.proto.MsgOpaqueData.encode(message.quotedMsg, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MsgRowOpaqueData message, length delimited. Does not implicitly {@link proto.MsgRowOpaqueData.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.MsgRowOpaqueData - * @static - * @param {proto.IMsgRowOpaqueData} message MsgRowOpaqueData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRowOpaqueData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgRowOpaqueData message from the specified reader or buffer. - * @function decode - * @memberof proto.MsgRowOpaqueData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.MsgRowOpaqueData} MsgRowOpaqueData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRowOpaqueData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.MsgRowOpaqueData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.currentMsg = $root.proto.MsgOpaqueData.decode(reader, reader.uint32()); - break; - case 2: - message.quotedMsg = $root.proto.MsgOpaqueData.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgRowOpaqueData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.MsgRowOpaqueData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.MsgRowOpaqueData} MsgRowOpaqueData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRowOpaqueData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgRowOpaqueData message. - * @function verify - * @memberof proto.MsgRowOpaqueData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgRowOpaqueData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.currentMsg != null && message.hasOwnProperty("currentMsg")) { - var error = $root.proto.MsgOpaqueData.verify(message.currentMsg); - if (error) - return "currentMsg." + error; - } - if (message.quotedMsg != null && message.hasOwnProperty("quotedMsg")) { - var error = $root.proto.MsgOpaqueData.verify(message.quotedMsg); - if (error) - return "quotedMsg." + error; - } - return null; - }; - - /** - * Creates a MsgRowOpaqueData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.MsgRowOpaqueData - * @static - * @param {Object.} object Plain object - * @returns {proto.MsgRowOpaqueData} MsgRowOpaqueData - */ - MsgRowOpaqueData.fromObject = function fromObject(object) { - if (object instanceof $root.proto.MsgRowOpaqueData) - return object; - var message = new $root.proto.MsgRowOpaqueData(); - if (object.currentMsg != null) { - if (typeof object.currentMsg !== "object") - throw TypeError(".proto.MsgRowOpaqueData.currentMsg: object expected"); - message.currentMsg = $root.proto.MsgOpaqueData.fromObject(object.currentMsg); - } - if (object.quotedMsg != null) { - if (typeof object.quotedMsg !== "object") - throw TypeError(".proto.MsgRowOpaqueData.quotedMsg: object expected"); - message.quotedMsg = $root.proto.MsgOpaqueData.fromObject(object.quotedMsg); - } - return message; - }; - - /** - * Creates a plain object from a MsgRowOpaqueData message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.MsgRowOpaqueData - * @static - * @param {proto.MsgRowOpaqueData} message MsgRowOpaqueData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgRowOpaqueData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.currentMsg = null; - object.quotedMsg = null; - } - if (message.currentMsg != null && message.hasOwnProperty("currentMsg")) - object.currentMsg = $root.proto.MsgOpaqueData.toObject(message.currentMsg, options); - if (message.quotedMsg != null && message.hasOwnProperty("quotedMsg")) - object.quotedMsg = $root.proto.MsgOpaqueData.toObject(message.quotedMsg, options); - return object; - }; - - /** - * Converts this MsgRowOpaqueData to JSON. - * @function toJSON - * @memberof proto.MsgRowOpaqueData - * @instance - * @returns {Object.} JSON object - */ - MsgRowOpaqueData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgRowOpaqueData; - })(); - - proto.PollOption = (function() { - - /** - * Properties of a PollOption. - * @memberof proto - * @interface IPollOption - * @property {string|null} [name] PollOption name - */ - - /** - * Constructs a new PollOption. - * @memberof proto - * @classdesc Represents a PollOption. - * @implements IPollOption - * @constructor - * @param {proto.IPollOption=} [properties] Properties to set - */ - function PollOption(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PollOption name. - * @member {string} name - * @memberof proto.PollOption - * @instance - */ - PollOption.prototype.name = ""; - - /** - * Creates a new PollOption instance using the specified properties. - * @function create - * @memberof proto.PollOption - * @static - * @param {proto.IPollOption=} [properties] Properties to set - * @returns {proto.PollOption} PollOption instance - */ - PollOption.create = function create(properties) { - return new PollOption(properties); - }; - - /** - * Encodes the specified PollOption message. Does not implicitly {@link proto.PollOption.verify|verify} messages. - * @function encode - * @memberof proto.PollOption - * @static - * @param {proto.IPollOption} message PollOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PollOption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified PollOption message, length delimited. Does not implicitly {@link proto.PollOption.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.PollOption - * @static - * @param {proto.IPollOption} message PollOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PollOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PollOption message from the specified reader or buffer. - * @function decode - * @memberof proto.PollOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.PollOption} PollOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PollOption.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.PollOption(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PollOption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.PollOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.PollOption} PollOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PollOption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PollOption message. - * @function verify - * @memberof proto.PollOption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PollOption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a PollOption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.PollOption - * @static - * @param {Object.} object Plain object - * @returns {proto.PollOption} PollOption - */ - PollOption.fromObject = function fromObject(object) { - if (object instanceof $root.proto.PollOption) - return object; - var message = new $root.proto.PollOption(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a PollOption message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.PollOption - * @static - * @param {proto.PollOption} message PollOption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PollOption.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this PollOption to JSON. - * @function toJSON - * @memberof proto.PollOption - * @instance - * @returns {Object.} JSON object - */ - PollOption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PollOption; - })(); - - proto.MediaRetryNotification = (function() { - - /** - * Properties of a MediaRetryNotification. - * @memberof proto - * @interface IMediaRetryNotification - * @property {string|null} [stanzaId] MediaRetryNotification stanzaId - * @property {string|null} [directPath] MediaRetryNotification directPath - * @property {proto.MediaRetryNotification.MediaRetryNotificationResultType|null} [result] MediaRetryNotification result - */ - - /** - * Constructs a new MediaRetryNotification. - * @memberof proto - * @classdesc Represents a MediaRetryNotification. - * @implements IMediaRetryNotification - * @constructor - * @param {proto.IMediaRetryNotification=} [properties] Properties to set - */ - function MediaRetryNotification(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MediaRetryNotification stanzaId. - * @member {string} stanzaId - * @memberof proto.MediaRetryNotification - * @instance - */ - MediaRetryNotification.prototype.stanzaId = ""; - - /** - * MediaRetryNotification directPath. - * @member {string} directPath - * @memberof proto.MediaRetryNotification - * @instance - */ - MediaRetryNotification.prototype.directPath = ""; - - /** - * MediaRetryNotification result. - * @member {proto.MediaRetryNotification.MediaRetryNotificationResultType} result - * @memberof proto.MediaRetryNotification - * @instance - */ - MediaRetryNotification.prototype.result = 0; - - /** - * Creates a new MediaRetryNotification instance using the specified properties. - * @function create - * @memberof proto.MediaRetryNotification - * @static - * @param {proto.IMediaRetryNotification=} [properties] Properties to set - * @returns {proto.MediaRetryNotification} MediaRetryNotification instance - */ - MediaRetryNotification.create = function create(properties) { - return new MediaRetryNotification(properties); - }; - - /** - * Encodes the specified MediaRetryNotification message. Does not implicitly {@link proto.MediaRetryNotification.verify|verify} messages. - * @function encode - * @memberof proto.MediaRetryNotification - * @static - * @param {proto.IMediaRetryNotification} message MediaRetryNotification message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MediaRetryNotification.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.stanzaId != null && Object.hasOwnProperty.call(message, "stanzaId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.stanzaId); - if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.directPath); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.result); - return writer; - }; - - /** - * Encodes the specified MediaRetryNotification message, length delimited. Does not implicitly {@link proto.MediaRetryNotification.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.MediaRetryNotification - * @static - * @param {proto.IMediaRetryNotification} message MediaRetryNotification message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MediaRetryNotification.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MediaRetryNotification message from the specified reader or buffer. - * @function decode - * @memberof proto.MediaRetryNotification - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.MediaRetryNotification} MediaRetryNotification - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MediaRetryNotification.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.MediaRetryNotification(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.stanzaId = reader.string(); - break; - case 2: - message.directPath = reader.string(); - break; - case 3: - message.result = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MediaRetryNotification message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.MediaRetryNotification - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.MediaRetryNotification} MediaRetryNotification - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MediaRetryNotification.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MediaRetryNotification message. - * @function verify - * @memberof proto.MediaRetryNotification - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MediaRetryNotification.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) - if (!$util.isString(message.stanzaId)) - return "stanzaId: string expected"; - if (message.directPath != null && message.hasOwnProperty("directPath")) - if (!$util.isString(message.directPath)) - return "directPath: string expected"; - if (message.result != null && message.hasOwnProperty("result")) - switch (message.result) { - default: - return "result: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - return null; - }; - - /** - * Creates a MediaRetryNotification message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.MediaRetryNotification - * @static - * @param {Object.} object Plain object - * @returns {proto.MediaRetryNotification} MediaRetryNotification - */ - MediaRetryNotification.fromObject = function fromObject(object) { - if (object instanceof $root.proto.MediaRetryNotification) - return object; - var message = new $root.proto.MediaRetryNotification(); - if (object.stanzaId != null) - message.stanzaId = String(object.stanzaId); - if (object.directPath != null) - message.directPath = String(object.directPath); - switch (object.result) { - case "GENERAL_ERROR": - case 0: - message.result = 0; - break; - case "SUCCESS": - case 1: - message.result = 1; - break; - case "NOT_FOUND": - case 2: - message.result = 2; - break; - case "DECRYPTION_ERROR": - case 3: - message.result = 3; - break; - } - return message; - }; - - /** - * Creates a plain object from a MediaRetryNotification message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.MediaRetryNotification - * @static - * @param {proto.MediaRetryNotification} message MediaRetryNotification - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MediaRetryNotification.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.stanzaId = ""; - object.directPath = ""; - object.result = options.enums === String ? "GENERAL_ERROR" : 0; - } - if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) - object.stanzaId = message.stanzaId; - if (message.directPath != null && message.hasOwnProperty("directPath")) - object.directPath = message.directPath; - if (message.result != null && message.hasOwnProperty("result")) - object.result = options.enums === String ? $root.proto.MediaRetryNotification.MediaRetryNotificationResultType[message.result] : message.result; - return object; - }; - - /** - * Converts this MediaRetryNotification to JSON. - * @function toJSON - * @memberof proto.MediaRetryNotification - * @instance - * @returns {Object.} JSON object - */ - MediaRetryNotification.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * MediaRetryNotificationResultType enum. - * @name proto.MediaRetryNotification.MediaRetryNotificationResultType - * @enum {number} - * @property {number} GENERAL_ERROR=0 GENERAL_ERROR value - * @property {number} SUCCESS=1 SUCCESS value - * @property {number} NOT_FOUND=2 NOT_FOUND value - * @property {number} DECRYPTION_ERROR=3 DECRYPTION_ERROR value - */ - MediaRetryNotification.MediaRetryNotificationResultType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "GENERAL_ERROR"] = 0; - values[valuesById[1] = "SUCCESS"] = 1; - values[valuesById[2] = "NOT_FOUND"] = 2; - values[valuesById[3] = "DECRYPTION_ERROR"] = 3; - return values; - })(); - - return MediaRetryNotification; - })(); - - proto.ServerErrorReceipt = (function() { - - /** - * Properties of a ServerErrorReceipt. - * @memberof proto - * @interface IServerErrorReceipt - * @property {string|null} [stanzaId] ServerErrorReceipt stanzaId - */ - - /** - * Constructs a new ServerErrorReceipt. - * @memberof proto - * @classdesc Represents a ServerErrorReceipt. - * @implements IServerErrorReceipt - * @constructor - * @param {proto.IServerErrorReceipt=} [properties] Properties to set - */ - function ServerErrorReceipt(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServerErrorReceipt stanzaId. - * @member {string} stanzaId - * @memberof proto.ServerErrorReceipt - * @instance - */ - ServerErrorReceipt.prototype.stanzaId = ""; - - /** - * Creates a new ServerErrorReceipt instance using the specified properties. - * @function create - * @memberof proto.ServerErrorReceipt - * @static - * @param {proto.IServerErrorReceipt=} [properties] Properties to set - * @returns {proto.ServerErrorReceipt} ServerErrorReceipt instance - */ - ServerErrorReceipt.create = function create(properties) { - return new ServerErrorReceipt(properties); - }; - - /** - * Encodes the specified ServerErrorReceipt message. Does not implicitly {@link proto.ServerErrorReceipt.verify|verify} messages. - * @function encode - * @memberof proto.ServerErrorReceipt - * @static - * @param {proto.IServerErrorReceipt} message ServerErrorReceipt message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServerErrorReceipt.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.stanzaId != null && Object.hasOwnProperty.call(message, "stanzaId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.stanzaId); - return writer; - }; - - /** - * Encodes the specified ServerErrorReceipt message, length delimited. Does not implicitly {@link proto.ServerErrorReceipt.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.ServerErrorReceipt - * @static - * @param {proto.IServerErrorReceipt} message ServerErrorReceipt message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServerErrorReceipt.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServerErrorReceipt message from the specified reader or buffer. - * @function decode - * @memberof proto.ServerErrorReceipt - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.ServerErrorReceipt} ServerErrorReceipt - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServerErrorReceipt.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ServerErrorReceipt(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.stanzaId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServerErrorReceipt message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.ServerErrorReceipt - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ServerErrorReceipt} ServerErrorReceipt - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServerErrorReceipt.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServerErrorReceipt message. - * @function verify - * @memberof proto.ServerErrorReceipt - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServerErrorReceipt.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) - if (!$util.isString(message.stanzaId)) - return "stanzaId: string expected"; - return null; - }; - - /** - * Creates a ServerErrorReceipt message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.ServerErrorReceipt - * @static - * @param {Object.} object Plain object - * @returns {proto.ServerErrorReceipt} ServerErrorReceipt - */ - ServerErrorReceipt.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ServerErrorReceipt) - return object; - var message = new $root.proto.ServerErrorReceipt(); - if (object.stanzaId != null) - message.stanzaId = String(object.stanzaId); - return message; - }; - - /** - * Creates a plain object from a ServerErrorReceipt message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.ServerErrorReceipt - * @static - * @param {proto.ServerErrorReceipt} message ServerErrorReceipt - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServerErrorReceipt.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.stanzaId = ""; - if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) - object.stanzaId = message.stanzaId; - return object; - }; - - /** - * Converts this ServerErrorReceipt to JSON. - * @function toJSON - * @memberof proto.ServerErrorReceipt - * @instance - * @returns {Object.} JSON object - */ - ServerErrorReceipt.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ServerErrorReceipt; - })(); - - proto.MessageKey = (function() { - - /** - * Properties of a MessageKey. - * @memberof proto - * @interface IMessageKey - * @property {string|null} [remoteJid] MessageKey remoteJid - * @property {boolean|null} [fromMe] MessageKey fromMe - * @property {string|null} [id] MessageKey id - * @property {string|null} [participant] MessageKey participant - */ - - /** - * Constructs a new MessageKey. - * @memberof proto - * @classdesc Represents a MessageKey. - * @implements IMessageKey - * @constructor - * @param {proto.IMessageKey=} [properties] Properties to set - */ - function MessageKey(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MessageKey remoteJid. - * @member {string} remoteJid - * @memberof proto.MessageKey - * @instance - */ - MessageKey.prototype.remoteJid = ""; - - /** - * MessageKey fromMe. - * @member {boolean} fromMe - * @memberof proto.MessageKey - * @instance - */ - MessageKey.prototype.fromMe = false; - - /** - * MessageKey id. - * @member {string} id - * @memberof proto.MessageKey - * @instance - */ - MessageKey.prototype.id = ""; - - /** - * MessageKey participant. - * @member {string} participant - * @memberof proto.MessageKey - * @instance - */ - MessageKey.prototype.participant = ""; - - /** - * Creates a new MessageKey instance using the specified properties. - * @function create - * @memberof proto.MessageKey - * @static - * @param {proto.IMessageKey=} [properties] Properties to set - * @returns {proto.MessageKey} MessageKey instance - */ - MessageKey.create = function create(properties) { - return new MessageKey(properties); - }; - - /** - * Encodes the specified MessageKey message. Does not implicitly {@link proto.MessageKey.verify|verify} messages. - * @function encode - * @memberof proto.MessageKey - * @static - * @param {proto.IMessageKey} message MessageKey message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageKey.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.remoteJid != null && Object.hasOwnProperty.call(message, "remoteJid")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.remoteJid); - if (message.fromMe != null && Object.hasOwnProperty.call(message, "fromMe")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fromMe); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.id); - if (message.participant != null && Object.hasOwnProperty.call(message, "participant")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.participant); - return writer; - }; - - /** - * Encodes the specified MessageKey message, length delimited. Does not implicitly {@link proto.MessageKey.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.MessageKey - * @static - * @param {proto.IMessageKey} message MessageKey message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageKey.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MessageKey message from the specified reader or buffer. - * @function decode - * @memberof proto.MessageKey - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.MessageKey} MessageKey - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageKey.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.MessageKey(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.remoteJid = reader.string(); - break; - case 2: - message.fromMe = reader.bool(); - break; - case 3: - message.id = reader.string(); - break; - case 4: - message.participant = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MessageKey message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.MessageKey - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.MessageKey} MessageKey - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageKey.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MessageKey message. - * @function verify - * @memberof proto.MessageKey - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MessageKey.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.remoteJid != null && message.hasOwnProperty("remoteJid")) - if (!$util.isString(message.remoteJid)) - return "remoteJid: string expected"; - if (message.fromMe != null && message.hasOwnProperty("fromMe")) - if (typeof message.fromMe !== "boolean") - return "fromMe: boolean expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.participant != null && message.hasOwnProperty("participant")) - if (!$util.isString(message.participant)) - return "participant: string expected"; - return null; - }; - - /** - * Creates a MessageKey message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.MessageKey - * @static - * @param {Object.} object Plain object - * @returns {proto.MessageKey} MessageKey - */ - MessageKey.fromObject = function fromObject(object) { - if (object instanceof $root.proto.MessageKey) - return object; - var message = new $root.proto.MessageKey(); - if (object.remoteJid != null) - message.remoteJid = String(object.remoteJid); - if (object.fromMe != null) - message.fromMe = Boolean(object.fromMe); - if (object.id != null) - message.id = String(object.id); - if (object.participant != null) - message.participant = String(object.participant); - return message; - }; - - /** - * Creates a plain object from a MessageKey message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.MessageKey - * @static - * @param {proto.MessageKey} message MessageKey - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MessageKey.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.remoteJid = ""; - object.fromMe = false; - object.id = ""; - object.participant = ""; - } - if (message.remoteJid != null && message.hasOwnProperty("remoteJid")) - object.remoteJid = message.remoteJid; - if (message.fromMe != null && message.hasOwnProperty("fromMe")) - object.fromMe = message.fromMe; - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.participant != null && message.hasOwnProperty("participant")) - object.participant = message.participant; - return object; - }; - - /** - * Converts this MessageKey to JSON. - * @function toJSON - * @memberof proto.MessageKey - * @instance - * @returns {Object.} JSON object - */ - MessageKey.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MessageKey; - })(); - - proto.ExitCode = (function() { - - /** - * Properties of an ExitCode. - * @memberof proto - * @interface IExitCode - * @property {number|Long|null} [code] ExitCode code - * @property {string|null} [text] ExitCode text - */ - - /** - * Constructs a new ExitCode. - * @memberof proto - * @classdesc Represents an ExitCode. - * @implements IExitCode - * @constructor - * @param {proto.IExitCode=} [properties] Properties to set - */ - function ExitCode(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExitCode code. - * @member {number|Long} code - * @memberof proto.ExitCode - * @instance - */ - ExitCode.prototype.code = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * ExitCode text. - * @member {string} text - * @memberof proto.ExitCode - * @instance - */ - ExitCode.prototype.text = ""; - - /** - * Creates a new ExitCode instance using the specified properties. - * @function create - * @memberof proto.ExitCode - * @static - * @param {proto.IExitCode=} [properties] Properties to set - * @returns {proto.ExitCode} ExitCode instance - */ - ExitCode.create = function create(properties) { - return new ExitCode(properties); - }; - - /** - * Encodes the specified ExitCode message. Does not implicitly {@link proto.ExitCode.verify|verify} messages. - * @function encode - * @memberof proto.ExitCode - * @static - * @param {proto.IExitCode} message ExitCode message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExitCode.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.code); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.text); - return writer; - }; - - /** - * Encodes the specified ExitCode message, length delimited. Does not implicitly {@link proto.ExitCode.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.ExitCode - * @static - * @param {proto.IExitCode} message ExitCode message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExitCode.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExitCode message from the specified reader or buffer. - * @function decode - * @memberof proto.ExitCode - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.ExitCode} ExitCode - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExitCode.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ExitCode(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.code = reader.uint64(); - break; - case 2: - message.text = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExitCode message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.ExitCode - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ExitCode} ExitCode - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExitCode.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExitCode message. - * @function verify - * @memberof proto.ExitCode - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExitCode.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.code != null && message.hasOwnProperty("code")) - if (!$util.isInteger(message.code) && !(message.code && $util.isInteger(message.code.low) && $util.isInteger(message.code.high))) - return "code: integer|Long expected"; - if (message.text != null && message.hasOwnProperty("text")) - if (!$util.isString(message.text)) - return "text: string expected"; - return null; - }; - - /** - * Creates an ExitCode message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.ExitCode - * @static - * @param {Object.} object Plain object - * @returns {proto.ExitCode} ExitCode - */ - ExitCode.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ExitCode) - return object; - var message = new $root.proto.ExitCode(); - if (object.code != null) - if ($util.Long) - (message.code = $util.Long.fromValue(object.code)).unsigned = true; - else if (typeof object.code === "string") - message.code = parseInt(object.code, 10); - else if (typeof object.code === "number") - message.code = object.code; - else if (typeof object.code === "object") - message.code = new $util.LongBits(object.code.low >>> 0, object.code.high >>> 0).toNumber(true); - if (object.text != null) - message.text = String(object.text); - return message; - }; - - /** - * Creates a plain object from an ExitCode message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.ExitCode - * @static - * @param {proto.ExitCode} message ExitCode - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExitCode.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; + object.messages = []; if (options.defaults) { if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.code = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, false); + object.lastMessageTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.code = options.longs === String ? "0" : 0; - object.text = ""; + object.lastMessageTimestamp = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.lastSystemMessageTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.lastSystemMessageTimestamp = options.longs === String ? "0" : 0; } - if (message.code != null && message.hasOwnProperty("code")) - if (typeof message.code === "number") - object.code = options.longs === String ? String(message.code) : message.code; + if (message.lastMessageTimestamp != null && message.hasOwnProperty("lastMessageTimestamp")) + if (typeof message.lastMessageTimestamp === "number") + object.lastMessageTimestamp = options.longs === String ? String(message.lastMessageTimestamp) : message.lastMessageTimestamp; else - object.code = options.longs === String ? $util.Long.prototype.toString.call(message.code) : options.longs === Number ? new $util.LongBits(message.code.low >>> 0, message.code.high >>> 0).toNumber(true) : message.code; - if (message.text != null && message.hasOwnProperty("text")) - object.text = message.text; + object.lastMessageTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.lastMessageTimestamp) : options.longs === Number ? new $util.LongBits(message.lastMessageTimestamp.low >>> 0, message.lastMessageTimestamp.high >>> 0).toNumber() : message.lastMessageTimestamp; + if (message.lastSystemMessageTimestamp != null && message.hasOwnProperty("lastSystemMessageTimestamp")) + if (typeof message.lastSystemMessageTimestamp === "number") + object.lastSystemMessageTimestamp = options.longs === String ? String(message.lastSystemMessageTimestamp) : message.lastSystemMessageTimestamp; + else + object.lastSystemMessageTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.lastSystemMessageTimestamp) : options.longs === Number ? new $util.LongBits(message.lastSystemMessageTimestamp.low >>> 0, message.lastSystemMessageTimestamp.high >>> 0).toNumber() : message.lastSystemMessageTimestamp; + if (message.messages && message.messages.length) { + object.messages = []; + for (var j = 0; j < message.messages.length; ++j) + object.messages[j] = $root.proto.SyncActionMessage.toObject(message.messages[j], options); + } return object; }; /** - * Converts this ExitCode to JSON. + * Converts this SyncActionMessageRange to JSON. * @function toJSON - * @memberof proto.ExitCode + * @memberof proto.SyncActionMessageRange * @instance * @returns {Object.} JSON object */ - ExitCode.prototype.toJSON = function toJSON() { + SyncActionMessageRange.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ExitCode; + return SyncActionMessageRange; })(); - proto.ExternalBlobReference = (function() { + proto.SyncActionValue = (function() { /** - * Properties of an ExternalBlobReference. + * Properties of a SyncActionValue. * @memberof proto - * @interface IExternalBlobReference - * @property {Uint8Array|null} [mediaKey] ExternalBlobReference mediaKey - * @property {string|null} [directPath] ExternalBlobReference directPath - * @property {string|null} [handle] ExternalBlobReference handle - * @property {number|Long|null} [fileSizeBytes] ExternalBlobReference fileSizeBytes - * @property {Uint8Array|null} [fileSha256] ExternalBlobReference fileSha256 - * @property {Uint8Array|null} [fileEncSha256] ExternalBlobReference fileEncSha256 + * @interface ISyncActionValue + * @property {number|Long|null} [timestamp] SyncActionValue timestamp + * @property {proto.IStarAction|null} [starAction] SyncActionValue starAction + * @property {proto.IContactAction|null} [contactAction] SyncActionValue contactAction + * @property {proto.IMuteAction|null} [muteAction] SyncActionValue muteAction + * @property {proto.IPinAction|null} [pinAction] SyncActionValue pinAction + * @property {proto.ISecurityNotificationSetting|null} [securityNotificationSetting] SyncActionValue securityNotificationSetting + * @property {proto.IPushNameSetting|null} [pushNameSetting] SyncActionValue pushNameSetting + * @property {proto.IQuickReplyAction|null} [quickReplyAction] SyncActionValue quickReplyAction + * @property {proto.IRecentStickerWeightsAction|null} [recentStickerWeightsAction] SyncActionValue recentStickerWeightsAction + * @property {proto.IRecentStickerMetadata|null} [recentStickerMetadata] SyncActionValue recentStickerMetadata + * @property {proto.IRecentEmojiWeightsAction|null} [recentEmojiWeightsAction] SyncActionValue recentEmojiWeightsAction + * @property {proto.ILabelEditAction|null} [labelEditAction] SyncActionValue labelEditAction + * @property {proto.ILabelAssociationAction|null} [labelAssociationAction] SyncActionValue labelAssociationAction + * @property {proto.ILocaleSetting|null} [localeSetting] SyncActionValue localeSetting + * @property {proto.IArchiveChatAction|null} [archiveChatAction] SyncActionValue archiveChatAction + * @property {proto.IDeleteMessageForMeAction|null} [deleteMessageForMeAction] SyncActionValue deleteMessageForMeAction + * @property {proto.IKeyExpiration|null} [keyExpiration] SyncActionValue keyExpiration + * @property {proto.IMarkChatAsReadAction|null} [markChatAsReadAction] SyncActionValue markChatAsReadAction + * @property {proto.IClearChatAction|null} [clearChatAction] SyncActionValue clearChatAction + * @property {proto.IDeleteChatAction|null} [deleteChatAction] SyncActionValue deleteChatAction + * @property {proto.IUnarchiveChatsSetting|null} [unarchiveChatsSetting] SyncActionValue unarchiveChatsSetting + * @property {proto.IPrimaryFeature|null} [primaryFeature] SyncActionValue primaryFeature + * @property {proto.IFavoriteStickerAction|null} [favoriteStickerAction] SyncActionValue favoriteStickerAction + * @property {proto.IAndroidUnsupportedActions|null} [androidUnsupportedActions] SyncActionValue androidUnsupportedActions + * @property {proto.IAgentAction|null} [agentAction] SyncActionValue agentAction + * @property {proto.ISubscriptionAction|null} [subscriptionAction] SyncActionValue subscriptionAction + * @property {proto.IUserStatusMuteAction|null} [userStatusMuteAction] SyncActionValue userStatusMuteAction + * @property {proto.ITimeFormatAction|null} [timeFormatAction] SyncActionValue timeFormatAction */ /** - * Constructs a new ExternalBlobReference. + * Constructs a new SyncActionValue. * @memberof proto - * @classdesc Represents an ExternalBlobReference. - * @implements IExternalBlobReference + * @classdesc Represents a SyncActionValue. + * @implements ISyncActionValue * @constructor - * @param {proto.IExternalBlobReference=} [properties] Properties to set + * @param {proto.ISyncActionValue=} [properties] Properties to set */ - function ExternalBlobReference(properties) { + function SyncActionValue(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39424,140 +57069,426 @@ $root.proto = (function() { } /** - * ExternalBlobReference mediaKey. - * @member {Uint8Array} mediaKey - * @memberof proto.ExternalBlobReference + * SyncActionValue timestamp. + * @member {number|Long} timestamp + * @memberof proto.SyncActionValue * @instance */ - ExternalBlobReference.prototype.mediaKey = $util.newBuffer([]); + SyncActionValue.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * ExternalBlobReference directPath. - * @member {string} directPath - * @memberof proto.ExternalBlobReference + * SyncActionValue starAction. + * @member {proto.IStarAction|null|undefined} starAction + * @memberof proto.SyncActionValue * @instance */ - ExternalBlobReference.prototype.directPath = ""; + SyncActionValue.prototype.starAction = null; /** - * ExternalBlobReference handle. - * @member {string} handle - * @memberof proto.ExternalBlobReference + * SyncActionValue contactAction. + * @member {proto.IContactAction|null|undefined} contactAction + * @memberof proto.SyncActionValue * @instance */ - ExternalBlobReference.prototype.handle = ""; + SyncActionValue.prototype.contactAction = null; /** - * ExternalBlobReference fileSizeBytes. - * @member {number|Long} fileSizeBytes - * @memberof proto.ExternalBlobReference + * SyncActionValue muteAction. + * @member {proto.IMuteAction|null|undefined} muteAction + * @memberof proto.SyncActionValue * @instance */ - ExternalBlobReference.prototype.fileSizeBytes = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + SyncActionValue.prototype.muteAction = null; /** - * ExternalBlobReference fileSha256. - * @member {Uint8Array} fileSha256 - * @memberof proto.ExternalBlobReference + * SyncActionValue pinAction. + * @member {proto.IPinAction|null|undefined} pinAction + * @memberof proto.SyncActionValue * @instance */ - ExternalBlobReference.prototype.fileSha256 = $util.newBuffer([]); + SyncActionValue.prototype.pinAction = null; /** - * ExternalBlobReference fileEncSha256. - * @member {Uint8Array} fileEncSha256 - * @memberof proto.ExternalBlobReference + * SyncActionValue securityNotificationSetting. + * @member {proto.ISecurityNotificationSetting|null|undefined} securityNotificationSetting + * @memberof proto.SyncActionValue * @instance */ - ExternalBlobReference.prototype.fileEncSha256 = $util.newBuffer([]); + SyncActionValue.prototype.securityNotificationSetting = null; /** - * Creates a new ExternalBlobReference instance using the specified properties. + * SyncActionValue pushNameSetting. + * @member {proto.IPushNameSetting|null|undefined} pushNameSetting + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.pushNameSetting = null; + + /** + * SyncActionValue quickReplyAction. + * @member {proto.IQuickReplyAction|null|undefined} quickReplyAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.quickReplyAction = null; + + /** + * SyncActionValue recentStickerWeightsAction. + * @member {proto.IRecentStickerWeightsAction|null|undefined} recentStickerWeightsAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.recentStickerWeightsAction = null; + + /** + * SyncActionValue recentStickerMetadata. + * @member {proto.IRecentStickerMetadata|null|undefined} recentStickerMetadata + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.recentStickerMetadata = null; + + /** + * SyncActionValue recentEmojiWeightsAction. + * @member {proto.IRecentEmojiWeightsAction|null|undefined} recentEmojiWeightsAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.recentEmojiWeightsAction = null; + + /** + * SyncActionValue labelEditAction. + * @member {proto.ILabelEditAction|null|undefined} labelEditAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.labelEditAction = null; + + /** + * SyncActionValue labelAssociationAction. + * @member {proto.ILabelAssociationAction|null|undefined} labelAssociationAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.labelAssociationAction = null; + + /** + * SyncActionValue localeSetting. + * @member {proto.ILocaleSetting|null|undefined} localeSetting + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.localeSetting = null; + + /** + * SyncActionValue archiveChatAction. + * @member {proto.IArchiveChatAction|null|undefined} archiveChatAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.archiveChatAction = null; + + /** + * SyncActionValue deleteMessageForMeAction. + * @member {proto.IDeleteMessageForMeAction|null|undefined} deleteMessageForMeAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.deleteMessageForMeAction = null; + + /** + * SyncActionValue keyExpiration. + * @member {proto.IKeyExpiration|null|undefined} keyExpiration + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.keyExpiration = null; + + /** + * SyncActionValue markChatAsReadAction. + * @member {proto.IMarkChatAsReadAction|null|undefined} markChatAsReadAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.markChatAsReadAction = null; + + /** + * SyncActionValue clearChatAction. + * @member {proto.IClearChatAction|null|undefined} clearChatAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.clearChatAction = null; + + /** + * SyncActionValue deleteChatAction. + * @member {proto.IDeleteChatAction|null|undefined} deleteChatAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.deleteChatAction = null; + + /** + * SyncActionValue unarchiveChatsSetting. + * @member {proto.IUnarchiveChatsSetting|null|undefined} unarchiveChatsSetting + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.unarchiveChatsSetting = null; + + /** + * SyncActionValue primaryFeature. + * @member {proto.IPrimaryFeature|null|undefined} primaryFeature + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.primaryFeature = null; + + /** + * SyncActionValue favoriteStickerAction. + * @member {proto.IFavoriteStickerAction|null|undefined} favoriteStickerAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.favoriteStickerAction = null; + + /** + * SyncActionValue androidUnsupportedActions. + * @member {proto.IAndroidUnsupportedActions|null|undefined} androidUnsupportedActions + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.androidUnsupportedActions = null; + + /** + * SyncActionValue agentAction. + * @member {proto.IAgentAction|null|undefined} agentAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.agentAction = null; + + /** + * SyncActionValue subscriptionAction. + * @member {proto.ISubscriptionAction|null|undefined} subscriptionAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.subscriptionAction = null; + + /** + * SyncActionValue userStatusMuteAction. + * @member {proto.IUserStatusMuteAction|null|undefined} userStatusMuteAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.userStatusMuteAction = null; + + /** + * SyncActionValue timeFormatAction. + * @member {proto.ITimeFormatAction|null|undefined} timeFormatAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.timeFormatAction = null; + + /** + * Creates a new SyncActionValue instance using the specified properties. * @function create - * @memberof proto.ExternalBlobReference + * @memberof proto.SyncActionValue * @static - * @param {proto.IExternalBlobReference=} [properties] Properties to set - * @returns {proto.ExternalBlobReference} ExternalBlobReference instance + * @param {proto.ISyncActionValue=} [properties] Properties to set + * @returns {proto.SyncActionValue} SyncActionValue instance */ - ExternalBlobReference.create = function create(properties) { - return new ExternalBlobReference(properties); + SyncActionValue.create = function create(properties) { + return new SyncActionValue(properties); }; /** - * Encodes the specified ExternalBlobReference message. Does not implicitly {@link proto.ExternalBlobReference.verify|verify} messages. + * Encodes the specified SyncActionValue message. Does not implicitly {@link proto.SyncActionValue.verify|verify} messages. * @function encode - * @memberof proto.ExternalBlobReference + * @memberof proto.SyncActionValue * @static - * @param {proto.IExternalBlobReference} message ExternalBlobReference message or plain object to encode + * @param {proto.ISyncActionValue} message SyncActionValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExternalBlobReference.encode = function encode(message, writer) { + SyncActionValue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.mediaKey); - if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.directPath); - if (message.handle != null && Object.hasOwnProperty.call(message, "handle")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.handle); - if (message.fileSizeBytes != null && Object.hasOwnProperty.call(message, "fileSizeBytes")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.fileSizeBytes); - if (message.fileSha256 != null && Object.hasOwnProperty.call(message, "fileSha256")) - writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.fileSha256); - if (message.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256")) - writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.fileEncSha256); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.timestamp); + if (message.starAction != null && Object.hasOwnProperty.call(message, "starAction")) + $root.proto.StarAction.encode(message.starAction, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.contactAction != null && Object.hasOwnProperty.call(message, "contactAction")) + $root.proto.ContactAction.encode(message.contactAction, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.muteAction != null && Object.hasOwnProperty.call(message, "muteAction")) + $root.proto.MuteAction.encode(message.muteAction, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.pinAction != null && Object.hasOwnProperty.call(message, "pinAction")) + $root.proto.PinAction.encode(message.pinAction, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.securityNotificationSetting != null && Object.hasOwnProperty.call(message, "securityNotificationSetting")) + $root.proto.SecurityNotificationSetting.encode(message.securityNotificationSetting, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.pushNameSetting != null && Object.hasOwnProperty.call(message, "pushNameSetting")) + $root.proto.PushNameSetting.encode(message.pushNameSetting, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.quickReplyAction != null && Object.hasOwnProperty.call(message, "quickReplyAction")) + $root.proto.QuickReplyAction.encode(message.quickReplyAction, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.recentStickerWeightsAction != null && Object.hasOwnProperty.call(message, "recentStickerWeightsAction")) + $root.proto.RecentStickerWeightsAction.encode(message.recentStickerWeightsAction, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.recentStickerMetadata != null && Object.hasOwnProperty.call(message, "recentStickerMetadata")) + $root.proto.RecentStickerMetadata.encode(message.recentStickerMetadata, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.recentEmojiWeightsAction != null && Object.hasOwnProperty.call(message, "recentEmojiWeightsAction")) + $root.proto.RecentEmojiWeightsAction.encode(message.recentEmojiWeightsAction, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.labelEditAction != null && Object.hasOwnProperty.call(message, "labelEditAction")) + $root.proto.LabelEditAction.encode(message.labelEditAction, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.labelAssociationAction != null && Object.hasOwnProperty.call(message, "labelAssociationAction")) + $root.proto.LabelAssociationAction.encode(message.labelAssociationAction, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.localeSetting != null && Object.hasOwnProperty.call(message, "localeSetting")) + $root.proto.LocaleSetting.encode(message.localeSetting, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.archiveChatAction != null && Object.hasOwnProperty.call(message, "archiveChatAction")) + $root.proto.ArchiveChatAction.encode(message.archiveChatAction, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.deleteMessageForMeAction != null && Object.hasOwnProperty.call(message, "deleteMessageForMeAction")) + $root.proto.DeleteMessageForMeAction.encode(message.deleteMessageForMeAction, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.keyExpiration != null && Object.hasOwnProperty.call(message, "keyExpiration")) + $root.proto.KeyExpiration.encode(message.keyExpiration, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.markChatAsReadAction != null && Object.hasOwnProperty.call(message, "markChatAsReadAction")) + $root.proto.MarkChatAsReadAction.encode(message.markChatAsReadAction, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.clearChatAction != null && Object.hasOwnProperty.call(message, "clearChatAction")) + $root.proto.ClearChatAction.encode(message.clearChatAction, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.deleteChatAction != null && Object.hasOwnProperty.call(message, "deleteChatAction")) + $root.proto.DeleteChatAction.encode(message.deleteChatAction, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.unarchiveChatsSetting != null && Object.hasOwnProperty.call(message, "unarchiveChatsSetting")) + $root.proto.UnarchiveChatsSetting.encode(message.unarchiveChatsSetting, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.primaryFeature != null && Object.hasOwnProperty.call(message, "primaryFeature")) + $root.proto.PrimaryFeature.encode(message.primaryFeature, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.favoriteStickerAction != null && Object.hasOwnProperty.call(message, "favoriteStickerAction")) + $root.proto.FavoriteStickerAction.encode(message.favoriteStickerAction, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.androidUnsupportedActions != null && Object.hasOwnProperty.call(message, "androidUnsupportedActions")) + $root.proto.AndroidUnsupportedActions.encode(message.androidUnsupportedActions, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.agentAction != null && Object.hasOwnProperty.call(message, "agentAction")) + $root.proto.AgentAction.encode(message.agentAction, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.subscriptionAction != null && Object.hasOwnProperty.call(message, "subscriptionAction")) + $root.proto.SubscriptionAction.encode(message.subscriptionAction, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + if (message.userStatusMuteAction != null && Object.hasOwnProperty.call(message, "userStatusMuteAction")) + $root.proto.UserStatusMuteAction.encode(message.userStatusMuteAction, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); + if (message.timeFormatAction != null && Object.hasOwnProperty.call(message, "timeFormatAction")) + $root.proto.TimeFormatAction.encode(message.timeFormatAction, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); return writer; }; /** - * Encodes the specified ExternalBlobReference message, length delimited. Does not implicitly {@link proto.ExternalBlobReference.verify|verify} messages. + * Encodes the specified SyncActionValue message, length delimited. Does not implicitly {@link proto.SyncActionValue.verify|verify} messages. * @function encodeDelimited - * @memberof proto.ExternalBlobReference + * @memberof proto.SyncActionValue * @static - * @param {proto.IExternalBlobReference} message ExternalBlobReference message or plain object to encode + * @param {proto.ISyncActionValue} message SyncActionValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExternalBlobReference.encodeDelimited = function encodeDelimited(message, writer) { + SyncActionValue.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExternalBlobReference message from the specified reader or buffer. + * Decodes a SyncActionValue message from the specified reader or buffer. * @function decode - * @memberof proto.ExternalBlobReference + * @memberof proto.SyncActionValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.ExternalBlobReference} ExternalBlobReference + * @returns {proto.SyncActionValue} SyncActionValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExternalBlobReference.decode = function decode(reader, length) { + SyncActionValue.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ExternalBlobReference(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.SyncActionValue(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.mediaKey = reader.bytes(); + message.timestamp = reader.int64(); break; case 2: - message.directPath = reader.string(); + message.starAction = $root.proto.StarAction.decode(reader, reader.uint32()); break; case 3: - message.handle = reader.string(); + message.contactAction = $root.proto.ContactAction.decode(reader, reader.uint32()); break; case 4: - message.fileSizeBytes = reader.uint64(); + message.muteAction = $root.proto.MuteAction.decode(reader, reader.uint32()); break; case 5: - message.fileSha256 = reader.bytes(); + message.pinAction = $root.proto.PinAction.decode(reader, reader.uint32()); break; case 6: - message.fileEncSha256 = reader.bytes(); + message.securityNotificationSetting = $root.proto.SecurityNotificationSetting.decode(reader, reader.uint32()); + break; + case 7: + message.pushNameSetting = $root.proto.PushNameSetting.decode(reader, reader.uint32()); + break; + case 8: + message.quickReplyAction = $root.proto.QuickReplyAction.decode(reader, reader.uint32()); + break; + case 9: + message.recentStickerWeightsAction = $root.proto.RecentStickerWeightsAction.decode(reader, reader.uint32()); + break; + case 10: + message.recentStickerMetadata = $root.proto.RecentStickerMetadata.decode(reader, reader.uint32()); + break; + case 11: + message.recentEmojiWeightsAction = $root.proto.RecentEmojiWeightsAction.decode(reader, reader.uint32()); + break; + case 14: + message.labelEditAction = $root.proto.LabelEditAction.decode(reader, reader.uint32()); + break; + case 15: + message.labelAssociationAction = $root.proto.LabelAssociationAction.decode(reader, reader.uint32()); + break; + case 16: + message.localeSetting = $root.proto.LocaleSetting.decode(reader, reader.uint32()); + break; + case 17: + message.archiveChatAction = $root.proto.ArchiveChatAction.decode(reader, reader.uint32()); + break; + case 18: + message.deleteMessageForMeAction = $root.proto.DeleteMessageForMeAction.decode(reader, reader.uint32()); + break; + case 19: + message.keyExpiration = $root.proto.KeyExpiration.decode(reader, reader.uint32()); + break; + case 20: + message.markChatAsReadAction = $root.proto.MarkChatAsReadAction.decode(reader, reader.uint32()); + break; + case 21: + message.clearChatAction = $root.proto.ClearChatAction.decode(reader, reader.uint32()); + break; + case 22: + message.deleteChatAction = $root.proto.DeleteChatAction.decode(reader, reader.uint32()); + break; + case 23: + message.unarchiveChatsSetting = $root.proto.UnarchiveChatsSetting.decode(reader, reader.uint32()); + break; + case 24: + message.primaryFeature = $root.proto.PrimaryFeature.decode(reader, reader.uint32()); + break; + case 25: + message.favoriteStickerAction = $root.proto.FavoriteStickerAction.decode(reader, reader.uint32()); + break; + case 26: + message.androidUnsupportedActions = $root.proto.AndroidUnsupportedActions.decode(reader, reader.uint32()); + break; + case 27: + message.agentAction = $root.proto.AgentAction.decode(reader, reader.uint32()); + break; + case 28: + message.subscriptionAction = $root.proto.SubscriptionAction.decode(reader, reader.uint32()); + break; + case 29: + message.userStatusMuteAction = $root.proto.UserStatusMuteAction.decode(reader, reader.uint32()); + break; + case 30: + message.timeFormatAction = $root.proto.TimeFormatAction.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -39568,365 +57499,453 @@ $root.proto = (function() { }; /** - * Decodes an ExternalBlobReference message from the specified reader or buffer, length delimited. + * Decodes a SyncActionValue message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.ExternalBlobReference + * @memberof proto.SyncActionValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ExternalBlobReference} ExternalBlobReference + * @returns {proto.SyncActionValue} SyncActionValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExternalBlobReference.decodeDelimited = function decodeDelimited(reader) { + SyncActionValue.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExternalBlobReference message. + * Verifies a SyncActionValue message. * @function verify - * @memberof proto.ExternalBlobReference + * @memberof proto.SyncActionValue * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExternalBlobReference.verify = function verify(message) { + SyncActionValue.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) - if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey))) - return "mediaKey: buffer expected"; - if (message.directPath != null && message.hasOwnProperty("directPath")) - if (!$util.isString(message.directPath)) - return "directPath: string expected"; - if (message.handle != null && message.hasOwnProperty("handle")) - if (!$util.isString(message.handle)) - return "handle: string expected"; - if (message.fileSizeBytes != null && message.hasOwnProperty("fileSizeBytes")) - if (!$util.isInteger(message.fileSizeBytes) && !(message.fileSizeBytes && $util.isInteger(message.fileSizeBytes.low) && $util.isInteger(message.fileSizeBytes.high))) - return "fileSizeBytes: integer|Long expected"; - if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) - if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256))) - return "fileSha256: buffer expected"; - if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) - if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256))) - return "fileEncSha256: buffer expected"; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) + return "timestamp: integer|Long expected"; + if (message.starAction != null && message.hasOwnProperty("starAction")) { + var error = $root.proto.StarAction.verify(message.starAction); + if (error) + return "starAction." + error; + } + if (message.contactAction != null && message.hasOwnProperty("contactAction")) { + var error = $root.proto.ContactAction.verify(message.contactAction); + if (error) + return "contactAction." + error; + } + if (message.muteAction != null && message.hasOwnProperty("muteAction")) { + var error = $root.proto.MuteAction.verify(message.muteAction); + if (error) + return "muteAction." + error; + } + if (message.pinAction != null && message.hasOwnProperty("pinAction")) { + var error = $root.proto.PinAction.verify(message.pinAction); + if (error) + return "pinAction." + error; + } + if (message.securityNotificationSetting != null && message.hasOwnProperty("securityNotificationSetting")) { + var error = $root.proto.SecurityNotificationSetting.verify(message.securityNotificationSetting); + if (error) + return "securityNotificationSetting." + error; + } + if (message.pushNameSetting != null && message.hasOwnProperty("pushNameSetting")) { + var error = $root.proto.PushNameSetting.verify(message.pushNameSetting); + if (error) + return "pushNameSetting." + error; + } + if (message.quickReplyAction != null && message.hasOwnProperty("quickReplyAction")) { + var error = $root.proto.QuickReplyAction.verify(message.quickReplyAction); + if (error) + return "quickReplyAction." + error; + } + if (message.recentStickerWeightsAction != null && message.hasOwnProperty("recentStickerWeightsAction")) { + var error = $root.proto.RecentStickerWeightsAction.verify(message.recentStickerWeightsAction); + if (error) + return "recentStickerWeightsAction." + error; + } + if (message.recentStickerMetadata != null && message.hasOwnProperty("recentStickerMetadata")) { + var error = $root.proto.RecentStickerMetadata.verify(message.recentStickerMetadata); + if (error) + return "recentStickerMetadata." + error; + } + if (message.recentEmojiWeightsAction != null && message.hasOwnProperty("recentEmojiWeightsAction")) { + var error = $root.proto.RecentEmojiWeightsAction.verify(message.recentEmojiWeightsAction); + if (error) + return "recentEmojiWeightsAction." + error; + } + if (message.labelEditAction != null && message.hasOwnProperty("labelEditAction")) { + var error = $root.proto.LabelEditAction.verify(message.labelEditAction); + if (error) + return "labelEditAction." + error; + } + if (message.labelAssociationAction != null && message.hasOwnProperty("labelAssociationAction")) { + var error = $root.proto.LabelAssociationAction.verify(message.labelAssociationAction); + if (error) + return "labelAssociationAction." + error; + } + if (message.localeSetting != null && message.hasOwnProperty("localeSetting")) { + var error = $root.proto.LocaleSetting.verify(message.localeSetting); + if (error) + return "localeSetting." + error; + } + if (message.archiveChatAction != null && message.hasOwnProperty("archiveChatAction")) { + var error = $root.proto.ArchiveChatAction.verify(message.archiveChatAction); + if (error) + return "archiveChatAction." + error; + } + if (message.deleteMessageForMeAction != null && message.hasOwnProperty("deleteMessageForMeAction")) { + var error = $root.proto.DeleteMessageForMeAction.verify(message.deleteMessageForMeAction); + if (error) + return "deleteMessageForMeAction." + error; + } + if (message.keyExpiration != null && message.hasOwnProperty("keyExpiration")) { + var error = $root.proto.KeyExpiration.verify(message.keyExpiration); + if (error) + return "keyExpiration." + error; + } + if (message.markChatAsReadAction != null && message.hasOwnProperty("markChatAsReadAction")) { + var error = $root.proto.MarkChatAsReadAction.verify(message.markChatAsReadAction); + if (error) + return "markChatAsReadAction." + error; + } + if (message.clearChatAction != null && message.hasOwnProperty("clearChatAction")) { + var error = $root.proto.ClearChatAction.verify(message.clearChatAction); + if (error) + return "clearChatAction." + error; + } + if (message.deleteChatAction != null && message.hasOwnProperty("deleteChatAction")) { + var error = $root.proto.DeleteChatAction.verify(message.deleteChatAction); + if (error) + return "deleteChatAction." + error; + } + if (message.unarchiveChatsSetting != null && message.hasOwnProperty("unarchiveChatsSetting")) { + var error = $root.proto.UnarchiveChatsSetting.verify(message.unarchiveChatsSetting); + if (error) + return "unarchiveChatsSetting." + error; + } + if (message.primaryFeature != null && message.hasOwnProperty("primaryFeature")) { + var error = $root.proto.PrimaryFeature.verify(message.primaryFeature); + if (error) + return "primaryFeature." + error; + } + if (message.favoriteStickerAction != null && message.hasOwnProperty("favoriteStickerAction")) { + var error = $root.proto.FavoriteStickerAction.verify(message.favoriteStickerAction); + if (error) + return "favoriteStickerAction." + error; + } + if (message.androidUnsupportedActions != null && message.hasOwnProperty("androidUnsupportedActions")) { + var error = $root.proto.AndroidUnsupportedActions.verify(message.androidUnsupportedActions); + if (error) + return "androidUnsupportedActions." + error; + } + if (message.agentAction != null && message.hasOwnProperty("agentAction")) { + var error = $root.proto.AgentAction.verify(message.agentAction); + if (error) + return "agentAction." + error; + } + if (message.subscriptionAction != null && message.hasOwnProperty("subscriptionAction")) { + var error = $root.proto.SubscriptionAction.verify(message.subscriptionAction); + if (error) + return "subscriptionAction." + error; + } + if (message.userStatusMuteAction != null && message.hasOwnProperty("userStatusMuteAction")) { + var error = $root.proto.UserStatusMuteAction.verify(message.userStatusMuteAction); + if (error) + return "userStatusMuteAction." + error; + } + if (message.timeFormatAction != null && message.hasOwnProperty("timeFormatAction")) { + var error = $root.proto.TimeFormatAction.verify(message.timeFormatAction); + if (error) + return "timeFormatAction." + error; + } return null; }; /** - * Creates an ExternalBlobReference message from a plain object. Also converts values to their respective internal types. + * Creates a SyncActionValue message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.ExternalBlobReference + * @memberof proto.SyncActionValue * @static * @param {Object.} object Plain object - * @returns {proto.ExternalBlobReference} ExternalBlobReference + * @returns {proto.SyncActionValue} SyncActionValue */ - ExternalBlobReference.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ExternalBlobReference) + SyncActionValue.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue) return object; - var message = new $root.proto.ExternalBlobReference(); - if (object.mediaKey != null) - if (typeof object.mediaKey === "string") - $util.base64.decode(object.mediaKey, message.mediaKey = $util.newBuffer($util.base64.length(object.mediaKey)), 0); - else if (object.mediaKey.length) - message.mediaKey = object.mediaKey; - if (object.directPath != null) - message.directPath = String(object.directPath); - if (object.handle != null) - message.handle = String(object.handle); - if (object.fileSizeBytes != null) + var message = new $root.proto.SyncActionValue(); + if (object.timestamp != null) if ($util.Long) - (message.fileSizeBytes = $util.Long.fromValue(object.fileSizeBytes)).unsigned = true; - else if (typeof object.fileSizeBytes === "string") - message.fileSizeBytes = parseInt(object.fileSizeBytes, 10); - else if (typeof object.fileSizeBytes === "number") - message.fileSizeBytes = object.fileSizeBytes; - else if (typeof object.fileSizeBytes === "object") - message.fileSizeBytes = new $util.LongBits(object.fileSizeBytes.low >>> 0, object.fileSizeBytes.high >>> 0).toNumber(true); - if (object.fileSha256 != null) - if (typeof object.fileSha256 === "string") - $util.base64.decode(object.fileSha256, message.fileSha256 = $util.newBuffer($util.base64.length(object.fileSha256)), 0); - else if (object.fileSha256.length) - message.fileSha256 = object.fileSha256; - if (object.fileEncSha256 != null) - if (typeof object.fileEncSha256 === "string") - $util.base64.decode(object.fileEncSha256, message.fileEncSha256 = $util.newBuffer($util.base64.length(object.fileEncSha256)), 0); - else if (object.fileEncSha256.length) - message.fileEncSha256 = object.fileEncSha256; + (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = false; + else if (typeof object.timestamp === "string") + message.timestamp = parseInt(object.timestamp, 10); + else if (typeof object.timestamp === "number") + message.timestamp = object.timestamp; + else if (typeof object.timestamp === "object") + message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(); + if (object.starAction != null) { + if (typeof object.starAction !== "object") + throw TypeError(".proto.SyncActionValue.starAction: object expected"); + message.starAction = $root.proto.StarAction.fromObject(object.starAction); + } + if (object.contactAction != null) { + if (typeof object.contactAction !== "object") + throw TypeError(".proto.SyncActionValue.contactAction: object expected"); + message.contactAction = $root.proto.ContactAction.fromObject(object.contactAction); + } + if (object.muteAction != null) { + if (typeof object.muteAction !== "object") + throw TypeError(".proto.SyncActionValue.muteAction: object expected"); + message.muteAction = $root.proto.MuteAction.fromObject(object.muteAction); + } + if (object.pinAction != null) { + if (typeof object.pinAction !== "object") + throw TypeError(".proto.SyncActionValue.pinAction: object expected"); + message.pinAction = $root.proto.PinAction.fromObject(object.pinAction); + } + if (object.securityNotificationSetting != null) { + if (typeof object.securityNotificationSetting !== "object") + throw TypeError(".proto.SyncActionValue.securityNotificationSetting: object expected"); + message.securityNotificationSetting = $root.proto.SecurityNotificationSetting.fromObject(object.securityNotificationSetting); + } + if (object.pushNameSetting != null) { + if (typeof object.pushNameSetting !== "object") + throw TypeError(".proto.SyncActionValue.pushNameSetting: object expected"); + message.pushNameSetting = $root.proto.PushNameSetting.fromObject(object.pushNameSetting); + } + if (object.quickReplyAction != null) { + if (typeof object.quickReplyAction !== "object") + throw TypeError(".proto.SyncActionValue.quickReplyAction: object expected"); + message.quickReplyAction = $root.proto.QuickReplyAction.fromObject(object.quickReplyAction); + } + if (object.recentStickerWeightsAction != null) { + if (typeof object.recentStickerWeightsAction !== "object") + throw TypeError(".proto.SyncActionValue.recentStickerWeightsAction: object expected"); + message.recentStickerWeightsAction = $root.proto.RecentStickerWeightsAction.fromObject(object.recentStickerWeightsAction); + } + if (object.recentStickerMetadata != null) { + if (typeof object.recentStickerMetadata !== "object") + throw TypeError(".proto.SyncActionValue.recentStickerMetadata: object expected"); + message.recentStickerMetadata = $root.proto.RecentStickerMetadata.fromObject(object.recentStickerMetadata); + } + if (object.recentEmojiWeightsAction != null) { + if (typeof object.recentEmojiWeightsAction !== "object") + throw TypeError(".proto.SyncActionValue.recentEmojiWeightsAction: object expected"); + message.recentEmojiWeightsAction = $root.proto.RecentEmojiWeightsAction.fromObject(object.recentEmojiWeightsAction); + } + if (object.labelEditAction != null) { + if (typeof object.labelEditAction !== "object") + throw TypeError(".proto.SyncActionValue.labelEditAction: object expected"); + message.labelEditAction = $root.proto.LabelEditAction.fromObject(object.labelEditAction); + } + if (object.labelAssociationAction != null) { + if (typeof object.labelAssociationAction !== "object") + throw TypeError(".proto.SyncActionValue.labelAssociationAction: object expected"); + message.labelAssociationAction = $root.proto.LabelAssociationAction.fromObject(object.labelAssociationAction); + } + if (object.localeSetting != null) { + if (typeof object.localeSetting !== "object") + throw TypeError(".proto.SyncActionValue.localeSetting: object expected"); + message.localeSetting = $root.proto.LocaleSetting.fromObject(object.localeSetting); + } + if (object.archiveChatAction != null) { + if (typeof object.archiveChatAction !== "object") + throw TypeError(".proto.SyncActionValue.archiveChatAction: object expected"); + message.archiveChatAction = $root.proto.ArchiveChatAction.fromObject(object.archiveChatAction); + } + if (object.deleteMessageForMeAction != null) { + if (typeof object.deleteMessageForMeAction !== "object") + throw TypeError(".proto.SyncActionValue.deleteMessageForMeAction: object expected"); + message.deleteMessageForMeAction = $root.proto.DeleteMessageForMeAction.fromObject(object.deleteMessageForMeAction); + } + if (object.keyExpiration != null) { + if (typeof object.keyExpiration !== "object") + throw TypeError(".proto.SyncActionValue.keyExpiration: object expected"); + message.keyExpiration = $root.proto.KeyExpiration.fromObject(object.keyExpiration); + } + if (object.markChatAsReadAction != null) { + if (typeof object.markChatAsReadAction !== "object") + throw TypeError(".proto.SyncActionValue.markChatAsReadAction: object expected"); + message.markChatAsReadAction = $root.proto.MarkChatAsReadAction.fromObject(object.markChatAsReadAction); + } + if (object.clearChatAction != null) { + if (typeof object.clearChatAction !== "object") + throw TypeError(".proto.SyncActionValue.clearChatAction: object expected"); + message.clearChatAction = $root.proto.ClearChatAction.fromObject(object.clearChatAction); + } + if (object.deleteChatAction != null) { + if (typeof object.deleteChatAction !== "object") + throw TypeError(".proto.SyncActionValue.deleteChatAction: object expected"); + message.deleteChatAction = $root.proto.DeleteChatAction.fromObject(object.deleteChatAction); + } + if (object.unarchiveChatsSetting != null) { + if (typeof object.unarchiveChatsSetting !== "object") + throw TypeError(".proto.SyncActionValue.unarchiveChatsSetting: object expected"); + message.unarchiveChatsSetting = $root.proto.UnarchiveChatsSetting.fromObject(object.unarchiveChatsSetting); + } + if (object.primaryFeature != null) { + if (typeof object.primaryFeature !== "object") + throw TypeError(".proto.SyncActionValue.primaryFeature: object expected"); + message.primaryFeature = $root.proto.PrimaryFeature.fromObject(object.primaryFeature); + } + if (object.favoriteStickerAction != null) { + if (typeof object.favoriteStickerAction !== "object") + throw TypeError(".proto.SyncActionValue.favoriteStickerAction: object expected"); + message.favoriteStickerAction = $root.proto.FavoriteStickerAction.fromObject(object.favoriteStickerAction); + } + if (object.androidUnsupportedActions != null) { + if (typeof object.androidUnsupportedActions !== "object") + throw TypeError(".proto.SyncActionValue.androidUnsupportedActions: object expected"); + message.androidUnsupportedActions = $root.proto.AndroidUnsupportedActions.fromObject(object.androidUnsupportedActions); + } + if (object.agentAction != null) { + if (typeof object.agentAction !== "object") + throw TypeError(".proto.SyncActionValue.agentAction: object expected"); + message.agentAction = $root.proto.AgentAction.fromObject(object.agentAction); + } + if (object.subscriptionAction != null) { + if (typeof object.subscriptionAction !== "object") + throw TypeError(".proto.SyncActionValue.subscriptionAction: object expected"); + message.subscriptionAction = $root.proto.SubscriptionAction.fromObject(object.subscriptionAction); + } + if (object.userStatusMuteAction != null) { + if (typeof object.userStatusMuteAction !== "object") + throw TypeError(".proto.SyncActionValue.userStatusMuteAction: object expected"); + message.userStatusMuteAction = $root.proto.UserStatusMuteAction.fromObject(object.userStatusMuteAction); + } + if (object.timeFormatAction != null) { + if (typeof object.timeFormatAction !== "object") + throw TypeError(".proto.SyncActionValue.timeFormatAction: object expected"); + message.timeFormatAction = $root.proto.TimeFormatAction.fromObject(object.timeFormatAction); + } return message; }; /** - * Creates a plain object from an ExternalBlobReference message. Also converts values to other types if specified. + * Creates a plain object from a SyncActionValue message. Also converts values to other types if specified. * @function toObject - * @memberof proto.ExternalBlobReference + * @memberof proto.SyncActionValue * @static - * @param {proto.ExternalBlobReference} message ExternalBlobReference + * @param {proto.SyncActionValue} message SyncActionValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExternalBlobReference.toObject = function toObject(message, options) { + SyncActionValue.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - if (options.bytes === String) - object.mediaKey = ""; - else { - object.mediaKey = []; - if (options.bytes !== Array) - object.mediaKey = $util.newBuffer(object.mediaKey); - } - object.directPath = ""; - object.handle = ""; if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.fileSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, false); + object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.fileSizeBytes = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.fileSha256 = ""; - else { - object.fileSha256 = []; - if (options.bytes !== Array) - object.fileSha256 = $util.newBuffer(object.fileSha256); - } - if (options.bytes === String) - object.fileEncSha256 = ""; - else { - object.fileEncSha256 = []; - if (options.bytes !== Array) - object.fileEncSha256 = $util.newBuffer(object.fileEncSha256); - } + object.timestamp = options.longs === String ? "0" : 0; + object.starAction = null; + object.contactAction = null; + object.muteAction = null; + object.pinAction = null; + object.securityNotificationSetting = null; + object.pushNameSetting = null; + object.quickReplyAction = null; + object.recentStickerWeightsAction = null; + object.recentStickerMetadata = null; + object.recentEmojiWeightsAction = null; + object.labelEditAction = null; + object.labelAssociationAction = null; + object.localeSetting = null; + object.archiveChatAction = null; + object.deleteMessageForMeAction = null; + object.keyExpiration = null; + object.markChatAsReadAction = null; + object.clearChatAction = null; + object.deleteChatAction = null; + object.unarchiveChatsSetting = null; + object.primaryFeature = null; + object.favoriteStickerAction = null; + object.androidUnsupportedActions = null; + object.agentAction = null; + object.subscriptionAction = null; + object.userStatusMuteAction = null; + object.timeFormatAction = null; } - if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) - object.mediaKey = options.bytes === String ? $util.base64.encode(message.mediaKey, 0, message.mediaKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.mediaKey) : message.mediaKey; - if (message.directPath != null && message.hasOwnProperty("directPath")) - object.directPath = message.directPath; - if (message.handle != null && message.hasOwnProperty("handle")) - object.handle = message.handle; - if (message.fileSizeBytes != null && message.hasOwnProperty("fileSizeBytes")) - if (typeof message.fileSizeBytes === "number") - object.fileSizeBytes = options.longs === String ? String(message.fileSizeBytes) : message.fileSizeBytes; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (typeof message.timestamp === "number") + object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; else - object.fileSizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.fileSizeBytes) : options.longs === Number ? new $util.LongBits(message.fileSizeBytes.low >>> 0, message.fileSizeBytes.high >>> 0).toNumber(true) : message.fileSizeBytes; - if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) - object.fileSha256 = options.bytes === String ? $util.base64.encode(message.fileSha256, 0, message.fileSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileSha256) : message.fileSha256; - if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) - object.fileEncSha256 = options.bytes === String ? $util.base64.encode(message.fileEncSha256, 0, message.fileEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileEncSha256) : message.fileEncSha256; + object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() : message.timestamp; + if (message.starAction != null && message.hasOwnProperty("starAction")) + object.starAction = $root.proto.StarAction.toObject(message.starAction, options); + if (message.contactAction != null && message.hasOwnProperty("contactAction")) + object.contactAction = $root.proto.ContactAction.toObject(message.contactAction, options); + if (message.muteAction != null && message.hasOwnProperty("muteAction")) + object.muteAction = $root.proto.MuteAction.toObject(message.muteAction, options); + if (message.pinAction != null && message.hasOwnProperty("pinAction")) + object.pinAction = $root.proto.PinAction.toObject(message.pinAction, options); + if (message.securityNotificationSetting != null && message.hasOwnProperty("securityNotificationSetting")) + object.securityNotificationSetting = $root.proto.SecurityNotificationSetting.toObject(message.securityNotificationSetting, options); + if (message.pushNameSetting != null && message.hasOwnProperty("pushNameSetting")) + object.pushNameSetting = $root.proto.PushNameSetting.toObject(message.pushNameSetting, options); + if (message.quickReplyAction != null && message.hasOwnProperty("quickReplyAction")) + object.quickReplyAction = $root.proto.QuickReplyAction.toObject(message.quickReplyAction, options); + if (message.recentStickerWeightsAction != null && message.hasOwnProperty("recentStickerWeightsAction")) + object.recentStickerWeightsAction = $root.proto.RecentStickerWeightsAction.toObject(message.recentStickerWeightsAction, options); + if (message.recentStickerMetadata != null && message.hasOwnProperty("recentStickerMetadata")) + object.recentStickerMetadata = $root.proto.RecentStickerMetadata.toObject(message.recentStickerMetadata, options); + if (message.recentEmojiWeightsAction != null && message.hasOwnProperty("recentEmojiWeightsAction")) + object.recentEmojiWeightsAction = $root.proto.RecentEmojiWeightsAction.toObject(message.recentEmojiWeightsAction, options); + if (message.labelEditAction != null && message.hasOwnProperty("labelEditAction")) + object.labelEditAction = $root.proto.LabelEditAction.toObject(message.labelEditAction, options); + if (message.labelAssociationAction != null && message.hasOwnProperty("labelAssociationAction")) + object.labelAssociationAction = $root.proto.LabelAssociationAction.toObject(message.labelAssociationAction, options); + if (message.localeSetting != null && message.hasOwnProperty("localeSetting")) + object.localeSetting = $root.proto.LocaleSetting.toObject(message.localeSetting, options); + if (message.archiveChatAction != null && message.hasOwnProperty("archiveChatAction")) + object.archiveChatAction = $root.proto.ArchiveChatAction.toObject(message.archiveChatAction, options); + if (message.deleteMessageForMeAction != null && message.hasOwnProperty("deleteMessageForMeAction")) + object.deleteMessageForMeAction = $root.proto.DeleteMessageForMeAction.toObject(message.deleteMessageForMeAction, options); + if (message.keyExpiration != null && message.hasOwnProperty("keyExpiration")) + object.keyExpiration = $root.proto.KeyExpiration.toObject(message.keyExpiration, options); + if (message.markChatAsReadAction != null && message.hasOwnProperty("markChatAsReadAction")) + object.markChatAsReadAction = $root.proto.MarkChatAsReadAction.toObject(message.markChatAsReadAction, options); + if (message.clearChatAction != null && message.hasOwnProperty("clearChatAction")) + object.clearChatAction = $root.proto.ClearChatAction.toObject(message.clearChatAction, options); + if (message.deleteChatAction != null && message.hasOwnProperty("deleteChatAction")) + object.deleteChatAction = $root.proto.DeleteChatAction.toObject(message.deleteChatAction, options); + if (message.unarchiveChatsSetting != null && message.hasOwnProperty("unarchiveChatsSetting")) + object.unarchiveChatsSetting = $root.proto.UnarchiveChatsSetting.toObject(message.unarchiveChatsSetting, options); + if (message.primaryFeature != null && message.hasOwnProperty("primaryFeature")) + object.primaryFeature = $root.proto.PrimaryFeature.toObject(message.primaryFeature, options); + if (message.favoriteStickerAction != null && message.hasOwnProperty("favoriteStickerAction")) + object.favoriteStickerAction = $root.proto.FavoriteStickerAction.toObject(message.favoriteStickerAction, options); + if (message.androidUnsupportedActions != null && message.hasOwnProperty("androidUnsupportedActions")) + object.androidUnsupportedActions = $root.proto.AndroidUnsupportedActions.toObject(message.androidUnsupportedActions, options); + if (message.agentAction != null && message.hasOwnProperty("agentAction")) + object.agentAction = $root.proto.AgentAction.toObject(message.agentAction, options); + if (message.subscriptionAction != null && message.hasOwnProperty("subscriptionAction")) + object.subscriptionAction = $root.proto.SubscriptionAction.toObject(message.subscriptionAction, options); + if (message.userStatusMuteAction != null && message.hasOwnProperty("userStatusMuteAction")) + object.userStatusMuteAction = $root.proto.UserStatusMuteAction.toObject(message.userStatusMuteAction, options); + if (message.timeFormatAction != null && message.hasOwnProperty("timeFormatAction")) + object.timeFormatAction = $root.proto.TimeFormatAction.toObject(message.timeFormatAction, options); return object; }; /** - * Converts this ExternalBlobReference to JSON. + * Converts this SyncActionValue to JSON. * @function toJSON - * @memberof proto.ExternalBlobReference + * @memberof proto.SyncActionValue * @instance * @returns {Object.} JSON object */ - ExternalBlobReference.prototype.toJSON = function toJSON() { + SyncActionValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ExternalBlobReference; - })(); - - proto.KeyId = (function() { - - /** - * Properties of a KeyId. - * @memberof proto - * @interface IKeyId - * @property {Uint8Array|null} [id] KeyId id - */ - - /** - * Constructs a new KeyId. - * @memberof proto - * @classdesc Represents a KeyId. - * @implements IKeyId - * @constructor - * @param {proto.IKeyId=} [properties] Properties to set - */ - function KeyId(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * KeyId id. - * @member {Uint8Array} id - * @memberof proto.KeyId - * @instance - */ - KeyId.prototype.id = $util.newBuffer([]); - - /** - * Creates a new KeyId instance using the specified properties. - * @function create - * @memberof proto.KeyId - * @static - * @param {proto.IKeyId=} [properties] Properties to set - * @returns {proto.KeyId} KeyId instance - */ - KeyId.create = function create(properties) { - return new KeyId(properties); - }; - - /** - * Encodes the specified KeyId message. Does not implicitly {@link proto.KeyId.verify|verify} messages. - * @function encode - * @memberof proto.KeyId - * @static - * @param {proto.IKeyId} message KeyId message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KeyId.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.id); - return writer; - }; - - /** - * Encodes the specified KeyId message, length delimited. Does not implicitly {@link proto.KeyId.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.KeyId - * @static - * @param {proto.IKeyId} message KeyId message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KeyId.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a KeyId message from the specified reader or buffer. - * @function decode - * @memberof proto.KeyId - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.KeyId} KeyId - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KeyId.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.KeyId(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a KeyId message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.KeyId - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.KeyId} KeyId - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KeyId.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a KeyId message. - * @function verify - * @memberof proto.KeyId - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - KeyId.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!(message.id && typeof message.id.length === "number" || $util.isString(message.id))) - return "id: buffer expected"; - return null; - }; - - /** - * Creates a KeyId message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.KeyId - * @static - * @param {Object.} object Plain object - * @returns {proto.KeyId} KeyId - */ - KeyId.fromObject = function fromObject(object) { - if (object instanceof $root.proto.KeyId) - return object; - var message = new $root.proto.KeyId(); - if (object.id != null) - if (typeof object.id === "string") - $util.base64.decode(object.id, message.id = $util.newBuffer($util.base64.length(object.id)), 0); - else if (object.id.length) - message.id = object.id; - return message; - }; - - /** - * Creates a plain object from a KeyId message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.KeyId - * @static - * @param {proto.KeyId} message KeyId - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - KeyId.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if (options.bytes === String) - object.id = ""; - else { - object.id = []; - if (options.bytes !== Array) - object.id = $util.newBuffer(object.id); - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = options.bytes === String ? $util.base64.encode(message.id, 0, message.id.length) : options.bytes === Array ? Array.prototype.slice.call(message.id) : message.id; - return object; - }; - - /** - * Converts this KeyId to JSON. - * @function toJSON - * @memberof proto.KeyId - * @instance - * @returns {Object.} JSON object - */ - KeyId.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return KeyId; + return SyncActionValue; })(); proto.SyncdIndex = (function() { @@ -41916,26 +59935,27 @@ $root.proto = (function() { return SyncdVersion; })(); - proto.AgentAction = (function() { + proto.TemplateButton = (function() { /** - * Properties of an AgentAction. + * Properties of a TemplateButton. * @memberof proto - * @interface IAgentAction - * @property {string|null} [name] AgentAction name - * @property {number|null} [deviceID] AgentAction deviceID - * @property {boolean|null} [isDeleted] AgentAction isDeleted + * @interface ITemplateButton + * @property {number|null} [index] TemplateButton index + * @property {proto.IQuickReplyButton|null} [quickReplyButton] TemplateButton quickReplyButton + * @property {proto.IURLButton|null} [urlButton] TemplateButton urlButton + * @property {proto.ICallButton|null} [callButton] TemplateButton callButton */ /** - * Constructs a new AgentAction. + * Constructs a new TemplateButton. * @memberof proto - * @classdesc Represents an AgentAction. - * @implements IAgentAction + * @classdesc Represents a TemplateButton. + * @implements ITemplateButton * @constructor - * @param {proto.IAgentAction=} [properties] Properties to set + * @param {proto.ITemplateButton=} [properties] Properties to set */ - function AgentAction(properties) { + function TemplateButton(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41943,6319 +59963,128 @@ $root.proto = (function() { } /** - * AgentAction name. - * @member {string} name - * @memberof proto.AgentAction + * TemplateButton index. + * @member {number} index + * @memberof proto.TemplateButton * @instance */ - AgentAction.prototype.name = ""; + TemplateButton.prototype.index = 0; /** - * AgentAction deviceID. - * @member {number} deviceID - * @memberof proto.AgentAction + * TemplateButton quickReplyButton. + * @member {proto.IQuickReplyButton|null|undefined} quickReplyButton + * @memberof proto.TemplateButton * @instance */ - AgentAction.prototype.deviceID = 0; + TemplateButton.prototype.quickReplyButton = null; /** - * AgentAction isDeleted. - * @member {boolean} isDeleted - * @memberof proto.AgentAction + * TemplateButton urlButton. + * @member {proto.IURLButton|null|undefined} urlButton + * @memberof proto.TemplateButton * @instance */ - AgentAction.prototype.isDeleted = false; + TemplateButton.prototype.urlButton = null; /** - * Creates a new AgentAction instance using the specified properties. + * TemplateButton callButton. + * @member {proto.ICallButton|null|undefined} callButton + * @memberof proto.TemplateButton + * @instance + */ + TemplateButton.prototype.callButton = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TemplateButton button. + * @member {"quickReplyButton"|"urlButton"|"callButton"|undefined} button + * @memberof proto.TemplateButton + * @instance + */ + Object.defineProperty(TemplateButton.prototype, "button", { + get: $util.oneOfGetter($oneOfFields = ["quickReplyButton", "urlButton", "callButton"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TemplateButton instance using the specified properties. * @function create - * @memberof proto.AgentAction + * @memberof proto.TemplateButton * @static - * @param {proto.IAgentAction=} [properties] Properties to set - * @returns {proto.AgentAction} AgentAction instance + * @param {proto.ITemplateButton=} [properties] Properties to set + * @returns {proto.TemplateButton} TemplateButton instance */ - AgentAction.create = function create(properties) { - return new AgentAction(properties); + TemplateButton.create = function create(properties) { + return new TemplateButton(properties); }; /** - * Encodes the specified AgentAction message. Does not implicitly {@link proto.AgentAction.verify|verify} messages. + * Encodes the specified TemplateButton message. Does not implicitly {@link proto.TemplateButton.verify|verify} messages. * @function encode - * @memberof proto.AgentAction + * @memberof proto.TemplateButton * @static - * @param {proto.IAgentAction} message AgentAction message or plain object to encode + * @param {proto.ITemplateButton} message TemplateButton message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AgentAction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.deviceID != null && Object.hasOwnProperty.call(message, "deviceID")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.deviceID); - if (message.isDeleted != null && Object.hasOwnProperty.call(message, "isDeleted")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.isDeleted); - return writer; - }; - - /** - * Encodes the specified AgentAction message, length delimited. Does not implicitly {@link proto.AgentAction.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.AgentAction - * @static - * @param {proto.IAgentAction} message AgentAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AgentAction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AgentAction message from the specified reader or buffer. - * @function decode - * @memberof proto.AgentAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.AgentAction} AgentAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AgentAction.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.AgentAction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.deviceID = reader.int32(); - break; - case 3: - message.isDeleted = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AgentAction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.AgentAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.AgentAction} AgentAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AgentAction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AgentAction message. - * @function verify - * @memberof proto.AgentAction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AgentAction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.deviceID != null && message.hasOwnProperty("deviceID")) - if (!$util.isInteger(message.deviceID)) - return "deviceID: integer expected"; - if (message.isDeleted != null && message.hasOwnProperty("isDeleted")) - if (typeof message.isDeleted !== "boolean") - return "isDeleted: boolean expected"; - return null; - }; - - /** - * Creates an AgentAction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.AgentAction - * @static - * @param {Object.} object Plain object - * @returns {proto.AgentAction} AgentAction - */ - AgentAction.fromObject = function fromObject(object) { - if (object instanceof $root.proto.AgentAction) - return object; - var message = new $root.proto.AgentAction(); - if (object.name != null) - message.name = String(object.name); - if (object.deviceID != null) - message.deviceID = object.deviceID | 0; - if (object.isDeleted != null) - message.isDeleted = Boolean(object.isDeleted); - return message; - }; - - /** - * Creates a plain object from an AgentAction message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.AgentAction - * @static - * @param {proto.AgentAction} message AgentAction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AgentAction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.deviceID = 0; - object.isDeleted = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.deviceID != null && message.hasOwnProperty("deviceID")) - object.deviceID = message.deviceID; - if (message.isDeleted != null && message.hasOwnProperty("isDeleted")) - object.isDeleted = message.isDeleted; - return object; - }; - - /** - * Converts this AgentAction to JSON. - * @function toJSON - * @memberof proto.AgentAction - * @instance - * @returns {Object.} JSON object - */ - AgentAction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return AgentAction; - })(); - - proto.AndroidUnsupportedActions = (function() { - - /** - * Properties of an AndroidUnsupportedActions. - * @memberof proto - * @interface IAndroidUnsupportedActions - * @property {boolean|null} [allowed] AndroidUnsupportedActions allowed - */ - - /** - * Constructs a new AndroidUnsupportedActions. - * @memberof proto - * @classdesc Represents an AndroidUnsupportedActions. - * @implements IAndroidUnsupportedActions - * @constructor - * @param {proto.IAndroidUnsupportedActions=} [properties] Properties to set - */ - function AndroidUnsupportedActions(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AndroidUnsupportedActions allowed. - * @member {boolean} allowed - * @memberof proto.AndroidUnsupportedActions - * @instance - */ - AndroidUnsupportedActions.prototype.allowed = false; - - /** - * Creates a new AndroidUnsupportedActions instance using the specified properties. - * @function create - * @memberof proto.AndroidUnsupportedActions - * @static - * @param {proto.IAndroidUnsupportedActions=} [properties] Properties to set - * @returns {proto.AndroidUnsupportedActions} AndroidUnsupportedActions instance - */ - AndroidUnsupportedActions.create = function create(properties) { - return new AndroidUnsupportedActions(properties); - }; - - /** - * Encodes the specified AndroidUnsupportedActions message. Does not implicitly {@link proto.AndroidUnsupportedActions.verify|verify} messages. - * @function encode - * @memberof proto.AndroidUnsupportedActions - * @static - * @param {proto.IAndroidUnsupportedActions} message AndroidUnsupportedActions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AndroidUnsupportedActions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.allowed != null && Object.hasOwnProperty.call(message, "allowed")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.allowed); - return writer; - }; - - /** - * Encodes the specified AndroidUnsupportedActions message, length delimited. Does not implicitly {@link proto.AndroidUnsupportedActions.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.AndroidUnsupportedActions - * @static - * @param {proto.IAndroidUnsupportedActions} message AndroidUnsupportedActions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AndroidUnsupportedActions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AndroidUnsupportedActions message from the specified reader or buffer. - * @function decode - * @memberof proto.AndroidUnsupportedActions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.AndroidUnsupportedActions} AndroidUnsupportedActions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AndroidUnsupportedActions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.AndroidUnsupportedActions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.allowed = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AndroidUnsupportedActions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.AndroidUnsupportedActions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.AndroidUnsupportedActions} AndroidUnsupportedActions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AndroidUnsupportedActions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AndroidUnsupportedActions message. - * @function verify - * @memberof proto.AndroidUnsupportedActions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AndroidUnsupportedActions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.allowed != null && message.hasOwnProperty("allowed")) - if (typeof message.allowed !== "boolean") - return "allowed: boolean expected"; - return null; - }; - - /** - * Creates an AndroidUnsupportedActions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.AndroidUnsupportedActions - * @static - * @param {Object.} object Plain object - * @returns {proto.AndroidUnsupportedActions} AndroidUnsupportedActions - */ - AndroidUnsupportedActions.fromObject = function fromObject(object) { - if (object instanceof $root.proto.AndroidUnsupportedActions) - return object; - var message = new $root.proto.AndroidUnsupportedActions(); - if (object.allowed != null) - message.allowed = Boolean(object.allowed); - return message; - }; - - /** - * Creates a plain object from an AndroidUnsupportedActions message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.AndroidUnsupportedActions - * @static - * @param {proto.AndroidUnsupportedActions} message AndroidUnsupportedActions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AndroidUnsupportedActions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.allowed = false; - if (message.allowed != null && message.hasOwnProperty("allowed")) - object.allowed = message.allowed; - return object; - }; - - /** - * Converts this AndroidUnsupportedActions to JSON. - * @function toJSON - * @memberof proto.AndroidUnsupportedActions - * @instance - * @returns {Object.} JSON object - */ - AndroidUnsupportedActions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return AndroidUnsupportedActions; - })(); - - proto.ArchiveChatAction = (function() { - - /** - * Properties of an ArchiveChatAction. - * @memberof proto - * @interface IArchiveChatAction - * @property {boolean|null} [archived] ArchiveChatAction archived - * @property {proto.ISyncActionMessageRange|null} [messageRange] ArchiveChatAction messageRange - */ - - /** - * Constructs a new ArchiveChatAction. - * @memberof proto - * @classdesc Represents an ArchiveChatAction. - * @implements IArchiveChatAction - * @constructor - * @param {proto.IArchiveChatAction=} [properties] Properties to set - */ - function ArchiveChatAction(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ArchiveChatAction archived. - * @member {boolean} archived - * @memberof proto.ArchiveChatAction - * @instance - */ - ArchiveChatAction.prototype.archived = false; - - /** - * ArchiveChatAction messageRange. - * @member {proto.ISyncActionMessageRange|null|undefined} messageRange - * @memberof proto.ArchiveChatAction - * @instance - */ - ArchiveChatAction.prototype.messageRange = null; - - /** - * Creates a new ArchiveChatAction instance using the specified properties. - * @function create - * @memberof proto.ArchiveChatAction - * @static - * @param {proto.IArchiveChatAction=} [properties] Properties to set - * @returns {proto.ArchiveChatAction} ArchiveChatAction instance - */ - ArchiveChatAction.create = function create(properties) { - return new ArchiveChatAction(properties); - }; - - /** - * Encodes the specified ArchiveChatAction message. Does not implicitly {@link proto.ArchiveChatAction.verify|verify} messages. - * @function encode - * @memberof proto.ArchiveChatAction - * @static - * @param {proto.IArchiveChatAction} message ArchiveChatAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ArchiveChatAction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.archived != null && Object.hasOwnProperty.call(message, "archived")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.archived); - if (message.messageRange != null && Object.hasOwnProperty.call(message, "messageRange")) - $root.proto.SyncActionMessageRange.encode(message.messageRange, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ArchiveChatAction message, length delimited. Does not implicitly {@link proto.ArchiveChatAction.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.ArchiveChatAction - * @static - * @param {proto.IArchiveChatAction} message ArchiveChatAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ArchiveChatAction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ArchiveChatAction message from the specified reader or buffer. - * @function decode - * @memberof proto.ArchiveChatAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.ArchiveChatAction} ArchiveChatAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ArchiveChatAction.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ArchiveChatAction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.archived = reader.bool(); - break; - case 2: - message.messageRange = $root.proto.SyncActionMessageRange.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ArchiveChatAction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.ArchiveChatAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ArchiveChatAction} ArchiveChatAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ArchiveChatAction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ArchiveChatAction message. - * @function verify - * @memberof proto.ArchiveChatAction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ArchiveChatAction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.archived != null && message.hasOwnProperty("archived")) - if (typeof message.archived !== "boolean") - return "archived: boolean expected"; - if (message.messageRange != null && message.hasOwnProperty("messageRange")) { - var error = $root.proto.SyncActionMessageRange.verify(message.messageRange); - if (error) - return "messageRange." + error; - } - return null; - }; - - /** - * Creates an ArchiveChatAction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.ArchiveChatAction - * @static - * @param {Object.} object Plain object - * @returns {proto.ArchiveChatAction} ArchiveChatAction - */ - ArchiveChatAction.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ArchiveChatAction) - return object; - var message = new $root.proto.ArchiveChatAction(); - if (object.archived != null) - message.archived = Boolean(object.archived); - if (object.messageRange != null) { - if (typeof object.messageRange !== "object") - throw TypeError(".proto.ArchiveChatAction.messageRange: object expected"); - message.messageRange = $root.proto.SyncActionMessageRange.fromObject(object.messageRange); - } - return message; - }; - - /** - * Creates a plain object from an ArchiveChatAction message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.ArchiveChatAction - * @static - * @param {proto.ArchiveChatAction} message ArchiveChatAction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ArchiveChatAction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.archived = false; - object.messageRange = null; - } - if (message.archived != null && message.hasOwnProperty("archived")) - object.archived = message.archived; - if (message.messageRange != null && message.hasOwnProperty("messageRange")) - object.messageRange = $root.proto.SyncActionMessageRange.toObject(message.messageRange, options); - return object; - }; - - /** - * Converts this ArchiveChatAction to JSON. - * @function toJSON - * @memberof proto.ArchiveChatAction - * @instance - * @returns {Object.} JSON object - */ - ArchiveChatAction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ArchiveChatAction; - })(); - - proto.ClearChatAction = (function() { - - /** - * Properties of a ClearChatAction. - * @memberof proto - * @interface IClearChatAction - * @property {proto.ISyncActionMessageRange|null} [messageRange] ClearChatAction messageRange - */ - - /** - * Constructs a new ClearChatAction. - * @memberof proto - * @classdesc Represents a ClearChatAction. - * @implements IClearChatAction - * @constructor - * @param {proto.IClearChatAction=} [properties] Properties to set - */ - function ClearChatAction(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClearChatAction messageRange. - * @member {proto.ISyncActionMessageRange|null|undefined} messageRange - * @memberof proto.ClearChatAction - * @instance - */ - ClearChatAction.prototype.messageRange = null; - - /** - * Creates a new ClearChatAction instance using the specified properties. - * @function create - * @memberof proto.ClearChatAction - * @static - * @param {proto.IClearChatAction=} [properties] Properties to set - * @returns {proto.ClearChatAction} ClearChatAction instance - */ - ClearChatAction.create = function create(properties) { - return new ClearChatAction(properties); - }; - - /** - * Encodes the specified ClearChatAction message. Does not implicitly {@link proto.ClearChatAction.verify|verify} messages. - * @function encode - * @memberof proto.ClearChatAction - * @static - * @param {proto.IClearChatAction} message ClearChatAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClearChatAction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.messageRange != null && Object.hasOwnProperty.call(message, "messageRange")) - $root.proto.SyncActionMessageRange.encode(message.messageRange, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ClearChatAction message, length delimited. Does not implicitly {@link proto.ClearChatAction.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.ClearChatAction - * @static - * @param {proto.IClearChatAction} message ClearChatAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClearChatAction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClearChatAction message from the specified reader or buffer. - * @function decode - * @memberof proto.ClearChatAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.ClearChatAction} ClearChatAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClearChatAction.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ClearChatAction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageRange = $root.proto.SyncActionMessageRange.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClearChatAction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.ClearChatAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ClearChatAction} ClearChatAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClearChatAction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClearChatAction message. - * @function verify - * @memberof proto.ClearChatAction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClearChatAction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.messageRange != null && message.hasOwnProperty("messageRange")) { - var error = $root.proto.SyncActionMessageRange.verify(message.messageRange); - if (error) - return "messageRange." + error; - } - return null; - }; - - /** - * Creates a ClearChatAction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.ClearChatAction - * @static - * @param {Object.} object Plain object - * @returns {proto.ClearChatAction} ClearChatAction - */ - ClearChatAction.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ClearChatAction) - return object; - var message = new $root.proto.ClearChatAction(); - if (object.messageRange != null) { - if (typeof object.messageRange !== "object") - throw TypeError(".proto.ClearChatAction.messageRange: object expected"); - message.messageRange = $root.proto.SyncActionMessageRange.fromObject(object.messageRange); - } - return message; - }; - - /** - * Creates a plain object from a ClearChatAction message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.ClearChatAction - * @static - * @param {proto.ClearChatAction} message ClearChatAction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClearChatAction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.messageRange = null; - if (message.messageRange != null && message.hasOwnProperty("messageRange")) - object.messageRange = $root.proto.SyncActionMessageRange.toObject(message.messageRange, options); - return object; - }; - - /** - * Converts this ClearChatAction to JSON. - * @function toJSON - * @memberof proto.ClearChatAction - * @instance - * @returns {Object.} JSON object - */ - ClearChatAction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ClearChatAction; - })(); - - proto.ContactAction = (function() { - - /** - * Properties of a ContactAction. - * @memberof proto - * @interface IContactAction - * @property {string|null} [fullName] ContactAction fullName - * @property {string|null} [firstName] ContactAction firstName - */ - - /** - * Constructs a new ContactAction. - * @memberof proto - * @classdesc Represents a ContactAction. - * @implements IContactAction - * @constructor - * @param {proto.IContactAction=} [properties] Properties to set - */ - function ContactAction(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ContactAction fullName. - * @member {string} fullName - * @memberof proto.ContactAction - * @instance - */ - ContactAction.prototype.fullName = ""; - - /** - * ContactAction firstName. - * @member {string} firstName - * @memberof proto.ContactAction - * @instance - */ - ContactAction.prototype.firstName = ""; - - /** - * Creates a new ContactAction instance using the specified properties. - * @function create - * @memberof proto.ContactAction - * @static - * @param {proto.IContactAction=} [properties] Properties to set - * @returns {proto.ContactAction} ContactAction instance - */ - ContactAction.create = function create(properties) { - return new ContactAction(properties); - }; - - /** - * Encodes the specified ContactAction message. Does not implicitly {@link proto.ContactAction.verify|verify} messages. - * @function encode - * @memberof proto.ContactAction - * @static - * @param {proto.IContactAction} message ContactAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ContactAction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.fullName); - if (message.firstName != null && Object.hasOwnProperty.call(message, "firstName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.firstName); - return writer; - }; - - /** - * Encodes the specified ContactAction message, length delimited. Does not implicitly {@link proto.ContactAction.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.ContactAction - * @static - * @param {proto.IContactAction} message ContactAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ContactAction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ContactAction message from the specified reader or buffer. - * @function decode - * @memberof proto.ContactAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.ContactAction} ContactAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ContactAction.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ContactAction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.fullName = reader.string(); - break; - case 2: - message.firstName = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ContactAction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.ContactAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ContactAction} ContactAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ContactAction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ContactAction message. - * @function verify - * @memberof proto.ContactAction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ContactAction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fullName != null && message.hasOwnProperty("fullName")) - if (!$util.isString(message.fullName)) - return "fullName: string expected"; - if (message.firstName != null && message.hasOwnProperty("firstName")) - if (!$util.isString(message.firstName)) - return "firstName: string expected"; - return null; - }; - - /** - * Creates a ContactAction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.ContactAction - * @static - * @param {Object.} object Plain object - * @returns {proto.ContactAction} ContactAction - */ - ContactAction.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ContactAction) - return object; - var message = new $root.proto.ContactAction(); - if (object.fullName != null) - message.fullName = String(object.fullName); - if (object.firstName != null) - message.firstName = String(object.firstName); - return message; - }; - - /** - * Creates a plain object from a ContactAction message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.ContactAction - * @static - * @param {proto.ContactAction} message ContactAction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ContactAction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.fullName = ""; - object.firstName = ""; - } - if (message.fullName != null && message.hasOwnProperty("fullName")) - object.fullName = message.fullName; - if (message.firstName != null && message.hasOwnProperty("firstName")) - object.firstName = message.firstName; - return object; - }; - - /** - * Converts this ContactAction to JSON. - * @function toJSON - * @memberof proto.ContactAction - * @instance - * @returns {Object.} JSON object - */ - ContactAction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ContactAction; - })(); - - proto.DeleteChatAction = (function() { - - /** - * Properties of a DeleteChatAction. - * @memberof proto - * @interface IDeleteChatAction - * @property {proto.ISyncActionMessageRange|null} [messageRange] DeleteChatAction messageRange - */ - - /** - * Constructs a new DeleteChatAction. - * @memberof proto - * @classdesc Represents a DeleteChatAction. - * @implements IDeleteChatAction - * @constructor - * @param {proto.IDeleteChatAction=} [properties] Properties to set - */ - function DeleteChatAction(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteChatAction messageRange. - * @member {proto.ISyncActionMessageRange|null|undefined} messageRange - * @memberof proto.DeleteChatAction - * @instance - */ - DeleteChatAction.prototype.messageRange = null; - - /** - * Creates a new DeleteChatAction instance using the specified properties. - * @function create - * @memberof proto.DeleteChatAction - * @static - * @param {proto.IDeleteChatAction=} [properties] Properties to set - * @returns {proto.DeleteChatAction} DeleteChatAction instance - */ - DeleteChatAction.create = function create(properties) { - return new DeleteChatAction(properties); - }; - - /** - * Encodes the specified DeleteChatAction message. Does not implicitly {@link proto.DeleteChatAction.verify|verify} messages. - * @function encode - * @memberof proto.DeleteChatAction - * @static - * @param {proto.IDeleteChatAction} message DeleteChatAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteChatAction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.messageRange != null && Object.hasOwnProperty.call(message, "messageRange")) - $root.proto.SyncActionMessageRange.encode(message.messageRange, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DeleteChatAction message, length delimited. Does not implicitly {@link proto.DeleteChatAction.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.DeleteChatAction - * @static - * @param {proto.IDeleteChatAction} message DeleteChatAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteChatAction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteChatAction message from the specified reader or buffer. - * @function decode - * @memberof proto.DeleteChatAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.DeleteChatAction} DeleteChatAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteChatAction.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.DeleteChatAction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageRange = $root.proto.SyncActionMessageRange.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteChatAction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.DeleteChatAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.DeleteChatAction} DeleteChatAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteChatAction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteChatAction message. - * @function verify - * @memberof proto.DeleteChatAction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteChatAction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.messageRange != null && message.hasOwnProperty("messageRange")) { - var error = $root.proto.SyncActionMessageRange.verify(message.messageRange); - if (error) - return "messageRange." + error; - } - return null; - }; - - /** - * Creates a DeleteChatAction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.DeleteChatAction - * @static - * @param {Object.} object Plain object - * @returns {proto.DeleteChatAction} DeleteChatAction - */ - DeleteChatAction.fromObject = function fromObject(object) { - if (object instanceof $root.proto.DeleteChatAction) - return object; - var message = new $root.proto.DeleteChatAction(); - if (object.messageRange != null) { - if (typeof object.messageRange !== "object") - throw TypeError(".proto.DeleteChatAction.messageRange: object expected"); - message.messageRange = $root.proto.SyncActionMessageRange.fromObject(object.messageRange); - } - return message; - }; - - /** - * Creates a plain object from a DeleteChatAction message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.DeleteChatAction - * @static - * @param {proto.DeleteChatAction} message DeleteChatAction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteChatAction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.messageRange = null; - if (message.messageRange != null && message.hasOwnProperty("messageRange")) - object.messageRange = $root.proto.SyncActionMessageRange.toObject(message.messageRange, options); - return object; - }; - - /** - * Converts this DeleteChatAction to JSON. - * @function toJSON - * @memberof proto.DeleteChatAction - * @instance - * @returns {Object.} JSON object - */ - DeleteChatAction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DeleteChatAction; - })(); - - proto.DeleteMessageForMeAction = (function() { - - /** - * Properties of a DeleteMessageForMeAction. - * @memberof proto - * @interface IDeleteMessageForMeAction - * @property {boolean|null} [deleteMedia] DeleteMessageForMeAction deleteMedia - * @property {number|Long|null} [messageTimestamp] DeleteMessageForMeAction messageTimestamp - */ - - /** - * Constructs a new DeleteMessageForMeAction. - * @memberof proto - * @classdesc Represents a DeleteMessageForMeAction. - * @implements IDeleteMessageForMeAction - * @constructor - * @param {proto.IDeleteMessageForMeAction=} [properties] Properties to set - */ - function DeleteMessageForMeAction(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteMessageForMeAction deleteMedia. - * @member {boolean} deleteMedia - * @memberof proto.DeleteMessageForMeAction - * @instance - */ - DeleteMessageForMeAction.prototype.deleteMedia = false; - - /** - * DeleteMessageForMeAction messageTimestamp. - * @member {number|Long} messageTimestamp - * @memberof proto.DeleteMessageForMeAction - * @instance - */ - DeleteMessageForMeAction.prototype.messageTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new DeleteMessageForMeAction instance using the specified properties. - * @function create - * @memberof proto.DeleteMessageForMeAction - * @static - * @param {proto.IDeleteMessageForMeAction=} [properties] Properties to set - * @returns {proto.DeleteMessageForMeAction} DeleteMessageForMeAction instance - */ - DeleteMessageForMeAction.create = function create(properties) { - return new DeleteMessageForMeAction(properties); - }; - - /** - * Encodes the specified DeleteMessageForMeAction message. Does not implicitly {@link proto.DeleteMessageForMeAction.verify|verify} messages. - * @function encode - * @memberof proto.DeleteMessageForMeAction - * @static - * @param {proto.IDeleteMessageForMeAction} message DeleteMessageForMeAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteMessageForMeAction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deleteMedia != null && Object.hasOwnProperty.call(message, "deleteMedia")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deleteMedia); - if (message.messageTimestamp != null && Object.hasOwnProperty.call(message, "messageTimestamp")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.messageTimestamp); - return writer; - }; - - /** - * Encodes the specified DeleteMessageForMeAction message, length delimited. Does not implicitly {@link proto.DeleteMessageForMeAction.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.DeleteMessageForMeAction - * @static - * @param {proto.IDeleteMessageForMeAction} message DeleteMessageForMeAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteMessageForMeAction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteMessageForMeAction message from the specified reader or buffer. - * @function decode - * @memberof proto.DeleteMessageForMeAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.DeleteMessageForMeAction} DeleteMessageForMeAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteMessageForMeAction.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.DeleteMessageForMeAction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deleteMedia = reader.bool(); - break; - case 2: - message.messageTimestamp = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteMessageForMeAction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.DeleteMessageForMeAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.DeleteMessageForMeAction} DeleteMessageForMeAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteMessageForMeAction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteMessageForMeAction message. - * @function verify - * @memberof proto.DeleteMessageForMeAction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteMessageForMeAction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deleteMedia != null && message.hasOwnProperty("deleteMedia")) - if (typeof message.deleteMedia !== "boolean") - return "deleteMedia: boolean expected"; - if (message.messageTimestamp != null && message.hasOwnProperty("messageTimestamp")) - if (!$util.isInteger(message.messageTimestamp) && !(message.messageTimestamp && $util.isInteger(message.messageTimestamp.low) && $util.isInteger(message.messageTimestamp.high))) - return "messageTimestamp: integer|Long expected"; - return null; - }; - - /** - * Creates a DeleteMessageForMeAction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.DeleteMessageForMeAction - * @static - * @param {Object.} object Plain object - * @returns {proto.DeleteMessageForMeAction} DeleteMessageForMeAction - */ - DeleteMessageForMeAction.fromObject = function fromObject(object) { - if (object instanceof $root.proto.DeleteMessageForMeAction) - return object; - var message = new $root.proto.DeleteMessageForMeAction(); - if (object.deleteMedia != null) - message.deleteMedia = Boolean(object.deleteMedia); - if (object.messageTimestamp != null) - if ($util.Long) - (message.messageTimestamp = $util.Long.fromValue(object.messageTimestamp)).unsigned = false; - else if (typeof object.messageTimestamp === "string") - message.messageTimestamp = parseInt(object.messageTimestamp, 10); - else if (typeof object.messageTimestamp === "number") - message.messageTimestamp = object.messageTimestamp; - else if (typeof object.messageTimestamp === "object") - message.messageTimestamp = new $util.LongBits(object.messageTimestamp.low >>> 0, object.messageTimestamp.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a DeleteMessageForMeAction message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.DeleteMessageForMeAction - * @static - * @param {proto.DeleteMessageForMeAction} message DeleteMessageForMeAction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteMessageForMeAction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.deleteMedia = false; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.messageTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.messageTimestamp = options.longs === String ? "0" : 0; - } - if (message.deleteMedia != null && message.hasOwnProperty("deleteMedia")) - object.deleteMedia = message.deleteMedia; - if (message.messageTimestamp != null && message.hasOwnProperty("messageTimestamp")) - if (typeof message.messageTimestamp === "number") - object.messageTimestamp = options.longs === String ? String(message.messageTimestamp) : message.messageTimestamp; - else - object.messageTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.messageTimestamp) : options.longs === Number ? new $util.LongBits(message.messageTimestamp.low >>> 0, message.messageTimestamp.high >>> 0).toNumber() : message.messageTimestamp; - return object; - }; - - /** - * Converts this DeleteMessageForMeAction to JSON. - * @function toJSON - * @memberof proto.DeleteMessageForMeAction - * @instance - * @returns {Object.} JSON object - */ - DeleteMessageForMeAction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DeleteMessageForMeAction; - })(); - - proto.FavoriteStickerAction = (function() { - - /** - * Properties of a FavoriteStickerAction. - * @memberof proto - * @interface IFavoriteStickerAction - * @property {string|null} [directPath] FavoriteStickerAction directPath - * @property {string|null} [lastUploadTimestamp] FavoriteStickerAction lastUploadTimestamp - * @property {string|null} [handle] FavoriteStickerAction handle - * @property {string|null} [encFilehash] FavoriteStickerAction encFilehash - * @property {string|null} [stickerHashWithoutMeta] FavoriteStickerAction stickerHashWithoutMeta - * @property {string|null} [mediaKey] FavoriteStickerAction mediaKey - * @property {number|Long|null} [mediaKeyTimestamp] FavoriteStickerAction mediaKeyTimestamp - * @property {boolean|null} [isFavorite] FavoriteStickerAction isFavorite - */ - - /** - * Constructs a new FavoriteStickerAction. - * @memberof proto - * @classdesc Represents a FavoriteStickerAction. - * @implements IFavoriteStickerAction - * @constructor - * @param {proto.IFavoriteStickerAction=} [properties] Properties to set - */ - function FavoriteStickerAction(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FavoriteStickerAction directPath. - * @member {string} directPath - * @memberof proto.FavoriteStickerAction - * @instance - */ - FavoriteStickerAction.prototype.directPath = ""; - - /** - * FavoriteStickerAction lastUploadTimestamp. - * @member {string} lastUploadTimestamp - * @memberof proto.FavoriteStickerAction - * @instance - */ - FavoriteStickerAction.prototype.lastUploadTimestamp = ""; - - /** - * FavoriteStickerAction handle. - * @member {string} handle - * @memberof proto.FavoriteStickerAction - * @instance - */ - FavoriteStickerAction.prototype.handle = ""; - - /** - * FavoriteStickerAction encFilehash. - * @member {string} encFilehash - * @memberof proto.FavoriteStickerAction - * @instance - */ - FavoriteStickerAction.prototype.encFilehash = ""; - - /** - * FavoriteStickerAction stickerHashWithoutMeta. - * @member {string} stickerHashWithoutMeta - * @memberof proto.FavoriteStickerAction - * @instance - */ - FavoriteStickerAction.prototype.stickerHashWithoutMeta = ""; - - /** - * FavoriteStickerAction mediaKey. - * @member {string} mediaKey - * @memberof proto.FavoriteStickerAction - * @instance - */ - FavoriteStickerAction.prototype.mediaKey = ""; - - /** - * FavoriteStickerAction mediaKeyTimestamp. - * @member {number|Long} mediaKeyTimestamp - * @memberof proto.FavoriteStickerAction - * @instance - */ - FavoriteStickerAction.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * FavoriteStickerAction isFavorite. - * @member {boolean} isFavorite - * @memberof proto.FavoriteStickerAction - * @instance - */ - FavoriteStickerAction.prototype.isFavorite = false; - - /** - * Creates a new FavoriteStickerAction instance using the specified properties. - * @function create - * @memberof proto.FavoriteStickerAction - * @static - * @param {proto.IFavoriteStickerAction=} [properties] Properties to set - * @returns {proto.FavoriteStickerAction} FavoriteStickerAction instance - */ - FavoriteStickerAction.create = function create(properties) { - return new FavoriteStickerAction(properties); - }; - - /** - * Encodes the specified FavoriteStickerAction message. Does not implicitly {@link proto.FavoriteStickerAction.verify|verify} messages. - * @function encode - * @memberof proto.FavoriteStickerAction - * @static - * @param {proto.IFavoriteStickerAction} message FavoriteStickerAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FavoriteStickerAction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.directPath); - if (message.lastUploadTimestamp != null && Object.hasOwnProperty.call(message, "lastUploadTimestamp")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.lastUploadTimestamp); - if (message.handle != null && Object.hasOwnProperty.call(message, "handle")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.handle); - if (message.encFilehash != null && Object.hasOwnProperty.call(message, "encFilehash")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.encFilehash); - if (message.stickerHashWithoutMeta != null && Object.hasOwnProperty.call(message, "stickerHashWithoutMeta")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.stickerHashWithoutMeta); - if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.mediaKey); - if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp")) - writer.uint32(/* id 7, wireType 0 =*/56).int64(message.mediaKeyTimestamp); - if (message.isFavorite != null && Object.hasOwnProperty.call(message, "isFavorite")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.isFavorite); - return writer; - }; - - /** - * Encodes the specified FavoriteStickerAction message, length delimited. Does not implicitly {@link proto.FavoriteStickerAction.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.FavoriteStickerAction - * @static - * @param {proto.IFavoriteStickerAction} message FavoriteStickerAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FavoriteStickerAction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FavoriteStickerAction message from the specified reader or buffer. - * @function decode - * @memberof proto.FavoriteStickerAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.FavoriteStickerAction} FavoriteStickerAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FavoriteStickerAction.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.FavoriteStickerAction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.directPath = reader.string(); - break; - case 2: - message.lastUploadTimestamp = reader.string(); - break; - case 3: - message.handle = reader.string(); - break; - case 4: - message.encFilehash = reader.string(); - break; - case 5: - message.stickerHashWithoutMeta = reader.string(); - break; - case 6: - message.mediaKey = reader.string(); - break; - case 7: - message.mediaKeyTimestamp = reader.int64(); - break; - case 8: - message.isFavorite = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FavoriteStickerAction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.FavoriteStickerAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.FavoriteStickerAction} FavoriteStickerAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FavoriteStickerAction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FavoriteStickerAction message. - * @function verify - * @memberof proto.FavoriteStickerAction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FavoriteStickerAction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.directPath != null && message.hasOwnProperty("directPath")) - if (!$util.isString(message.directPath)) - return "directPath: string expected"; - if (message.lastUploadTimestamp != null && message.hasOwnProperty("lastUploadTimestamp")) - if (!$util.isString(message.lastUploadTimestamp)) - return "lastUploadTimestamp: string expected"; - if (message.handle != null && message.hasOwnProperty("handle")) - if (!$util.isString(message.handle)) - return "handle: string expected"; - if (message.encFilehash != null && message.hasOwnProperty("encFilehash")) - if (!$util.isString(message.encFilehash)) - return "encFilehash: string expected"; - if (message.stickerHashWithoutMeta != null && message.hasOwnProperty("stickerHashWithoutMeta")) - if (!$util.isString(message.stickerHashWithoutMeta)) - return "stickerHashWithoutMeta: string expected"; - if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) - if (!$util.isString(message.mediaKey)) - return "mediaKey: string expected"; - if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) - if (!$util.isInteger(message.mediaKeyTimestamp) && !(message.mediaKeyTimestamp && $util.isInteger(message.mediaKeyTimestamp.low) && $util.isInteger(message.mediaKeyTimestamp.high))) - return "mediaKeyTimestamp: integer|Long expected"; - if (message.isFavorite != null && message.hasOwnProperty("isFavorite")) - if (typeof message.isFavorite !== "boolean") - return "isFavorite: boolean expected"; - return null; - }; - - /** - * Creates a FavoriteStickerAction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.FavoriteStickerAction - * @static - * @param {Object.} object Plain object - * @returns {proto.FavoriteStickerAction} FavoriteStickerAction - */ - FavoriteStickerAction.fromObject = function fromObject(object) { - if (object instanceof $root.proto.FavoriteStickerAction) - return object; - var message = new $root.proto.FavoriteStickerAction(); - if (object.directPath != null) - message.directPath = String(object.directPath); - if (object.lastUploadTimestamp != null) - message.lastUploadTimestamp = String(object.lastUploadTimestamp); - if (object.handle != null) - message.handle = String(object.handle); - if (object.encFilehash != null) - message.encFilehash = String(object.encFilehash); - if (object.stickerHashWithoutMeta != null) - message.stickerHashWithoutMeta = String(object.stickerHashWithoutMeta); - if (object.mediaKey != null) - message.mediaKey = String(object.mediaKey); - if (object.mediaKeyTimestamp != null) - if ($util.Long) - (message.mediaKeyTimestamp = $util.Long.fromValue(object.mediaKeyTimestamp)).unsigned = false; - else if (typeof object.mediaKeyTimestamp === "string") - message.mediaKeyTimestamp = parseInt(object.mediaKeyTimestamp, 10); - else if (typeof object.mediaKeyTimestamp === "number") - message.mediaKeyTimestamp = object.mediaKeyTimestamp; - else if (typeof object.mediaKeyTimestamp === "object") - message.mediaKeyTimestamp = new $util.LongBits(object.mediaKeyTimestamp.low >>> 0, object.mediaKeyTimestamp.high >>> 0).toNumber(); - if (object.isFavorite != null) - message.isFavorite = Boolean(object.isFavorite); - return message; - }; - - /** - * Creates a plain object from a FavoriteStickerAction message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.FavoriteStickerAction - * @static - * @param {proto.FavoriteStickerAction} message FavoriteStickerAction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FavoriteStickerAction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.directPath = ""; - object.lastUploadTimestamp = ""; - object.handle = ""; - object.encFilehash = ""; - object.stickerHashWithoutMeta = ""; - object.mediaKey = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.mediaKeyTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.mediaKeyTimestamp = options.longs === String ? "0" : 0; - object.isFavorite = false; - } - if (message.directPath != null && message.hasOwnProperty("directPath")) - object.directPath = message.directPath; - if (message.lastUploadTimestamp != null && message.hasOwnProperty("lastUploadTimestamp")) - object.lastUploadTimestamp = message.lastUploadTimestamp; - if (message.handle != null && message.hasOwnProperty("handle")) - object.handle = message.handle; - if (message.encFilehash != null && message.hasOwnProperty("encFilehash")) - object.encFilehash = message.encFilehash; - if (message.stickerHashWithoutMeta != null && message.hasOwnProperty("stickerHashWithoutMeta")) - object.stickerHashWithoutMeta = message.stickerHashWithoutMeta; - if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) - object.mediaKey = message.mediaKey; - if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) - if (typeof message.mediaKeyTimestamp === "number") - object.mediaKeyTimestamp = options.longs === String ? String(message.mediaKeyTimestamp) : message.mediaKeyTimestamp; - else - object.mediaKeyTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.mediaKeyTimestamp) : options.longs === Number ? new $util.LongBits(message.mediaKeyTimestamp.low >>> 0, message.mediaKeyTimestamp.high >>> 0).toNumber() : message.mediaKeyTimestamp; - if (message.isFavorite != null && message.hasOwnProperty("isFavorite")) - object.isFavorite = message.isFavorite; - return object; - }; - - /** - * Converts this FavoriteStickerAction to JSON. - * @function toJSON - * @memberof proto.FavoriteStickerAction - * @instance - * @returns {Object.} JSON object - */ - FavoriteStickerAction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return FavoriteStickerAction; - })(); - - proto.KeyExpiration = (function() { - - /** - * Properties of a KeyExpiration. - * @memberof proto - * @interface IKeyExpiration - * @property {number|null} [expiredKeyEpoch] KeyExpiration expiredKeyEpoch - */ - - /** - * Constructs a new KeyExpiration. - * @memberof proto - * @classdesc Represents a KeyExpiration. - * @implements IKeyExpiration - * @constructor - * @param {proto.IKeyExpiration=} [properties] Properties to set - */ - function KeyExpiration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * KeyExpiration expiredKeyEpoch. - * @member {number} expiredKeyEpoch - * @memberof proto.KeyExpiration - * @instance - */ - KeyExpiration.prototype.expiredKeyEpoch = 0; - - /** - * Creates a new KeyExpiration instance using the specified properties. - * @function create - * @memberof proto.KeyExpiration - * @static - * @param {proto.IKeyExpiration=} [properties] Properties to set - * @returns {proto.KeyExpiration} KeyExpiration instance - */ - KeyExpiration.create = function create(properties) { - return new KeyExpiration(properties); - }; - - /** - * Encodes the specified KeyExpiration message. Does not implicitly {@link proto.KeyExpiration.verify|verify} messages. - * @function encode - * @memberof proto.KeyExpiration - * @static - * @param {proto.IKeyExpiration} message KeyExpiration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KeyExpiration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.expiredKeyEpoch != null && Object.hasOwnProperty.call(message, "expiredKeyEpoch")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.expiredKeyEpoch); - return writer; - }; - - /** - * Encodes the specified KeyExpiration message, length delimited. Does not implicitly {@link proto.KeyExpiration.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.KeyExpiration - * @static - * @param {proto.IKeyExpiration} message KeyExpiration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KeyExpiration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a KeyExpiration message from the specified reader or buffer. - * @function decode - * @memberof proto.KeyExpiration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.KeyExpiration} KeyExpiration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KeyExpiration.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.KeyExpiration(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.expiredKeyEpoch = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a KeyExpiration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.KeyExpiration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.KeyExpiration} KeyExpiration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KeyExpiration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a KeyExpiration message. - * @function verify - * @memberof proto.KeyExpiration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - KeyExpiration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.expiredKeyEpoch != null && message.hasOwnProperty("expiredKeyEpoch")) - if (!$util.isInteger(message.expiredKeyEpoch)) - return "expiredKeyEpoch: integer expected"; - return null; - }; - - /** - * Creates a KeyExpiration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.KeyExpiration - * @static - * @param {Object.} object Plain object - * @returns {proto.KeyExpiration} KeyExpiration - */ - KeyExpiration.fromObject = function fromObject(object) { - if (object instanceof $root.proto.KeyExpiration) - return object; - var message = new $root.proto.KeyExpiration(); - if (object.expiredKeyEpoch != null) - message.expiredKeyEpoch = object.expiredKeyEpoch | 0; - return message; - }; - - /** - * Creates a plain object from a KeyExpiration message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.KeyExpiration - * @static - * @param {proto.KeyExpiration} message KeyExpiration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - KeyExpiration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.expiredKeyEpoch = 0; - if (message.expiredKeyEpoch != null && message.hasOwnProperty("expiredKeyEpoch")) - object.expiredKeyEpoch = message.expiredKeyEpoch; - return object; - }; - - /** - * Converts this KeyExpiration to JSON. - * @function toJSON - * @memberof proto.KeyExpiration - * @instance - * @returns {Object.} JSON object - */ - KeyExpiration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return KeyExpiration; - })(); - - proto.LabelAssociationAction = (function() { - - /** - * Properties of a LabelAssociationAction. - * @memberof proto - * @interface ILabelAssociationAction - * @property {boolean|null} [labeled] LabelAssociationAction labeled - */ - - /** - * Constructs a new LabelAssociationAction. - * @memberof proto - * @classdesc Represents a LabelAssociationAction. - * @implements ILabelAssociationAction - * @constructor - * @param {proto.ILabelAssociationAction=} [properties] Properties to set - */ - function LabelAssociationAction(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LabelAssociationAction labeled. - * @member {boolean} labeled - * @memberof proto.LabelAssociationAction - * @instance - */ - LabelAssociationAction.prototype.labeled = false; - - /** - * Creates a new LabelAssociationAction instance using the specified properties. - * @function create - * @memberof proto.LabelAssociationAction - * @static - * @param {proto.ILabelAssociationAction=} [properties] Properties to set - * @returns {proto.LabelAssociationAction} LabelAssociationAction instance - */ - LabelAssociationAction.create = function create(properties) { - return new LabelAssociationAction(properties); - }; - - /** - * Encodes the specified LabelAssociationAction message. Does not implicitly {@link proto.LabelAssociationAction.verify|verify} messages. - * @function encode - * @memberof proto.LabelAssociationAction - * @static - * @param {proto.ILabelAssociationAction} message LabelAssociationAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LabelAssociationAction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.labeled != null && Object.hasOwnProperty.call(message, "labeled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.labeled); - return writer; - }; - - /** - * Encodes the specified LabelAssociationAction message, length delimited. Does not implicitly {@link proto.LabelAssociationAction.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.LabelAssociationAction - * @static - * @param {proto.ILabelAssociationAction} message LabelAssociationAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LabelAssociationAction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LabelAssociationAction message from the specified reader or buffer. - * @function decode - * @memberof proto.LabelAssociationAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.LabelAssociationAction} LabelAssociationAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LabelAssociationAction.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.LabelAssociationAction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.labeled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LabelAssociationAction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.LabelAssociationAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.LabelAssociationAction} LabelAssociationAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LabelAssociationAction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LabelAssociationAction message. - * @function verify - * @memberof proto.LabelAssociationAction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LabelAssociationAction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.labeled != null && message.hasOwnProperty("labeled")) - if (typeof message.labeled !== "boolean") - return "labeled: boolean expected"; - return null; - }; - - /** - * Creates a LabelAssociationAction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.LabelAssociationAction - * @static - * @param {Object.} object Plain object - * @returns {proto.LabelAssociationAction} LabelAssociationAction - */ - LabelAssociationAction.fromObject = function fromObject(object) { - if (object instanceof $root.proto.LabelAssociationAction) - return object; - var message = new $root.proto.LabelAssociationAction(); - if (object.labeled != null) - message.labeled = Boolean(object.labeled); - return message; - }; - - /** - * Creates a plain object from a LabelAssociationAction message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.LabelAssociationAction - * @static - * @param {proto.LabelAssociationAction} message LabelAssociationAction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LabelAssociationAction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.labeled = false; - if (message.labeled != null && message.hasOwnProperty("labeled")) - object.labeled = message.labeled; - return object; - }; - - /** - * Converts this LabelAssociationAction to JSON. - * @function toJSON - * @memberof proto.LabelAssociationAction - * @instance - * @returns {Object.} JSON object - */ - LabelAssociationAction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return LabelAssociationAction; - })(); - - proto.LabelEditAction = (function() { - - /** - * Properties of a LabelEditAction. - * @memberof proto - * @interface ILabelEditAction - * @property {string|null} [name] LabelEditAction name - * @property {number|null} [color] LabelEditAction color - * @property {number|null} [predefinedId] LabelEditAction predefinedId - * @property {boolean|null} [deleted] LabelEditAction deleted - */ - - /** - * Constructs a new LabelEditAction. - * @memberof proto - * @classdesc Represents a LabelEditAction. - * @implements ILabelEditAction - * @constructor - * @param {proto.ILabelEditAction=} [properties] Properties to set - */ - function LabelEditAction(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LabelEditAction name. - * @member {string} name - * @memberof proto.LabelEditAction - * @instance - */ - LabelEditAction.prototype.name = ""; - - /** - * LabelEditAction color. - * @member {number} color - * @memberof proto.LabelEditAction - * @instance - */ - LabelEditAction.prototype.color = 0; - - /** - * LabelEditAction predefinedId. - * @member {number} predefinedId - * @memberof proto.LabelEditAction - * @instance - */ - LabelEditAction.prototype.predefinedId = 0; - - /** - * LabelEditAction deleted. - * @member {boolean} deleted - * @memberof proto.LabelEditAction - * @instance - */ - LabelEditAction.prototype.deleted = false; - - /** - * Creates a new LabelEditAction instance using the specified properties. - * @function create - * @memberof proto.LabelEditAction - * @static - * @param {proto.ILabelEditAction=} [properties] Properties to set - * @returns {proto.LabelEditAction} LabelEditAction instance - */ - LabelEditAction.create = function create(properties) { - return new LabelEditAction(properties); - }; - - /** - * Encodes the specified LabelEditAction message. Does not implicitly {@link proto.LabelEditAction.verify|verify} messages. - * @function encode - * @memberof proto.LabelEditAction - * @static - * @param {proto.ILabelEditAction} message LabelEditAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LabelEditAction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.color != null && Object.hasOwnProperty.call(message, "color")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.color); - if (message.predefinedId != null && Object.hasOwnProperty.call(message, "predefinedId")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.predefinedId); - if (message.deleted != null && Object.hasOwnProperty.call(message, "deleted")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.deleted); - return writer; - }; - - /** - * Encodes the specified LabelEditAction message, length delimited. Does not implicitly {@link proto.LabelEditAction.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.LabelEditAction - * @static - * @param {proto.ILabelEditAction} message LabelEditAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LabelEditAction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LabelEditAction message from the specified reader or buffer. - * @function decode - * @memberof proto.LabelEditAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.LabelEditAction} LabelEditAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LabelEditAction.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.LabelEditAction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.color = reader.int32(); - break; - case 3: - message.predefinedId = reader.int32(); - break; - case 4: - message.deleted = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LabelEditAction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.LabelEditAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.LabelEditAction} LabelEditAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LabelEditAction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LabelEditAction message. - * @function verify - * @memberof proto.LabelEditAction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LabelEditAction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.color != null && message.hasOwnProperty("color")) - if (!$util.isInteger(message.color)) - return "color: integer expected"; - if (message.predefinedId != null && message.hasOwnProperty("predefinedId")) - if (!$util.isInteger(message.predefinedId)) - return "predefinedId: integer expected"; - if (message.deleted != null && message.hasOwnProperty("deleted")) - if (typeof message.deleted !== "boolean") - return "deleted: boolean expected"; - return null; - }; - - /** - * Creates a LabelEditAction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.LabelEditAction - * @static - * @param {Object.} object Plain object - * @returns {proto.LabelEditAction} LabelEditAction - */ - LabelEditAction.fromObject = function fromObject(object) { - if (object instanceof $root.proto.LabelEditAction) - return object; - var message = new $root.proto.LabelEditAction(); - if (object.name != null) - message.name = String(object.name); - if (object.color != null) - message.color = object.color | 0; - if (object.predefinedId != null) - message.predefinedId = object.predefinedId | 0; - if (object.deleted != null) - message.deleted = Boolean(object.deleted); - return message; - }; - - /** - * Creates a plain object from a LabelEditAction message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.LabelEditAction - * @static - * @param {proto.LabelEditAction} message LabelEditAction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LabelEditAction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.color = 0; - object.predefinedId = 0; - object.deleted = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.color != null && message.hasOwnProperty("color")) - object.color = message.color; - if (message.predefinedId != null && message.hasOwnProperty("predefinedId")) - object.predefinedId = message.predefinedId; - if (message.deleted != null && message.hasOwnProperty("deleted")) - object.deleted = message.deleted; - return object; - }; - - /** - * Converts this LabelEditAction to JSON. - * @function toJSON - * @memberof proto.LabelEditAction - * @instance - * @returns {Object.} JSON object - */ - LabelEditAction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return LabelEditAction; - })(); - - proto.LocaleSetting = (function() { - - /** - * Properties of a LocaleSetting. - * @memberof proto - * @interface ILocaleSetting - * @property {string|null} [locale] LocaleSetting locale - */ - - /** - * Constructs a new LocaleSetting. - * @memberof proto - * @classdesc Represents a LocaleSetting. - * @implements ILocaleSetting - * @constructor - * @param {proto.ILocaleSetting=} [properties] Properties to set - */ - function LocaleSetting(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LocaleSetting locale. - * @member {string} locale - * @memberof proto.LocaleSetting - * @instance - */ - LocaleSetting.prototype.locale = ""; - - /** - * Creates a new LocaleSetting instance using the specified properties. - * @function create - * @memberof proto.LocaleSetting - * @static - * @param {proto.ILocaleSetting=} [properties] Properties to set - * @returns {proto.LocaleSetting} LocaleSetting instance - */ - LocaleSetting.create = function create(properties) { - return new LocaleSetting(properties); - }; - - /** - * Encodes the specified LocaleSetting message. Does not implicitly {@link proto.LocaleSetting.verify|verify} messages. - * @function encode - * @memberof proto.LocaleSetting - * @static - * @param {proto.ILocaleSetting} message LocaleSetting message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LocaleSetting.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.locale != null && Object.hasOwnProperty.call(message, "locale")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.locale); - return writer; - }; - - /** - * Encodes the specified LocaleSetting message, length delimited. Does not implicitly {@link proto.LocaleSetting.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.LocaleSetting - * @static - * @param {proto.ILocaleSetting} message LocaleSetting message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LocaleSetting.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LocaleSetting message from the specified reader or buffer. - * @function decode - * @memberof proto.LocaleSetting - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.LocaleSetting} LocaleSetting - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LocaleSetting.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.LocaleSetting(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.locale = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LocaleSetting message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.LocaleSetting - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.LocaleSetting} LocaleSetting - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LocaleSetting.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LocaleSetting message. - * @function verify - * @memberof proto.LocaleSetting - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LocaleSetting.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.locale != null && message.hasOwnProperty("locale")) - if (!$util.isString(message.locale)) - return "locale: string expected"; - return null; - }; - - /** - * Creates a LocaleSetting message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.LocaleSetting - * @static - * @param {Object.} object Plain object - * @returns {proto.LocaleSetting} LocaleSetting - */ - LocaleSetting.fromObject = function fromObject(object) { - if (object instanceof $root.proto.LocaleSetting) - return object; - var message = new $root.proto.LocaleSetting(); - if (object.locale != null) - message.locale = String(object.locale); - return message; - }; - - /** - * Creates a plain object from a LocaleSetting message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.LocaleSetting - * @static - * @param {proto.LocaleSetting} message LocaleSetting - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LocaleSetting.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.locale = ""; - if (message.locale != null && message.hasOwnProperty("locale")) - object.locale = message.locale; - return object; - }; - - /** - * Converts this LocaleSetting to JSON. - * @function toJSON - * @memberof proto.LocaleSetting - * @instance - * @returns {Object.} JSON object - */ - LocaleSetting.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return LocaleSetting; - })(); - - proto.MarkChatAsReadAction = (function() { - - /** - * Properties of a MarkChatAsReadAction. - * @memberof proto - * @interface IMarkChatAsReadAction - * @property {boolean|null} [read] MarkChatAsReadAction read - * @property {proto.ISyncActionMessageRange|null} [messageRange] MarkChatAsReadAction messageRange - */ - - /** - * Constructs a new MarkChatAsReadAction. - * @memberof proto - * @classdesc Represents a MarkChatAsReadAction. - * @implements IMarkChatAsReadAction - * @constructor - * @param {proto.IMarkChatAsReadAction=} [properties] Properties to set - */ - function MarkChatAsReadAction(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MarkChatAsReadAction read. - * @member {boolean} read - * @memberof proto.MarkChatAsReadAction - * @instance - */ - MarkChatAsReadAction.prototype.read = false; - - /** - * MarkChatAsReadAction messageRange. - * @member {proto.ISyncActionMessageRange|null|undefined} messageRange - * @memberof proto.MarkChatAsReadAction - * @instance - */ - MarkChatAsReadAction.prototype.messageRange = null; - - /** - * Creates a new MarkChatAsReadAction instance using the specified properties. - * @function create - * @memberof proto.MarkChatAsReadAction - * @static - * @param {proto.IMarkChatAsReadAction=} [properties] Properties to set - * @returns {proto.MarkChatAsReadAction} MarkChatAsReadAction instance - */ - MarkChatAsReadAction.create = function create(properties) { - return new MarkChatAsReadAction(properties); - }; - - /** - * Encodes the specified MarkChatAsReadAction message. Does not implicitly {@link proto.MarkChatAsReadAction.verify|verify} messages. - * @function encode - * @memberof proto.MarkChatAsReadAction - * @static - * @param {proto.IMarkChatAsReadAction} message MarkChatAsReadAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MarkChatAsReadAction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.read != null && Object.hasOwnProperty.call(message, "read")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.read); - if (message.messageRange != null && Object.hasOwnProperty.call(message, "messageRange")) - $root.proto.SyncActionMessageRange.encode(message.messageRange, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MarkChatAsReadAction message, length delimited. Does not implicitly {@link proto.MarkChatAsReadAction.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.MarkChatAsReadAction - * @static - * @param {proto.IMarkChatAsReadAction} message MarkChatAsReadAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MarkChatAsReadAction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MarkChatAsReadAction message from the specified reader or buffer. - * @function decode - * @memberof proto.MarkChatAsReadAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.MarkChatAsReadAction} MarkChatAsReadAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MarkChatAsReadAction.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.MarkChatAsReadAction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.read = reader.bool(); - break; - case 2: - message.messageRange = $root.proto.SyncActionMessageRange.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MarkChatAsReadAction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.MarkChatAsReadAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.MarkChatAsReadAction} MarkChatAsReadAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MarkChatAsReadAction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MarkChatAsReadAction message. - * @function verify - * @memberof proto.MarkChatAsReadAction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MarkChatAsReadAction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.read != null && message.hasOwnProperty("read")) - if (typeof message.read !== "boolean") - return "read: boolean expected"; - if (message.messageRange != null && message.hasOwnProperty("messageRange")) { - var error = $root.proto.SyncActionMessageRange.verify(message.messageRange); - if (error) - return "messageRange." + error; - } - return null; - }; - - /** - * Creates a MarkChatAsReadAction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.MarkChatAsReadAction - * @static - * @param {Object.} object Plain object - * @returns {proto.MarkChatAsReadAction} MarkChatAsReadAction - */ - MarkChatAsReadAction.fromObject = function fromObject(object) { - if (object instanceof $root.proto.MarkChatAsReadAction) - return object; - var message = new $root.proto.MarkChatAsReadAction(); - if (object.read != null) - message.read = Boolean(object.read); - if (object.messageRange != null) { - if (typeof object.messageRange !== "object") - throw TypeError(".proto.MarkChatAsReadAction.messageRange: object expected"); - message.messageRange = $root.proto.SyncActionMessageRange.fromObject(object.messageRange); - } - return message; - }; - - /** - * Creates a plain object from a MarkChatAsReadAction message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.MarkChatAsReadAction - * @static - * @param {proto.MarkChatAsReadAction} message MarkChatAsReadAction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MarkChatAsReadAction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.read = false; - object.messageRange = null; - } - if (message.read != null && message.hasOwnProperty("read")) - object.read = message.read; - if (message.messageRange != null && message.hasOwnProperty("messageRange")) - object.messageRange = $root.proto.SyncActionMessageRange.toObject(message.messageRange, options); - return object; - }; - - /** - * Converts this MarkChatAsReadAction to JSON. - * @function toJSON - * @memberof proto.MarkChatAsReadAction - * @instance - * @returns {Object.} JSON object - */ - MarkChatAsReadAction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MarkChatAsReadAction; - })(); - - proto.MuteAction = (function() { - - /** - * Properties of a MuteAction. - * @memberof proto - * @interface IMuteAction - * @property {boolean|null} [muted] MuteAction muted - * @property {number|Long|null} [muteEndTimestamp] MuteAction muteEndTimestamp - */ - - /** - * Constructs a new MuteAction. - * @memberof proto - * @classdesc Represents a MuteAction. - * @implements IMuteAction - * @constructor - * @param {proto.IMuteAction=} [properties] Properties to set - */ - function MuteAction(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MuteAction muted. - * @member {boolean} muted - * @memberof proto.MuteAction - * @instance - */ - MuteAction.prototype.muted = false; - - /** - * MuteAction muteEndTimestamp. - * @member {number|Long} muteEndTimestamp - * @memberof proto.MuteAction - * @instance - */ - MuteAction.prototype.muteEndTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new MuteAction instance using the specified properties. - * @function create - * @memberof proto.MuteAction - * @static - * @param {proto.IMuteAction=} [properties] Properties to set - * @returns {proto.MuteAction} MuteAction instance - */ - MuteAction.create = function create(properties) { - return new MuteAction(properties); - }; - - /** - * Encodes the specified MuteAction message. Does not implicitly {@link proto.MuteAction.verify|verify} messages. - * @function encode - * @memberof proto.MuteAction - * @static - * @param {proto.IMuteAction} message MuteAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MuteAction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.muted != null && Object.hasOwnProperty.call(message, "muted")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.muted); - if (message.muteEndTimestamp != null && Object.hasOwnProperty.call(message, "muteEndTimestamp")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.muteEndTimestamp); - return writer; - }; - - /** - * Encodes the specified MuteAction message, length delimited. Does not implicitly {@link proto.MuteAction.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.MuteAction - * @static - * @param {proto.IMuteAction} message MuteAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MuteAction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MuteAction message from the specified reader or buffer. - * @function decode - * @memberof proto.MuteAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.MuteAction} MuteAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MuteAction.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.MuteAction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.muted = reader.bool(); - break; - case 2: - message.muteEndTimestamp = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MuteAction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.MuteAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.MuteAction} MuteAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MuteAction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MuteAction message. - * @function verify - * @memberof proto.MuteAction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MuteAction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.muted != null && message.hasOwnProperty("muted")) - if (typeof message.muted !== "boolean") - return "muted: boolean expected"; - if (message.muteEndTimestamp != null && message.hasOwnProperty("muteEndTimestamp")) - if (!$util.isInteger(message.muteEndTimestamp) && !(message.muteEndTimestamp && $util.isInteger(message.muteEndTimestamp.low) && $util.isInteger(message.muteEndTimestamp.high))) - return "muteEndTimestamp: integer|Long expected"; - return null; - }; - - /** - * Creates a MuteAction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.MuteAction - * @static - * @param {Object.} object Plain object - * @returns {proto.MuteAction} MuteAction - */ - MuteAction.fromObject = function fromObject(object) { - if (object instanceof $root.proto.MuteAction) - return object; - var message = new $root.proto.MuteAction(); - if (object.muted != null) - message.muted = Boolean(object.muted); - if (object.muteEndTimestamp != null) - if ($util.Long) - (message.muteEndTimestamp = $util.Long.fromValue(object.muteEndTimestamp)).unsigned = false; - else if (typeof object.muteEndTimestamp === "string") - message.muteEndTimestamp = parseInt(object.muteEndTimestamp, 10); - else if (typeof object.muteEndTimestamp === "number") - message.muteEndTimestamp = object.muteEndTimestamp; - else if (typeof object.muteEndTimestamp === "object") - message.muteEndTimestamp = new $util.LongBits(object.muteEndTimestamp.low >>> 0, object.muteEndTimestamp.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a MuteAction message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.MuteAction - * @static - * @param {proto.MuteAction} message MuteAction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MuteAction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.muted = false; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.muteEndTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.muteEndTimestamp = options.longs === String ? "0" : 0; - } - if (message.muted != null && message.hasOwnProperty("muted")) - object.muted = message.muted; - if (message.muteEndTimestamp != null && message.hasOwnProperty("muteEndTimestamp")) - if (typeof message.muteEndTimestamp === "number") - object.muteEndTimestamp = options.longs === String ? String(message.muteEndTimestamp) : message.muteEndTimestamp; - else - object.muteEndTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.muteEndTimestamp) : options.longs === Number ? new $util.LongBits(message.muteEndTimestamp.low >>> 0, message.muteEndTimestamp.high >>> 0).toNumber() : message.muteEndTimestamp; - return object; - }; - - /** - * Converts this MuteAction to JSON. - * @function toJSON - * @memberof proto.MuteAction - * @instance - * @returns {Object.} JSON object - */ - MuteAction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MuteAction; - })(); - - proto.PinAction = (function() { - - /** - * Properties of a PinAction. - * @memberof proto - * @interface IPinAction - * @property {boolean|null} [pinned] PinAction pinned - */ - - /** - * Constructs a new PinAction. - * @memberof proto - * @classdesc Represents a PinAction. - * @implements IPinAction - * @constructor - * @param {proto.IPinAction=} [properties] Properties to set - */ - function PinAction(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PinAction pinned. - * @member {boolean} pinned - * @memberof proto.PinAction - * @instance - */ - PinAction.prototype.pinned = false; - - /** - * Creates a new PinAction instance using the specified properties. - * @function create - * @memberof proto.PinAction - * @static - * @param {proto.IPinAction=} [properties] Properties to set - * @returns {proto.PinAction} PinAction instance - */ - PinAction.create = function create(properties) { - return new PinAction(properties); - }; - - /** - * Encodes the specified PinAction message. Does not implicitly {@link proto.PinAction.verify|verify} messages. - * @function encode - * @memberof proto.PinAction - * @static - * @param {proto.IPinAction} message PinAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PinAction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pinned != null && Object.hasOwnProperty.call(message, "pinned")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.pinned); - return writer; - }; - - /** - * Encodes the specified PinAction message, length delimited. Does not implicitly {@link proto.PinAction.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.PinAction - * @static - * @param {proto.IPinAction} message PinAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PinAction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PinAction message from the specified reader or buffer. - * @function decode - * @memberof proto.PinAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.PinAction} PinAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PinAction.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.PinAction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pinned = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PinAction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.PinAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.PinAction} PinAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PinAction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PinAction message. - * @function verify - * @memberof proto.PinAction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PinAction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pinned != null && message.hasOwnProperty("pinned")) - if (typeof message.pinned !== "boolean") - return "pinned: boolean expected"; - return null; - }; - - /** - * Creates a PinAction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.PinAction - * @static - * @param {Object.} object Plain object - * @returns {proto.PinAction} PinAction - */ - PinAction.fromObject = function fromObject(object) { - if (object instanceof $root.proto.PinAction) - return object; - var message = new $root.proto.PinAction(); - if (object.pinned != null) - message.pinned = Boolean(object.pinned); - return message; - }; - - /** - * Creates a plain object from a PinAction message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.PinAction - * @static - * @param {proto.PinAction} message PinAction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PinAction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.pinned = false; - if (message.pinned != null && message.hasOwnProperty("pinned")) - object.pinned = message.pinned; - return object; - }; - - /** - * Converts this PinAction to JSON. - * @function toJSON - * @memberof proto.PinAction - * @instance - * @returns {Object.} JSON object - */ - PinAction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PinAction; - })(); - - proto.PrimaryFeature = (function() { - - /** - * Properties of a PrimaryFeature. - * @memberof proto - * @interface IPrimaryFeature - * @property {Array.|null} [flags] PrimaryFeature flags - */ - - /** - * Constructs a new PrimaryFeature. - * @memberof proto - * @classdesc Represents a PrimaryFeature. - * @implements IPrimaryFeature - * @constructor - * @param {proto.IPrimaryFeature=} [properties] Properties to set - */ - function PrimaryFeature(properties) { - this.flags = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PrimaryFeature flags. - * @member {Array.} flags - * @memberof proto.PrimaryFeature - * @instance - */ - PrimaryFeature.prototype.flags = $util.emptyArray; - - /** - * Creates a new PrimaryFeature instance using the specified properties. - * @function create - * @memberof proto.PrimaryFeature - * @static - * @param {proto.IPrimaryFeature=} [properties] Properties to set - * @returns {proto.PrimaryFeature} PrimaryFeature instance - */ - PrimaryFeature.create = function create(properties) { - return new PrimaryFeature(properties); - }; - - /** - * Encodes the specified PrimaryFeature message. Does not implicitly {@link proto.PrimaryFeature.verify|verify} messages. - * @function encode - * @memberof proto.PrimaryFeature - * @static - * @param {proto.IPrimaryFeature} message PrimaryFeature message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PrimaryFeature.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.flags != null && message.flags.length) - for (var i = 0; i < message.flags.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.flags[i]); - return writer; - }; - - /** - * Encodes the specified PrimaryFeature message, length delimited. Does not implicitly {@link proto.PrimaryFeature.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.PrimaryFeature - * @static - * @param {proto.IPrimaryFeature} message PrimaryFeature message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PrimaryFeature.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PrimaryFeature message from the specified reader or buffer. - * @function decode - * @memberof proto.PrimaryFeature - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.PrimaryFeature} PrimaryFeature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PrimaryFeature.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.PrimaryFeature(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.flags && message.flags.length)) - message.flags = []; - message.flags.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PrimaryFeature message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.PrimaryFeature - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.PrimaryFeature} PrimaryFeature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PrimaryFeature.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PrimaryFeature message. - * @function verify - * @memberof proto.PrimaryFeature - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PrimaryFeature.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.flags != null && message.hasOwnProperty("flags")) { - if (!Array.isArray(message.flags)) - return "flags: array expected"; - for (var i = 0; i < message.flags.length; ++i) - if (!$util.isString(message.flags[i])) - return "flags: string[] expected"; - } - return null; - }; - - /** - * Creates a PrimaryFeature message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.PrimaryFeature - * @static - * @param {Object.} object Plain object - * @returns {proto.PrimaryFeature} PrimaryFeature - */ - PrimaryFeature.fromObject = function fromObject(object) { - if (object instanceof $root.proto.PrimaryFeature) - return object; - var message = new $root.proto.PrimaryFeature(); - if (object.flags) { - if (!Array.isArray(object.flags)) - throw TypeError(".proto.PrimaryFeature.flags: array expected"); - message.flags = []; - for (var i = 0; i < object.flags.length; ++i) - message.flags[i] = String(object.flags[i]); - } - return message; - }; - - /** - * Creates a plain object from a PrimaryFeature message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.PrimaryFeature - * @static - * @param {proto.PrimaryFeature} message PrimaryFeature - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PrimaryFeature.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.flags = []; - if (message.flags && message.flags.length) { - object.flags = []; - for (var j = 0; j < message.flags.length; ++j) - object.flags[j] = message.flags[j]; - } - return object; - }; - - /** - * Converts this PrimaryFeature to JSON. - * @function toJSON - * @memberof proto.PrimaryFeature - * @instance - * @returns {Object.} JSON object - */ - PrimaryFeature.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PrimaryFeature; - })(); - - proto.PushNameSetting = (function() { - - /** - * Properties of a PushNameSetting. - * @memberof proto - * @interface IPushNameSetting - * @property {string|null} [name] PushNameSetting name - */ - - /** - * Constructs a new PushNameSetting. - * @memberof proto - * @classdesc Represents a PushNameSetting. - * @implements IPushNameSetting - * @constructor - * @param {proto.IPushNameSetting=} [properties] Properties to set - */ - function PushNameSetting(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PushNameSetting name. - * @member {string} name - * @memberof proto.PushNameSetting - * @instance - */ - PushNameSetting.prototype.name = ""; - - /** - * Creates a new PushNameSetting instance using the specified properties. - * @function create - * @memberof proto.PushNameSetting - * @static - * @param {proto.IPushNameSetting=} [properties] Properties to set - * @returns {proto.PushNameSetting} PushNameSetting instance - */ - PushNameSetting.create = function create(properties) { - return new PushNameSetting(properties); - }; - - /** - * Encodes the specified PushNameSetting message. Does not implicitly {@link proto.PushNameSetting.verify|verify} messages. - * @function encode - * @memberof proto.PushNameSetting - * @static - * @param {proto.IPushNameSetting} message PushNameSetting message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PushNameSetting.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified PushNameSetting message, length delimited. Does not implicitly {@link proto.PushNameSetting.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.PushNameSetting - * @static - * @param {proto.IPushNameSetting} message PushNameSetting message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PushNameSetting.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PushNameSetting message from the specified reader or buffer. - * @function decode - * @memberof proto.PushNameSetting - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.PushNameSetting} PushNameSetting - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PushNameSetting.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.PushNameSetting(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PushNameSetting message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.PushNameSetting - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.PushNameSetting} PushNameSetting - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PushNameSetting.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PushNameSetting message. - * @function verify - * @memberof proto.PushNameSetting - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PushNameSetting.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a PushNameSetting message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.PushNameSetting - * @static - * @param {Object.} object Plain object - * @returns {proto.PushNameSetting} PushNameSetting - */ - PushNameSetting.fromObject = function fromObject(object) { - if (object instanceof $root.proto.PushNameSetting) - return object; - var message = new $root.proto.PushNameSetting(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a PushNameSetting message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.PushNameSetting - * @static - * @param {proto.PushNameSetting} message PushNameSetting - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PushNameSetting.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this PushNameSetting to JSON. - * @function toJSON - * @memberof proto.PushNameSetting - * @instance - * @returns {Object.} JSON object - */ - PushNameSetting.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PushNameSetting; - })(); - - proto.QuickReplyAction = (function() { - - /** - * Properties of a QuickReplyAction. - * @memberof proto - * @interface IQuickReplyAction - * @property {string|null} [shortcut] QuickReplyAction shortcut - * @property {string|null} [message] QuickReplyAction message - * @property {Array.|null} [keywords] QuickReplyAction keywords - * @property {number|null} [count] QuickReplyAction count - * @property {boolean|null} [deleted] QuickReplyAction deleted - */ - - /** - * Constructs a new QuickReplyAction. - * @memberof proto - * @classdesc Represents a QuickReplyAction. - * @implements IQuickReplyAction - * @constructor - * @param {proto.IQuickReplyAction=} [properties] Properties to set - */ - function QuickReplyAction(properties) { - this.keywords = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QuickReplyAction shortcut. - * @member {string} shortcut - * @memberof proto.QuickReplyAction - * @instance - */ - QuickReplyAction.prototype.shortcut = ""; - - /** - * QuickReplyAction message. - * @member {string} message - * @memberof proto.QuickReplyAction - * @instance - */ - QuickReplyAction.prototype.message = ""; - - /** - * QuickReplyAction keywords. - * @member {Array.} keywords - * @memberof proto.QuickReplyAction - * @instance - */ - QuickReplyAction.prototype.keywords = $util.emptyArray; - - /** - * QuickReplyAction count. - * @member {number} count - * @memberof proto.QuickReplyAction - * @instance - */ - QuickReplyAction.prototype.count = 0; - - /** - * QuickReplyAction deleted. - * @member {boolean} deleted - * @memberof proto.QuickReplyAction - * @instance - */ - QuickReplyAction.prototype.deleted = false; - - /** - * Creates a new QuickReplyAction instance using the specified properties. - * @function create - * @memberof proto.QuickReplyAction - * @static - * @param {proto.IQuickReplyAction=} [properties] Properties to set - * @returns {proto.QuickReplyAction} QuickReplyAction instance - */ - QuickReplyAction.create = function create(properties) { - return new QuickReplyAction(properties); - }; - - /** - * Encodes the specified QuickReplyAction message. Does not implicitly {@link proto.QuickReplyAction.verify|verify} messages. - * @function encode - * @memberof proto.QuickReplyAction - * @static - * @param {proto.IQuickReplyAction} message QuickReplyAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QuickReplyAction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.shortcut != null && Object.hasOwnProperty.call(message, "shortcut")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.shortcut); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); - if (message.keywords != null && message.keywords.length) - for (var i = 0; i < message.keywords.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.keywords[i]); - if (message.count != null && Object.hasOwnProperty.call(message, "count")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.count); - if (message.deleted != null && Object.hasOwnProperty.call(message, "deleted")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.deleted); - return writer; - }; - - /** - * Encodes the specified QuickReplyAction message, length delimited. Does not implicitly {@link proto.QuickReplyAction.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.QuickReplyAction - * @static - * @param {proto.IQuickReplyAction} message QuickReplyAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QuickReplyAction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QuickReplyAction message from the specified reader or buffer. - * @function decode - * @memberof proto.QuickReplyAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.QuickReplyAction} QuickReplyAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QuickReplyAction.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.QuickReplyAction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.shortcut = reader.string(); - break; - case 2: - message.message = reader.string(); - break; - case 3: - if (!(message.keywords && message.keywords.length)) - message.keywords = []; - message.keywords.push(reader.string()); - break; - case 4: - message.count = reader.int32(); - break; - case 5: - message.deleted = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QuickReplyAction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.QuickReplyAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.QuickReplyAction} QuickReplyAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QuickReplyAction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QuickReplyAction message. - * @function verify - * @memberof proto.QuickReplyAction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QuickReplyAction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.shortcut != null && message.hasOwnProperty("shortcut")) - if (!$util.isString(message.shortcut)) - return "shortcut: string expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.keywords != null && message.hasOwnProperty("keywords")) { - if (!Array.isArray(message.keywords)) - return "keywords: array expected"; - for (var i = 0; i < message.keywords.length; ++i) - if (!$util.isString(message.keywords[i])) - return "keywords: string[] expected"; - } - if (message.count != null && message.hasOwnProperty("count")) - if (!$util.isInteger(message.count)) - return "count: integer expected"; - if (message.deleted != null && message.hasOwnProperty("deleted")) - if (typeof message.deleted !== "boolean") - return "deleted: boolean expected"; - return null; - }; - - /** - * Creates a QuickReplyAction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.QuickReplyAction - * @static - * @param {Object.} object Plain object - * @returns {proto.QuickReplyAction} QuickReplyAction - */ - QuickReplyAction.fromObject = function fromObject(object) { - if (object instanceof $root.proto.QuickReplyAction) - return object; - var message = new $root.proto.QuickReplyAction(); - if (object.shortcut != null) - message.shortcut = String(object.shortcut); - if (object.message != null) - message.message = String(object.message); - if (object.keywords) { - if (!Array.isArray(object.keywords)) - throw TypeError(".proto.QuickReplyAction.keywords: array expected"); - message.keywords = []; - for (var i = 0; i < object.keywords.length; ++i) - message.keywords[i] = String(object.keywords[i]); - } - if (object.count != null) - message.count = object.count | 0; - if (object.deleted != null) - message.deleted = Boolean(object.deleted); - return message; - }; - - /** - * Creates a plain object from a QuickReplyAction message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.QuickReplyAction - * @static - * @param {proto.QuickReplyAction} message QuickReplyAction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QuickReplyAction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.keywords = []; - if (options.defaults) { - object.shortcut = ""; - object.message = ""; - object.count = 0; - object.deleted = false; - } - if (message.shortcut != null && message.hasOwnProperty("shortcut")) - object.shortcut = message.shortcut; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.keywords && message.keywords.length) { - object.keywords = []; - for (var j = 0; j < message.keywords.length; ++j) - object.keywords[j] = message.keywords[j]; - } - if (message.count != null && message.hasOwnProperty("count")) - object.count = message.count; - if (message.deleted != null && message.hasOwnProperty("deleted")) - object.deleted = message.deleted; - return object; - }; - - /** - * Converts this QuickReplyAction to JSON. - * @function toJSON - * @memberof proto.QuickReplyAction - * @instance - * @returns {Object.} JSON object - */ - QuickReplyAction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QuickReplyAction; - })(); - - proto.RecentEmojiWeight = (function() { - - /** - * Properties of a RecentEmojiWeight. - * @memberof proto - * @interface IRecentEmojiWeight - * @property {string|null} [emoji] RecentEmojiWeight emoji - * @property {number|null} [weight] RecentEmojiWeight weight - */ - - /** - * Constructs a new RecentEmojiWeight. - * @memberof proto - * @classdesc Represents a RecentEmojiWeight. - * @implements IRecentEmojiWeight - * @constructor - * @param {proto.IRecentEmojiWeight=} [properties] Properties to set - */ - function RecentEmojiWeight(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RecentEmojiWeight emoji. - * @member {string} emoji - * @memberof proto.RecentEmojiWeight - * @instance - */ - RecentEmojiWeight.prototype.emoji = ""; - - /** - * RecentEmojiWeight weight. - * @member {number} weight - * @memberof proto.RecentEmojiWeight - * @instance - */ - RecentEmojiWeight.prototype.weight = 0; - - /** - * Creates a new RecentEmojiWeight instance using the specified properties. - * @function create - * @memberof proto.RecentEmojiWeight - * @static - * @param {proto.IRecentEmojiWeight=} [properties] Properties to set - * @returns {proto.RecentEmojiWeight} RecentEmojiWeight instance - */ - RecentEmojiWeight.create = function create(properties) { - return new RecentEmojiWeight(properties); - }; - - /** - * Encodes the specified RecentEmojiWeight message. Does not implicitly {@link proto.RecentEmojiWeight.verify|verify} messages. - * @function encode - * @memberof proto.RecentEmojiWeight - * @static - * @param {proto.IRecentEmojiWeight} message RecentEmojiWeight message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RecentEmojiWeight.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.emoji != null && Object.hasOwnProperty.call(message, "emoji")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.emoji); - if (message.weight != null && Object.hasOwnProperty.call(message, "weight")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.weight); - return writer; - }; - - /** - * Encodes the specified RecentEmojiWeight message, length delimited. Does not implicitly {@link proto.RecentEmojiWeight.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.RecentEmojiWeight - * @static - * @param {proto.IRecentEmojiWeight} message RecentEmojiWeight message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RecentEmojiWeight.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RecentEmojiWeight message from the specified reader or buffer. - * @function decode - * @memberof proto.RecentEmojiWeight - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.RecentEmojiWeight} RecentEmojiWeight - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RecentEmojiWeight.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.RecentEmojiWeight(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.emoji = reader.string(); - break; - case 2: - message.weight = reader.float(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RecentEmojiWeight message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.RecentEmojiWeight - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.RecentEmojiWeight} RecentEmojiWeight - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RecentEmojiWeight.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RecentEmojiWeight message. - * @function verify - * @memberof proto.RecentEmojiWeight - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RecentEmojiWeight.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.emoji != null && message.hasOwnProperty("emoji")) - if (!$util.isString(message.emoji)) - return "emoji: string expected"; - if (message.weight != null && message.hasOwnProperty("weight")) - if (typeof message.weight !== "number") - return "weight: number expected"; - return null; - }; - - /** - * Creates a RecentEmojiWeight message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.RecentEmojiWeight - * @static - * @param {Object.} object Plain object - * @returns {proto.RecentEmojiWeight} RecentEmojiWeight - */ - RecentEmojiWeight.fromObject = function fromObject(object) { - if (object instanceof $root.proto.RecentEmojiWeight) - return object; - var message = new $root.proto.RecentEmojiWeight(); - if (object.emoji != null) - message.emoji = String(object.emoji); - if (object.weight != null) - message.weight = Number(object.weight); - return message; - }; - - /** - * Creates a plain object from a RecentEmojiWeight message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.RecentEmojiWeight - * @static - * @param {proto.RecentEmojiWeight} message RecentEmojiWeight - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RecentEmojiWeight.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.emoji = ""; - object.weight = 0; - } - if (message.emoji != null && message.hasOwnProperty("emoji")) - object.emoji = message.emoji; - if (message.weight != null && message.hasOwnProperty("weight")) - object.weight = options.json && !isFinite(message.weight) ? String(message.weight) : message.weight; - return object; - }; - - /** - * Converts this RecentEmojiWeight to JSON. - * @function toJSON - * @memberof proto.RecentEmojiWeight - * @instance - * @returns {Object.} JSON object - */ - RecentEmojiWeight.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RecentEmojiWeight; - })(); - - proto.RecentEmojiWeightsAction = (function() { - - /** - * Properties of a RecentEmojiWeightsAction. - * @memberof proto - * @interface IRecentEmojiWeightsAction - * @property {Array.|null} [weights] RecentEmojiWeightsAction weights - */ - - /** - * Constructs a new RecentEmojiWeightsAction. - * @memberof proto - * @classdesc Represents a RecentEmojiWeightsAction. - * @implements IRecentEmojiWeightsAction - * @constructor - * @param {proto.IRecentEmojiWeightsAction=} [properties] Properties to set - */ - function RecentEmojiWeightsAction(properties) { - this.weights = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RecentEmojiWeightsAction weights. - * @member {Array.} weights - * @memberof proto.RecentEmojiWeightsAction - * @instance - */ - RecentEmojiWeightsAction.prototype.weights = $util.emptyArray; - - /** - * Creates a new RecentEmojiWeightsAction instance using the specified properties. - * @function create - * @memberof proto.RecentEmojiWeightsAction - * @static - * @param {proto.IRecentEmojiWeightsAction=} [properties] Properties to set - * @returns {proto.RecentEmojiWeightsAction} RecentEmojiWeightsAction instance - */ - RecentEmojiWeightsAction.create = function create(properties) { - return new RecentEmojiWeightsAction(properties); - }; - - /** - * Encodes the specified RecentEmojiWeightsAction message. Does not implicitly {@link proto.RecentEmojiWeightsAction.verify|verify} messages. - * @function encode - * @memberof proto.RecentEmojiWeightsAction - * @static - * @param {proto.IRecentEmojiWeightsAction} message RecentEmojiWeightsAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RecentEmojiWeightsAction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.weights != null && message.weights.length) - for (var i = 0; i < message.weights.length; ++i) - $root.proto.RecentEmojiWeight.encode(message.weights[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RecentEmojiWeightsAction message, length delimited. Does not implicitly {@link proto.RecentEmojiWeightsAction.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.RecentEmojiWeightsAction - * @static - * @param {proto.IRecentEmojiWeightsAction} message RecentEmojiWeightsAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RecentEmojiWeightsAction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RecentEmojiWeightsAction message from the specified reader or buffer. - * @function decode - * @memberof proto.RecentEmojiWeightsAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.RecentEmojiWeightsAction} RecentEmojiWeightsAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RecentEmojiWeightsAction.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.RecentEmojiWeightsAction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.weights && message.weights.length)) - message.weights = []; - message.weights.push($root.proto.RecentEmojiWeight.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RecentEmojiWeightsAction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.RecentEmojiWeightsAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.RecentEmojiWeightsAction} RecentEmojiWeightsAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RecentEmojiWeightsAction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RecentEmojiWeightsAction message. - * @function verify - * @memberof proto.RecentEmojiWeightsAction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RecentEmojiWeightsAction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.weights != null && message.hasOwnProperty("weights")) { - if (!Array.isArray(message.weights)) - return "weights: array expected"; - for (var i = 0; i < message.weights.length; ++i) { - var error = $root.proto.RecentEmojiWeight.verify(message.weights[i]); - if (error) - return "weights." + error; - } - } - return null; - }; - - /** - * Creates a RecentEmojiWeightsAction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.RecentEmojiWeightsAction - * @static - * @param {Object.} object Plain object - * @returns {proto.RecentEmojiWeightsAction} RecentEmojiWeightsAction - */ - RecentEmojiWeightsAction.fromObject = function fromObject(object) { - if (object instanceof $root.proto.RecentEmojiWeightsAction) - return object; - var message = new $root.proto.RecentEmojiWeightsAction(); - if (object.weights) { - if (!Array.isArray(object.weights)) - throw TypeError(".proto.RecentEmojiWeightsAction.weights: array expected"); - message.weights = []; - for (var i = 0; i < object.weights.length; ++i) { - if (typeof object.weights[i] !== "object") - throw TypeError(".proto.RecentEmojiWeightsAction.weights: object expected"); - message.weights[i] = $root.proto.RecentEmojiWeight.fromObject(object.weights[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a RecentEmojiWeightsAction message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.RecentEmojiWeightsAction - * @static - * @param {proto.RecentEmojiWeightsAction} message RecentEmojiWeightsAction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RecentEmojiWeightsAction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.weights = []; - if (message.weights && message.weights.length) { - object.weights = []; - for (var j = 0; j < message.weights.length; ++j) - object.weights[j] = $root.proto.RecentEmojiWeight.toObject(message.weights[j], options); - } - return object; - }; - - /** - * Converts this RecentEmojiWeightsAction to JSON. - * @function toJSON - * @memberof proto.RecentEmojiWeightsAction - * @instance - * @returns {Object.} JSON object - */ - RecentEmojiWeightsAction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RecentEmojiWeightsAction; - })(); - - proto.RecentStickerMetadata = (function() { - - /** - * Properties of a RecentStickerMetadata. - * @memberof proto - * @interface IRecentStickerMetadata - * @property {string|null} [directPath] RecentStickerMetadata directPath - * @property {string|null} [encFilehash] RecentStickerMetadata encFilehash - * @property {string|null} [mediaKey] RecentStickerMetadata mediaKey - * @property {string|null} [stanzaId] RecentStickerMetadata stanzaId - * @property {string|null} [chatJid] RecentStickerMetadata chatJid - * @property {string|null} [participant] RecentStickerMetadata participant - * @property {boolean|null} [isSentByMe] RecentStickerMetadata isSentByMe - */ - - /** - * Constructs a new RecentStickerMetadata. - * @memberof proto - * @classdesc Represents a RecentStickerMetadata. - * @implements IRecentStickerMetadata - * @constructor - * @param {proto.IRecentStickerMetadata=} [properties] Properties to set - */ - function RecentStickerMetadata(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RecentStickerMetadata directPath. - * @member {string} directPath - * @memberof proto.RecentStickerMetadata - * @instance - */ - RecentStickerMetadata.prototype.directPath = ""; - - /** - * RecentStickerMetadata encFilehash. - * @member {string} encFilehash - * @memberof proto.RecentStickerMetadata - * @instance - */ - RecentStickerMetadata.prototype.encFilehash = ""; - - /** - * RecentStickerMetadata mediaKey. - * @member {string} mediaKey - * @memberof proto.RecentStickerMetadata - * @instance - */ - RecentStickerMetadata.prototype.mediaKey = ""; - - /** - * RecentStickerMetadata stanzaId. - * @member {string} stanzaId - * @memberof proto.RecentStickerMetadata - * @instance - */ - RecentStickerMetadata.prototype.stanzaId = ""; - - /** - * RecentStickerMetadata chatJid. - * @member {string} chatJid - * @memberof proto.RecentStickerMetadata - * @instance - */ - RecentStickerMetadata.prototype.chatJid = ""; - - /** - * RecentStickerMetadata participant. - * @member {string} participant - * @memberof proto.RecentStickerMetadata - * @instance - */ - RecentStickerMetadata.prototype.participant = ""; - - /** - * RecentStickerMetadata isSentByMe. - * @member {boolean} isSentByMe - * @memberof proto.RecentStickerMetadata - * @instance - */ - RecentStickerMetadata.prototype.isSentByMe = false; - - /** - * Creates a new RecentStickerMetadata instance using the specified properties. - * @function create - * @memberof proto.RecentStickerMetadata - * @static - * @param {proto.IRecentStickerMetadata=} [properties] Properties to set - * @returns {proto.RecentStickerMetadata} RecentStickerMetadata instance - */ - RecentStickerMetadata.create = function create(properties) { - return new RecentStickerMetadata(properties); - }; - - /** - * Encodes the specified RecentStickerMetadata message. Does not implicitly {@link proto.RecentStickerMetadata.verify|verify} messages. - * @function encode - * @memberof proto.RecentStickerMetadata - * @static - * @param {proto.IRecentStickerMetadata} message RecentStickerMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RecentStickerMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.directPath); - if (message.encFilehash != null && Object.hasOwnProperty.call(message, "encFilehash")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.encFilehash); - if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.mediaKey); - if (message.stanzaId != null && Object.hasOwnProperty.call(message, "stanzaId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.stanzaId); - if (message.chatJid != null && Object.hasOwnProperty.call(message, "chatJid")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.chatJid); - if (message.participant != null && Object.hasOwnProperty.call(message, "participant")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.participant); - if (message.isSentByMe != null && Object.hasOwnProperty.call(message, "isSentByMe")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.isSentByMe); - return writer; - }; - - /** - * Encodes the specified RecentStickerMetadata message, length delimited. Does not implicitly {@link proto.RecentStickerMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.RecentStickerMetadata - * @static - * @param {proto.IRecentStickerMetadata} message RecentStickerMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RecentStickerMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RecentStickerMetadata message from the specified reader or buffer. - * @function decode - * @memberof proto.RecentStickerMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.RecentStickerMetadata} RecentStickerMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RecentStickerMetadata.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.RecentStickerMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.directPath = reader.string(); - break; - case 2: - message.encFilehash = reader.string(); - break; - case 3: - message.mediaKey = reader.string(); - break; - case 4: - message.stanzaId = reader.string(); - break; - case 5: - message.chatJid = reader.string(); - break; - case 6: - message.participant = reader.string(); - break; - case 7: - message.isSentByMe = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RecentStickerMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.RecentStickerMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.RecentStickerMetadata} RecentStickerMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RecentStickerMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RecentStickerMetadata message. - * @function verify - * @memberof proto.RecentStickerMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RecentStickerMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.directPath != null && message.hasOwnProperty("directPath")) - if (!$util.isString(message.directPath)) - return "directPath: string expected"; - if (message.encFilehash != null && message.hasOwnProperty("encFilehash")) - if (!$util.isString(message.encFilehash)) - return "encFilehash: string expected"; - if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) - if (!$util.isString(message.mediaKey)) - return "mediaKey: string expected"; - if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) - if (!$util.isString(message.stanzaId)) - return "stanzaId: string expected"; - if (message.chatJid != null && message.hasOwnProperty("chatJid")) - if (!$util.isString(message.chatJid)) - return "chatJid: string expected"; - if (message.participant != null && message.hasOwnProperty("participant")) - if (!$util.isString(message.participant)) - return "participant: string expected"; - if (message.isSentByMe != null && message.hasOwnProperty("isSentByMe")) - if (typeof message.isSentByMe !== "boolean") - return "isSentByMe: boolean expected"; - return null; - }; - - /** - * Creates a RecentStickerMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.RecentStickerMetadata - * @static - * @param {Object.} object Plain object - * @returns {proto.RecentStickerMetadata} RecentStickerMetadata - */ - RecentStickerMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.proto.RecentStickerMetadata) - return object; - var message = new $root.proto.RecentStickerMetadata(); - if (object.directPath != null) - message.directPath = String(object.directPath); - if (object.encFilehash != null) - message.encFilehash = String(object.encFilehash); - if (object.mediaKey != null) - message.mediaKey = String(object.mediaKey); - if (object.stanzaId != null) - message.stanzaId = String(object.stanzaId); - if (object.chatJid != null) - message.chatJid = String(object.chatJid); - if (object.participant != null) - message.participant = String(object.participant); - if (object.isSentByMe != null) - message.isSentByMe = Boolean(object.isSentByMe); - return message; - }; - - /** - * Creates a plain object from a RecentStickerMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.RecentStickerMetadata - * @static - * @param {proto.RecentStickerMetadata} message RecentStickerMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RecentStickerMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.directPath = ""; - object.encFilehash = ""; - object.mediaKey = ""; - object.stanzaId = ""; - object.chatJid = ""; - object.participant = ""; - object.isSentByMe = false; - } - if (message.directPath != null && message.hasOwnProperty("directPath")) - object.directPath = message.directPath; - if (message.encFilehash != null && message.hasOwnProperty("encFilehash")) - object.encFilehash = message.encFilehash; - if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) - object.mediaKey = message.mediaKey; - if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) - object.stanzaId = message.stanzaId; - if (message.chatJid != null && message.hasOwnProperty("chatJid")) - object.chatJid = message.chatJid; - if (message.participant != null && message.hasOwnProperty("participant")) - object.participant = message.participant; - if (message.isSentByMe != null && message.hasOwnProperty("isSentByMe")) - object.isSentByMe = message.isSentByMe; - return object; - }; - - /** - * Converts this RecentStickerMetadata to JSON. - * @function toJSON - * @memberof proto.RecentStickerMetadata - * @instance - * @returns {Object.} JSON object - */ - RecentStickerMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RecentStickerMetadata; - })(); - - proto.RecentStickerWeight = (function() { - - /** - * Properties of a RecentStickerWeight. - * @memberof proto - * @interface IRecentStickerWeight - * @property {string|null} [filehash] RecentStickerWeight filehash - * @property {number|null} [weight] RecentStickerWeight weight - */ - - /** - * Constructs a new RecentStickerWeight. - * @memberof proto - * @classdesc Represents a RecentStickerWeight. - * @implements IRecentStickerWeight - * @constructor - * @param {proto.IRecentStickerWeight=} [properties] Properties to set - */ - function RecentStickerWeight(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RecentStickerWeight filehash. - * @member {string} filehash - * @memberof proto.RecentStickerWeight - * @instance - */ - RecentStickerWeight.prototype.filehash = ""; - - /** - * RecentStickerWeight weight. - * @member {number} weight - * @memberof proto.RecentStickerWeight - * @instance - */ - RecentStickerWeight.prototype.weight = 0; - - /** - * Creates a new RecentStickerWeight instance using the specified properties. - * @function create - * @memberof proto.RecentStickerWeight - * @static - * @param {proto.IRecentStickerWeight=} [properties] Properties to set - * @returns {proto.RecentStickerWeight} RecentStickerWeight instance - */ - RecentStickerWeight.create = function create(properties) { - return new RecentStickerWeight(properties); - }; - - /** - * Encodes the specified RecentStickerWeight message. Does not implicitly {@link proto.RecentStickerWeight.verify|verify} messages. - * @function encode - * @memberof proto.RecentStickerWeight - * @static - * @param {proto.IRecentStickerWeight} message RecentStickerWeight message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RecentStickerWeight.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.filehash != null && Object.hasOwnProperty.call(message, "filehash")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.filehash); - if (message.weight != null && Object.hasOwnProperty.call(message, "weight")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.weight); - return writer; - }; - - /** - * Encodes the specified RecentStickerWeight message, length delimited. Does not implicitly {@link proto.RecentStickerWeight.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.RecentStickerWeight - * @static - * @param {proto.IRecentStickerWeight} message RecentStickerWeight message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RecentStickerWeight.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RecentStickerWeight message from the specified reader or buffer. - * @function decode - * @memberof proto.RecentStickerWeight - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.RecentStickerWeight} RecentStickerWeight - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RecentStickerWeight.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.RecentStickerWeight(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.filehash = reader.string(); - break; - case 2: - message.weight = reader.float(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RecentStickerWeight message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.RecentStickerWeight - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.RecentStickerWeight} RecentStickerWeight - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RecentStickerWeight.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RecentStickerWeight message. - * @function verify - * @memberof proto.RecentStickerWeight - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RecentStickerWeight.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.filehash != null && message.hasOwnProperty("filehash")) - if (!$util.isString(message.filehash)) - return "filehash: string expected"; - if (message.weight != null && message.hasOwnProperty("weight")) - if (typeof message.weight !== "number") - return "weight: number expected"; - return null; - }; - - /** - * Creates a RecentStickerWeight message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.RecentStickerWeight - * @static - * @param {Object.} object Plain object - * @returns {proto.RecentStickerWeight} RecentStickerWeight - */ - RecentStickerWeight.fromObject = function fromObject(object) { - if (object instanceof $root.proto.RecentStickerWeight) - return object; - var message = new $root.proto.RecentStickerWeight(); - if (object.filehash != null) - message.filehash = String(object.filehash); - if (object.weight != null) - message.weight = Number(object.weight); - return message; - }; - - /** - * Creates a plain object from a RecentStickerWeight message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.RecentStickerWeight - * @static - * @param {proto.RecentStickerWeight} message RecentStickerWeight - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RecentStickerWeight.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.filehash = ""; - object.weight = 0; - } - if (message.filehash != null && message.hasOwnProperty("filehash")) - object.filehash = message.filehash; - if (message.weight != null && message.hasOwnProperty("weight")) - object.weight = options.json && !isFinite(message.weight) ? String(message.weight) : message.weight; - return object; - }; - - /** - * Converts this RecentStickerWeight to JSON. - * @function toJSON - * @memberof proto.RecentStickerWeight - * @instance - * @returns {Object.} JSON object - */ - RecentStickerWeight.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RecentStickerWeight; - })(); - - proto.RecentStickerWeightsAction = (function() { - - /** - * Properties of a RecentStickerWeightsAction. - * @memberof proto - * @interface IRecentStickerWeightsAction - * @property {Array.|null} [weights] RecentStickerWeightsAction weights - */ - - /** - * Constructs a new RecentStickerWeightsAction. - * @memberof proto - * @classdesc Represents a RecentStickerWeightsAction. - * @implements IRecentStickerWeightsAction - * @constructor - * @param {proto.IRecentStickerWeightsAction=} [properties] Properties to set - */ - function RecentStickerWeightsAction(properties) { - this.weights = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RecentStickerWeightsAction weights. - * @member {Array.} weights - * @memberof proto.RecentStickerWeightsAction - * @instance - */ - RecentStickerWeightsAction.prototype.weights = $util.emptyArray; - - /** - * Creates a new RecentStickerWeightsAction instance using the specified properties. - * @function create - * @memberof proto.RecentStickerWeightsAction - * @static - * @param {proto.IRecentStickerWeightsAction=} [properties] Properties to set - * @returns {proto.RecentStickerWeightsAction} RecentStickerWeightsAction instance - */ - RecentStickerWeightsAction.create = function create(properties) { - return new RecentStickerWeightsAction(properties); - }; - - /** - * Encodes the specified RecentStickerWeightsAction message. Does not implicitly {@link proto.RecentStickerWeightsAction.verify|verify} messages. - * @function encode - * @memberof proto.RecentStickerWeightsAction - * @static - * @param {proto.IRecentStickerWeightsAction} message RecentStickerWeightsAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RecentStickerWeightsAction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.weights != null && message.weights.length) - for (var i = 0; i < message.weights.length; ++i) - $root.proto.RecentStickerWeight.encode(message.weights[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RecentStickerWeightsAction message, length delimited. Does not implicitly {@link proto.RecentStickerWeightsAction.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.RecentStickerWeightsAction - * @static - * @param {proto.IRecentStickerWeightsAction} message RecentStickerWeightsAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RecentStickerWeightsAction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RecentStickerWeightsAction message from the specified reader or buffer. - * @function decode - * @memberof proto.RecentStickerWeightsAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.RecentStickerWeightsAction} RecentStickerWeightsAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RecentStickerWeightsAction.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.RecentStickerWeightsAction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.weights && message.weights.length)) - message.weights = []; - message.weights.push($root.proto.RecentStickerWeight.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RecentStickerWeightsAction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.RecentStickerWeightsAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.RecentStickerWeightsAction} RecentStickerWeightsAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RecentStickerWeightsAction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RecentStickerWeightsAction message. - * @function verify - * @memberof proto.RecentStickerWeightsAction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RecentStickerWeightsAction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.weights != null && message.hasOwnProperty("weights")) { - if (!Array.isArray(message.weights)) - return "weights: array expected"; - for (var i = 0; i < message.weights.length; ++i) { - var error = $root.proto.RecentStickerWeight.verify(message.weights[i]); - if (error) - return "weights." + error; - } - } - return null; - }; - - /** - * Creates a RecentStickerWeightsAction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.RecentStickerWeightsAction - * @static - * @param {Object.} object Plain object - * @returns {proto.RecentStickerWeightsAction} RecentStickerWeightsAction - */ - RecentStickerWeightsAction.fromObject = function fromObject(object) { - if (object instanceof $root.proto.RecentStickerWeightsAction) - return object; - var message = new $root.proto.RecentStickerWeightsAction(); - if (object.weights) { - if (!Array.isArray(object.weights)) - throw TypeError(".proto.RecentStickerWeightsAction.weights: array expected"); - message.weights = []; - for (var i = 0; i < object.weights.length; ++i) { - if (typeof object.weights[i] !== "object") - throw TypeError(".proto.RecentStickerWeightsAction.weights: object expected"); - message.weights[i] = $root.proto.RecentStickerWeight.fromObject(object.weights[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a RecentStickerWeightsAction message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.RecentStickerWeightsAction - * @static - * @param {proto.RecentStickerWeightsAction} message RecentStickerWeightsAction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RecentStickerWeightsAction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.weights = []; - if (message.weights && message.weights.length) { - object.weights = []; - for (var j = 0; j < message.weights.length; ++j) - object.weights[j] = $root.proto.RecentStickerWeight.toObject(message.weights[j], options); - } - return object; - }; - - /** - * Converts this RecentStickerWeightsAction to JSON. - * @function toJSON - * @memberof proto.RecentStickerWeightsAction - * @instance - * @returns {Object.} JSON object - */ - RecentStickerWeightsAction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RecentStickerWeightsAction; - })(); - - proto.SecurityNotificationSetting = (function() { - - /** - * Properties of a SecurityNotificationSetting. - * @memberof proto - * @interface ISecurityNotificationSetting - * @property {boolean|null} [showNotification] SecurityNotificationSetting showNotification - */ - - /** - * Constructs a new SecurityNotificationSetting. - * @memberof proto - * @classdesc Represents a SecurityNotificationSetting. - * @implements ISecurityNotificationSetting - * @constructor - * @param {proto.ISecurityNotificationSetting=} [properties] Properties to set - */ - function SecurityNotificationSetting(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SecurityNotificationSetting showNotification. - * @member {boolean} showNotification - * @memberof proto.SecurityNotificationSetting - * @instance - */ - SecurityNotificationSetting.prototype.showNotification = false; - - /** - * Creates a new SecurityNotificationSetting instance using the specified properties. - * @function create - * @memberof proto.SecurityNotificationSetting - * @static - * @param {proto.ISecurityNotificationSetting=} [properties] Properties to set - * @returns {proto.SecurityNotificationSetting} SecurityNotificationSetting instance - */ - SecurityNotificationSetting.create = function create(properties) { - return new SecurityNotificationSetting(properties); - }; - - /** - * Encodes the specified SecurityNotificationSetting message. Does not implicitly {@link proto.SecurityNotificationSetting.verify|verify} messages. - * @function encode - * @memberof proto.SecurityNotificationSetting - * @static - * @param {proto.ISecurityNotificationSetting} message SecurityNotificationSetting message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SecurityNotificationSetting.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.showNotification != null && Object.hasOwnProperty.call(message, "showNotification")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.showNotification); - return writer; - }; - - /** - * Encodes the specified SecurityNotificationSetting message, length delimited. Does not implicitly {@link proto.SecurityNotificationSetting.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.SecurityNotificationSetting - * @static - * @param {proto.ISecurityNotificationSetting} message SecurityNotificationSetting message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SecurityNotificationSetting.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SecurityNotificationSetting message from the specified reader or buffer. - * @function decode - * @memberof proto.SecurityNotificationSetting - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.SecurityNotificationSetting} SecurityNotificationSetting - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SecurityNotificationSetting.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.SecurityNotificationSetting(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.showNotification = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SecurityNotificationSetting message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.SecurityNotificationSetting - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.SecurityNotificationSetting} SecurityNotificationSetting - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SecurityNotificationSetting.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SecurityNotificationSetting message. - * @function verify - * @memberof proto.SecurityNotificationSetting - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SecurityNotificationSetting.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.showNotification != null && message.hasOwnProperty("showNotification")) - if (typeof message.showNotification !== "boolean") - return "showNotification: boolean expected"; - return null; - }; - - /** - * Creates a SecurityNotificationSetting message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.SecurityNotificationSetting - * @static - * @param {Object.} object Plain object - * @returns {proto.SecurityNotificationSetting} SecurityNotificationSetting - */ - SecurityNotificationSetting.fromObject = function fromObject(object) { - if (object instanceof $root.proto.SecurityNotificationSetting) - return object; - var message = new $root.proto.SecurityNotificationSetting(); - if (object.showNotification != null) - message.showNotification = Boolean(object.showNotification); - return message; - }; - - /** - * Creates a plain object from a SecurityNotificationSetting message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.SecurityNotificationSetting - * @static - * @param {proto.SecurityNotificationSetting} message SecurityNotificationSetting - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SecurityNotificationSetting.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.showNotification = false; - if (message.showNotification != null && message.hasOwnProperty("showNotification")) - object.showNotification = message.showNotification; - return object; - }; - - /** - * Converts this SecurityNotificationSetting to JSON. - * @function toJSON - * @memberof proto.SecurityNotificationSetting - * @instance - * @returns {Object.} JSON object - */ - SecurityNotificationSetting.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SecurityNotificationSetting; - })(); - - proto.StarAction = (function() { - - /** - * Properties of a StarAction. - * @memberof proto - * @interface IStarAction - * @property {boolean|null} [starred] StarAction starred - */ - - /** - * Constructs a new StarAction. - * @memberof proto - * @classdesc Represents a StarAction. - * @implements IStarAction - * @constructor - * @param {proto.IStarAction=} [properties] Properties to set - */ - function StarAction(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StarAction starred. - * @member {boolean} starred - * @memberof proto.StarAction - * @instance - */ - StarAction.prototype.starred = false; - - /** - * Creates a new StarAction instance using the specified properties. - * @function create - * @memberof proto.StarAction - * @static - * @param {proto.IStarAction=} [properties] Properties to set - * @returns {proto.StarAction} StarAction instance - */ - StarAction.create = function create(properties) { - return new StarAction(properties); - }; - - /** - * Encodes the specified StarAction message. Does not implicitly {@link proto.StarAction.verify|verify} messages. - * @function encode - * @memberof proto.StarAction - * @static - * @param {proto.IStarAction} message StarAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StarAction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.starred != null && Object.hasOwnProperty.call(message, "starred")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.starred); - return writer; - }; - - /** - * Encodes the specified StarAction message, length delimited. Does not implicitly {@link proto.StarAction.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.StarAction - * @static - * @param {proto.IStarAction} message StarAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StarAction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StarAction message from the specified reader or buffer. - * @function decode - * @memberof proto.StarAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.StarAction} StarAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StarAction.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.StarAction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.starred = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StarAction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.StarAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.StarAction} StarAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StarAction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StarAction message. - * @function verify - * @memberof proto.StarAction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StarAction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.starred != null && message.hasOwnProperty("starred")) - if (typeof message.starred !== "boolean") - return "starred: boolean expected"; - return null; - }; - - /** - * Creates a StarAction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.StarAction - * @static - * @param {Object.} object Plain object - * @returns {proto.StarAction} StarAction - */ - StarAction.fromObject = function fromObject(object) { - if (object instanceof $root.proto.StarAction) - return object; - var message = new $root.proto.StarAction(); - if (object.starred != null) - message.starred = Boolean(object.starred); - return message; - }; - - /** - * Creates a plain object from a StarAction message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.StarAction - * @static - * @param {proto.StarAction} message StarAction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StarAction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.starred = false; - if (message.starred != null && message.hasOwnProperty("starred")) - object.starred = message.starred; - return object; - }; - - /** - * Converts this StarAction to JSON. - * @function toJSON - * @memberof proto.StarAction - * @instance - * @returns {Object.} JSON object - */ - StarAction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return StarAction; - })(); - - proto.SubscriptionAction = (function() { - - /** - * Properties of a SubscriptionAction. - * @memberof proto - * @interface ISubscriptionAction - * @property {boolean|null} [isDeactivated] SubscriptionAction isDeactivated - * @property {boolean|null} [isAutoRenewing] SubscriptionAction isAutoRenewing - * @property {number|Long|null} [expirationDate] SubscriptionAction expirationDate - */ - - /** - * Constructs a new SubscriptionAction. - * @memberof proto - * @classdesc Represents a SubscriptionAction. - * @implements ISubscriptionAction - * @constructor - * @param {proto.ISubscriptionAction=} [properties] Properties to set - */ - function SubscriptionAction(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SubscriptionAction isDeactivated. - * @member {boolean} isDeactivated - * @memberof proto.SubscriptionAction - * @instance - */ - SubscriptionAction.prototype.isDeactivated = false; - - /** - * SubscriptionAction isAutoRenewing. - * @member {boolean} isAutoRenewing - * @memberof proto.SubscriptionAction - * @instance - */ - SubscriptionAction.prototype.isAutoRenewing = false; - - /** - * SubscriptionAction expirationDate. - * @member {number|Long} expirationDate - * @memberof proto.SubscriptionAction - * @instance - */ - SubscriptionAction.prototype.expirationDate = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new SubscriptionAction instance using the specified properties. - * @function create - * @memberof proto.SubscriptionAction - * @static - * @param {proto.ISubscriptionAction=} [properties] Properties to set - * @returns {proto.SubscriptionAction} SubscriptionAction instance - */ - SubscriptionAction.create = function create(properties) { - return new SubscriptionAction(properties); - }; - - /** - * Encodes the specified SubscriptionAction message. Does not implicitly {@link proto.SubscriptionAction.verify|verify} messages. - * @function encode - * @memberof proto.SubscriptionAction - * @static - * @param {proto.ISubscriptionAction} message SubscriptionAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SubscriptionAction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.isDeactivated != null && Object.hasOwnProperty.call(message, "isDeactivated")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isDeactivated); - if (message.isAutoRenewing != null && Object.hasOwnProperty.call(message, "isAutoRenewing")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isAutoRenewing); - if (message.expirationDate != null && Object.hasOwnProperty.call(message, "expirationDate")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.expirationDate); - return writer; - }; - - /** - * Encodes the specified SubscriptionAction message, length delimited. Does not implicitly {@link proto.SubscriptionAction.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.SubscriptionAction - * @static - * @param {proto.ISubscriptionAction} message SubscriptionAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SubscriptionAction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SubscriptionAction message from the specified reader or buffer. - * @function decode - * @memberof proto.SubscriptionAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.SubscriptionAction} SubscriptionAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SubscriptionAction.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.SubscriptionAction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.isDeactivated = reader.bool(); - break; - case 2: - message.isAutoRenewing = reader.bool(); - break; - case 3: - message.expirationDate = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SubscriptionAction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.SubscriptionAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.SubscriptionAction} SubscriptionAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SubscriptionAction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SubscriptionAction message. - * @function verify - * @memberof proto.SubscriptionAction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SubscriptionAction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.isDeactivated != null && message.hasOwnProperty("isDeactivated")) - if (typeof message.isDeactivated !== "boolean") - return "isDeactivated: boolean expected"; - if (message.isAutoRenewing != null && message.hasOwnProperty("isAutoRenewing")) - if (typeof message.isAutoRenewing !== "boolean") - return "isAutoRenewing: boolean expected"; - if (message.expirationDate != null && message.hasOwnProperty("expirationDate")) - if (!$util.isInteger(message.expirationDate) && !(message.expirationDate && $util.isInteger(message.expirationDate.low) && $util.isInteger(message.expirationDate.high))) - return "expirationDate: integer|Long expected"; - return null; - }; - - /** - * Creates a SubscriptionAction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.SubscriptionAction - * @static - * @param {Object.} object Plain object - * @returns {proto.SubscriptionAction} SubscriptionAction - */ - SubscriptionAction.fromObject = function fromObject(object) { - if (object instanceof $root.proto.SubscriptionAction) - return object; - var message = new $root.proto.SubscriptionAction(); - if (object.isDeactivated != null) - message.isDeactivated = Boolean(object.isDeactivated); - if (object.isAutoRenewing != null) - message.isAutoRenewing = Boolean(object.isAutoRenewing); - if (object.expirationDate != null) - if ($util.Long) - (message.expirationDate = $util.Long.fromValue(object.expirationDate)).unsigned = false; - else if (typeof object.expirationDate === "string") - message.expirationDate = parseInt(object.expirationDate, 10); - else if (typeof object.expirationDate === "number") - message.expirationDate = object.expirationDate; - else if (typeof object.expirationDate === "object") - message.expirationDate = new $util.LongBits(object.expirationDate.low >>> 0, object.expirationDate.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a SubscriptionAction message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.SubscriptionAction - * @static - * @param {proto.SubscriptionAction} message SubscriptionAction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SubscriptionAction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.isDeactivated = false; - object.isAutoRenewing = false; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.expirationDate = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.expirationDate = options.longs === String ? "0" : 0; - } - if (message.isDeactivated != null && message.hasOwnProperty("isDeactivated")) - object.isDeactivated = message.isDeactivated; - if (message.isAutoRenewing != null && message.hasOwnProperty("isAutoRenewing")) - object.isAutoRenewing = message.isAutoRenewing; - if (message.expirationDate != null && message.hasOwnProperty("expirationDate")) - if (typeof message.expirationDate === "number") - object.expirationDate = options.longs === String ? String(message.expirationDate) : message.expirationDate; - else - object.expirationDate = options.longs === String ? $util.Long.prototype.toString.call(message.expirationDate) : options.longs === Number ? new $util.LongBits(message.expirationDate.low >>> 0, message.expirationDate.high >>> 0).toNumber() : message.expirationDate; - return object; - }; - - /** - * Converts this SubscriptionAction to JSON. - * @function toJSON - * @memberof proto.SubscriptionAction - * @instance - * @returns {Object.} JSON object - */ - SubscriptionAction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SubscriptionAction; - })(); - - proto.SyncActionData = (function() { - - /** - * Properties of a SyncActionData. - * @memberof proto - * @interface ISyncActionData - * @property {Uint8Array|null} [index] SyncActionData index - * @property {proto.ISyncActionValue|null} [value] SyncActionData value - * @property {Uint8Array|null} [padding] SyncActionData padding - * @property {number|null} [version] SyncActionData version - */ - - /** - * Constructs a new SyncActionData. - * @memberof proto - * @classdesc Represents a SyncActionData. - * @implements ISyncActionData - * @constructor - * @param {proto.ISyncActionData=} [properties] Properties to set - */ - function SyncActionData(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SyncActionData index. - * @member {Uint8Array} index - * @memberof proto.SyncActionData - * @instance - */ - SyncActionData.prototype.index = $util.newBuffer([]); - - /** - * SyncActionData value. - * @member {proto.ISyncActionValue|null|undefined} value - * @memberof proto.SyncActionData - * @instance - */ - SyncActionData.prototype.value = null; - - /** - * SyncActionData padding. - * @member {Uint8Array} padding - * @memberof proto.SyncActionData - * @instance - */ - SyncActionData.prototype.padding = $util.newBuffer([]); - - /** - * SyncActionData version. - * @member {number} version - * @memberof proto.SyncActionData - * @instance - */ - SyncActionData.prototype.version = 0; - - /** - * Creates a new SyncActionData instance using the specified properties. - * @function create - * @memberof proto.SyncActionData - * @static - * @param {proto.ISyncActionData=} [properties] Properties to set - * @returns {proto.SyncActionData} SyncActionData instance - */ - SyncActionData.create = function create(properties) { - return new SyncActionData(properties); - }; - - /** - * Encodes the specified SyncActionData message. Does not implicitly {@link proto.SyncActionData.verify|verify} messages. - * @function encode - * @memberof proto.SyncActionData - * @static - * @param {proto.ISyncActionData} message SyncActionData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SyncActionData.encode = function encode(message, writer) { + TemplateButton.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.quickReplyButton != null && Object.hasOwnProperty.call(message, "quickReplyButton")) + $root.proto.QuickReplyButton.encode(message.quickReplyButton, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.urlButton != null && Object.hasOwnProperty.call(message, "urlButton")) + $root.proto.URLButton.encode(message.urlButton, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.callButton != null && Object.hasOwnProperty.call(message, "callButton")) + $root.proto.CallButton.encode(message.callButton, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.index != null && Object.hasOwnProperty.call(message, "index")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.index); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - $root.proto.SyncActionValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.padding != null && Object.hasOwnProperty.call(message, "padding")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.padding); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.version); + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.index); return writer; }; /** - * Encodes the specified SyncActionData message, length delimited. Does not implicitly {@link proto.SyncActionData.verify|verify} messages. + * Encodes the specified TemplateButton message, length delimited. Does not implicitly {@link proto.TemplateButton.verify|verify} messages. * @function encodeDelimited - * @memberof proto.SyncActionData + * @memberof proto.TemplateButton * @static - * @param {proto.ISyncActionData} message SyncActionData message or plain object to encode + * @param {proto.ITemplateButton} message TemplateButton message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SyncActionData.encodeDelimited = function encodeDelimited(message, writer) { + TemplateButton.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SyncActionData message from the specified reader or buffer. + * Decodes a TemplateButton message from the specified reader or buffer. * @function decode - * @memberof proto.SyncActionData + * @memberof proto.TemplateButton * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.SyncActionData} SyncActionData + * @returns {proto.TemplateButton} TemplateButton * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SyncActionData.decode = function decode(reader, length) { + TemplateButton.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.SyncActionData(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.TemplateButton(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.index = reader.bytes(); - break; - case 2: - message.value = $root.proto.SyncActionValue.decode(reader, reader.uint32()); - break; - case 3: - message.padding = reader.bytes(); - break; case 4: - message.version = reader.int32(); + message.index = reader.uint32(); break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SyncActionData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.SyncActionData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.SyncActionData} SyncActionData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SyncActionData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SyncActionData message. - * @function verify - * @memberof proto.SyncActionData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SyncActionData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.index != null && message.hasOwnProperty("index")) - if (!(message.index && typeof message.index.length === "number" || $util.isString(message.index))) - return "index: buffer expected"; - if (message.value != null && message.hasOwnProperty("value")) { - var error = $root.proto.SyncActionValue.verify(message.value); - if (error) - return "value." + error; - } - if (message.padding != null && message.hasOwnProperty("padding")) - if (!(message.padding && typeof message.padding.length === "number" || $util.isString(message.padding))) - return "padding: buffer expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isInteger(message.version)) - return "version: integer expected"; - return null; - }; - - /** - * Creates a SyncActionData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.SyncActionData - * @static - * @param {Object.} object Plain object - * @returns {proto.SyncActionData} SyncActionData - */ - SyncActionData.fromObject = function fromObject(object) { - if (object instanceof $root.proto.SyncActionData) - return object; - var message = new $root.proto.SyncActionData(); - if (object.index != null) - if (typeof object.index === "string") - $util.base64.decode(object.index, message.index = $util.newBuffer($util.base64.length(object.index)), 0); - else if (object.index.length) - message.index = object.index; - if (object.value != null) { - if (typeof object.value !== "object") - throw TypeError(".proto.SyncActionData.value: object expected"); - message.value = $root.proto.SyncActionValue.fromObject(object.value); - } - if (object.padding != null) - if (typeof object.padding === "string") - $util.base64.decode(object.padding, message.padding = $util.newBuffer($util.base64.length(object.padding)), 0); - else if (object.padding.length) - message.padding = object.padding; - if (object.version != null) - message.version = object.version | 0; - return message; - }; - - /** - * Creates a plain object from a SyncActionData message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.SyncActionData - * @static - * @param {proto.SyncActionData} message SyncActionData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SyncActionData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.index = ""; - else { - object.index = []; - if (options.bytes !== Array) - object.index = $util.newBuffer(object.index); - } - object.value = null; - if (options.bytes === String) - object.padding = ""; - else { - object.padding = []; - if (options.bytes !== Array) - object.padding = $util.newBuffer(object.padding); - } - object.version = 0; - } - if (message.index != null && message.hasOwnProperty("index")) - object.index = options.bytes === String ? $util.base64.encode(message.index, 0, message.index.length) : options.bytes === Array ? Array.prototype.slice.call(message.index) : message.index; - if (message.value != null && message.hasOwnProperty("value")) - object.value = $root.proto.SyncActionValue.toObject(message.value, options); - if (message.padding != null && message.hasOwnProperty("padding")) - object.padding = options.bytes === String ? $util.base64.encode(message.padding, 0, message.padding.length) : options.bytes === Array ? Array.prototype.slice.call(message.padding) : message.padding; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - return object; - }; - - /** - * Converts this SyncActionData to JSON. - * @function toJSON - * @memberof proto.SyncActionData - * @instance - * @returns {Object.} JSON object - */ - SyncActionData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SyncActionData; - })(); - - proto.SyncActionMessage = (function() { - - /** - * Properties of a SyncActionMessage. - * @memberof proto - * @interface ISyncActionMessage - * @property {proto.IMessageKey|null} [key] SyncActionMessage key - * @property {number|Long|null} [timestamp] SyncActionMessage timestamp - */ - - /** - * Constructs a new SyncActionMessage. - * @memberof proto - * @classdesc Represents a SyncActionMessage. - * @implements ISyncActionMessage - * @constructor - * @param {proto.ISyncActionMessage=} [properties] Properties to set - */ - function SyncActionMessage(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SyncActionMessage key. - * @member {proto.IMessageKey|null|undefined} key - * @memberof proto.SyncActionMessage - * @instance - */ - SyncActionMessage.prototype.key = null; - - /** - * SyncActionMessage timestamp. - * @member {number|Long} timestamp - * @memberof proto.SyncActionMessage - * @instance - */ - SyncActionMessage.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new SyncActionMessage instance using the specified properties. - * @function create - * @memberof proto.SyncActionMessage - * @static - * @param {proto.ISyncActionMessage=} [properties] Properties to set - * @returns {proto.SyncActionMessage} SyncActionMessage instance - */ - SyncActionMessage.create = function create(properties) { - return new SyncActionMessage(properties); - }; - - /** - * Encodes the specified SyncActionMessage message. Does not implicitly {@link proto.SyncActionMessage.verify|verify} messages. - * @function encode - * @memberof proto.SyncActionMessage - * @static - * @param {proto.ISyncActionMessage} message SyncActionMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SyncActionMessage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - $root.proto.MessageKey.encode(message.key, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.timestamp); - return writer; - }; - - /** - * Encodes the specified SyncActionMessage message, length delimited. Does not implicitly {@link proto.SyncActionMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.SyncActionMessage - * @static - * @param {proto.ISyncActionMessage} message SyncActionMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SyncActionMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SyncActionMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.SyncActionMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.SyncActionMessage} SyncActionMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SyncActionMessage.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.SyncActionMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { case 1: - message.key = $root.proto.MessageKey.decode(reader, reader.uint32()); + message.quickReplyButton = $root.proto.QuickReplyButton.decode(reader, reader.uint32()); break; case 2: - message.timestamp = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SyncActionMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.SyncActionMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.SyncActionMessage} SyncActionMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SyncActionMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SyncActionMessage message. - * @function verify - * @memberof proto.SyncActionMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SyncActionMessage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.key != null && message.hasOwnProperty("key")) { - var error = $root.proto.MessageKey.verify(message.key); - if (error) - return "key." + error; - } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) - return "timestamp: integer|Long expected"; - return null; - }; - - /** - * Creates a SyncActionMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.SyncActionMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.SyncActionMessage} SyncActionMessage - */ - SyncActionMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.SyncActionMessage) - return object; - var message = new $root.proto.SyncActionMessage(); - if (object.key != null) { - if (typeof object.key !== "object") - throw TypeError(".proto.SyncActionMessage.key: object expected"); - message.key = $root.proto.MessageKey.fromObject(object.key); - } - if (object.timestamp != null) - if ($util.Long) - (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = false; - else if (typeof object.timestamp === "string") - message.timestamp = parseInt(object.timestamp, 10); - else if (typeof object.timestamp === "number") - message.timestamp = object.timestamp; - else if (typeof object.timestamp === "object") - message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a SyncActionMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.SyncActionMessage - * @static - * @param {proto.SyncActionMessage} message SyncActionMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SyncActionMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.key = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timestamp = options.longs === String ? "0" : 0; - } - if (message.key != null && message.hasOwnProperty("key")) - object.key = $root.proto.MessageKey.toObject(message.key, options); - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (typeof message.timestamp === "number") - object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; - else - object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() : message.timestamp; - return object; - }; - - /** - * Converts this SyncActionMessage to JSON. - * @function toJSON - * @memberof proto.SyncActionMessage - * @instance - * @returns {Object.} JSON object - */ - SyncActionMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SyncActionMessage; - })(); - - proto.SyncActionMessageRange = (function() { - - /** - * Properties of a SyncActionMessageRange. - * @memberof proto - * @interface ISyncActionMessageRange - * @property {number|Long|null} [lastMessageTimestamp] SyncActionMessageRange lastMessageTimestamp - * @property {number|Long|null} [lastSystemMessageTimestamp] SyncActionMessageRange lastSystemMessageTimestamp - * @property {Array.|null} [messages] SyncActionMessageRange messages - */ - - /** - * Constructs a new SyncActionMessageRange. - * @memberof proto - * @classdesc Represents a SyncActionMessageRange. - * @implements ISyncActionMessageRange - * @constructor - * @param {proto.ISyncActionMessageRange=} [properties] Properties to set - */ - function SyncActionMessageRange(properties) { - this.messages = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SyncActionMessageRange lastMessageTimestamp. - * @member {number|Long} lastMessageTimestamp - * @memberof proto.SyncActionMessageRange - * @instance - */ - SyncActionMessageRange.prototype.lastMessageTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * SyncActionMessageRange lastSystemMessageTimestamp. - * @member {number|Long} lastSystemMessageTimestamp - * @memberof proto.SyncActionMessageRange - * @instance - */ - SyncActionMessageRange.prototype.lastSystemMessageTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * SyncActionMessageRange messages. - * @member {Array.} messages - * @memberof proto.SyncActionMessageRange - * @instance - */ - SyncActionMessageRange.prototype.messages = $util.emptyArray; - - /** - * Creates a new SyncActionMessageRange instance using the specified properties. - * @function create - * @memberof proto.SyncActionMessageRange - * @static - * @param {proto.ISyncActionMessageRange=} [properties] Properties to set - * @returns {proto.SyncActionMessageRange} SyncActionMessageRange instance - */ - SyncActionMessageRange.create = function create(properties) { - return new SyncActionMessageRange(properties); - }; - - /** - * Encodes the specified SyncActionMessageRange message. Does not implicitly {@link proto.SyncActionMessageRange.verify|verify} messages. - * @function encode - * @memberof proto.SyncActionMessageRange - * @static - * @param {proto.ISyncActionMessageRange} message SyncActionMessageRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SyncActionMessageRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.lastMessageTimestamp != null && Object.hasOwnProperty.call(message, "lastMessageTimestamp")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.lastMessageTimestamp); - if (message.lastSystemMessageTimestamp != null && Object.hasOwnProperty.call(message, "lastSystemMessageTimestamp")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.lastSystemMessageTimestamp); - if (message.messages != null && message.messages.length) - for (var i = 0; i < message.messages.length; ++i) - $root.proto.SyncActionMessage.encode(message.messages[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SyncActionMessageRange message, length delimited. Does not implicitly {@link proto.SyncActionMessageRange.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.SyncActionMessageRange - * @static - * @param {proto.ISyncActionMessageRange} message SyncActionMessageRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SyncActionMessageRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SyncActionMessageRange message from the specified reader or buffer. - * @function decode - * @memberof proto.SyncActionMessageRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.SyncActionMessageRange} SyncActionMessageRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SyncActionMessageRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.SyncActionMessageRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.lastMessageTimestamp = reader.int64(); - break; - case 2: - message.lastSystemMessageTimestamp = reader.int64(); + message.urlButton = $root.proto.URLButton.decode(reader, reader.uint32()); break; case 3: - if (!(message.messages && message.messages.length)) - message.messages = []; - message.messages.push($root.proto.SyncActionMessage.decode(reader, reader.uint32())); + message.callButton = $root.proto.CallButton.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -48266,197 +60095,169 @@ $root.proto = (function() { }; /** - * Decodes a SyncActionMessageRange message from the specified reader or buffer, length delimited. + * Decodes a TemplateButton message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.SyncActionMessageRange + * @memberof proto.TemplateButton * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.SyncActionMessageRange} SyncActionMessageRange + * @returns {proto.TemplateButton} TemplateButton * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SyncActionMessageRange.decodeDelimited = function decodeDelimited(reader) { + TemplateButton.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SyncActionMessageRange message. + * Verifies a TemplateButton message. * @function verify - * @memberof proto.SyncActionMessageRange + * @memberof proto.TemplateButton * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SyncActionMessageRange.verify = function verify(message) { + TemplateButton.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.lastMessageTimestamp != null && message.hasOwnProperty("lastMessageTimestamp")) - if (!$util.isInteger(message.lastMessageTimestamp) && !(message.lastMessageTimestamp && $util.isInteger(message.lastMessageTimestamp.low) && $util.isInteger(message.lastMessageTimestamp.high))) - return "lastMessageTimestamp: integer|Long expected"; - if (message.lastSystemMessageTimestamp != null && message.hasOwnProperty("lastSystemMessageTimestamp")) - if (!$util.isInteger(message.lastSystemMessageTimestamp) && !(message.lastSystemMessageTimestamp && $util.isInteger(message.lastSystemMessageTimestamp.low) && $util.isInteger(message.lastSystemMessageTimestamp.high))) - return "lastSystemMessageTimestamp: integer|Long expected"; - if (message.messages != null && message.hasOwnProperty("messages")) { - if (!Array.isArray(message.messages)) - return "messages: array expected"; - for (var i = 0; i < message.messages.length; ++i) { - var error = $root.proto.SyncActionMessage.verify(message.messages[i]); + var properties = {}; + if (message.index != null && message.hasOwnProperty("index")) + if (!$util.isInteger(message.index)) + return "index: integer expected"; + if (message.quickReplyButton != null && message.hasOwnProperty("quickReplyButton")) { + properties.button = 1; + { + var error = $root.proto.QuickReplyButton.verify(message.quickReplyButton); if (error) - return "messages." + error; + return "quickReplyButton." + error; + } + } + if (message.urlButton != null && message.hasOwnProperty("urlButton")) { + if (properties.button === 1) + return "button: multiple values"; + properties.button = 1; + { + var error = $root.proto.URLButton.verify(message.urlButton); + if (error) + return "urlButton." + error; + } + } + if (message.callButton != null && message.hasOwnProperty("callButton")) { + if (properties.button === 1) + return "button: multiple values"; + properties.button = 1; + { + var error = $root.proto.CallButton.verify(message.callButton); + if (error) + return "callButton." + error; } } return null; }; /** - * Creates a SyncActionMessageRange message from a plain object. Also converts values to their respective internal types. + * Creates a TemplateButton message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.SyncActionMessageRange + * @memberof proto.TemplateButton * @static * @param {Object.} object Plain object - * @returns {proto.SyncActionMessageRange} SyncActionMessageRange + * @returns {proto.TemplateButton} TemplateButton */ - SyncActionMessageRange.fromObject = function fromObject(object) { - if (object instanceof $root.proto.SyncActionMessageRange) + TemplateButton.fromObject = function fromObject(object) { + if (object instanceof $root.proto.TemplateButton) return object; - var message = new $root.proto.SyncActionMessageRange(); - if (object.lastMessageTimestamp != null) - if ($util.Long) - (message.lastMessageTimestamp = $util.Long.fromValue(object.lastMessageTimestamp)).unsigned = false; - else if (typeof object.lastMessageTimestamp === "string") - message.lastMessageTimestamp = parseInt(object.lastMessageTimestamp, 10); - else if (typeof object.lastMessageTimestamp === "number") - message.lastMessageTimestamp = object.lastMessageTimestamp; - else if (typeof object.lastMessageTimestamp === "object") - message.lastMessageTimestamp = new $util.LongBits(object.lastMessageTimestamp.low >>> 0, object.lastMessageTimestamp.high >>> 0).toNumber(); - if (object.lastSystemMessageTimestamp != null) - if ($util.Long) - (message.lastSystemMessageTimestamp = $util.Long.fromValue(object.lastSystemMessageTimestamp)).unsigned = false; - else if (typeof object.lastSystemMessageTimestamp === "string") - message.lastSystemMessageTimestamp = parseInt(object.lastSystemMessageTimestamp, 10); - else if (typeof object.lastSystemMessageTimestamp === "number") - message.lastSystemMessageTimestamp = object.lastSystemMessageTimestamp; - else if (typeof object.lastSystemMessageTimestamp === "object") - message.lastSystemMessageTimestamp = new $util.LongBits(object.lastSystemMessageTimestamp.low >>> 0, object.lastSystemMessageTimestamp.high >>> 0).toNumber(); - if (object.messages) { - if (!Array.isArray(object.messages)) - throw TypeError(".proto.SyncActionMessageRange.messages: array expected"); - message.messages = []; - for (var i = 0; i < object.messages.length; ++i) { - if (typeof object.messages[i] !== "object") - throw TypeError(".proto.SyncActionMessageRange.messages: object expected"); - message.messages[i] = $root.proto.SyncActionMessage.fromObject(object.messages[i]); - } + var message = new $root.proto.TemplateButton(); + if (object.index != null) + message.index = object.index >>> 0; + if (object.quickReplyButton != null) { + if (typeof object.quickReplyButton !== "object") + throw TypeError(".proto.TemplateButton.quickReplyButton: object expected"); + message.quickReplyButton = $root.proto.QuickReplyButton.fromObject(object.quickReplyButton); + } + if (object.urlButton != null) { + if (typeof object.urlButton !== "object") + throw TypeError(".proto.TemplateButton.urlButton: object expected"); + message.urlButton = $root.proto.URLButton.fromObject(object.urlButton); + } + if (object.callButton != null) { + if (typeof object.callButton !== "object") + throw TypeError(".proto.TemplateButton.callButton: object expected"); + message.callButton = $root.proto.CallButton.fromObject(object.callButton); } return message; }; /** - * Creates a plain object from a SyncActionMessageRange message. Also converts values to other types if specified. + * Creates a plain object from a TemplateButton message. Also converts values to other types if specified. * @function toObject - * @memberof proto.SyncActionMessageRange + * @memberof proto.TemplateButton * @static - * @param {proto.SyncActionMessageRange} message SyncActionMessageRange + * @param {proto.TemplateButton} message TemplateButton * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SyncActionMessageRange.toObject = function toObject(message, options) { + TemplateButton.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.messages = []; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.lastMessageTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.lastMessageTimestamp = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.lastSystemMessageTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.lastSystemMessageTimestamp = options.longs === String ? "0" : 0; + if (options.defaults) + object.index = 0; + if (message.quickReplyButton != null && message.hasOwnProperty("quickReplyButton")) { + object.quickReplyButton = $root.proto.QuickReplyButton.toObject(message.quickReplyButton, options); + if (options.oneofs) + object.button = "quickReplyButton"; } - if (message.lastMessageTimestamp != null && message.hasOwnProperty("lastMessageTimestamp")) - if (typeof message.lastMessageTimestamp === "number") - object.lastMessageTimestamp = options.longs === String ? String(message.lastMessageTimestamp) : message.lastMessageTimestamp; - else - object.lastMessageTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.lastMessageTimestamp) : options.longs === Number ? new $util.LongBits(message.lastMessageTimestamp.low >>> 0, message.lastMessageTimestamp.high >>> 0).toNumber() : message.lastMessageTimestamp; - if (message.lastSystemMessageTimestamp != null && message.hasOwnProperty("lastSystemMessageTimestamp")) - if (typeof message.lastSystemMessageTimestamp === "number") - object.lastSystemMessageTimestamp = options.longs === String ? String(message.lastSystemMessageTimestamp) : message.lastSystemMessageTimestamp; - else - object.lastSystemMessageTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.lastSystemMessageTimestamp) : options.longs === Number ? new $util.LongBits(message.lastSystemMessageTimestamp.low >>> 0, message.lastSystemMessageTimestamp.high >>> 0).toNumber() : message.lastSystemMessageTimestamp; - if (message.messages && message.messages.length) { - object.messages = []; - for (var j = 0; j < message.messages.length; ++j) - object.messages[j] = $root.proto.SyncActionMessage.toObject(message.messages[j], options); + if (message.urlButton != null && message.hasOwnProperty("urlButton")) { + object.urlButton = $root.proto.URLButton.toObject(message.urlButton, options); + if (options.oneofs) + object.button = "urlButton"; } + if (message.callButton != null && message.hasOwnProperty("callButton")) { + object.callButton = $root.proto.CallButton.toObject(message.callButton, options); + if (options.oneofs) + object.button = "callButton"; + } + if (message.index != null && message.hasOwnProperty("index")) + object.index = message.index; return object; }; /** - * Converts this SyncActionMessageRange to JSON. + * Converts this TemplateButton to JSON. * @function toJSON - * @memberof proto.SyncActionMessageRange + * @memberof proto.TemplateButton * @instance * @returns {Object.} JSON object */ - SyncActionMessageRange.prototype.toJSON = function toJSON() { + TemplateButton.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SyncActionMessageRange; + return TemplateButton; })(); - proto.SyncActionValue = (function() { + proto.TemplateButtonReplyMessage = (function() { /** - * Properties of a SyncActionValue. + * Properties of a TemplateButtonReplyMessage. * @memberof proto - * @interface ISyncActionValue - * @property {number|Long|null} [timestamp] SyncActionValue timestamp - * @property {proto.IStarAction|null} [starAction] SyncActionValue starAction - * @property {proto.IContactAction|null} [contactAction] SyncActionValue contactAction - * @property {proto.IMuteAction|null} [muteAction] SyncActionValue muteAction - * @property {proto.IPinAction|null} [pinAction] SyncActionValue pinAction - * @property {proto.ISecurityNotificationSetting|null} [securityNotificationSetting] SyncActionValue securityNotificationSetting - * @property {proto.IPushNameSetting|null} [pushNameSetting] SyncActionValue pushNameSetting - * @property {proto.IQuickReplyAction|null} [quickReplyAction] SyncActionValue quickReplyAction - * @property {proto.IRecentStickerWeightsAction|null} [recentStickerWeightsAction] SyncActionValue recentStickerWeightsAction - * @property {proto.IRecentStickerMetadata|null} [recentStickerMetadata] SyncActionValue recentStickerMetadata - * @property {proto.IRecentEmojiWeightsAction|null} [recentEmojiWeightsAction] SyncActionValue recentEmojiWeightsAction - * @property {proto.ILabelEditAction|null} [labelEditAction] SyncActionValue labelEditAction - * @property {proto.ILabelAssociationAction|null} [labelAssociationAction] SyncActionValue labelAssociationAction - * @property {proto.ILocaleSetting|null} [localeSetting] SyncActionValue localeSetting - * @property {proto.IArchiveChatAction|null} [archiveChatAction] SyncActionValue archiveChatAction - * @property {proto.IDeleteMessageForMeAction|null} [deleteMessageForMeAction] SyncActionValue deleteMessageForMeAction - * @property {proto.IKeyExpiration|null} [keyExpiration] SyncActionValue keyExpiration - * @property {proto.IMarkChatAsReadAction|null} [markChatAsReadAction] SyncActionValue markChatAsReadAction - * @property {proto.IClearChatAction|null} [clearChatAction] SyncActionValue clearChatAction - * @property {proto.IDeleteChatAction|null} [deleteChatAction] SyncActionValue deleteChatAction - * @property {proto.IUnarchiveChatsSetting|null} [unarchiveChatsSetting] SyncActionValue unarchiveChatsSetting - * @property {proto.IPrimaryFeature|null} [primaryFeature] SyncActionValue primaryFeature - * @property {proto.IFavoriteStickerAction|null} [favoriteStickerAction] SyncActionValue favoriteStickerAction - * @property {proto.IAndroidUnsupportedActions|null} [androidUnsupportedActions] SyncActionValue androidUnsupportedActions - * @property {proto.IAgentAction|null} [agentAction] SyncActionValue agentAction - * @property {proto.ISubscriptionAction|null} [subscriptionAction] SyncActionValue subscriptionAction - * @property {proto.IUserStatusMuteAction|null} [userStatusMuteAction] SyncActionValue userStatusMuteAction - * @property {proto.ITimeFormatAction|null} [timeFormatAction] SyncActionValue timeFormatAction + * @interface ITemplateButtonReplyMessage + * @property {string|null} [selectedId] TemplateButtonReplyMessage selectedId + * @property {string|null} [selectedDisplayText] TemplateButtonReplyMessage selectedDisplayText + * @property {proto.IContextInfo|null} [contextInfo] TemplateButtonReplyMessage contextInfo + * @property {number|null} [selectedIndex] TemplateButtonReplyMessage selectedIndex */ /** - * Constructs a new SyncActionValue. + * Constructs a new TemplateButtonReplyMessage. * @memberof proto - * @classdesc Represents a SyncActionValue. - * @implements ISyncActionValue + * @classdesc Represents a TemplateButtonReplyMessage. + * @implements ITemplateButtonReplyMessage * @constructor - * @param {proto.ISyncActionValue=} [properties] Properties to set + * @param {proto.ITemplateButtonReplyMessage=} [properties] Properties to set */ - function SyncActionValue(properties) { + function TemplateButtonReplyMessage(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -48464,426 +60265,114 @@ $root.proto = (function() { } /** - * SyncActionValue timestamp. - * @member {number|Long} timestamp - * @memberof proto.SyncActionValue + * TemplateButtonReplyMessage selectedId. + * @member {string} selectedId + * @memberof proto.TemplateButtonReplyMessage * @instance */ - SyncActionValue.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + TemplateButtonReplyMessage.prototype.selectedId = ""; /** - * SyncActionValue starAction. - * @member {proto.IStarAction|null|undefined} starAction - * @memberof proto.SyncActionValue + * TemplateButtonReplyMessage selectedDisplayText. + * @member {string} selectedDisplayText + * @memberof proto.TemplateButtonReplyMessage * @instance */ - SyncActionValue.prototype.starAction = null; + TemplateButtonReplyMessage.prototype.selectedDisplayText = ""; /** - * SyncActionValue contactAction. - * @member {proto.IContactAction|null|undefined} contactAction - * @memberof proto.SyncActionValue + * TemplateButtonReplyMessage contextInfo. + * @member {proto.IContextInfo|null|undefined} contextInfo + * @memberof proto.TemplateButtonReplyMessage * @instance */ - SyncActionValue.prototype.contactAction = null; + TemplateButtonReplyMessage.prototype.contextInfo = null; /** - * SyncActionValue muteAction. - * @member {proto.IMuteAction|null|undefined} muteAction - * @memberof proto.SyncActionValue + * TemplateButtonReplyMessage selectedIndex. + * @member {number} selectedIndex + * @memberof proto.TemplateButtonReplyMessage * @instance */ - SyncActionValue.prototype.muteAction = null; + TemplateButtonReplyMessage.prototype.selectedIndex = 0; /** - * SyncActionValue pinAction. - * @member {proto.IPinAction|null|undefined} pinAction - * @memberof proto.SyncActionValue - * @instance - */ - SyncActionValue.prototype.pinAction = null; - - /** - * SyncActionValue securityNotificationSetting. - * @member {proto.ISecurityNotificationSetting|null|undefined} securityNotificationSetting - * @memberof proto.SyncActionValue - * @instance - */ - SyncActionValue.prototype.securityNotificationSetting = null; - - /** - * SyncActionValue pushNameSetting. - * @member {proto.IPushNameSetting|null|undefined} pushNameSetting - * @memberof proto.SyncActionValue - * @instance - */ - SyncActionValue.prototype.pushNameSetting = null; - - /** - * SyncActionValue quickReplyAction. - * @member {proto.IQuickReplyAction|null|undefined} quickReplyAction - * @memberof proto.SyncActionValue - * @instance - */ - SyncActionValue.prototype.quickReplyAction = null; - - /** - * SyncActionValue recentStickerWeightsAction. - * @member {proto.IRecentStickerWeightsAction|null|undefined} recentStickerWeightsAction - * @memberof proto.SyncActionValue - * @instance - */ - SyncActionValue.prototype.recentStickerWeightsAction = null; - - /** - * SyncActionValue recentStickerMetadata. - * @member {proto.IRecentStickerMetadata|null|undefined} recentStickerMetadata - * @memberof proto.SyncActionValue - * @instance - */ - SyncActionValue.prototype.recentStickerMetadata = null; - - /** - * SyncActionValue recentEmojiWeightsAction. - * @member {proto.IRecentEmojiWeightsAction|null|undefined} recentEmojiWeightsAction - * @memberof proto.SyncActionValue - * @instance - */ - SyncActionValue.prototype.recentEmojiWeightsAction = null; - - /** - * SyncActionValue labelEditAction. - * @member {proto.ILabelEditAction|null|undefined} labelEditAction - * @memberof proto.SyncActionValue - * @instance - */ - SyncActionValue.prototype.labelEditAction = null; - - /** - * SyncActionValue labelAssociationAction. - * @member {proto.ILabelAssociationAction|null|undefined} labelAssociationAction - * @memberof proto.SyncActionValue - * @instance - */ - SyncActionValue.prototype.labelAssociationAction = null; - - /** - * SyncActionValue localeSetting. - * @member {proto.ILocaleSetting|null|undefined} localeSetting - * @memberof proto.SyncActionValue - * @instance - */ - SyncActionValue.prototype.localeSetting = null; - - /** - * SyncActionValue archiveChatAction. - * @member {proto.IArchiveChatAction|null|undefined} archiveChatAction - * @memberof proto.SyncActionValue - * @instance - */ - SyncActionValue.prototype.archiveChatAction = null; - - /** - * SyncActionValue deleteMessageForMeAction. - * @member {proto.IDeleteMessageForMeAction|null|undefined} deleteMessageForMeAction - * @memberof proto.SyncActionValue - * @instance - */ - SyncActionValue.prototype.deleteMessageForMeAction = null; - - /** - * SyncActionValue keyExpiration. - * @member {proto.IKeyExpiration|null|undefined} keyExpiration - * @memberof proto.SyncActionValue - * @instance - */ - SyncActionValue.prototype.keyExpiration = null; - - /** - * SyncActionValue markChatAsReadAction. - * @member {proto.IMarkChatAsReadAction|null|undefined} markChatAsReadAction - * @memberof proto.SyncActionValue - * @instance - */ - SyncActionValue.prototype.markChatAsReadAction = null; - - /** - * SyncActionValue clearChatAction. - * @member {proto.IClearChatAction|null|undefined} clearChatAction - * @memberof proto.SyncActionValue - * @instance - */ - SyncActionValue.prototype.clearChatAction = null; - - /** - * SyncActionValue deleteChatAction. - * @member {proto.IDeleteChatAction|null|undefined} deleteChatAction - * @memberof proto.SyncActionValue - * @instance - */ - SyncActionValue.prototype.deleteChatAction = null; - - /** - * SyncActionValue unarchiveChatsSetting. - * @member {proto.IUnarchiveChatsSetting|null|undefined} unarchiveChatsSetting - * @memberof proto.SyncActionValue - * @instance - */ - SyncActionValue.prototype.unarchiveChatsSetting = null; - - /** - * SyncActionValue primaryFeature. - * @member {proto.IPrimaryFeature|null|undefined} primaryFeature - * @memberof proto.SyncActionValue - * @instance - */ - SyncActionValue.prototype.primaryFeature = null; - - /** - * SyncActionValue favoriteStickerAction. - * @member {proto.IFavoriteStickerAction|null|undefined} favoriteStickerAction - * @memberof proto.SyncActionValue - * @instance - */ - SyncActionValue.prototype.favoriteStickerAction = null; - - /** - * SyncActionValue androidUnsupportedActions. - * @member {proto.IAndroidUnsupportedActions|null|undefined} androidUnsupportedActions - * @memberof proto.SyncActionValue - * @instance - */ - SyncActionValue.prototype.androidUnsupportedActions = null; - - /** - * SyncActionValue agentAction. - * @member {proto.IAgentAction|null|undefined} agentAction - * @memberof proto.SyncActionValue - * @instance - */ - SyncActionValue.prototype.agentAction = null; - - /** - * SyncActionValue subscriptionAction. - * @member {proto.ISubscriptionAction|null|undefined} subscriptionAction - * @memberof proto.SyncActionValue - * @instance - */ - SyncActionValue.prototype.subscriptionAction = null; - - /** - * SyncActionValue userStatusMuteAction. - * @member {proto.IUserStatusMuteAction|null|undefined} userStatusMuteAction - * @memberof proto.SyncActionValue - * @instance - */ - SyncActionValue.prototype.userStatusMuteAction = null; - - /** - * SyncActionValue timeFormatAction. - * @member {proto.ITimeFormatAction|null|undefined} timeFormatAction - * @memberof proto.SyncActionValue - * @instance - */ - SyncActionValue.prototype.timeFormatAction = null; - - /** - * Creates a new SyncActionValue instance using the specified properties. + * Creates a new TemplateButtonReplyMessage instance using the specified properties. * @function create - * @memberof proto.SyncActionValue + * @memberof proto.TemplateButtonReplyMessage * @static - * @param {proto.ISyncActionValue=} [properties] Properties to set - * @returns {proto.SyncActionValue} SyncActionValue instance + * @param {proto.ITemplateButtonReplyMessage=} [properties] Properties to set + * @returns {proto.TemplateButtonReplyMessage} TemplateButtonReplyMessage instance */ - SyncActionValue.create = function create(properties) { - return new SyncActionValue(properties); + TemplateButtonReplyMessage.create = function create(properties) { + return new TemplateButtonReplyMessage(properties); }; /** - * Encodes the specified SyncActionValue message. Does not implicitly {@link proto.SyncActionValue.verify|verify} messages. + * Encodes the specified TemplateButtonReplyMessage message. Does not implicitly {@link proto.TemplateButtonReplyMessage.verify|verify} messages. * @function encode - * @memberof proto.SyncActionValue + * @memberof proto.TemplateButtonReplyMessage * @static - * @param {proto.ISyncActionValue} message SyncActionValue message or plain object to encode + * @param {proto.ITemplateButtonReplyMessage} message TemplateButtonReplyMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SyncActionValue.encode = function encode(message, writer) { + TemplateButtonReplyMessage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.timestamp); - if (message.starAction != null && Object.hasOwnProperty.call(message, "starAction")) - $root.proto.StarAction.encode(message.starAction, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.contactAction != null && Object.hasOwnProperty.call(message, "contactAction")) - $root.proto.ContactAction.encode(message.contactAction, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.muteAction != null && Object.hasOwnProperty.call(message, "muteAction")) - $root.proto.MuteAction.encode(message.muteAction, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.pinAction != null && Object.hasOwnProperty.call(message, "pinAction")) - $root.proto.PinAction.encode(message.pinAction, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.securityNotificationSetting != null && Object.hasOwnProperty.call(message, "securityNotificationSetting")) - $root.proto.SecurityNotificationSetting.encode(message.securityNotificationSetting, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.pushNameSetting != null && Object.hasOwnProperty.call(message, "pushNameSetting")) - $root.proto.PushNameSetting.encode(message.pushNameSetting, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.quickReplyAction != null && Object.hasOwnProperty.call(message, "quickReplyAction")) - $root.proto.QuickReplyAction.encode(message.quickReplyAction, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.recentStickerWeightsAction != null && Object.hasOwnProperty.call(message, "recentStickerWeightsAction")) - $root.proto.RecentStickerWeightsAction.encode(message.recentStickerWeightsAction, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.recentStickerMetadata != null && Object.hasOwnProperty.call(message, "recentStickerMetadata")) - $root.proto.RecentStickerMetadata.encode(message.recentStickerMetadata, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.recentEmojiWeightsAction != null && Object.hasOwnProperty.call(message, "recentEmojiWeightsAction")) - $root.proto.RecentEmojiWeightsAction.encode(message.recentEmojiWeightsAction, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.labelEditAction != null && Object.hasOwnProperty.call(message, "labelEditAction")) - $root.proto.LabelEditAction.encode(message.labelEditAction, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.labelAssociationAction != null && Object.hasOwnProperty.call(message, "labelAssociationAction")) - $root.proto.LabelAssociationAction.encode(message.labelAssociationAction, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.localeSetting != null && Object.hasOwnProperty.call(message, "localeSetting")) - $root.proto.LocaleSetting.encode(message.localeSetting, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.archiveChatAction != null && Object.hasOwnProperty.call(message, "archiveChatAction")) - $root.proto.ArchiveChatAction.encode(message.archiveChatAction, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.deleteMessageForMeAction != null && Object.hasOwnProperty.call(message, "deleteMessageForMeAction")) - $root.proto.DeleteMessageForMeAction.encode(message.deleteMessageForMeAction, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.keyExpiration != null && Object.hasOwnProperty.call(message, "keyExpiration")) - $root.proto.KeyExpiration.encode(message.keyExpiration, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.markChatAsReadAction != null && Object.hasOwnProperty.call(message, "markChatAsReadAction")) - $root.proto.MarkChatAsReadAction.encode(message.markChatAsReadAction, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.clearChatAction != null && Object.hasOwnProperty.call(message, "clearChatAction")) - $root.proto.ClearChatAction.encode(message.clearChatAction, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.deleteChatAction != null && Object.hasOwnProperty.call(message, "deleteChatAction")) - $root.proto.DeleteChatAction.encode(message.deleteChatAction, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.unarchiveChatsSetting != null && Object.hasOwnProperty.call(message, "unarchiveChatsSetting")) - $root.proto.UnarchiveChatsSetting.encode(message.unarchiveChatsSetting, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.primaryFeature != null && Object.hasOwnProperty.call(message, "primaryFeature")) - $root.proto.PrimaryFeature.encode(message.primaryFeature, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.favoriteStickerAction != null && Object.hasOwnProperty.call(message, "favoriteStickerAction")) - $root.proto.FavoriteStickerAction.encode(message.favoriteStickerAction, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.androidUnsupportedActions != null && Object.hasOwnProperty.call(message, "androidUnsupportedActions")) - $root.proto.AndroidUnsupportedActions.encode(message.androidUnsupportedActions, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.agentAction != null && Object.hasOwnProperty.call(message, "agentAction")) - $root.proto.AgentAction.encode(message.agentAction, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); - if (message.subscriptionAction != null && Object.hasOwnProperty.call(message, "subscriptionAction")) - $root.proto.SubscriptionAction.encode(message.subscriptionAction, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); - if (message.userStatusMuteAction != null && Object.hasOwnProperty.call(message, "userStatusMuteAction")) - $root.proto.UserStatusMuteAction.encode(message.userStatusMuteAction, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); - if (message.timeFormatAction != null && Object.hasOwnProperty.call(message, "timeFormatAction")) - $root.proto.TimeFormatAction.encode(message.timeFormatAction, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); + if (message.selectedId != null && Object.hasOwnProperty.call(message, "selectedId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selectedId); + if (message.selectedDisplayText != null && Object.hasOwnProperty.call(message, "selectedDisplayText")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.selectedDisplayText); + if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) + $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.selectedIndex != null && Object.hasOwnProperty.call(message, "selectedIndex")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.selectedIndex); return writer; }; /** - * Encodes the specified SyncActionValue message, length delimited. Does not implicitly {@link proto.SyncActionValue.verify|verify} messages. + * Encodes the specified TemplateButtonReplyMessage message, length delimited. Does not implicitly {@link proto.TemplateButtonReplyMessage.verify|verify} messages. * @function encodeDelimited - * @memberof proto.SyncActionValue + * @memberof proto.TemplateButtonReplyMessage * @static - * @param {proto.ISyncActionValue} message SyncActionValue message or plain object to encode + * @param {proto.ITemplateButtonReplyMessage} message TemplateButtonReplyMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SyncActionValue.encodeDelimited = function encodeDelimited(message, writer) { + TemplateButtonReplyMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SyncActionValue message from the specified reader or buffer. + * Decodes a TemplateButtonReplyMessage message from the specified reader or buffer. * @function decode - * @memberof proto.SyncActionValue + * @memberof proto.TemplateButtonReplyMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.SyncActionValue} SyncActionValue + * @returns {proto.TemplateButtonReplyMessage} TemplateButtonReplyMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SyncActionValue.decode = function decode(reader, length) { + TemplateButtonReplyMessage.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.SyncActionValue(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.TemplateButtonReplyMessage(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.timestamp = reader.int64(); + message.selectedId = reader.string(); break; case 2: - message.starAction = $root.proto.StarAction.decode(reader, reader.uint32()); + message.selectedDisplayText = reader.string(); break; case 3: - message.contactAction = $root.proto.ContactAction.decode(reader, reader.uint32()); + message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); break; case 4: - message.muteAction = $root.proto.MuteAction.decode(reader, reader.uint32()); - break; - case 5: - message.pinAction = $root.proto.PinAction.decode(reader, reader.uint32()); - break; - case 6: - message.securityNotificationSetting = $root.proto.SecurityNotificationSetting.decode(reader, reader.uint32()); - break; - case 7: - message.pushNameSetting = $root.proto.PushNameSetting.decode(reader, reader.uint32()); - break; - case 8: - message.quickReplyAction = $root.proto.QuickReplyAction.decode(reader, reader.uint32()); - break; - case 9: - message.recentStickerWeightsAction = $root.proto.RecentStickerWeightsAction.decode(reader, reader.uint32()); - break; - case 10: - message.recentStickerMetadata = $root.proto.RecentStickerMetadata.decode(reader, reader.uint32()); - break; - case 11: - message.recentEmojiWeightsAction = $root.proto.RecentEmojiWeightsAction.decode(reader, reader.uint32()); - break; - case 14: - message.labelEditAction = $root.proto.LabelEditAction.decode(reader, reader.uint32()); - break; - case 15: - message.labelAssociationAction = $root.proto.LabelAssociationAction.decode(reader, reader.uint32()); - break; - case 16: - message.localeSetting = $root.proto.LocaleSetting.decode(reader, reader.uint32()); - break; - case 17: - message.archiveChatAction = $root.proto.ArchiveChatAction.decode(reader, reader.uint32()); - break; - case 18: - message.deleteMessageForMeAction = $root.proto.DeleteMessageForMeAction.decode(reader, reader.uint32()); - break; - case 19: - message.keyExpiration = $root.proto.KeyExpiration.decode(reader, reader.uint32()); - break; - case 20: - message.markChatAsReadAction = $root.proto.MarkChatAsReadAction.decode(reader, reader.uint32()); - break; - case 21: - message.clearChatAction = $root.proto.ClearChatAction.decode(reader, reader.uint32()); - break; - case 22: - message.deleteChatAction = $root.proto.DeleteChatAction.decode(reader, reader.uint32()); - break; - case 23: - message.unarchiveChatsSetting = $root.proto.UnarchiveChatsSetting.decode(reader, reader.uint32()); - break; - case 24: - message.primaryFeature = $root.proto.PrimaryFeature.decode(reader, reader.uint32()); - break; - case 25: - message.favoriteStickerAction = $root.proto.FavoriteStickerAction.decode(reader, reader.uint32()); - break; - case 26: - message.androidUnsupportedActions = $root.proto.AndroidUnsupportedActions.decode(reader, reader.uint32()); - break; - case 27: - message.agentAction = $root.proto.AgentAction.decode(reader, reader.uint32()); - break; - case 28: - message.subscriptionAction = $root.proto.SubscriptionAction.decode(reader, reader.uint32()); - break; - case 29: - message.userStatusMuteAction = $root.proto.UserStatusMuteAction.decode(reader, reader.uint32()); - break; - case 30: - message.timeFormatAction = $root.proto.TimeFormatAction.decode(reader, reader.uint32()); + message.selectedIndex = reader.uint32(); break; default: reader.skipType(tag & 7); @@ -48894,453 +60383,418 @@ $root.proto = (function() { }; /** - * Decodes a SyncActionValue message from the specified reader or buffer, length delimited. + * Decodes a TemplateButtonReplyMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.SyncActionValue + * @memberof proto.TemplateButtonReplyMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.SyncActionValue} SyncActionValue + * @returns {proto.TemplateButtonReplyMessage} TemplateButtonReplyMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SyncActionValue.decodeDelimited = function decodeDelimited(reader) { + TemplateButtonReplyMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SyncActionValue message. + * Verifies a TemplateButtonReplyMessage message. * @function verify - * @memberof proto.SyncActionValue + * @memberof proto.TemplateButtonReplyMessage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SyncActionValue.verify = function verify(message) { + TemplateButtonReplyMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) - return "timestamp: integer|Long expected"; - if (message.starAction != null && message.hasOwnProperty("starAction")) { - var error = $root.proto.StarAction.verify(message.starAction); + if (message.selectedId != null && message.hasOwnProperty("selectedId")) + if (!$util.isString(message.selectedId)) + return "selectedId: string expected"; + if (message.selectedDisplayText != null && message.hasOwnProperty("selectedDisplayText")) + if (!$util.isString(message.selectedDisplayText)) + return "selectedDisplayText: string expected"; + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { + var error = $root.proto.ContextInfo.verify(message.contextInfo); if (error) - return "starAction." + error; - } - if (message.contactAction != null && message.hasOwnProperty("contactAction")) { - var error = $root.proto.ContactAction.verify(message.contactAction); - if (error) - return "contactAction." + error; - } - if (message.muteAction != null && message.hasOwnProperty("muteAction")) { - var error = $root.proto.MuteAction.verify(message.muteAction); - if (error) - return "muteAction." + error; - } - if (message.pinAction != null && message.hasOwnProperty("pinAction")) { - var error = $root.proto.PinAction.verify(message.pinAction); - if (error) - return "pinAction." + error; - } - if (message.securityNotificationSetting != null && message.hasOwnProperty("securityNotificationSetting")) { - var error = $root.proto.SecurityNotificationSetting.verify(message.securityNotificationSetting); - if (error) - return "securityNotificationSetting." + error; - } - if (message.pushNameSetting != null && message.hasOwnProperty("pushNameSetting")) { - var error = $root.proto.PushNameSetting.verify(message.pushNameSetting); - if (error) - return "pushNameSetting." + error; - } - if (message.quickReplyAction != null && message.hasOwnProperty("quickReplyAction")) { - var error = $root.proto.QuickReplyAction.verify(message.quickReplyAction); - if (error) - return "quickReplyAction." + error; - } - if (message.recentStickerWeightsAction != null && message.hasOwnProperty("recentStickerWeightsAction")) { - var error = $root.proto.RecentStickerWeightsAction.verify(message.recentStickerWeightsAction); - if (error) - return "recentStickerWeightsAction." + error; - } - if (message.recentStickerMetadata != null && message.hasOwnProperty("recentStickerMetadata")) { - var error = $root.proto.RecentStickerMetadata.verify(message.recentStickerMetadata); - if (error) - return "recentStickerMetadata." + error; - } - if (message.recentEmojiWeightsAction != null && message.hasOwnProperty("recentEmojiWeightsAction")) { - var error = $root.proto.RecentEmojiWeightsAction.verify(message.recentEmojiWeightsAction); - if (error) - return "recentEmojiWeightsAction." + error; - } - if (message.labelEditAction != null && message.hasOwnProperty("labelEditAction")) { - var error = $root.proto.LabelEditAction.verify(message.labelEditAction); - if (error) - return "labelEditAction." + error; - } - if (message.labelAssociationAction != null && message.hasOwnProperty("labelAssociationAction")) { - var error = $root.proto.LabelAssociationAction.verify(message.labelAssociationAction); - if (error) - return "labelAssociationAction." + error; - } - if (message.localeSetting != null && message.hasOwnProperty("localeSetting")) { - var error = $root.proto.LocaleSetting.verify(message.localeSetting); - if (error) - return "localeSetting." + error; - } - if (message.archiveChatAction != null && message.hasOwnProperty("archiveChatAction")) { - var error = $root.proto.ArchiveChatAction.verify(message.archiveChatAction); - if (error) - return "archiveChatAction." + error; - } - if (message.deleteMessageForMeAction != null && message.hasOwnProperty("deleteMessageForMeAction")) { - var error = $root.proto.DeleteMessageForMeAction.verify(message.deleteMessageForMeAction); - if (error) - return "deleteMessageForMeAction." + error; - } - if (message.keyExpiration != null && message.hasOwnProperty("keyExpiration")) { - var error = $root.proto.KeyExpiration.verify(message.keyExpiration); - if (error) - return "keyExpiration." + error; - } - if (message.markChatAsReadAction != null && message.hasOwnProperty("markChatAsReadAction")) { - var error = $root.proto.MarkChatAsReadAction.verify(message.markChatAsReadAction); - if (error) - return "markChatAsReadAction." + error; - } - if (message.clearChatAction != null && message.hasOwnProperty("clearChatAction")) { - var error = $root.proto.ClearChatAction.verify(message.clearChatAction); - if (error) - return "clearChatAction." + error; - } - if (message.deleteChatAction != null && message.hasOwnProperty("deleteChatAction")) { - var error = $root.proto.DeleteChatAction.verify(message.deleteChatAction); - if (error) - return "deleteChatAction." + error; - } - if (message.unarchiveChatsSetting != null && message.hasOwnProperty("unarchiveChatsSetting")) { - var error = $root.proto.UnarchiveChatsSetting.verify(message.unarchiveChatsSetting); - if (error) - return "unarchiveChatsSetting." + error; - } - if (message.primaryFeature != null && message.hasOwnProperty("primaryFeature")) { - var error = $root.proto.PrimaryFeature.verify(message.primaryFeature); - if (error) - return "primaryFeature." + error; - } - if (message.favoriteStickerAction != null && message.hasOwnProperty("favoriteStickerAction")) { - var error = $root.proto.FavoriteStickerAction.verify(message.favoriteStickerAction); - if (error) - return "favoriteStickerAction." + error; - } - if (message.androidUnsupportedActions != null && message.hasOwnProperty("androidUnsupportedActions")) { - var error = $root.proto.AndroidUnsupportedActions.verify(message.androidUnsupportedActions); - if (error) - return "androidUnsupportedActions." + error; - } - if (message.agentAction != null && message.hasOwnProperty("agentAction")) { - var error = $root.proto.AgentAction.verify(message.agentAction); - if (error) - return "agentAction." + error; - } - if (message.subscriptionAction != null && message.hasOwnProperty("subscriptionAction")) { - var error = $root.proto.SubscriptionAction.verify(message.subscriptionAction); - if (error) - return "subscriptionAction." + error; - } - if (message.userStatusMuteAction != null && message.hasOwnProperty("userStatusMuteAction")) { - var error = $root.proto.UserStatusMuteAction.verify(message.userStatusMuteAction); - if (error) - return "userStatusMuteAction." + error; - } - if (message.timeFormatAction != null && message.hasOwnProperty("timeFormatAction")) { - var error = $root.proto.TimeFormatAction.verify(message.timeFormatAction); - if (error) - return "timeFormatAction." + error; + return "contextInfo." + error; } + if (message.selectedIndex != null && message.hasOwnProperty("selectedIndex")) + if (!$util.isInteger(message.selectedIndex)) + return "selectedIndex: integer expected"; return null; }; /** - * Creates a SyncActionValue message from a plain object. Also converts values to their respective internal types. + * Creates a TemplateButtonReplyMessage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.SyncActionValue + * @memberof proto.TemplateButtonReplyMessage * @static * @param {Object.} object Plain object - * @returns {proto.SyncActionValue} SyncActionValue + * @returns {proto.TemplateButtonReplyMessage} TemplateButtonReplyMessage */ - SyncActionValue.fromObject = function fromObject(object) { - if (object instanceof $root.proto.SyncActionValue) + TemplateButtonReplyMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.TemplateButtonReplyMessage) return object; - var message = new $root.proto.SyncActionValue(); - if (object.timestamp != null) - if ($util.Long) - (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = false; - else if (typeof object.timestamp === "string") - message.timestamp = parseInt(object.timestamp, 10); - else if (typeof object.timestamp === "number") - message.timestamp = object.timestamp; - else if (typeof object.timestamp === "object") - message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(); - if (object.starAction != null) { - if (typeof object.starAction !== "object") - throw TypeError(".proto.SyncActionValue.starAction: object expected"); - message.starAction = $root.proto.StarAction.fromObject(object.starAction); + var message = new $root.proto.TemplateButtonReplyMessage(); + if (object.selectedId != null) + message.selectedId = String(object.selectedId); + if (object.selectedDisplayText != null) + message.selectedDisplayText = String(object.selectedDisplayText); + if (object.contextInfo != null) { + if (typeof object.contextInfo !== "object") + throw TypeError(".proto.TemplateButtonReplyMessage.contextInfo: object expected"); + message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); } - if (object.contactAction != null) { - if (typeof object.contactAction !== "object") - throw TypeError(".proto.SyncActionValue.contactAction: object expected"); - message.contactAction = $root.proto.ContactAction.fromObject(object.contactAction); + if (object.selectedIndex != null) + message.selectedIndex = object.selectedIndex >>> 0; + return message; + }; + + /** + * Creates a plain object from a TemplateButtonReplyMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.TemplateButtonReplyMessage + * @static + * @param {proto.TemplateButtonReplyMessage} message TemplateButtonReplyMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TemplateButtonReplyMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.selectedId = ""; + object.selectedDisplayText = ""; + object.contextInfo = null; + object.selectedIndex = 0; } - if (object.muteAction != null) { - if (typeof object.muteAction !== "object") - throw TypeError(".proto.SyncActionValue.muteAction: object expected"); - message.muteAction = $root.proto.MuteAction.fromObject(object.muteAction); - } - if (object.pinAction != null) { - if (typeof object.pinAction !== "object") - throw TypeError(".proto.SyncActionValue.pinAction: object expected"); - message.pinAction = $root.proto.PinAction.fromObject(object.pinAction); - } - if (object.securityNotificationSetting != null) { - if (typeof object.securityNotificationSetting !== "object") - throw TypeError(".proto.SyncActionValue.securityNotificationSetting: object expected"); - message.securityNotificationSetting = $root.proto.SecurityNotificationSetting.fromObject(object.securityNotificationSetting); - } - if (object.pushNameSetting != null) { - if (typeof object.pushNameSetting !== "object") - throw TypeError(".proto.SyncActionValue.pushNameSetting: object expected"); - message.pushNameSetting = $root.proto.PushNameSetting.fromObject(object.pushNameSetting); - } - if (object.quickReplyAction != null) { - if (typeof object.quickReplyAction !== "object") - throw TypeError(".proto.SyncActionValue.quickReplyAction: object expected"); - message.quickReplyAction = $root.proto.QuickReplyAction.fromObject(object.quickReplyAction); - } - if (object.recentStickerWeightsAction != null) { - if (typeof object.recentStickerWeightsAction !== "object") - throw TypeError(".proto.SyncActionValue.recentStickerWeightsAction: object expected"); - message.recentStickerWeightsAction = $root.proto.RecentStickerWeightsAction.fromObject(object.recentStickerWeightsAction); - } - if (object.recentStickerMetadata != null) { - if (typeof object.recentStickerMetadata !== "object") - throw TypeError(".proto.SyncActionValue.recentStickerMetadata: object expected"); - message.recentStickerMetadata = $root.proto.RecentStickerMetadata.fromObject(object.recentStickerMetadata); - } - if (object.recentEmojiWeightsAction != null) { - if (typeof object.recentEmojiWeightsAction !== "object") - throw TypeError(".proto.SyncActionValue.recentEmojiWeightsAction: object expected"); - message.recentEmojiWeightsAction = $root.proto.RecentEmojiWeightsAction.fromObject(object.recentEmojiWeightsAction); - } - if (object.labelEditAction != null) { - if (typeof object.labelEditAction !== "object") - throw TypeError(".proto.SyncActionValue.labelEditAction: object expected"); - message.labelEditAction = $root.proto.LabelEditAction.fromObject(object.labelEditAction); - } - if (object.labelAssociationAction != null) { - if (typeof object.labelAssociationAction !== "object") - throw TypeError(".proto.SyncActionValue.labelAssociationAction: object expected"); - message.labelAssociationAction = $root.proto.LabelAssociationAction.fromObject(object.labelAssociationAction); - } - if (object.localeSetting != null) { - if (typeof object.localeSetting !== "object") - throw TypeError(".proto.SyncActionValue.localeSetting: object expected"); - message.localeSetting = $root.proto.LocaleSetting.fromObject(object.localeSetting); - } - if (object.archiveChatAction != null) { - if (typeof object.archiveChatAction !== "object") - throw TypeError(".proto.SyncActionValue.archiveChatAction: object expected"); - message.archiveChatAction = $root.proto.ArchiveChatAction.fromObject(object.archiveChatAction); - } - if (object.deleteMessageForMeAction != null) { - if (typeof object.deleteMessageForMeAction !== "object") - throw TypeError(".proto.SyncActionValue.deleteMessageForMeAction: object expected"); - message.deleteMessageForMeAction = $root.proto.DeleteMessageForMeAction.fromObject(object.deleteMessageForMeAction); - } - if (object.keyExpiration != null) { - if (typeof object.keyExpiration !== "object") - throw TypeError(".proto.SyncActionValue.keyExpiration: object expected"); - message.keyExpiration = $root.proto.KeyExpiration.fromObject(object.keyExpiration); - } - if (object.markChatAsReadAction != null) { - if (typeof object.markChatAsReadAction !== "object") - throw TypeError(".proto.SyncActionValue.markChatAsReadAction: object expected"); - message.markChatAsReadAction = $root.proto.MarkChatAsReadAction.fromObject(object.markChatAsReadAction); - } - if (object.clearChatAction != null) { - if (typeof object.clearChatAction !== "object") - throw TypeError(".proto.SyncActionValue.clearChatAction: object expected"); - message.clearChatAction = $root.proto.ClearChatAction.fromObject(object.clearChatAction); - } - if (object.deleteChatAction != null) { - if (typeof object.deleteChatAction !== "object") - throw TypeError(".proto.SyncActionValue.deleteChatAction: object expected"); - message.deleteChatAction = $root.proto.DeleteChatAction.fromObject(object.deleteChatAction); - } - if (object.unarchiveChatsSetting != null) { - if (typeof object.unarchiveChatsSetting !== "object") - throw TypeError(".proto.SyncActionValue.unarchiveChatsSetting: object expected"); - message.unarchiveChatsSetting = $root.proto.UnarchiveChatsSetting.fromObject(object.unarchiveChatsSetting); - } - if (object.primaryFeature != null) { - if (typeof object.primaryFeature !== "object") - throw TypeError(".proto.SyncActionValue.primaryFeature: object expected"); - message.primaryFeature = $root.proto.PrimaryFeature.fromObject(object.primaryFeature); - } - if (object.favoriteStickerAction != null) { - if (typeof object.favoriteStickerAction !== "object") - throw TypeError(".proto.SyncActionValue.favoriteStickerAction: object expected"); - message.favoriteStickerAction = $root.proto.FavoriteStickerAction.fromObject(object.favoriteStickerAction); - } - if (object.androidUnsupportedActions != null) { - if (typeof object.androidUnsupportedActions !== "object") - throw TypeError(".proto.SyncActionValue.androidUnsupportedActions: object expected"); - message.androidUnsupportedActions = $root.proto.AndroidUnsupportedActions.fromObject(object.androidUnsupportedActions); - } - if (object.agentAction != null) { - if (typeof object.agentAction !== "object") - throw TypeError(".proto.SyncActionValue.agentAction: object expected"); - message.agentAction = $root.proto.AgentAction.fromObject(object.agentAction); - } - if (object.subscriptionAction != null) { - if (typeof object.subscriptionAction !== "object") - throw TypeError(".proto.SyncActionValue.subscriptionAction: object expected"); - message.subscriptionAction = $root.proto.SubscriptionAction.fromObject(object.subscriptionAction); - } - if (object.userStatusMuteAction != null) { - if (typeof object.userStatusMuteAction !== "object") - throw TypeError(".proto.SyncActionValue.userStatusMuteAction: object expected"); - message.userStatusMuteAction = $root.proto.UserStatusMuteAction.fromObject(object.userStatusMuteAction); - } - if (object.timeFormatAction != null) { - if (typeof object.timeFormatAction !== "object") - throw TypeError(".proto.SyncActionValue.timeFormatAction: object expected"); - message.timeFormatAction = $root.proto.TimeFormatAction.fromObject(object.timeFormatAction); + if (message.selectedId != null && message.hasOwnProperty("selectedId")) + object.selectedId = message.selectedId; + if (message.selectedDisplayText != null && message.hasOwnProperty("selectedDisplayText")) + object.selectedDisplayText = message.selectedDisplayText; + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) + object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + if (message.selectedIndex != null && message.hasOwnProperty("selectedIndex")) + object.selectedIndex = message.selectedIndex; + return object; + }; + + /** + * Converts this TemplateButtonReplyMessage to JSON. + * @function toJSON + * @memberof proto.TemplateButtonReplyMessage + * @instance + * @returns {Object.} JSON object + */ + TemplateButtonReplyMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TemplateButtonReplyMessage; + })(); + + proto.TemplateMessage = (function() { + + /** + * Properties of a TemplateMessage. + * @memberof proto + * @interface ITemplateMessage + * @property {proto.IContextInfo|null} [contextInfo] TemplateMessage contextInfo + * @property {proto.IHydratedFourRowTemplate|null} [hydratedTemplate] TemplateMessage hydratedTemplate + * @property {proto.IFourRowTemplate|null} [fourRowTemplate] TemplateMessage fourRowTemplate + * @property {proto.IHydratedFourRowTemplate|null} [hydratedFourRowTemplate] TemplateMessage hydratedFourRowTemplate + */ + + /** + * Constructs a new TemplateMessage. + * @memberof proto + * @classdesc Represents a TemplateMessage. + * @implements ITemplateMessage + * @constructor + * @param {proto.ITemplateMessage=} [properties] Properties to set + */ + function TemplateMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TemplateMessage contextInfo. + * @member {proto.IContextInfo|null|undefined} contextInfo + * @memberof proto.TemplateMessage + * @instance + */ + TemplateMessage.prototype.contextInfo = null; + + /** + * TemplateMessage hydratedTemplate. + * @member {proto.IHydratedFourRowTemplate|null|undefined} hydratedTemplate + * @memberof proto.TemplateMessage + * @instance + */ + TemplateMessage.prototype.hydratedTemplate = null; + + /** + * TemplateMessage fourRowTemplate. + * @member {proto.IFourRowTemplate|null|undefined} fourRowTemplate + * @memberof proto.TemplateMessage + * @instance + */ + TemplateMessage.prototype.fourRowTemplate = null; + + /** + * TemplateMessage hydratedFourRowTemplate. + * @member {proto.IHydratedFourRowTemplate|null|undefined} hydratedFourRowTemplate + * @memberof proto.TemplateMessage + * @instance + */ + TemplateMessage.prototype.hydratedFourRowTemplate = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TemplateMessage format. + * @member {"fourRowTemplate"|"hydratedFourRowTemplate"|undefined} format + * @memberof proto.TemplateMessage + * @instance + */ + Object.defineProperty(TemplateMessage.prototype, "format", { + get: $util.oneOfGetter($oneOfFields = ["fourRowTemplate", "hydratedFourRowTemplate"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TemplateMessage instance using the specified properties. + * @function create + * @memberof proto.TemplateMessage + * @static + * @param {proto.ITemplateMessage=} [properties] Properties to set + * @returns {proto.TemplateMessage} TemplateMessage instance + */ + TemplateMessage.create = function create(properties) { + return new TemplateMessage(properties); + }; + + /** + * Encodes the specified TemplateMessage message. Does not implicitly {@link proto.TemplateMessage.verify|verify} messages. + * @function encode + * @memberof proto.TemplateMessage + * @static + * @param {proto.ITemplateMessage} message TemplateMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TemplateMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fourRowTemplate != null && Object.hasOwnProperty.call(message, "fourRowTemplate")) + $root.proto.FourRowTemplate.encode(message.fourRowTemplate, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.hydratedFourRowTemplate != null && Object.hasOwnProperty.call(message, "hydratedFourRowTemplate")) + $root.proto.HydratedFourRowTemplate.encode(message.hydratedFourRowTemplate, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) + $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.hydratedTemplate != null && Object.hasOwnProperty.call(message, "hydratedTemplate")) + $root.proto.HydratedFourRowTemplate.encode(message.hydratedTemplate, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TemplateMessage message, length delimited. Does not implicitly {@link proto.TemplateMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.TemplateMessage + * @static + * @param {proto.ITemplateMessage} message TemplateMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TemplateMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TemplateMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.TemplateMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.TemplateMessage} TemplateMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TemplateMessage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.TemplateMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); + break; + case 4: + message.hydratedTemplate = $root.proto.HydratedFourRowTemplate.decode(reader, reader.uint32()); + break; + case 1: + message.fourRowTemplate = $root.proto.FourRowTemplate.decode(reader, reader.uint32()); + break; + case 2: + message.hydratedFourRowTemplate = $root.proto.HydratedFourRowTemplate.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } } return message; }; /** - * Creates a plain object from a SyncActionValue message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.SyncActionValue + * Decodes a TemplateMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.TemplateMessage * @static - * @param {proto.SyncActionValue} message SyncActionValue + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.TemplateMessage} TemplateMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TemplateMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TemplateMessage message. + * @function verify + * @memberof proto.TemplateMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TemplateMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } + if (message.hydratedTemplate != null && message.hasOwnProperty("hydratedTemplate")) { + var error = $root.proto.HydratedFourRowTemplate.verify(message.hydratedTemplate); + if (error) + return "hydratedTemplate." + error; + } + if (message.fourRowTemplate != null && message.hasOwnProperty("fourRowTemplate")) { + properties.format = 1; + { + var error = $root.proto.FourRowTemplate.verify(message.fourRowTemplate); + if (error) + return "fourRowTemplate." + error; + } + } + if (message.hydratedFourRowTemplate != null && message.hasOwnProperty("hydratedFourRowTemplate")) { + if (properties.format === 1) + return "format: multiple values"; + properties.format = 1; + { + var error = $root.proto.HydratedFourRowTemplate.verify(message.hydratedFourRowTemplate); + if (error) + return "hydratedFourRowTemplate." + error; + } + } + return null; + }; + + /** + * Creates a TemplateMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.TemplateMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.TemplateMessage} TemplateMessage + */ + TemplateMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.TemplateMessage) + return object; + var message = new $root.proto.TemplateMessage(); + if (object.contextInfo != null) { + if (typeof object.contextInfo !== "object") + throw TypeError(".proto.TemplateMessage.contextInfo: object expected"); + message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); + } + if (object.hydratedTemplate != null) { + if (typeof object.hydratedTemplate !== "object") + throw TypeError(".proto.TemplateMessage.hydratedTemplate: object expected"); + message.hydratedTemplate = $root.proto.HydratedFourRowTemplate.fromObject(object.hydratedTemplate); + } + if (object.fourRowTemplate != null) { + if (typeof object.fourRowTemplate !== "object") + throw TypeError(".proto.TemplateMessage.fourRowTemplate: object expected"); + message.fourRowTemplate = $root.proto.FourRowTemplate.fromObject(object.fourRowTemplate); + } + if (object.hydratedFourRowTemplate != null) { + if (typeof object.hydratedFourRowTemplate !== "object") + throw TypeError(".proto.TemplateMessage.hydratedFourRowTemplate: object expected"); + message.hydratedFourRowTemplate = $root.proto.HydratedFourRowTemplate.fromObject(object.hydratedFourRowTemplate); + } + return message; + }; + + /** + * Creates a plain object from a TemplateMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.TemplateMessage + * @static + * @param {proto.TemplateMessage} message TemplateMessage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SyncActionValue.toObject = function toObject(message, options) { + TemplateMessage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timestamp = options.longs === String ? "0" : 0; - object.starAction = null; - object.contactAction = null; - object.muteAction = null; - object.pinAction = null; - object.securityNotificationSetting = null; - object.pushNameSetting = null; - object.quickReplyAction = null; - object.recentStickerWeightsAction = null; - object.recentStickerMetadata = null; - object.recentEmojiWeightsAction = null; - object.labelEditAction = null; - object.labelAssociationAction = null; - object.localeSetting = null; - object.archiveChatAction = null; - object.deleteMessageForMeAction = null; - object.keyExpiration = null; - object.markChatAsReadAction = null; - object.clearChatAction = null; - object.deleteChatAction = null; - object.unarchiveChatsSetting = null; - object.primaryFeature = null; - object.favoriteStickerAction = null; - object.androidUnsupportedActions = null; - object.agentAction = null; - object.subscriptionAction = null; - object.userStatusMuteAction = null; - object.timeFormatAction = null; + object.contextInfo = null; + object.hydratedTemplate = null; } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (typeof message.timestamp === "number") - object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; - else - object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() : message.timestamp; - if (message.starAction != null && message.hasOwnProperty("starAction")) - object.starAction = $root.proto.StarAction.toObject(message.starAction, options); - if (message.contactAction != null && message.hasOwnProperty("contactAction")) - object.contactAction = $root.proto.ContactAction.toObject(message.contactAction, options); - if (message.muteAction != null && message.hasOwnProperty("muteAction")) - object.muteAction = $root.proto.MuteAction.toObject(message.muteAction, options); - if (message.pinAction != null && message.hasOwnProperty("pinAction")) - object.pinAction = $root.proto.PinAction.toObject(message.pinAction, options); - if (message.securityNotificationSetting != null && message.hasOwnProperty("securityNotificationSetting")) - object.securityNotificationSetting = $root.proto.SecurityNotificationSetting.toObject(message.securityNotificationSetting, options); - if (message.pushNameSetting != null && message.hasOwnProperty("pushNameSetting")) - object.pushNameSetting = $root.proto.PushNameSetting.toObject(message.pushNameSetting, options); - if (message.quickReplyAction != null && message.hasOwnProperty("quickReplyAction")) - object.quickReplyAction = $root.proto.QuickReplyAction.toObject(message.quickReplyAction, options); - if (message.recentStickerWeightsAction != null && message.hasOwnProperty("recentStickerWeightsAction")) - object.recentStickerWeightsAction = $root.proto.RecentStickerWeightsAction.toObject(message.recentStickerWeightsAction, options); - if (message.recentStickerMetadata != null && message.hasOwnProperty("recentStickerMetadata")) - object.recentStickerMetadata = $root.proto.RecentStickerMetadata.toObject(message.recentStickerMetadata, options); - if (message.recentEmojiWeightsAction != null && message.hasOwnProperty("recentEmojiWeightsAction")) - object.recentEmojiWeightsAction = $root.proto.RecentEmojiWeightsAction.toObject(message.recentEmojiWeightsAction, options); - if (message.labelEditAction != null && message.hasOwnProperty("labelEditAction")) - object.labelEditAction = $root.proto.LabelEditAction.toObject(message.labelEditAction, options); - if (message.labelAssociationAction != null && message.hasOwnProperty("labelAssociationAction")) - object.labelAssociationAction = $root.proto.LabelAssociationAction.toObject(message.labelAssociationAction, options); - if (message.localeSetting != null && message.hasOwnProperty("localeSetting")) - object.localeSetting = $root.proto.LocaleSetting.toObject(message.localeSetting, options); - if (message.archiveChatAction != null && message.hasOwnProperty("archiveChatAction")) - object.archiveChatAction = $root.proto.ArchiveChatAction.toObject(message.archiveChatAction, options); - if (message.deleteMessageForMeAction != null && message.hasOwnProperty("deleteMessageForMeAction")) - object.deleteMessageForMeAction = $root.proto.DeleteMessageForMeAction.toObject(message.deleteMessageForMeAction, options); - if (message.keyExpiration != null && message.hasOwnProperty("keyExpiration")) - object.keyExpiration = $root.proto.KeyExpiration.toObject(message.keyExpiration, options); - if (message.markChatAsReadAction != null && message.hasOwnProperty("markChatAsReadAction")) - object.markChatAsReadAction = $root.proto.MarkChatAsReadAction.toObject(message.markChatAsReadAction, options); - if (message.clearChatAction != null && message.hasOwnProperty("clearChatAction")) - object.clearChatAction = $root.proto.ClearChatAction.toObject(message.clearChatAction, options); - if (message.deleteChatAction != null && message.hasOwnProperty("deleteChatAction")) - object.deleteChatAction = $root.proto.DeleteChatAction.toObject(message.deleteChatAction, options); - if (message.unarchiveChatsSetting != null && message.hasOwnProperty("unarchiveChatsSetting")) - object.unarchiveChatsSetting = $root.proto.UnarchiveChatsSetting.toObject(message.unarchiveChatsSetting, options); - if (message.primaryFeature != null && message.hasOwnProperty("primaryFeature")) - object.primaryFeature = $root.proto.PrimaryFeature.toObject(message.primaryFeature, options); - if (message.favoriteStickerAction != null && message.hasOwnProperty("favoriteStickerAction")) - object.favoriteStickerAction = $root.proto.FavoriteStickerAction.toObject(message.favoriteStickerAction, options); - if (message.androidUnsupportedActions != null && message.hasOwnProperty("androidUnsupportedActions")) - object.androidUnsupportedActions = $root.proto.AndroidUnsupportedActions.toObject(message.androidUnsupportedActions, options); - if (message.agentAction != null && message.hasOwnProperty("agentAction")) - object.agentAction = $root.proto.AgentAction.toObject(message.agentAction, options); - if (message.subscriptionAction != null && message.hasOwnProperty("subscriptionAction")) - object.subscriptionAction = $root.proto.SubscriptionAction.toObject(message.subscriptionAction, options); - if (message.userStatusMuteAction != null && message.hasOwnProperty("userStatusMuteAction")) - object.userStatusMuteAction = $root.proto.UserStatusMuteAction.toObject(message.userStatusMuteAction, options); - if (message.timeFormatAction != null && message.hasOwnProperty("timeFormatAction")) - object.timeFormatAction = $root.proto.TimeFormatAction.toObject(message.timeFormatAction, options); + if (message.fourRowTemplate != null && message.hasOwnProperty("fourRowTemplate")) { + object.fourRowTemplate = $root.proto.FourRowTemplate.toObject(message.fourRowTemplate, options); + if (options.oneofs) + object.format = "fourRowTemplate"; + } + if (message.hydratedFourRowTemplate != null && message.hasOwnProperty("hydratedFourRowTemplate")) { + object.hydratedFourRowTemplate = $root.proto.HydratedFourRowTemplate.toObject(message.hydratedFourRowTemplate, options); + if (options.oneofs) + object.format = "hydratedFourRowTemplate"; + } + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) + object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + if (message.hydratedTemplate != null && message.hasOwnProperty("hydratedTemplate")) + object.hydratedTemplate = $root.proto.HydratedFourRowTemplate.toObject(message.hydratedTemplate, options); return object; }; /** - * Converts this SyncActionValue to JSON. + * Converts this TemplateMessage to JSON. * @function toJSON - * @memberof proto.SyncActionValue + * @memberof proto.TemplateMessage * @instance * @returns {Object.} JSON object */ - SyncActionValue.prototype.toJSON = function toJSON() { + TemplateMessage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SyncActionValue; + return TemplateMessage; })(); proto.TimeFormatAction = (function() { @@ -49530,6 +60984,226 @@ $root.proto = (function() { return TimeFormatAction; })(); + proto.URLButton = (function() { + + /** + * Properties of a URLButton. + * @memberof proto + * @interface IURLButton + * @property {proto.IHighlyStructuredMessage|null} [displayText] URLButton displayText + * @property {proto.IHighlyStructuredMessage|null} [url] URLButton url + */ + + /** + * Constructs a new URLButton. + * @memberof proto + * @classdesc Represents a URLButton. + * @implements IURLButton + * @constructor + * @param {proto.IURLButton=} [properties] Properties to set + */ + function URLButton(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * URLButton displayText. + * @member {proto.IHighlyStructuredMessage|null|undefined} displayText + * @memberof proto.URLButton + * @instance + */ + URLButton.prototype.displayText = null; + + /** + * URLButton url. + * @member {proto.IHighlyStructuredMessage|null|undefined} url + * @memberof proto.URLButton + * @instance + */ + URLButton.prototype.url = null; + + /** + * Creates a new URLButton instance using the specified properties. + * @function create + * @memberof proto.URLButton + * @static + * @param {proto.IURLButton=} [properties] Properties to set + * @returns {proto.URLButton} URLButton instance + */ + URLButton.create = function create(properties) { + return new URLButton(properties); + }; + + /** + * Encodes the specified URLButton message. Does not implicitly {@link proto.URLButton.verify|verify} messages. + * @function encode + * @memberof proto.URLButton + * @static + * @param {proto.IURLButton} message URLButton message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + URLButton.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayText != null && Object.hasOwnProperty.call(message, "displayText")) + $root.proto.HighlyStructuredMessage.encode(message.displayText, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.url != null && Object.hasOwnProperty.call(message, "url")) + $root.proto.HighlyStructuredMessage.encode(message.url, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified URLButton message, length delimited. Does not implicitly {@link proto.URLButton.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.URLButton + * @static + * @param {proto.IURLButton} message URLButton message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + URLButton.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a URLButton message from the specified reader or buffer. + * @function decode + * @memberof proto.URLButton + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.URLButton} URLButton + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + URLButton.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.URLButton(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.displayText = $root.proto.HighlyStructuredMessage.decode(reader, reader.uint32()); + break; + case 2: + message.url = $root.proto.HighlyStructuredMessage.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a URLButton message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.URLButton + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.URLButton} URLButton + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + URLButton.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a URLButton message. + * @function verify + * @memberof proto.URLButton + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + URLButton.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayText != null && message.hasOwnProperty("displayText")) { + var error = $root.proto.HighlyStructuredMessage.verify(message.displayText); + if (error) + return "displayText." + error; + } + if (message.url != null && message.hasOwnProperty("url")) { + var error = $root.proto.HighlyStructuredMessage.verify(message.url); + if (error) + return "url." + error; + } + return null; + }; + + /** + * Creates a URLButton message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.URLButton + * @static + * @param {Object.} object Plain object + * @returns {proto.URLButton} URLButton + */ + URLButton.fromObject = function fromObject(object) { + if (object instanceof $root.proto.URLButton) + return object; + var message = new $root.proto.URLButton(); + if (object.displayText != null) { + if (typeof object.displayText !== "object") + throw TypeError(".proto.URLButton.displayText: object expected"); + message.displayText = $root.proto.HighlyStructuredMessage.fromObject(object.displayText); + } + if (object.url != null) { + if (typeof object.url !== "object") + throw TypeError(".proto.URLButton.url: object expected"); + message.url = $root.proto.HighlyStructuredMessage.fromObject(object.url); + } + return message; + }; + + /** + * Creates a plain object from a URLButton message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.URLButton + * @static + * @param {proto.URLButton} message URLButton + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + URLButton.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayText = null; + object.url = null; + } + if (message.displayText != null && message.hasOwnProperty("displayText")) + object.displayText = $root.proto.HighlyStructuredMessage.toObject(message.displayText, options); + if (message.url != null && message.hasOwnProperty("url")) + object.url = $root.proto.HighlyStructuredMessage.toObject(message.url, options); + return object; + }; + + /** + * Converts this URLButton to JSON. + * @function toJSON + * @memberof proto.URLButton + * @instance + * @returns {Object.} JSON object + */ + URLButton.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return URLButton; + })(); + proto.UnarchiveChatsSetting = (function() { /** @@ -49717,5477 +61391,6 @@ $root.proto = (function() { return UnarchiveChatsSetting; })(); - proto.UserStatusMuteAction = (function() { - - /** - * Properties of a UserStatusMuteAction. - * @memberof proto - * @interface IUserStatusMuteAction - * @property {boolean|null} [muted] UserStatusMuteAction muted - */ - - /** - * Constructs a new UserStatusMuteAction. - * @memberof proto - * @classdesc Represents a UserStatusMuteAction. - * @implements IUserStatusMuteAction - * @constructor - * @param {proto.IUserStatusMuteAction=} [properties] Properties to set - */ - function UserStatusMuteAction(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UserStatusMuteAction muted. - * @member {boolean} muted - * @memberof proto.UserStatusMuteAction - * @instance - */ - UserStatusMuteAction.prototype.muted = false; - - /** - * Creates a new UserStatusMuteAction instance using the specified properties. - * @function create - * @memberof proto.UserStatusMuteAction - * @static - * @param {proto.IUserStatusMuteAction=} [properties] Properties to set - * @returns {proto.UserStatusMuteAction} UserStatusMuteAction instance - */ - UserStatusMuteAction.create = function create(properties) { - return new UserStatusMuteAction(properties); - }; - - /** - * Encodes the specified UserStatusMuteAction message. Does not implicitly {@link proto.UserStatusMuteAction.verify|verify} messages. - * @function encode - * @memberof proto.UserStatusMuteAction - * @static - * @param {proto.IUserStatusMuteAction} message UserStatusMuteAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserStatusMuteAction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.muted != null && Object.hasOwnProperty.call(message, "muted")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.muted); - return writer; - }; - - /** - * Encodes the specified UserStatusMuteAction message, length delimited. Does not implicitly {@link proto.UserStatusMuteAction.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.UserStatusMuteAction - * @static - * @param {proto.IUserStatusMuteAction} message UserStatusMuteAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserStatusMuteAction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UserStatusMuteAction message from the specified reader or buffer. - * @function decode - * @memberof proto.UserStatusMuteAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.UserStatusMuteAction} UserStatusMuteAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserStatusMuteAction.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.UserStatusMuteAction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.muted = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UserStatusMuteAction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.UserStatusMuteAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.UserStatusMuteAction} UserStatusMuteAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserStatusMuteAction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UserStatusMuteAction message. - * @function verify - * @memberof proto.UserStatusMuteAction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UserStatusMuteAction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.muted != null && message.hasOwnProperty("muted")) - if (typeof message.muted !== "boolean") - return "muted: boolean expected"; - return null; - }; - - /** - * Creates a UserStatusMuteAction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.UserStatusMuteAction - * @static - * @param {Object.} object Plain object - * @returns {proto.UserStatusMuteAction} UserStatusMuteAction - */ - UserStatusMuteAction.fromObject = function fromObject(object) { - if (object instanceof $root.proto.UserStatusMuteAction) - return object; - var message = new $root.proto.UserStatusMuteAction(); - if (object.muted != null) - message.muted = Boolean(object.muted); - return message; - }; - - /** - * Creates a plain object from a UserStatusMuteAction message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.UserStatusMuteAction - * @static - * @param {proto.UserStatusMuteAction} message UserStatusMuteAction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UserStatusMuteAction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.muted = false; - if (message.muted != null && message.hasOwnProperty("muted")) - object.muted = message.muted; - return object; - }; - - /** - * Converts this UserStatusMuteAction to JSON. - * @function toJSON - * @memberof proto.UserStatusMuteAction - * @instance - * @returns {Object.} JSON object - */ - UserStatusMuteAction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return UserStatusMuteAction; - })(); - - proto.BizAccountLinkInfo = (function() { - - /** - * Properties of a BizAccountLinkInfo. - * @memberof proto - * @interface IBizAccountLinkInfo - * @property {number|Long|null} [whatsappBizAcctFbid] BizAccountLinkInfo whatsappBizAcctFbid - * @property {string|null} [whatsappAcctNumber] BizAccountLinkInfo whatsappAcctNumber - * @property {number|Long|null} [issueTime] BizAccountLinkInfo issueTime - * @property {proto.BizAccountLinkInfo.BizAccountLinkInfoHostStorageType|null} [hostStorage] BizAccountLinkInfo hostStorage - * @property {proto.BizAccountLinkInfo.BizAccountLinkInfoAccountType|null} [accountType] BizAccountLinkInfo accountType - */ - - /** - * Constructs a new BizAccountLinkInfo. - * @memberof proto - * @classdesc Represents a BizAccountLinkInfo. - * @implements IBizAccountLinkInfo - * @constructor - * @param {proto.IBizAccountLinkInfo=} [properties] Properties to set - */ - function BizAccountLinkInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BizAccountLinkInfo whatsappBizAcctFbid. - * @member {number|Long} whatsappBizAcctFbid - * @memberof proto.BizAccountLinkInfo - * @instance - */ - BizAccountLinkInfo.prototype.whatsappBizAcctFbid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * BizAccountLinkInfo whatsappAcctNumber. - * @member {string} whatsappAcctNumber - * @memberof proto.BizAccountLinkInfo - * @instance - */ - BizAccountLinkInfo.prototype.whatsappAcctNumber = ""; - - /** - * BizAccountLinkInfo issueTime. - * @member {number|Long} issueTime - * @memberof proto.BizAccountLinkInfo - * @instance - */ - BizAccountLinkInfo.prototype.issueTime = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * BizAccountLinkInfo hostStorage. - * @member {proto.BizAccountLinkInfo.BizAccountLinkInfoHostStorageType} hostStorage - * @memberof proto.BizAccountLinkInfo - * @instance - */ - BizAccountLinkInfo.prototype.hostStorage = 0; - - /** - * BizAccountLinkInfo accountType. - * @member {proto.BizAccountLinkInfo.BizAccountLinkInfoAccountType} accountType - * @memberof proto.BizAccountLinkInfo - * @instance - */ - BizAccountLinkInfo.prototype.accountType = 0; - - /** - * Creates a new BizAccountLinkInfo instance using the specified properties. - * @function create - * @memberof proto.BizAccountLinkInfo - * @static - * @param {proto.IBizAccountLinkInfo=} [properties] Properties to set - * @returns {proto.BizAccountLinkInfo} BizAccountLinkInfo instance - */ - BizAccountLinkInfo.create = function create(properties) { - return new BizAccountLinkInfo(properties); - }; - - /** - * Encodes the specified BizAccountLinkInfo message. Does not implicitly {@link proto.BizAccountLinkInfo.verify|verify} messages. - * @function encode - * @memberof proto.BizAccountLinkInfo - * @static - * @param {proto.IBizAccountLinkInfo} message BizAccountLinkInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BizAccountLinkInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.whatsappBizAcctFbid != null && Object.hasOwnProperty.call(message, "whatsappBizAcctFbid")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.whatsappBizAcctFbid); - if (message.whatsappAcctNumber != null && Object.hasOwnProperty.call(message, "whatsappAcctNumber")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.whatsappAcctNumber); - if (message.issueTime != null && Object.hasOwnProperty.call(message, "issueTime")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.issueTime); - if (message.hostStorage != null && Object.hasOwnProperty.call(message, "hostStorage")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.hostStorage); - if (message.accountType != null && Object.hasOwnProperty.call(message, "accountType")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.accountType); - return writer; - }; - - /** - * Encodes the specified BizAccountLinkInfo message, length delimited. Does not implicitly {@link proto.BizAccountLinkInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.BizAccountLinkInfo - * @static - * @param {proto.IBizAccountLinkInfo} message BizAccountLinkInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BizAccountLinkInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BizAccountLinkInfo message from the specified reader or buffer. - * @function decode - * @memberof proto.BizAccountLinkInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.BizAccountLinkInfo} BizAccountLinkInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BizAccountLinkInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.BizAccountLinkInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.whatsappBizAcctFbid = reader.uint64(); - break; - case 2: - message.whatsappAcctNumber = reader.string(); - break; - case 3: - message.issueTime = reader.uint64(); - break; - case 4: - message.hostStorage = reader.int32(); - break; - case 5: - message.accountType = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BizAccountLinkInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.BizAccountLinkInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.BizAccountLinkInfo} BizAccountLinkInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BizAccountLinkInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BizAccountLinkInfo message. - * @function verify - * @memberof proto.BizAccountLinkInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BizAccountLinkInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.whatsappBizAcctFbid != null && message.hasOwnProperty("whatsappBizAcctFbid")) - if (!$util.isInteger(message.whatsappBizAcctFbid) && !(message.whatsappBizAcctFbid && $util.isInteger(message.whatsappBizAcctFbid.low) && $util.isInteger(message.whatsappBizAcctFbid.high))) - return "whatsappBizAcctFbid: integer|Long expected"; - if (message.whatsappAcctNumber != null && message.hasOwnProperty("whatsappAcctNumber")) - if (!$util.isString(message.whatsappAcctNumber)) - return "whatsappAcctNumber: string expected"; - if (message.issueTime != null && message.hasOwnProperty("issueTime")) - if (!$util.isInteger(message.issueTime) && !(message.issueTime && $util.isInteger(message.issueTime.low) && $util.isInteger(message.issueTime.high))) - return "issueTime: integer|Long expected"; - if (message.hostStorage != null && message.hasOwnProperty("hostStorage")) - switch (message.hostStorage) { - default: - return "hostStorage: enum value expected"; - case 0: - case 1: - break; - } - if (message.accountType != null && message.hasOwnProperty("accountType")) - switch (message.accountType) { - default: - return "accountType: enum value expected"; - case 0: - break; - } - return null; - }; - - /** - * Creates a BizAccountLinkInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.BizAccountLinkInfo - * @static - * @param {Object.} object Plain object - * @returns {proto.BizAccountLinkInfo} BizAccountLinkInfo - */ - BizAccountLinkInfo.fromObject = function fromObject(object) { - if (object instanceof $root.proto.BizAccountLinkInfo) - return object; - var message = new $root.proto.BizAccountLinkInfo(); - if (object.whatsappBizAcctFbid != null) - if ($util.Long) - (message.whatsappBizAcctFbid = $util.Long.fromValue(object.whatsappBizAcctFbid)).unsigned = true; - else if (typeof object.whatsappBizAcctFbid === "string") - message.whatsappBizAcctFbid = parseInt(object.whatsappBizAcctFbid, 10); - else if (typeof object.whatsappBizAcctFbid === "number") - message.whatsappBizAcctFbid = object.whatsappBizAcctFbid; - else if (typeof object.whatsappBizAcctFbid === "object") - message.whatsappBizAcctFbid = new $util.LongBits(object.whatsappBizAcctFbid.low >>> 0, object.whatsappBizAcctFbid.high >>> 0).toNumber(true); - if (object.whatsappAcctNumber != null) - message.whatsappAcctNumber = String(object.whatsappAcctNumber); - if (object.issueTime != null) - if ($util.Long) - (message.issueTime = $util.Long.fromValue(object.issueTime)).unsigned = true; - else if (typeof object.issueTime === "string") - message.issueTime = parseInt(object.issueTime, 10); - else if (typeof object.issueTime === "number") - message.issueTime = object.issueTime; - else if (typeof object.issueTime === "object") - message.issueTime = new $util.LongBits(object.issueTime.low >>> 0, object.issueTime.high >>> 0).toNumber(true); - switch (object.hostStorage) { - case "ON_PREMISE": - case 0: - message.hostStorage = 0; - break; - case "FACEBOOK": - case 1: - message.hostStorage = 1; - break; - } - switch (object.accountType) { - case "ENTERPRISE": - case 0: - message.accountType = 0; - break; - } - return message; - }; - - /** - * Creates a plain object from a BizAccountLinkInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.BizAccountLinkInfo - * @static - * @param {proto.BizAccountLinkInfo} message BizAccountLinkInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BizAccountLinkInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.whatsappBizAcctFbid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.whatsappBizAcctFbid = options.longs === String ? "0" : 0; - object.whatsappAcctNumber = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.issueTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.issueTime = options.longs === String ? "0" : 0; - object.hostStorage = options.enums === String ? "ON_PREMISE" : 0; - object.accountType = options.enums === String ? "ENTERPRISE" : 0; - } - if (message.whatsappBizAcctFbid != null && message.hasOwnProperty("whatsappBizAcctFbid")) - if (typeof message.whatsappBizAcctFbid === "number") - object.whatsappBizAcctFbid = options.longs === String ? String(message.whatsappBizAcctFbid) : message.whatsappBizAcctFbid; - else - object.whatsappBizAcctFbid = options.longs === String ? $util.Long.prototype.toString.call(message.whatsappBizAcctFbid) : options.longs === Number ? new $util.LongBits(message.whatsappBizAcctFbid.low >>> 0, message.whatsappBizAcctFbid.high >>> 0).toNumber(true) : message.whatsappBizAcctFbid; - if (message.whatsappAcctNumber != null && message.hasOwnProperty("whatsappAcctNumber")) - object.whatsappAcctNumber = message.whatsappAcctNumber; - if (message.issueTime != null && message.hasOwnProperty("issueTime")) - if (typeof message.issueTime === "number") - object.issueTime = options.longs === String ? String(message.issueTime) : message.issueTime; - else - object.issueTime = options.longs === String ? $util.Long.prototype.toString.call(message.issueTime) : options.longs === Number ? new $util.LongBits(message.issueTime.low >>> 0, message.issueTime.high >>> 0).toNumber(true) : message.issueTime; - if (message.hostStorage != null && message.hasOwnProperty("hostStorage")) - object.hostStorage = options.enums === String ? $root.proto.BizAccountLinkInfo.BizAccountLinkInfoHostStorageType[message.hostStorage] : message.hostStorage; - if (message.accountType != null && message.hasOwnProperty("accountType")) - object.accountType = options.enums === String ? $root.proto.BizAccountLinkInfo.BizAccountLinkInfoAccountType[message.accountType] : message.accountType; - return object; - }; - - /** - * Converts this BizAccountLinkInfo to JSON. - * @function toJSON - * @memberof proto.BizAccountLinkInfo - * @instance - * @returns {Object.} JSON object - */ - BizAccountLinkInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * BizAccountLinkInfoHostStorageType enum. - * @name proto.BizAccountLinkInfo.BizAccountLinkInfoHostStorageType - * @enum {number} - * @property {number} ON_PREMISE=0 ON_PREMISE value - * @property {number} FACEBOOK=1 FACEBOOK value - */ - BizAccountLinkInfo.BizAccountLinkInfoHostStorageType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ON_PREMISE"] = 0; - values[valuesById[1] = "FACEBOOK"] = 1; - return values; - })(); - - /** - * BizAccountLinkInfoAccountType enum. - * @name proto.BizAccountLinkInfo.BizAccountLinkInfoAccountType - * @enum {number} - * @property {number} ENTERPRISE=0 ENTERPRISE value - */ - BizAccountLinkInfo.BizAccountLinkInfoAccountType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENTERPRISE"] = 0; - return values; - })(); - - return BizAccountLinkInfo; - })(); - - proto.BizAccountPayload = (function() { - - /** - * Properties of a BizAccountPayload. - * @memberof proto - * @interface IBizAccountPayload - * @property {proto.IVerifiedNameCertificate|null} [vnameCert] BizAccountPayload vnameCert - * @property {Uint8Array|null} [bizAcctLinkInfo] BizAccountPayload bizAcctLinkInfo - */ - - /** - * Constructs a new BizAccountPayload. - * @memberof proto - * @classdesc Represents a BizAccountPayload. - * @implements IBizAccountPayload - * @constructor - * @param {proto.IBizAccountPayload=} [properties] Properties to set - */ - function BizAccountPayload(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BizAccountPayload vnameCert. - * @member {proto.IVerifiedNameCertificate|null|undefined} vnameCert - * @memberof proto.BizAccountPayload - * @instance - */ - BizAccountPayload.prototype.vnameCert = null; - - /** - * BizAccountPayload bizAcctLinkInfo. - * @member {Uint8Array} bizAcctLinkInfo - * @memberof proto.BizAccountPayload - * @instance - */ - BizAccountPayload.prototype.bizAcctLinkInfo = $util.newBuffer([]); - - /** - * Creates a new BizAccountPayload instance using the specified properties. - * @function create - * @memberof proto.BizAccountPayload - * @static - * @param {proto.IBizAccountPayload=} [properties] Properties to set - * @returns {proto.BizAccountPayload} BizAccountPayload instance - */ - BizAccountPayload.create = function create(properties) { - return new BizAccountPayload(properties); - }; - - /** - * Encodes the specified BizAccountPayload message. Does not implicitly {@link proto.BizAccountPayload.verify|verify} messages. - * @function encode - * @memberof proto.BizAccountPayload - * @static - * @param {proto.IBizAccountPayload} message BizAccountPayload message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BizAccountPayload.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.vnameCert != null && Object.hasOwnProperty.call(message, "vnameCert")) - $root.proto.VerifiedNameCertificate.encode(message.vnameCert, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.bizAcctLinkInfo != null && Object.hasOwnProperty.call(message, "bizAcctLinkInfo")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.bizAcctLinkInfo); - return writer; - }; - - /** - * Encodes the specified BizAccountPayload message, length delimited. Does not implicitly {@link proto.BizAccountPayload.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.BizAccountPayload - * @static - * @param {proto.IBizAccountPayload} message BizAccountPayload message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BizAccountPayload.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BizAccountPayload message from the specified reader or buffer. - * @function decode - * @memberof proto.BizAccountPayload - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.BizAccountPayload} BizAccountPayload - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BizAccountPayload.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.BizAccountPayload(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.vnameCert = $root.proto.VerifiedNameCertificate.decode(reader, reader.uint32()); - break; - case 2: - message.bizAcctLinkInfo = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BizAccountPayload message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.BizAccountPayload - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.BizAccountPayload} BizAccountPayload - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BizAccountPayload.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BizAccountPayload message. - * @function verify - * @memberof proto.BizAccountPayload - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BizAccountPayload.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.vnameCert != null && message.hasOwnProperty("vnameCert")) { - var error = $root.proto.VerifiedNameCertificate.verify(message.vnameCert); - if (error) - return "vnameCert." + error; - } - if (message.bizAcctLinkInfo != null && message.hasOwnProperty("bizAcctLinkInfo")) - if (!(message.bizAcctLinkInfo && typeof message.bizAcctLinkInfo.length === "number" || $util.isString(message.bizAcctLinkInfo))) - return "bizAcctLinkInfo: buffer expected"; - return null; - }; - - /** - * Creates a BizAccountPayload message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.BizAccountPayload - * @static - * @param {Object.} object Plain object - * @returns {proto.BizAccountPayload} BizAccountPayload - */ - BizAccountPayload.fromObject = function fromObject(object) { - if (object instanceof $root.proto.BizAccountPayload) - return object; - var message = new $root.proto.BizAccountPayload(); - if (object.vnameCert != null) { - if (typeof object.vnameCert !== "object") - throw TypeError(".proto.BizAccountPayload.vnameCert: object expected"); - message.vnameCert = $root.proto.VerifiedNameCertificate.fromObject(object.vnameCert); - } - if (object.bizAcctLinkInfo != null) - if (typeof object.bizAcctLinkInfo === "string") - $util.base64.decode(object.bizAcctLinkInfo, message.bizAcctLinkInfo = $util.newBuffer($util.base64.length(object.bizAcctLinkInfo)), 0); - else if (object.bizAcctLinkInfo.length) - message.bizAcctLinkInfo = object.bizAcctLinkInfo; - return message; - }; - - /** - * Creates a plain object from a BizAccountPayload message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.BizAccountPayload - * @static - * @param {proto.BizAccountPayload} message BizAccountPayload - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BizAccountPayload.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.vnameCert = null; - if (options.bytes === String) - object.bizAcctLinkInfo = ""; - else { - object.bizAcctLinkInfo = []; - if (options.bytes !== Array) - object.bizAcctLinkInfo = $util.newBuffer(object.bizAcctLinkInfo); - } - } - if (message.vnameCert != null && message.hasOwnProperty("vnameCert")) - object.vnameCert = $root.proto.VerifiedNameCertificate.toObject(message.vnameCert, options); - if (message.bizAcctLinkInfo != null && message.hasOwnProperty("bizAcctLinkInfo")) - object.bizAcctLinkInfo = options.bytes === String ? $util.base64.encode(message.bizAcctLinkInfo, 0, message.bizAcctLinkInfo.length) : options.bytes === Array ? Array.prototype.slice.call(message.bizAcctLinkInfo) : message.bizAcctLinkInfo; - return object; - }; - - /** - * Converts this BizAccountPayload to JSON. - * @function toJSON - * @memberof proto.BizAccountPayload - * @instance - * @returns {Object.} JSON object - */ - BizAccountPayload.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return BizAccountPayload; - })(); - - proto.BizIdentityInfo = (function() { - - /** - * Properties of a BizIdentityInfo. - * @memberof proto - * @interface IBizIdentityInfo - * @property {proto.BizIdentityInfo.BizIdentityInfoVerifiedLevelValue|null} [vlevel] BizIdentityInfo vlevel - * @property {proto.IVerifiedNameCertificate|null} [vnameCert] BizIdentityInfo vnameCert - * @property {boolean|null} [signed] BizIdentityInfo signed - * @property {boolean|null} [revoked] BizIdentityInfo revoked - * @property {proto.BizIdentityInfo.BizIdentityInfoHostStorageType|null} [hostStorage] BizIdentityInfo hostStorage - * @property {proto.BizIdentityInfo.BizIdentityInfoActualActorsType|null} [actualActors] BizIdentityInfo actualActors - * @property {number|Long|null} [privacyModeTs] BizIdentityInfo privacyModeTs - * @property {number|Long|null} [featureControls] BizIdentityInfo featureControls - */ - - /** - * Constructs a new BizIdentityInfo. - * @memberof proto - * @classdesc Represents a BizIdentityInfo. - * @implements IBizIdentityInfo - * @constructor - * @param {proto.IBizIdentityInfo=} [properties] Properties to set - */ - function BizIdentityInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BizIdentityInfo vlevel. - * @member {proto.BizIdentityInfo.BizIdentityInfoVerifiedLevelValue} vlevel - * @memberof proto.BizIdentityInfo - * @instance - */ - BizIdentityInfo.prototype.vlevel = 0; - - /** - * BizIdentityInfo vnameCert. - * @member {proto.IVerifiedNameCertificate|null|undefined} vnameCert - * @memberof proto.BizIdentityInfo - * @instance - */ - BizIdentityInfo.prototype.vnameCert = null; - - /** - * BizIdentityInfo signed. - * @member {boolean} signed - * @memberof proto.BizIdentityInfo - * @instance - */ - BizIdentityInfo.prototype.signed = false; - - /** - * BizIdentityInfo revoked. - * @member {boolean} revoked - * @memberof proto.BizIdentityInfo - * @instance - */ - BizIdentityInfo.prototype.revoked = false; - - /** - * BizIdentityInfo hostStorage. - * @member {proto.BizIdentityInfo.BizIdentityInfoHostStorageType} hostStorage - * @memberof proto.BizIdentityInfo - * @instance - */ - BizIdentityInfo.prototype.hostStorage = 0; - - /** - * BizIdentityInfo actualActors. - * @member {proto.BizIdentityInfo.BizIdentityInfoActualActorsType} actualActors - * @memberof proto.BizIdentityInfo - * @instance - */ - BizIdentityInfo.prototype.actualActors = 0; - - /** - * BizIdentityInfo privacyModeTs. - * @member {number|Long} privacyModeTs - * @memberof proto.BizIdentityInfo - * @instance - */ - BizIdentityInfo.prototype.privacyModeTs = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * BizIdentityInfo featureControls. - * @member {number|Long} featureControls - * @memberof proto.BizIdentityInfo - * @instance - */ - BizIdentityInfo.prototype.featureControls = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Creates a new BizIdentityInfo instance using the specified properties. - * @function create - * @memberof proto.BizIdentityInfo - * @static - * @param {proto.IBizIdentityInfo=} [properties] Properties to set - * @returns {proto.BizIdentityInfo} BizIdentityInfo instance - */ - BizIdentityInfo.create = function create(properties) { - return new BizIdentityInfo(properties); - }; - - /** - * Encodes the specified BizIdentityInfo message. Does not implicitly {@link proto.BizIdentityInfo.verify|verify} messages. - * @function encode - * @memberof proto.BizIdentityInfo - * @static - * @param {proto.IBizIdentityInfo} message BizIdentityInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BizIdentityInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.vlevel != null && Object.hasOwnProperty.call(message, "vlevel")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.vlevel); - if (message.vnameCert != null && Object.hasOwnProperty.call(message, "vnameCert")) - $root.proto.VerifiedNameCertificate.encode(message.vnameCert, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.signed != null && Object.hasOwnProperty.call(message, "signed")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.signed); - if (message.revoked != null && Object.hasOwnProperty.call(message, "revoked")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.revoked); - if (message.hostStorage != null && Object.hasOwnProperty.call(message, "hostStorage")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.hostStorage); - if (message.actualActors != null && Object.hasOwnProperty.call(message, "actualActors")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.actualActors); - if (message.privacyModeTs != null && Object.hasOwnProperty.call(message, "privacyModeTs")) - writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.privacyModeTs); - if (message.featureControls != null && Object.hasOwnProperty.call(message, "featureControls")) - writer.uint32(/* id 8, wireType 0 =*/64).uint64(message.featureControls); - return writer; - }; - - /** - * Encodes the specified BizIdentityInfo message, length delimited. Does not implicitly {@link proto.BizIdentityInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.BizIdentityInfo - * @static - * @param {proto.IBizIdentityInfo} message BizIdentityInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BizIdentityInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BizIdentityInfo message from the specified reader or buffer. - * @function decode - * @memberof proto.BizIdentityInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.BizIdentityInfo} BizIdentityInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BizIdentityInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.BizIdentityInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.vlevel = reader.int32(); - break; - case 2: - message.vnameCert = $root.proto.VerifiedNameCertificate.decode(reader, reader.uint32()); - break; - case 3: - message.signed = reader.bool(); - break; - case 4: - message.revoked = reader.bool(); - break; - case 5: - message.hostStorage = reader.int32(); - break; - case 6: - message.actualActors = reader.int32(); - break; - case 7: - message.privacyModeTs = reader.uint64(); - break; - case 8: - message.featureControls = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BizIdentityInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.BizIdentityInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.BizIdentityInfo} BizIdentityInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BizIdentityInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BizIdentityInfo message. - * @function verify - * @memberof proto.BizIdentityInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BizIdentityInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.vlevel != null && message.hasOwnProperty("vlevel")) - switch (message.vlevel) { - default: - return "vlevel: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.vnameCert != null && message.hasOwnProperty("vnameCert")) { - var error = $root.proto.VerifiedNameCertificate.verify(message.vnameCert); - if (error) - return "vnameCert." + error; - } - if (message.signed != null && message.hasOwnProperty("signed")) - if (typeof message.signed !== "boolean") - return "signed: boolean expected"; - if (message.revoked != null && message.hasOwnProperty("revoked")) - if (typeof message.revoked !== "boolean") - return "revoked: boolean expected"; - if (message.hostStorage != null && message.hasOwnProperty("hostStorage")) - switch (message.hostStorage) { - default: - return "hostStorage: enum value expected"; - case 0: - case 1: - break; - } - if (message.actualActors != null && message.hasOwnProperty("actualActors")) - switch (message.actualActors) { - default: - return "actualActors: enum value expected"; - case 0: - case 1: - break; - } - if (message.privacyModeTs != null && message.hasOwnProperty("privacyModeTs")) - if (!$util.isInteger(message.privacyModeTs) && !(message.privacyModeTs && $util.isInteger(message.privacyModeTs.low) && $util.isInteger(message.privacyModeTs.high))) - return "privacyModeTs: integer|Long expected"; - if (message.featureControls != null && message.hasOwnProperty("featureControls")) - if (!$util.isInteger(message.featureControls) && !(message.featureControls && $util.isInteger(message.featureControls.low) && $util.isInteger(message.featureControls.high))) - return "featureControls: integer|Long expected"; - return null; - }; - - /** - * Creates a BizIdentityInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.BizIdentityInfo - * @static - * @param {Object.} object Plain object - * @returns {proto.BizIdentityInfo} BizIdentityInfo - */ - BizIdentityInfo.fromObject = function fromObject(object) { - if (object instanceof $root.proto.BizIdentityInfo) - return object; - var message = new $root.proto.BizIdentityInfo(); - switch (object.vlevel) { - case "UNKNOWN": - case 0: - message.vlevel = 0; - break; - case "LOW": - case 1: - message.vlevel = 1; - break; - case "HIGH": - case 2: - message.vlevel = 2; - break; - } - if (object.vnameCert != null) { - if (typeof object.vnameCert !== "object") - throw TypeError(".proto.BizIdentityInfo.vnameCert: object expected"); - message.vnameCert = $root.proto.VerifiedNameCertificate.fromObject(object.vnameCert); - } - if (object.signed != null) - message.signed = Boolean(object.signed); - if (object.revoked != null) - message.revoked = Boolean(object.revoked); - switch (object.hostStorage) { - case "ON_PREMISE": - case 0: - message.hostStorage = 0; - break; - case "FACEBOOK": - case 1: - message.hostStorage = 1; - break; - } - switch (object.actualActors) { - case "SELF": - case 0: - message.actualActors = 0; - break; - case "BSP": - case 1: - message.actualActors = 1; - break; - } - if (object.privacyModeTs != null) - if ($util.Long) - (message.privacyModeTs = $util.Long.fromValue(object.privacyModeTs)).unsigned = true; - else if (typeof object.privacyModeTs === "string") - message.privacyModeTs = parseInt(object.privacyModeTs, 10); - else if (typeof object.privacyModeTs === "number") - message.privacyModeTs = object.privacyModeTs; - else if (typeof object.privacyModeTs === "object") - message.privacyModeTs = new $util.LongBits(object.privacyModeTs.low >>> 0, object.privacyModeTs.high >>> 0).toNumber(true); - if (object.featureControls != null) - if ($util.Long) - (message.featureControls = $util.Long.fromValue(object.featureControls)).unsigned = true; - else if (typeof object.featureControls === "string") - message.featureControls = parseInt(object.featureControls, 10); - else if (typeof object.featureControls === "number") - message.featureControls = object.featureControls; - else if (typeof object.featureControls === "object") - message.featureControls = new $util.LongBits(object.featureControls.low >>> 0, object.featureControls.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a BizIdentityInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.BizIdentityInfo - * @static - * @param {proto.BizIdentityInfo} message BizIdentityInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BizIdentityInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.vlevel = options.enums === String ? "UNKNOWN" : 0; - object.vnameCert = null; - object.signed = false; - object.revoked = false; - object.hostStorage = options.enums === String ? "ON_PREMISE" : 0; - object.actualActors = options.enums === String ? "SELF" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.privacyModeTs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.privacyModeTs = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.featureControls = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.featureControls = options.longs === String ? "0" : 0; - } - if (message.vlevel != null && message.hasOwnProperty("vlevel")) - object.vlevel = options.enums === String ? $root.proto.BizIdentityInfo.BizIdentityInfoVerifiedLevelValue[message.vlevel] : message.vlevel; - if (message.vnameCert != null && message.hasOwnProperty("vnameCert")) - object.vnameCert = $root.proto.VerifiedNameCertificate.toObject(message.vnameCert, options); - if (message.signed != null && message.hasOwnProperty("signed")) - object.signed = message.signed; - if (message.revoked != null && message.hasOwnProperty("revoked")) - object.revoked = message.revoked; - if (message.hostStorage != null && message.hasOwnProperty("hostStorage")) - object.hostStorage = options.enums === String ? $root.proto.BizIdentityInfo.BizIdentityInfoHostStorageType[message.hostStorage] : message.hostStorage; - if (message.actualActors != null && message.hasOwnProperty("actualActors")) - object.actualActors = options.enums === String ? $root.proto.BizIdentityInfo.BizIdentityInfoActualActorsType[message.actualActors] : message.actualActors; - if (message.privacyModeTs != null && message.hasOwnProperty("privacyModeTs")) - if (typeof message.privacyModeTs === "number") - object.privacyModeTs = options.longs === String ? String(message.privacyModeTs) : message.privacyModeTs; - else - object.privacyModeTs = options.longs === String ? $util.Long.prototype.toString.call(message.privacyModeTs) : options.longs === Number ? new $util.LongBits(message.privacyModeTs.low >>> 0, message.privacyModeTs.high >>> 0).toNumber(true) : message.privacyModeTs; - if (message.featureControls != null && message.hasOwnProperty("featureControls")) - if (typeof message.featureControls === "number") - object.featureControls = options.longs === String ? String(message.featureControls) : message.featureControls; - else - object.featureControls = options.longs === String ? $util.Long.prototype.toString.call(message.featureControls) : options.longs === Number ? new $util.LongBits(message.featureControls.low >>> 0, message.featureControls.high >>> 0).toNumber(true) : message.featureControls; - return object; - }; - - /** - * Converts this BizIdentityInfo to JSON. - * @function toJSON - * @memberof proto.BizIdentityInfo - * @instance - * @returns {Object.} JSON object - */ - BizIdentityInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * BizIdentityInfoVerifiedLevelValue enum. - * @name proto.BizIdentityInfo.BizIdentityInfoVerifiedLevelValue - * @enum {number} - * @property {number} UNKNOWN=0 UNKNOWN value - * @property {number} LOW=1 LOW value - * @property {number} HIGH=2 HIGH value - */ - BizIdentityInfo.BizIdentityInfoVerifiedLevelValue = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN"] = 0; - values[valuesById[1] = "LOW"] = 1; - values[valuesById[2] = "HIGH"] = 2; - return values; - })(); - - /** - * BizIdentityInfoHostStorageType enum. - * @name proto.BizIdentityInfo.BizIdentityInfoHostStorageType - * @enum {number} - * @property {number} ON_PREMISE=0 ON_PREMISE value - * @property {number} FACEBOOK=1 FACEBOOK value - */ - BizIdentityInfo.BizIdentityInfoHostStorageType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ON_PREMISE"] = 0; - values[valuesById[1] = "FACEBOOK"] = 1; - return values; - })(); - - /** - * BizIdentityInfoActualActorsType enum. - * @name proto.BizIdentityInfo.BizIdentityInfoActualActorsType - * @enum {number} - * @property {number} SELF=0 SELF value - * @property {number} BSP=1 BSP value - */ - BizIdentityInfo.BizIdentityInfoActualActorsType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SELF"] = 0; - values[valuesById[1] = "BSP"] = 1; - return values; - })(); - - return BizIdentityInfo; - })(); - - proto.LocalizedName = (function() { - - /** - * Properties of a LocalizedName. - * @memberof proto - * @interface ILocalizedName - * @property {string|null} [lg] LocalizedName lg - * @property {string|null} [lc] LocalizedName lc - * @property {string|null} [verifiedName] LocalizedName verifiedName - */ - - /** - * Constructs a new LocalizedName. - * @memberof proto - * @classdesc Represents a LocalizedName. - * @implements ILocalizedName - * @constructor - * @param {proto.ILocalizedName=} [properties] Properties to set - */ - function LocalizedName(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LocalizedName lg. - * @member {string} lg - * @memberof proto.LocalizedName - * @instance - */ - LocalizedName.prototype.lg = ""; - - /** - * LocalizedName lc. - * @member {string} lc - * @memberof proto.LocalizedName - * @instance - */ - LocalizedName.prototype.lc = ""; - - /** - * LocalizedName verifiedName. - * @member {string} verifiedName - * @memberof proto.LocalizedName - * @instance - */ - LocalizedName.prototype.verifiedName = ""; - - /** - * Creates a new LocalizedName instance using the specified properties. - * @function create - * @memberof proto.LocalizedName - * @static - * @param {proto.ILocalizedName=} [properties] Properties to set - * @returns {proto.LocalizedName} LocalizedName instance - */ - LocalizedName.create = function create(properties) { - return new LocalizedName(properties); - }; - - /** - * Encodes the specified LocalizedName message. Does not implicitly {@link proto.LocalizedName.verify|verify} messages. - * @function encode - * @memberof proto.LocalizedName - * @static - * @param {proto.ILocalizedName} message LocalizedName message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LocalizedName.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.lg != null && Object.hasOwnProperty.call(message, "lg")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.lg); - if (message.lc != null && Object.hasOwnProperty.call(message, "lc")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.lc); - if (message.verifiedName != null && Object.hasOwnProperty.call(message, "verifiedName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.verifiedName); - return writer; - }; - - /** - * Encodes the specified LocalizedName message, length delimited. Does not implicitly {@link proto.LocalizedName.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.LocalizedName - * @static - * @param {proto.ILocalizedName} message LocalizedName message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LocalizedName.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LocalizedName message from the specified reader or buffer. - * @function decode - * @memberof proto.LocalizedName - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.LocalizedName} LocalizedName - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LocalizedName.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.LocalizedName(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.lg = reader.string(); - break; - case 2: - message.lc = reader.string(); - break; - case 3: - message.verifiedName = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LocalizedName message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.LocalizedName - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.LocalizedName} LocalizedName - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LocalizedName.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LocalizedName message. - * @function verify - * @memberof proto.LocalizedName - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LocalizedName.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.lg != null && message.hasOwnProperty("lg")) - if (!$util.isString(message.lg)) - return "lg: string expected"; - if (message.lc != null && message.hasOwnProperty("lc")) - if (!$util.isString(message.lc)) - return "lc: string expected"; - if (message.verifiedName != null && message.hasOwnProperty("verifiedName")) - if (!$util.isString(message.verifiedName)) - return "verifiedName: string expected"; - return null; - }; - - /** - * Creates a LocalizedName message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.LocalizedName - * @static - * @param {Object.} object Plain object - * @returns {proto.LocalizedName} LocalizedName - */ - LocalizedName.fromObject = function fromObject(object) { - if (object instanceof $root.proto.LocalizedName) - return object; - var message = new $root.proto.LocalizedName(); - if (object.lg != null) - message.lg = String(object.lg); - if (object.lc != null) - message.lc = String(object.lc); - if (object.verifiedName != null) - message.verifiedName = String(object.verifiedName); - return message; - }; - - /** - * Creates a plain object from a LocalizedName message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.LocalizedName - * @static - * @param {proto.LocalizedName} message LocalizedName - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LocalizedName.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.lg = ""; - object.lc = ""; - object.verifiedName = ""; - } - if (message.lg != null && message.hasOwnProperty("lg")) - object.lg = message.lg; - if (message.lc != null && message.hasOwnProperty("lc")) - object.lc = message.lc; - if (message.verifiedName != null && message.hasOwnProperty("verifiedName")) - object.verifiedName = message.verifiedName; - return object; - }; - - /** - * Converts this LocalizedName to JSON. - * @function toJSON - * @memberof proto.LocalizedName - * @instance - * @returns {Object.} JSON object - */ - LocalizedName.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return LocalizedName; - })(); - - proto.VerifiedNameCertificate = (function() { - - /** - * Properties of a VerifiedNameCertificate. - * @memberof proto - * @interface IVerifiedNameCertificate - * @property {Uint8Array|null} [details] VerifiedNameCertificate details - * @property {Uint8Array|null} [signature] VerifiedNameCertificate signature - * @property {Uint8Array|null} [serverSignature] VerifiedNameCertificate serverSignature - */ - - /** - * Constructs a new VerifiedNameCertificate. - * @memberof proto - * @classdesc Represents a VerifiedNameCertificate. - * @implements IVerifiedNameCertificate - * @constructor - * @param {proto.IVerifiedNameCertificate=} [properties] Properties to set - */ - function VerifiedNameCertificate(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VerifiedNameCertificate details. - * @member {Uint8Array} details - * @memberof proto.VerifiedNameCertificate - * @instance - */ - VerifiedNameCertificate.prototype.details = $util.newBuffer([]); - - /** - * VerifiedNameCertificate signature. - * @member {Uint8Array} signature - * @memberof proto.VerifiedNameCertificate - * @instance - */ - VerifiedNameCertificate.prototype.signature = $util.newBuffer([]); - - /** - * VerifiedNameCertificate serverSignature. - * @member {Uint8Array} serverSignature - * @memberof proto.VerifiedNameCertificate - * @instance - */ - VerifiedNameCertificate.prototype.serverSignature = $util.newBuffer([]); - - /** - * Creates a new VerifiedNameCertificate instance using the specified properties. - * @function create - * @memberof proto.VerifiedNameCertificate - * @static - * @param {proto.IVerifiedNameCertificate=} [properties] Properties to set - * @returns {proto.VerifiedNameCertificate} VerifiedNameCertificate instance - */ - VerifiedNameCertificate.create = function create(properties) { - return new VerifiedNameCertificate(properties); - }; - - /** - * Encodes the specified VerifiedNameCertificate message. Does not implicitly {@link proto.VerifiedNameCertificate.verify|verify} messages. - * @function encode - * @memberof proto.VerifiedNameCertificate - * @static - * @param {proto.IVerifiedNameCertificate} message VerifiedNameCertificate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VerifiedNameCertificate.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.details != null && Object.hasOwnProperty.call(message, "details")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.details); - if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.signature); - if (message.serverSignature != null && Object.hasOwnProperty.call(message, "serverSignature")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.serverSignature); - return writer; - }; - - /** - * Encodes the specified VerifiedNameCertificate message, length delimited. Does not implicitly {@link proto.VerifiedNameCertificate.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.VerifiedNameCertificate - * @static - * @param {proto.IVerifiedNameCertificate} message VerifiedNameCertificate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VerifiedNameCertificate.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VerifiedNameCertificate message from the specified reader or buffer. - * @function decode - * @memberof proto.VerifiedNameCertificate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.VerifiedNameCertificate} VerifiedNameCertificate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VerifiedNameCertificate.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.VerifiedNameCertificate(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.details = reader.bytes(); - break; - case 2: - message.signature = reader.bytes(); - break; - case 3: - message.serverSignature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VerifiedNameCertificate message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.VerifiedNameCertificate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.VerifiedNameCertificate} VerifiedNameCertificate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VerifiedNameCertificate.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VerifiedNameCertificate message. - * @function verify - * @memberof proto.VerifiedNameCertificate - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VerifiedNameCertificate.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.details != null && message.hasOwnProperty("details")) - if (!(message.details && typeof message.details.length === "number" || $util.isString(message.details))) - return "details: buffer expected"; - if (message.signature != null && message.hasOwnProperty("signature")) - if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) - return "signature: buffer expected"; - if (message.serverSignature != null && message.hasOwnProperty("serverSignature")) - if (!(message.serverSignature && typeof message.serverSignature.length === "number" || $util.isString(message.serverSignature))) - return "serverSignature: buffer expected"; - return null; - }; - - /** - * Creates a VerifiedNameCertificate message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.VerifiedNameCertificate - * @static - * @param {Object.} object Plain object - * @returns {proto.VerifiedNameCertificate} VerifiedNameCertificate - */ - VerifiedNameCertificate.fromObject = function fromObject(object) { - if (object instanceof $root.proto.VerifiedNameCertificate) - return object; - var message = new $root.proto.VerifiedNameCertificate(); - if (object.details != null) - if (typeof object.details === "string") - $util.base64.decode(object.details, message.details = $util.newBuffer($util.base64.length(object.details)), 0); - else if (object.details.length) - message.details = object.details; - if (object.signature != null) - if (typeof object.signature === "string") - $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); - else if (object.signature.length) - message.signature = object.signature; - if (object.serverSignature != null) - if (typeof object.serverSignature === "string") - $util.base64.decode(object.serverSignature, message.serverSignature = $util.newBuffer($util.base64.length(object.serverSignature)), 0); - else if (object.serverSignature.length) - message.serverSignature = object.serverSignature; - return message; - }; - - /** - * Creates a plain object from a VerifiedNameCertificate message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.VerifiedNameCertificate - * @static - * @param {proto.VerifiedNameCertificate} message VerifiedNameCertificate - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VerifiedNameCertificate.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.details = ""; - else { - object.details = []; - if (options.bytes !== Array) - object.details = $util.newBuffer(object.details); - } - if (options.bytes === String) - object.signature = ""; - else { - object.signature = []; - if (options.bytes !== Array) - object.signature = $util.newBuffer(object.signature); - } - if (options.bytes === String) - object.serverSignature = ""; - else { - object.serverSignature = []; - if (options.bytes !== Array) - object.serverSignature = $util.newBuffer(object.serverSignature); - } - } - if (message.details != null && message.hasOwnProperty("details")) - object.details = options.bytes === String ? $util.base64.encode(message.details, 0, message.details.length) : options.bytes === Array ? Array.prototype.slice.call(message.details) : message.details; - if (message.signature != null && message.hasOwnProperty("signature")) - object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; - if (message.serverSignature != null && message.hasOwnProperty("serverSignature")) - object.serverSignature = options.bytes === String ? $util.base64.encode(message.serverSignature, 0, message.serverSignature.length) : options.bytes === Array ? Array.prototype.slice.call(message.serverSignature) : message.serverSignature; - return object; - }; - - /** - * Converts this VerifiedNameCertificate to JSON. - * @function toJSON - * @memberof proto.VerifiedNameCertificate - * @instance - * @returns {Object.} JSON object - */ - VerifiedNameCertificate.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return VerifiedNameCertificate; - })(); - - proto.VerifiedNameDetails = (function() { - - /** - * Properties of a VerifiedNameDetails. - * @memberof proto - * @interface IVerifiedNameDetails - * @property {number|Long|null} [serial] VerifiedNameDetails serial - * @property {string|null} [issuer] VerifiedNameDetails issuer - * @property {string|null} [verifiedName] VerifiedNameDetails verifiedName - * @property {Array.|null} [localizedNames] VerifiedNameDetails localizedNames - * @property {number|Long|null} [issueTime] VerifiedNameDetails issueTime - */ - - /** - * Constructs a new VerifiedNameDetails. - * @memberof proto - * @classdesc Represents a VerifiedNameDetails. - * @implements IVerifiedNameDetails - * @constructor - * @param {proto.IVerifiedNameDetails=} [properties] Properties to set - */ - function VerifiedNameDetails(properties) { - this.localizedNames = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VerifiedNameDetails serial. - * @member {number|Long} serial - * @memberof proto.VerifiedNameDetails - * @instance - */ - VerifiedNameDetails.prototype.serial = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * VerifiedNameDetails issuer. - * @member {string} issuer - * @memberof proto.VerifiedNameDetails - * @instance - */ - VerifiedNameDetails.prototype.issuer = ""; - - /** - * VerifiedNameDetails verifiedName. - * @member {string} verifiedName - * @memberof proto.VerifiedNameDetails - * @instance - */ - VerifiedNameDetails.prototype.verifiedName = ""; - - /** - * VerifiedNameDetails localizedNames. - * @member {Array.} localizedNames - * @memberof proto.VerifiedNameDetails - * @instance - */ - VerifiedNameDetails.prototype.localizedNames = $util.emptyArray; - - /** - * VerifiedNameDetails issueTime. - * @member {number|Long} issueTime - * @memberof proto.VerifiedNameDetails - * @instance - */ - VerifiedNameDetails.prototype.issueTime = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Creates a new VerifiedNameDetails instance using the specified properties. - * @function create - * @memberof proto.VerifiedNameDetails - * @static - * @param {proto.IVerifiedNameDetails=} [properties] Properties to set - * @returns {proto.VerifiedNameDetails} VerifiedNameDetails instance - */ - VerifiedNameDetails.create = function create(properties) { - return new VerifiedNameDetails(properties); - }; - - /** - * Encodes the specified VerifiedNameDetails message. Does not implicitly {@link proto.VerifiedNameDetails.verify|verify} messages. - * @function encode - * @memberof proto.VerifiedNameDetails - * @static - * @param {proto.IVerifiedNameDetails} message VerifiedNameDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VerifiedNameDetails.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.serial != null && Object.hasOwnProperty.call(message, "serial")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.serial); - if (message.issuer != null && Object.hasOwnProperty.call(message, "issuer")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.issuer); - if (message.verifiedName != null && Object.hasOwnProperty.call(message, "verifiedName")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.verifiedName); - if (message.localizedNames != null && message.localizedNames.length) - for (var i = 0; i < message.localizedNames.length; ++i) - $root.proto.LocalizedName.encode(message.localizedNames[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.issueTime != null && Object.hasOwnProperty.call(message, "issueTime")) - writer.uint32(/* id 10, wireType 0 =*/80).uint64(message.issueTime); - return writer; - }; - - /** - * Encodes the specified VerifiedNameDetails message, length delimited. Does not implicitly {@link proto.VerifiedNameDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.VerifiedNameDetails - * @static - * @param {proto.IVerifiedNameDetails} message VerifiedNameDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VerifiedNameDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VerifiedNameDetails message from the specified reader or buffer. - * @function decode - * @memberof proto.VerifiedNameDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.VerifiedNameDetails} VerifiedNameDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VerifiedNameDetails.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.VerifiedNameDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.serial = reader.uint64(); - break; - case 2: - message.issuer = reader.string(); - break; - case 4: - message.verifiedName = reader.string(); - break; - case 8: - if (!(message.localizedNames && message.localizedNames.length)) - message.localizedNames = []; - message.localizedNames.push($root.proto.LocalizedName.decode(reader, reader.uint32())); - break; - case 10: - message.issueTime = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VerifiedNameDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.VerifiedNameDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.VerifiedNameDetails} VerifiedNameDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VerifiedNameDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VerifiedNameDetails message. - * @function verify - * @memberof proto.VerifiedNameDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VerifiedNameDetails.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.serial != null && message.hasOwnProperty("serial")) - if (!$util.isInteger(message.serial) && !(message.serial && $util.isInteger(message.serial.low) && $util.isInteger(message.serial.high))) - return "serial: integer|Long expected"; - if (message.issuer != null && message.hasOwnProperty("issuer")) - if (!$util.isString(message.issuer)) - return "issuer: string expected"; - if (message.verifiedName != null && message.hasOwnProperty("verifiedName")) - if (!$util.isString(message.verifiedName)) - return "verifiedName: string expected"; - if (message.localizedNames != null && message.hasOwnProperty("localizedNames")) { - if (!Array.isArray(message.localizedNames)) - return "localizedNames: array expected"; - for (var i = 0; i < message.localizedNames.length; ++i) { - var error = $root.proto.LocalizedName.verify(message.localizedNames[i]); - if (error) - return "localizedNames." + error; - } - } - if (message.issueTime != null && message.hasOwnProperty("issueTime")) - if (!$util.isInteger(message.issueTime) && !(message.issueTime && $util.isInteger(message.issueTime.low) && $util.isInteger(message.issueTime.high))) - return "issueTime: integer|Long expected"; - return null; - }; - - /** - * Creates a VerifiedNameDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.VerifiedNameDetails - * @static - * @param {Object.} object Plain object - * @returns {proto.VerifiedNameDetails} VerifiedNameDetails - */ - VerifiedNameDetails.fromObject = function fromObject(object) { - if (object instanceof $root.proto.VerifiedNameDetails) - return object; - var message = new $root.proto.VerifiedNameDetails(); - if (object.serial != null) - if ($util.Long) - (message.serial = $util.Long.fromValue(object.serial)).unsigned = true; - else if (typeof object.serial === "string") - message.serial = parseInt(object.serial, 10); - else if (typeof object.serial === "number") - message.serial = object.serial; - else if (typeof object.serial === "object") - message.serial = new $util.LongBits(object.serial.low >>> 0, object.serial.high >>> 0).toNumber(true); - if (object.issuer != null) - message.issuer = String(object.issuer); - if (object.verifiedName != null) - message.verifiedName = String(object.verifiedName); - if (object.localizedNames) { - if (!Array.isArray(object.localizedNames)) - throw TypeError(".proto.VerifiedNameDetails.localizedNames: array expected"); - message.localizedNames = []; - for (var i = 0; i < object.localizedNames.length; ++i) { - if (typeof object.localizedNames[i] !== "object") - throw TypeError(".proto.VerifiedNameDetails.localizedNames: object expected"); - message.localizedNames[i] = $root.proto.LocalizedName.fromObject(object.localizedNames[i]); - } - } - if (object.issueTime != null) - if ($util.Long) - (message.issueTime = $util.Long.fromValue(object.issueTime)).unsigned = true; - else if (typeof object.issueTime === "string") - message.issueTime = parseInt(object.issueTime, 10); - else if (typeof object.issueTime === "number") - message.issueTime = object.issueTime; - else if (typeof object.issueTime === "object") - message.issueTime = new $util.LongBits(object.issueTime.low >>> 0, object.issueTime.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a VerifiedNameDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.VerifiedNameDetails - * @static - * @param {proto.VerifiedNameDetails} message VerifiedNameDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VerifiedNameDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.localizedNames = []; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.serial = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.serial = options.longs === String ? "0" : 0; - object.issuer = ""; - object.verifiedName = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.issueTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.issueTime = options.longs === String ? "0" : 0; - } - if (message.serial != null && message.hasOwnProperty("serial")) - if (typeof message.serial === "number") - object.serial = options.longs === String ? String(message.serial) : message.serial; - else - object.serial = options.longs === String ? $util.Long.prototype.toString.call(message.serial) : options.longs === Number ? new $util.LongBits(message.serial.low >>> 0, message.serial.high >>> 0).toNumber(true) : message.serial; - if (message.issuer != null && message.hasOwnProperty("issuer")) - object.issuer = message.issuer; - if (message.verifiedName != null && message.hasOwnProperty("verifiedName")) - object.verifiedName = message.verifiedName; - if (message.localizedNames && message.localizedNames.length) { - object.localizedNames = []; - for (var j = 0; j < message.localizedNames.length; ++j) - object.localizedNames[j] = $root.proto.LocalizedName.toObject(message.localizedNames[j], options); - } - if (message.issueTime != null && message.hasOwnProperty("issueTime")) - if (typeof message.issueTime === "number") - object.issueTime = options.longs === String ? String(message.issueTime) : message.issueTime; - else - object.issueTime = options.longs === String ? $util.Long.prototype.toString.call(message.issueTime) : options.longs === Number ? new $util.LongBits(message.issueTime.low >>> 0, message.issueTime.high >>> 0).toNumber(true) : message.issueTime; - return object; - }; - - /** - * Converts this VerifiedNameDetails to JSON. - * @function toJSON - * @memberof proto.VerifiedNameDetails - * @instance - * @returns {Object.} JSON object - */ - VerifiedNameDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return VerifiedNameDetails; - })(); - - proto.CertChain = (function() { - - /** - * Properties of a CertChain. - * @memberof proto - * @interface ICertChain - * @property {proto.INoiseCertificate|null} [leaf] CertChain leaf - * @property {proto.INoiseCertificate|null} [intermediate] CertChain intermediate - */ - - /** - * Constructs a new CertChain. - * @memberof proto - * @classdesc Represents a CertChain. - * @implements ICertChain - * @constructor - * @param {proto.ICertChain=} [properties] Properties to set - */ - function CertChain(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CertChain leaf. - * @member {proto.INoiseCertificate|null|undefined} leaf - * @memberof proto.CertChain - * @instance - */ - CertChain.prototype.leaf = null; - - /** - * CertChain intermediate. - * @member {proto.INoiseCertificate|null|undefined} intermediate - * @memberof proto.CertChain - * @instance - */ - CertChain.prototype.intermediate = null; - - /** - * Creates a new CertChain instance using the specified properties. - * @function create - * @memberof proto.CertChain - * @static - * @param {proto.ICertChain=} [properties] Properties to set - * @returns {proto.CertChain} CertChain instance - */ - CertChain.create = function create(properties) { - return new CertChain(properties); - }; - - /** - * Encodes the specified CertChain message. Does not implicitly {@link proto.CertChain.verify|verify} messages. - * @function encode - * @memberof proto.CertChain - * @static - * @param {proto.ICertChain} message CertChain message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CertChain.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.leaf != null && Object.hasOwnProperty.call(message, "leaf")) - $root.proto.NoiseCertificate.encode(message.leaf, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.intermediate != null && Object.hasOwnProperty.call(message, "intermediate")) - $root.proto.NoiseCertificate.encode(message.intermediate, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CertChain message, length delimited. Does not implicitly {@link proto.CertChain.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.CertChain - * @static - * @param {proto.ICertChain} message CertChain message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CertChain.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CertChain message from the specified reader or buffer. - * @function decode - * @memberof proto.CertChain - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.CertChain} CertChain - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CertChain.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.CertChain(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.leaf = $root.proto.NoiseCertificate.decode(reader, reader.uint32()); - break; - case 2: - message.intermediate = $root.proto.NoiseCertificate.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CertChain message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.CertChain - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.CertChain} CertChain - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CertChain.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CertChain message. - * @function verify - * @memberof proto.CertChain - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CertChain.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.leaf != null && message.hasOwnProperty("leaf")) { - var error = $root.proto.NoiseCertificate.verify(message.leaf); - if (error) - return "leaf." + error; - } - if (message.intermediate != null && message.hasOwnProperty("intermediate")) { - var error = $root.proto.NoiseCertificate.verify(message.intermediate); - if (error) - return "intermediate." + error; - } - return null; - }; - - /** - * Creates a CertChain message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.CertChain - * @static - * @param {Object.} object Plain object - * @returns {proto.CertChain} CertChain - */ - CertChain.fromObject = function fromObject(object) { - if (object instanceof $root.proto.CertChain) - return object; - var message = new $root.proto.CertChain(); - if (object.leaf != null) { - if (typeof object.leaf !== "object") - throw TypeError(".proto.CertChain.leaf: object expected"); - message.leaf = $root.proto.NoiseCertificate.fromObject(object.leaf); - } - if (object.intermediate != null) { - if (typeof object.intermediate !== "object") - throw TypeError(".proto.CertChain.intermediate: object expected"); - message.intermediate = $root.proto.NoiseCertificate.fromObject(object.intermediate); - } - return message; - }; - - /** - * Creates a plain object from a CertChain message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.CertChain - * @static - * @param {proto.CertChain} message CertChain - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CertChain.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.leaf = null; - object.intermediate = null; - } - if (message.leaf != null && message.hasOwnProperty("leaf")) - object.leaf = $root.proto.NoiseCertificate.toObject(message.leaf, options); - if (message.intermediate != null && message.hasOwnProperty("intermediate")) - object.intermediate = $root.proto.NoiseCertificate.toObject(message.intermediate, options); - return object; - }; - - /** - * Converts this CertChain to JSON. - * @function toJSON - * @memberof proto.CertChain - * @instance - * @returns {Object.} JSON object - */ - CertChain.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CertChain; - })(); - - proto.ClientFinish = (function() { - - /** - * Properties of a ClientFinish. - * @memberof proto - * @interface IClientFinish - * @property {Uint8Array|null} ["static"] ClientFinish static - * @property {Uint8Array|null} [payload] ClientFinish payload - */ - - /** - * Constructs a new ClientFinish. - * @memberof proto - * @classdesc Represents a ClientFinish. - * @implements IClientFinish - * @constructor - * @param {proto.IClientFinish=} [properties] Properties to set - */ - function ClientFinish(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClientFinish static. - * @member {Uint8Array} static - * @memberof proto.ClientFinish - * @instance - */ - ClientFinish.prototype["static"] = $util.newBuffer([]); - - /** - * ClientFinish payload. - * @member {Uint8Array} payload - * @memberof proto.ClientFinish - * @instance - */ - ClientFinish.prototype.payload = $util.newBuffer([]); - - /** - * Creates a new ClientFinish instance using the specified properties. - * @function create - * @memberof proto.ClientFinish - * @static - * @param {proto.IClientFinish=} [properties] Properties to set - * @returns {proto.ClientFinish} ClientFinish instance - */ - ClientFinish.create = function create(properties) { - return new ClientFinish(properties); - }; - - /** - * Encodes the specified ClientFinish message. Does not implicitly {@link proto.ClientFinish.verify|verify} messages. - * @function encode - * @memberof proto.ClientFinish - * @static - * @param {proto.IClientFinish} message ClientFinish message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientFinish.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message["static"] != null && Object.hasOwnProperty.call(message, "static")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message["static"]); - if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.payload); - return writer; - }; - - /** - * Encodes the specified ClientFinish message, length delimited. Does not implicitly {@link proto.ClientFinish.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.ClientFinish - * @static - * @param {proto.IClientFinish} message ClientFinish message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientFinish.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClientFinish message from the specified reader or buffer. - * @function decode - * @memberof proto.ClientFinish - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.ClientFinish} ClientFinish - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientFinish.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ClientFinish(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message["static"] = reader.bytes(); - break; - case 2: - message.payload = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClientFinish message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.ClientFinish - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ClientFinish} ClientFinish - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientFinish.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClientFinish message. - * @function verify - * @memberof proto.ClientFinish - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClientFinish.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message["static"] != null && message.hasOwnProperty("static")) - if (!(message["static"] && typeof message["static"].length === "number" || $util.isString(message["static"]))) - return "static: buffer expected"; - if (message.payload != null && message.hasOwnProperty("payload")) - if (!(message.payload && typeof message.payload.length === "number" || $util.isString(message.payload))) - return "payload: buffer expected"; - return null; - }; - - /** - * Creates a ClientFinish message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.ClientFinish - * @static - * @param {Object.} object Plain object - * @returns {proto.ClientFinish} ClientFinish - */ - ClientFinish.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ClientFinish) - return object; - var message = new $root.proto.ClientFinish(); - if (object["static"] != null) - if (typeof object["static"] === "string") - $util.base64.decode(object["static"], message["static"] = $util.newBuffer($util.base64.length(object["static"])), 0); - else if (object["static"].length) - message["static"] = object["static"]; - if (object.payload != null) - if (typeof object.payload === "string") - $util.base64.decode(object.payload, message.payload = $util.newBuffer($util.base64.length(object.payload)), 0); - else if (object.payload.length) - message.payload = object.payload; - return message; - }; - - /** - * Creates a plain object from a ClientFinish message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.ClientFinish - * @static - * @param {proto.ClientFinish} message ClientFinish - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClientFinish.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object["static"] = ""; - else { - object["static"] = []; - if (options.bytes !== Array) - object["static"] = $util.newBuffer(object["static"]); - } - if (options.bytes === String) - object.payload = ""; - else { - object.payload = []; - if (options.bytes !== Array) - object.payload = $util.newBuffer(object.payload); - } - } - if (message["static"] != null && message.hasOwnProperty("static")) - object["static"] = options.bytes === String ? $util.base64.encode(message["static"], 0, message["static"].length) : options.bytes === Array ? Array.prototype.slice.call(message["static"]) : message["static"]; - if (message.payload != null && message.hasOwnProperty("payload")) - object.payload = options.bytes === String ? $util.base64.encode(message.payload, 0, message.payload.length) : options.bytes === Array ? Array.prototype.slice.call(message.payload) : message.payload; - return object; - }; - - /** - * Converts this ClientFinish to JSON. - * @function toJSON - * @memberof proto.ClientFinish - * @instance - * @returns {Object.} JSON object - */ - ClientFinish.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ClientFinish; - })(); - - proto.ClientHello = (function() { - - /** - * Properties of a ClientHello. - * @memberof proto - * @interface IClientHello - * @property {Uint8Array|null} [ephemeral] ClientHello ephemeral - * @property {Uint8Array|null} ["static"] ClientHello static - * @property {Uint8Array|null} [payload] ClientHello payload - */ - - /** - * Constructs a new ClientHello. - * @memberof proto - * @classdesc Represents a ClientHello. - * @implements IClientHello - * @constructor - * @param {proto.IClientHello=} [properties] Properties to set - */ - function ClientHello(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClientHello ephemeral. - * @member {Uint8Array} ephemeral - * @memberof proto.ClientHello - * @instance - */ - ClientHello.prototype.ephemeral = $util.newBuffer([]); - - /** - * ClientHello static. - * @member {Uint8Array} static - * @memberof proto.ClientHello - * @instance - */ - ClientHello.prototype["static"] = $util.newBuffer([]); - - /** - * ClientHello payload. - * @member {Uint8Array} payload - * @memberof proto.ClientHello - * @instance - */ - ClientHello.prototype.payload = $util.newBuffer([]); - - /** - * Creates a new ClientHello instance using the specified properties. - * @function create - * @memberof proto.ClientHello - * @static - * @param {proto.IClientHello=} [properties] Properties to set - * @returns {proto.ClientHello} ClientHello instance - */ - ClientHello.create = function create(properties) { - return new ClientHello(properties); - }; - - /** - * Encodes the specified ClientHello message. Does not implicitly {@link proto.ClientHello.verify|verify} messages. - * @function encode - * @memberof proto.ClientHello - * @static - * @param {proto.IClientHello} message ClientHello message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientHello.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ephemeral != null && Object.hasOwnProperty.call(message, "ephemeral")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.ephemeral); - if (message["static"] != null && Object.hasOwnProperty.call(message, "static")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message["static"]); - if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.payload); - return writer; - }; - - /** - * Encodes the specified ClientHello message, length delimited. Does not implicitly {@link proto.ClientHello.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.ClientHello - * @static - * @param {proto.IClientHello} message ClientHello message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientHello.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClientHello message from the specified reader or buffer. - * @function decode - * @memberof proto.ClientHello - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.ClientHello} ClientHello - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientHello.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ClientHello(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ephemeral = reader.bytes(); - break; - case 2: - message["static"] = reader.bytes(); - break; - case 3: - message.payload = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClientHello message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.ClientHello - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ClientHello} ClientHello - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientHello.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClientHello message. - * @function verify - * @memberof proto.ClientHello - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClientHello.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ephemeral != null && message.hasOwnProperty("ephemeral")) - if (!(message.ephemeral && typeof message.ephemeral.length === "number" || $util.isString(message.ephemeral))) - return "ephemeral: buffer expected"; - if (message["static"] != null && message.hasOwnProperty("static")) - if (!(message["static"] && typeof message["static"].length === "number" || $util.isString(message["static"]))) - return "static: buffer expected"; - if (message.payload != null && message.hasOwnProperty("payload")) - if (!(message.payload && typeof message.payload.length === "number" || $util.isString(message.payload))) - return "payload: buffer expected"; - return null; - }; - - /** - * Creates a ClientHello message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.ClientHello - * @static - * @param {Object.} object Plain object - * @returns {proto.ClientHello} ClientHello - */ - ClientHello.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ClientHello) - return object; - var message = new $root.proto.ClientHello(); - if (object.ephemeral != null) - if (typeof object.ephemeral === "string") - $util.base64.decode(object.ephemeral, message.ephemeral = $util.newBuffer($util.base64.length(object.ephemeral)), 0); - else if (object.ephemeral.length) - message.ephemeral = object.ephemeral; - if (object["static"] != null) - if (typeof object["static"] === "string") - $util.base64.decode(object["static"], message["static"] = $util.newBuffer($util.base64.length(object["static"])), 0); - else if (object["static"].length) - message["static"] = object["static"]; - if (object.payload != null) - if (typeof object.payload === "string") - $util.base64.decode(object.payload, message.payload = $util.newBuffer($util.base64.length(object.payload)), 0); - else if (object.payload.length) - message.payload = object.payload; - return message; - }; - - /** - * Creates a plain object from a ClientHello message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.ClientHello - * @static - * @param {proto.ClientHello} message ClientHello - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClientHello.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.ephemeral = ""; - else { - object.ephemeral = []; - if (options.bytes !== Array) - object.ephemeral = $util.newBuffer(object.ephemeral); - } - if (options.bytes === String) - object["static"] = ""; - else { - object["static"] = []; - if (options.bytes !== Array) - object["static"] = $util.newBuffer(object["static"]); - } - if (options.bytes === String) - object.payload = ""; - else { - object.payload = []; - if (options.bytes !== Array) - object.payload = $util.newBuffer(object.payload); - } - } - if (message.ephemeral != null && message.hasOwnProperty("ephemeral")) - object.ephemeral = options.bytes === String ? $util.base64.encode(message.ephemeral, 0, message.ephemeral.length) : options.bytes === Array ? Array.prototype.slice.call(message.ephemeral) : message.ephemeral; - if (message["static"] != null && message.hasOwnProperty("static")) - object["static"] = options.bytes === String ? $util.base64.encode(message["static"], 0, message["static"].length) : options.bytes === Array ? Array.prototype.slice.call(message["static"]) : message["static"]; - if (message.payload != null && message.hasOwnProperty("payload")) - object.payload = options.bytes === String ? $util.base64.encode(message.payload, 0, message.payload.length) : options.bytes === Array ? Array.prototype.slice.call(message.payload) : message.payload; - return object; - }; - - /** - * Converts this ClientHello to JSON. - * @function toJSON - * @memberof proto.ClientHello - * @instance - * @returns {Object.} JSON object - */ - ClientHello.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ClientHello; - })(); - - proto.ClientPayload = (function() { - - /** - * Properties of a ClientPayload. - * @memberof proto - * @interface IClientPayload - * @property {number|Long|null} [username] ClientPayload username - * @property {boolean|null} [passive] ClientPayload passive - * @property {proto.IUserAgent|null} [userAgent] ClientPayload userAgent - * @property {proto.IWebInfo|null} [webInfo] ClientPayload webInfo - * @property {string|null} [pushName] ClientPayload pushName - * @property {number|null} [sessionId] ClientPayload sessionId - * @property {boolean|null} [shortConnect] ClientPayload shortConnect - * @property {proto.ClientPayload.ClientPayloadConnectType|null} [connectType] ClientPayload connectType - * @property {proto.ClientPayload.ClientPayloadConnectReason|null} [connectReason] ClientPayload connectReason - * @property {Array.|null} [shards] ClientPayload shards - * @property {proto.IDNSSource|null} [dnsSource] ClientPayload dnsSource - * @property {number|null} [connectAttemptCount] ClientPayload connectAttemptCount - * @property {number|null} [device] ClientPayload device - * @property {proto.ICompanionRegData|null} [regData] ClientPayload regData - * @property {proto.ClientPayload.ClientPayloadProduct|null} [product] ClientPayload product - * @property {Uint8Array|null} [fbCat] ClientPayload fbCat - * @property {Uint8Array|null} [fbUserAgent] ClientPayload fbUserAgent - * @property {boolean|null} [oc] ClientPayload oc - * @property {number|null} [lc] ClientPayload lc - * @property {proto.ClientPayload.ClientPayloadIOSAppExtension|null} [iosAppExtension] ClientPayload iosAppExtension - * @property {number|Long|null} [fbAppId] ClientPayload fbAppId - * @property {Uint8Array|null} [fbDeviceId] ClientPayload fbDeviceId - * @property {boolean|null} [pull] ClientPayload pull - */ - - /** - * Constructs a new ClientPayload. - * @memberof proto - * @classdesc Represents a ClientPayload. - * @implements IClientPayload - * @constructor - * @param {proto.IClientPayload=} [properties] Properties to set - */ - function ClientPayload(properties) { - this.shards = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClientPayload username. - * @member {number|Long} username - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.username = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * ClientPayload passive. - * @member {boolean} passive - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.passive = false; - - /** - * ClientPayload userAgent. - * @member {proto.IUserAgent|null|undefined} userAgent - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.userAgent = null; - - /** - * ClientPayload webInfo. - * @member {proto.IWebInfo|null|undefined} webInfo - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.webInfo = null; - - /** - * ClientPayload pushName. - * @member {string} pushName - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.pushName = ""; - - /** - * ClientPayload sessionId. - * @member {number} sessionId - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.sessionId = 0; - - /** - * ClientPayload shortConnect. - * @member {boolean} shortConnect - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.shortConnect = false; - - /** - * ClientPayload connectType. - * @member {proto.ClientPayload.ClientPayloadConnectType} connectType - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.connectType = 0; - - /** - * ClientPayload connectReason. - * @member {proto.ClientPayload.ClientPayloadConnectReason} connectReason - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.connectReason = 0; - - /** - * ClientPayload shards. - * @member {Array.} shards - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.shards = $util.emptyArray; - - /** - * ClientPayload dnsSource. - * @member {proto.IDNSSource|null|undefined} dnsSource - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.dnsSource = null; - - /** - * ClientPayload connectAttemptCount. - * @member {number} connectAttemptCount - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.connectAttemptCount = 0; - - /** - * ClientPayload device. - * @member {number} device - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.device = 0; - - /** - * ClientPayload regData. - * @member {proto.ICompanionRegData|null|undefined} regData - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.regData = null; - - /** - * ClientPayload product. - * @member {proto.ClientPayload.ClientPayloadProduct} product - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.product = 0; - - /** - * ClientPayload fbCat. - * @member {Uint8Array} fbCat - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.fbCat = $util.newBuffer([]); - - /** - * ClientPayload fbUserAgent. - * @member {Uint8Array} fbUserAgent - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.fbUserAgent = $util.newBuffer([]); - - /** - * ClientPayload oc. - * @member {boolean} oc - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.oc = false; - - /** - * ClientPayload lc. - * @member {number} lc - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.lc = 0; - - /** - * ClientPayload iosAppExtension. - * @member {proto.ClientPayload.ClientPayloadIOSAppExtension} iosAppExtension - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.iosAppExtension = 0; - - /** - * ClientPayload fbAppId. - * @member {number|Long} fbAppId - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.fbAppId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * ClientPayload fbDeviceId. - * @member {Uint8Array} fbDeviceId - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.fbDeviceId = $util.newBuffer([]); - - /** - * ClientPayload pull. - * @member {boolean} pull - * @memberof proto.ClientPayload - * @instance - */ - ClientPayload.prototype.pull = false; - - /** - * Creates a new ClientPayload instance using the specified properties. - * @function create - * @memberof proto.ClientPayload - * @static - * @param {proto.IClientPayload=} [properties] Properties to set - * @returns {proto.ClientPayload} ClientPayload instance - */ - ClientPayload.create = function create(properties) { - return new ClientPayload(properties); - }; - - /** - * Encodes the specified ClientPayload message. Does not implicitly {@link proto.ClientPayload.verify|verify} messages. - * @function encode - * @memberof proto.ClientPayload - * @static - * @param {proto.IClientPayload} message ClientPayload message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientPayload.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.username != null && Object.hasOwnProperty.call(message, "username")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.username); - if (message.passive != null && Object.hasOwnProperty.call(message, "passive")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.passive); - if (message.userAgent != null && Object.hasOwnProperty.call(message, "userAgent")) - $root.proto.UserAgent.encode(message.userAgent, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.webInfo != null && Object.hasOwnProperty.call(message, "webInfo")) - $root.proto.WebInfo.encode(message.webInfo, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.pushName != null && Object.hasOwnProperty.call(message, "pushName")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.pushName); - if (message.sessionId != null && Object.hasOwnProperty.call(message, "sessionId")) - writer.uint32(/* id 9, wireType 5 =*/77).sfixed32(message.sessionId); - if (message.shortConnect != null && Object.hasOwnProperty.call(message, "shortConnect")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.shortConnect); - if (message.connectType != null && Object.hasOwnProperty.call(message, "connectType")) - writer.uint32(/* id 12, wireType 0 =*/96).int32(message.connectType); - if (message.connectReason != null && Object.hasOwnProperty.call(message, "connectReason")) - writer.uint32(/* id 13, wireType 0 =*/104).int32(message.connectReason); - if (message.shards != null && message.shards.length) - for (var i = 0; i < message.shards.length; ++i) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.shards[i]); - if (message.dnsSource != null && Object.hasOwnProperty.call(message, "dnsSource")) - $root.proto.DNSSource.encode(message.dnsSource, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.connectAttemptCount != null && Object.hasOwnProperty.call(message, "connectAttemptCount")) - writer.uint32(/* id 16, wireType 0 =*/128).uint32(message.connectAttemptCount); - if (message.device != null && Object.hasOwnProperty.call(message, "device")) - writer.uint32(/* id 18, wireType 0 =*/144).uint32(message.device); - if (message.regData != null && Object.hasOwnProperty.call(message, "regData")) - $root.proto.CompanionRegData.encode(message.regData, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.product != null && Object.hasOwnProperty.call(message, "product")) - writer.uint32(/* id 20, wireType 0 =*/160).int32(message.product); - if (message.fbCat != null && Object.hasOwnProperty.call(message, "fbCat")) - writer.uint32(/* id 21, wireType 2 =*/170).bytes(message.fbCat); - if (message.fbUserAgent != null && Object.hasOwnProperty.call(message, "fbUserAgent")) - writer.uint32(/* id 22, wireType 2 =*/178).bytes(message.fbUserAgent); - if (message.oc != null && Object.hasOwnProperty.call(message, "oc")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.oc); - if (message.lc != null && Object.hasOwnProperty.call(message, "lc")) - writer.uint32(/* id 24, wireType 0 =*/192).int32(message.lc); - if (message.iosAppExtension != null && Object.hasOwnProperty.call(message, "iosAppExtension")) - writer.uint32(/* id 30, wireType 0 =*/240).int32(message.iosAppExtension); - if (message.fbAppId != null && Object.hasOwnProperty.call(message, "fbAppId")) - writer.uint32(/* id 31, wireType 0 =*/248).uint64(message.fbAppId); - if (message.fbDeviceId != null && Object.hasOwnProperty.call(message, "fbDeviceId")) - writer.uint32(/* id 32, wireType 2 =*/258).bytes(message.fbDeviceId); - if (message.pull != null && Object.hasOwnProperty.call(message, "pull")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.pull); - return writer; - }; - - /** - * Encodes the specified ClientPayload message, length delimited. Does not implicitly {@link proto.ClientPayload.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.ClientPayload - * @static - * @param {proto.IClientPayload} message ClientPayload message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientPayload.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClientPayload message from the specified reader or buffer. - * @function decode - * @memberof proto.ClientPayload - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.ClientPayload} ClientPayload - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientPayload.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ClientPayload(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.username = reader.uint64(); - break; - case 3: - message.passive = reader.bool(); - break; - case 5: - message.userAgent = $root.proto.UserAgent.decode(reader, reader.uint32()); - break; - case 6: - message.webInfo = $root.proto.WebInfo.decode(reader, reader.uint32()); - break; - case 7: - message.pushName = reader.string(); - break; - case 9: - message.sessionId = reader.sfixed32(); - break; - case 10: - message.shortConnect = reader.bool(); - break; - case 12: - message.connectType = reader.int32(); - break; - case 13: - message.connectReason = reader.int32(); - break; - case 14: - if (!(message.shards && message.shards.length)) - message.shards = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.shards.push(reader.int32()); - } else - message.shards.push(reader.int32()); - break; - case 15: - message.dnsSource = $root.proto.DNSSource.decode(reader, reader.uint32()); - break; - case 16: - message.connectAttemptCount = reader.uint32(); - break; - case 18: - message.device = reader.uint32(); - break; - case 19: - message.regData = $root.proto.CompanionRegData.decode(reader, reader.uint32()); - break; - case 20: - message.product = reader.int32(); - break; - case 21: - message.fbCat = reader.bytes(); - break; - case 22: - message.fbUserAgent = reader.bytes(); - break; - case 23: - message.oc = reader.bool(); - break; - case 24: - message.lc = reader.int32(); - break; - case 30: - message.iosAppExtension = reader.int32(); - break; - case 31: - message.fbAppId = reader.uint64(); - break; - case 32: - message.fbDeviceId = reader.bytes(); - break; - case 33: - message.pull = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClientPayload message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.ClientPayload - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ClientPayload} ClientPayload - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientPayload.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClientPayload message. - * @function verify - * @memberof proto.ClientPayload - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClientPayload.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.username != null && message.hasOwnProperty("username")) - if (!$util.isInteger(message.username) && !(message.username && $util.isInteger(message.username.low) && $util.isInteger(message.username.high))) - return "username: integer|Long expected"; - if (message.passive != null && message.hasOwnProperty("passive")) - if (typeof message.passive !== "boolean") - return "passive: boolean expected"; - if (message.userAgent != null && message.hasOwnProperty("userAgent")) { - var error = $root.proto.UserAgent.verify(message.userAgent); - if (error) - return "userAgent." + error; - } - if (message.webInfo != null && message.hasOwnProperty("webInfo")) { - var error = $root.proto.WebInfo.verify(message.webInfo); - if (error) - return "webInfo." + error; - } - if (message.pushName != null && message.hasOwnProperty("pushName")) - if (!$util.isString(message.pushName)) - return "pushName: string expected"; - if (message.sessionId != null && message.hasOwnProperty("sessionId")) - if (!$util.isInteger(message.sessionId)) - return "sessionId: integer expected"; - if (message.shortConnect != null && message.hasOwnProperty("shortConnect")) - if (typeof message.shortConnect !== "boolean") - return "shortConnect: boolean expected"; - if (message.connectType != null && message.hasOwnProperty("connectType")) - switch (message.connectType) { - default: - return "connectType: enum value expected"; - case 0: - case 1: - case 100: - case 101: - case 102: - case 103: - case 104: - case 105: - case 106: - case 107: - case 108: - case 109: - case 110: - case 111: - case 112: - break; - } - if (message.connectReason != null && message.hasOwnProperty("connectReason")) - switch (message.connectReason) { - default: - return "connectReason: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.shards != null && message.hasOwnProperty("shards")) { - if (!Array.isArray(message.shards)) - return "shards: array expected"; - for (var i = 0; i < message.shards.length; ++i) - if (!$util.isInteger(message.shards[i])) - return "shards: integer[] expected"; - } - if (message.dnsSource != null && message.hasOwnProperty("dnsSource")) { - var error = $root.proto.DNSSource.verify(message.dnsSource); - if (error) - return "dnsSource." + error; - } - if (message.connectAttemptCount != null && message.hasOwnProperty("connectAttemptCount")) - if (!$util.isInteger(message.connectAttemptCount)) - return "connectAttemptCount: integer expected"; - if (message.device != null && message.hasOwnProperty("device")) - if (!$util.isInteger(message.device)) - return "device: integer expected"; - if (message.regData != null && message.hasOwnProperty("regData")) { - var error = $root.proto.CompanionRegData.verify(message.regData); - if (error) - return "regData." + error; - } - if (message.product != null && message.hasOwnProperty("product")) - switch (message.product) { - default: - return "product: enum value expected"; - case 0: - case 1: - break; - } - if (message.fbCat != null && message.hasOwnProperty("fbCat")) - if (!(message.fbCat && typeof message.fbCat.length === "number" || $util.isString(message.fbCat))) - return "fbCat: buffer expected"; - if (message.fbUserAgent != null && message.hasOwnProperty("fbUserAgent")) - if (!(message.fbUserAgent && typeof message.fbUserAgent.length === "number" || $util.isString(message.fbUserAgent))) - return "fbUserAgent: buffer expected"; - if (message.oc != null && message.hasOwnProperty("oc")) - if (typeof message.oc !== "boolean") - return "oc: boolean expected"; - if (message.lc != null && message.hasOwnProperty("lc")) - if (!$util.isInteger(message.lc)) - return "lc: integer expected"; - if (message.iosAppExtension != null && message.hasOwnProperty("iosAppExtension")) - switch (message.iosAppExtension) { - default: - return "iosAppExtension: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.fbAppId != null && message.hasOwnProperty("fbAppId")) - if (!$util.isInteger(message.fbAppId) && !(message.fbAppId && $util.isInteger(message.fbAppId.low) && $util.isInteger(message.fbAppId.high))) - return "fbAppId: integer|Long expected"; - if (message.fbDeviceId != null && message.hasOwnProperty("fbDeviceId")) - if (!(message.fbDeviceId && typeof message.fbDeviceId.length === "number" || $util.isString(message.fbDeviceId))) - return "fbDeviceId: buffer expected"; - if (message.pull != null && message.hasOwnProperty("pull")) - if (typeof message.pull !== "boolean") - return "pull: boolean expected"; - return null; - }; - - /** - * Creates a ClientPayload message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.ClientPayload - * @static - * @param {Object.} object Plain object - * @returns {proto.ClientPayload} ClientPayload - */ - ClientPayload.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ClientPayload) - return object; - var message = new $root.proto.ClientPayload(); - if (object.username != null) - if ($util.Long) - (message.username = $util.Long.fromValue(object.username)).unsigned = true; - else if (typeof object.username === "string") - message.username = parseInt(object.username, 10); - else if (typeof object.username === "number") - message.username = object.username; - else if (typeof object.username === "object") - message.username = new $util.LongBits(object.username.low >>> 0, object.username.high >>> 0).toNumber(true); - if (object.passive != null) - message.passive = Boolean(object.passive); - if (object.userAgent != null) { - if (typeof object.userAgent !== "object") - throw TypeError(".proto.ClientPayload.userAgent: object expected"); - message.userAgent = $root.proto.UserAgent.fromObject(object.userAgent); - } - if (object.webInfo != null) { - if (typeof object.webInfo !== "object") - throw TypeError(".proto.ClientPayload.webInfo: object expected"); - message.webInfo = $root.proto.WebInfo.fromObject(object.webInfo); - } - if (object.pushName != null) - message.pushName = String(object.pushName); - if (object.sessionId != null) - message.sessionId = object.sessionId | 0; - if (object.shortConnect != null) - message.shortConnect = Boolean(object.shortConnect); - switch (object.connectType) { - case "CELLULAR_UNKNOWN": - case 0: - message.connectType = 0; - break; - case "WIFI_UNKNOWN": - case 1: - message.connectType = 1; - break; - case "CELLULAR_EDGE": - case 100: - message.connectType = 100; - break; - case "CELLULAR_IDEN": - case 101: - message.connectType = 101; - break; - case "CELLULAR_UMTS": - case 102: - message.connectType = 102; - break; - case "CELLULAR_EVDO": - case 103: - message.connectType = 103; - break; - case "CELLULAR_GPRS": - case 104: - message.connectType = 104; - break; - case "CELLULAR_HSDPA": - case 105: - message.connectType = 105; - break; - case "CELLULAR_HSUPA": - case 106: - message.connectType = 106; - break; - case "CELLULAR_HSPA": - case 107: - message.connectType = 107; - break; - case "CELLULAR_CDMA": - case 108: - message.connectType = 108; - break; - case "CELLULAR_1XRTT": - case 109: - message.connectType = 109; - break; - case "CELLULAR_EHRPD": - case 110: - message.connectType = 110; - break; - case "CELLULAR_LTE": - case 111: - message.connectType = 111; - break; - case "CELLULAR_HSPAP": - case 112: - message.connectType = 112; - break; - } - switch (object.connectReason) { - case "PUSH": - case 0: - message.connectReason = 0; - break; - case "USER_ACTIVATED": - case 1: - message.connectReason = 1; - break; - case "SCHEDULED": - case 2: - message.connectReason = 2; - break; - case "ERROR_RECONNECT": - case 3: - message.connectReason = 3; - break; - case "NETWORK_SWITCH": - case 4: - message.connectReason = 4; - break; - case "PING_RECONNECT": - case 5: - message.connectReason = 5; - break; - } - if (object.shards) { - if (!Array.isArray(object.shards)) - throw TypeError(".proto.ClientPayload.shards: array expected"); - message.shards = []; - for (var i = 0; i < object.shards.length; ++i) - message.shards[i] = object.shards[i] | 0; - } - if (object.dnsSource != null) { - if (typeof object.dnsSource !== "object") - throw TypeError(".proto.ClientPayload.dnsSource: object expected"); - message.dnsSource = $root.proto.DNSSource.fromObject(object.dnsSource); - } - if (object.connectAttemptCount != null) - message.connectAttemptCount = object.connectAttemptCount >>> 0; - if (object.device != null) - message.device = object.device >>> 0; - if (object.regData != null) { - if (typeof object.regData !== "object") - throw TypeError(".proto.ClientPayload.regData: object expected"); - message.regData = $root.proto.CompanionRegData.fromObject(object.regData); - } - switch (object.product) { - case "WHATSAPP": - case 0: - message.product = 0; - break; - case "MESSENGER": - case 1: - message.product = 1; - break; - } - if (object.fbCat != null) - if (typeof object.fbCat === "string") - $util.base64.decode(object.fbCat, message.fbCat = $util.newBuffer($util.base64.length(object.fbCat)), 0); - else if (object.fbCat.length) - message.fbCat = object.fbCat; - if (object.fbUserAgent != null) - if (typeof object.fbUserAgent === "string") - $util.base64.decode(object.fbUserAgent, message.fbUserAgent = $util.newBuffer($util.base64.length(object.fbUserAgent)), 0); - else if (object.fbUserAgent.length) - message.fbUserAgent = object.fbUserAgent; - if (object.oc != null) - message.oc = Boolean(object.oc); - if (object.lc != null) - message.lc = object.lc | 0; - switch (object.iosAppExtension) { - case "SHARE_EXTENSION": - case 0: - message.iosAppExtension = 0; - break; - case "SERVICE_EXTENSION": - case 1: - message.iosAppExtension = 1; - break; - case "INTENTS_EXTENSION": - case 2: - message.iosAppExtension = 2; - break; - } - if (object.fbAppId != null) - if ($util.Long) - (message.fbAppId = $util.Long.fromValue(object.fbAppId)).unsigned = true; - else if (typeof object.fbAppId === "string") - message.fbAppId = parseInt(object.fbAppId, 10); - else if (typeof object.fbAppId === "number") - message.fbAppId = object.fbAppId; - else if (typeof object.fbAppId === "object") - message.fbAppId = new $util.LongBits(object.fbAppId.low >>> 0, object.fbAppId.high >>> 0).toNumber(true); - if (object.fbDeviceId != null) - if (typeof object.fbDeviceId === "string") - $util.base64.decode(object.fbDeviceId, message.fbDeviceId = $util.newBuffer($util.base64.length(object.fbDeviceId)), 0); - else if (object.fbDeviceId.length) - message.fbDeviceId = object.fbDeviceId; - if (object.pull != null) - message.pull = Boolean(object.pull); - return message; - }; - - /** - * Creates a plain object from a ClientPayload message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.ClientPayload - * @static - * @param {proto.ClientPayload} message ClientPayload - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClientPayload.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.shards = []; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.username = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.username = options.longs === String ? "0" : 0; - object.passive = false; - object.userAgent = null; - object.webInfo = null; - object.pushName = ""; - object.sessionId = 0; - object.shortConnect = false; - object.connectType = options.enums === String ? "CELLULAR_UNKNOWN" : 0; - object.connectReason = options.enums === String ? "PUSH" : 0; - object.dnsSource = null; - object.connectAttemptCount = 0; - object.device = 0; - object.regData = null; - object.product = options.enums === String ? "WHATSAPP" : 0; - if (options.bytes === String) - object.fbCat = ""; - else { - object.fbCat = []; - if (options.bytes !== Array) - object.fbCat = $util.newBuffer(object.fbCat); - } - if (options.bytes === String) - object.fbUserAgent = ""; - else { - object.fbUserAgent = []; - if (options.bytes !== Array) - object.fbUserAgent = $util.newBuffer(object.fbUserAgent); - } - object.oc = false; - object.lc = 0; - object.iosAppExtension = options.enums === String ? "SHARE_EXTENSION" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.fbAppId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.fbAppId = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.fbDeviceId = ""; - else { - object.fbDeviceId = []; - if (options.bytes !== Array) - object.fbDeviceId = $util.newBuffer(object.fbDeviceId); - } - object.pull = false; - } - if (message.username != null && message.hasOwnProperty("username")) - if (typeof message.username === "number") - object.username = options.longs === String ? String(message.username) : message.username; - else - object.username = options.longs === String ? $util.Long.prototype.toString.call(message.username) : options.longs === Number ? new $util.LongBits(message.username.low >>> 0, message.username.high >>> 0).toNumber(true) : message.username; - if (message.passive != null && message.hasOwnProperty("passive")) - object.passive = message.passive; - if (message.userAgent != null && message.hasOwnProperty("userAgent")) - object.userAgent = $root.proto.UserAgent.toObject(message.userAgent, options); - if (message.webInfo != null && message.hasOwnProperty("webInfo")) - object.webInfo = $root.proto.WebInfo.toObject(message.webInfo, options); - if (message.pushName != null && message.hasOwnProperty("pushName")) - object.pushName = message.pushName; - if (message.sessionId != null && message.hasOwnProperty("sessionId")) - object.sessionId = message.sessionId; - if (message.shortConnect != null && message.hasOwnProperty("shortConnect")) - object.shortConnect = message.shortConnect; - if (message.connectType != null && message.hasOwnProperty("connectType")) - object.connectType = options.enums === String ? $root.proto.ClientPayload.ClientPayloadConnectType[message.connectType] : message.connectType; - if (message.connectReason != null && message.hasOwnProperty("connectReason")) - object.connectReason = options.enums === String ? $root.proto.ClientPayload.ClientPayloadConnectReason[message.connectReason] : message.connectReason; - if (message.shards && message.shards.length) { - object.shards = []; - for (var j = 0; j < message.shards.length; ++j) - object.shards[j] = message.shards[j]; - } - if (message.dnsSource != null && message.hasOwnProperty("dnsSource")) - object.dnsSource = $root.proto.DNSSource.toObject(message.dnsSource, options); - if (message.connectAttemptCount != null && message.hasOwnProperty("connectAttemptCount")) - object.connectAttemptCount = message.connectAttemptCount; - if (message.device != null && message.hasOwnProperty("device")) - object.device = message.device; - if (message.regData != null && message.hasOwnProperty("regData")) - object.regData = $root.proto.CompanionRegData.toObject(message.regData, options); - if (message.product != null && message.hasOwnProperty("product")) - object.product = options.enums === String ? $root.proto.ClientPayload.ClientPayloadProduct[message.product] : message.product; - if (message.fbCat != null && message.hasOwnProperty("fbCat")) - object.fbCat = options.bytes === String ? $util.base64.encode(message.fbCat, 0, message.fbCat.length) : options.bytes === Array ? Array.prototype.slice.call(message.fbCat) : message.fbCat; - if (message.fbUserAgent != null && message.hasOwnProperty("fbUserAgent")) - object.fbUserAgent = options.bytes === String ? $util.base64.encode(message.fbUserAgent, 0, message.fbUserAgent.length) : options.bytes === Array ? Array.prototype.slice.call(message.fbUserAgent) : message.fbUserAgent; - if (message.oc != null && message.hasOwnProperty("oc")) - object.oc = message.oc; - if (message.lc != null && message.hasOwnProperty("lc")) - object.lc = message.lc; - if (message.iosAppExtension != null && message.hasOwnProperty("iosAppExtension")) - object.iosAppExtension = options.enums === String ? $root.proto.ClientPayload.ClientPayloadIOSAppExtension[message.iosAppExtension] : message.iosAppExtension; - if (message.fbAppId != null && message.hasOwnProperty("fbAppId")) - if (typeof message.fbAppId === "number") - object.fbAppId = options.longs === String ? String(message.fbAppId) : message.fbAppId; - else - object.fbAppId = options.longs === String ? $util.Long.prototype.toString.call(message.fbAppId) : options.longs === Number ? new $util.LongBits(message.fbAppId.low >>> 0, message.fbAppId.high >>> 0).toNumber(true) : message.fbAppId; - if (message.fbDeviceId != null && message.hasOwnProperty("fbDeviceId")) - object.fbDeviceId = options.bytes === String ? $util.base64.encode(message.fbDeviceId, 0, message.fbDeviceId.length) : options.bytes === Array ? Array.prototype.slice.call(message.fbDeviceId) : message.fbDeviceId; - if (message.pull != null && message.hasOwnProperty("pull")) - object.pull = message.pull; - return object; - }; - - /** - * Converts this ClientPayload to JSON. - * @function toJSON - * @memberof proto.ClientPayload - * @instance - * @returns {Object.} JSON object - */ - ClientPayload.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * ClientPayloadConnectType enum. - * @name proto.ClientPayload.ClientPayloadConnectType - * @enum {number} - * @property {number} CELLULAR_UNKNOWN=0 CELLULAR_UNKNOWN value - * @property {number} WIFI_UNKNOWN=1 WIFI_UNKNOWN value - * @property {number} CELLULAR_EDGE=100 CELLULAR_EDGE value - * @property {number} CELLULAR_IDEN=101 CELLULAR_IDEN value - * @property {number} CELLULAR_UMTS=102 CELLULAR_UMTS value - * @property {number} CELLULAR_EVDO=103 CELLULAR_EVDO value - * @property {number} CELLULAR_GPRS=104 CELLULAR_GPRS value - * @property {number} CELLULAR_HSDPA=105 CELLULAR_HSDPA value - * @property {number} CELLULAR_HSUPA=106 CELLULAR_HSUPA value - * @property {number} CELLULAR_HSPA=107 CELLULAR_HSPA value - * @property {number} CELLULAR_CDMA=108 CELLULAR_CDMA value - * @property {number} CELLULAR_1XRTT=109 CELLULAR_1XRTT value - * @property {number} CELLULAR_EHRPD=110 CELLULAR_EHRPD value - * @property {number} CELLULAR_LTE=111 CELLULAR_LTE value - * @property {number} CELLULAR_HSPAP=112 CELLULAR_HSPAP value - */ - ClientPayload.ClientPayloadConnectType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CELLULAR_UNKNOWN"] = 0; - values[valuesById[1] = "WIFI_UNKNOWN"] = 1; - values[valuesById[100] = "CELLULAR_EDGE"] = 100; - values[valuesById[101] = "CELLULAR_IDEN"] = 101; - values[valuesById[102] = "CELLULAR_UMTS"] = 102; - values[valuesById[103] = "CELLULAR_EVDO"] = 103; - values[valuesById[104] = "CELLULAR_GPRS"] = 104; - values[valuesById[105] = "CELLULAR_HSDPA"] = 105; - values[valuesById[106] = "CELLULAR_HSUPA"] = 106; - values[valuesById[107] = "CELLULAR_HSPA"] = 107; - values[valuesById[108] = "CELLULAR_CDMA"] = 108; - values[valuesById[109] = "CELLULAR_1XRTT"] = 109; - values[valuesById[110] = "CELLULAR_EHRPD"] = 110; - values[valuesById[111] = "CELLULAR_LTE"] = 111; - values[valuesById[112] = "CELLULAR_HSPAP"] = 112; - return values; - })(); - - /** - * ClientPayloadConnectReason enum. - * @name proto.ClientPayload.ClientPayloadConnectReason - * @enum {number} - * @property {number} PUSH=0 PUSH value - * @property {number} USER_ACTIVATED=1 USER_ACTIVATED value - * @property {number} SCHEDULED=2 SCHEDULED value - * @property {number} ERROR_RECONNECT=3 ERROR_RECONNECT value - * @property {number} NETWORK_SWITCH=4 NETWORK_SWITCH value - * @property {number} PING_RECONNECT=5 PING_RECONNECT value - */ - ClientPayload.ClientPayloadConnectReason = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PUSH"] = 0; - values[valuesById[1] = "USER_ACTIVATED"] = 1; - values[valuesById[2] = "SCHEDULED"] = 2; - values[valuesById[3] = "ERROR_RECONNECT"] = 3; - values[valuesById[4] = "NETWORK_SWITCH"] = 4; - values[valuesById[5] = "PING_RECONNECT"] = 5; - return values; - })(); - - /** - * ClientPayloadProduct enum. - * @name proto.ClientPayload.ClientPayloadProduct - * @enum {number} - * @property {number} WHATSAPP=0 WHATSAPP value - * @property {number} MESSENGER=1 MESSENGER value - */ - ClientPayload.ClientPayloadProduct = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "WHATSAPP"] = 0; - values[valuesById[1] = "MESSENGER"] = 1; - return values; - })(); - - /** - * ClientPayloadIOSAppExtension enum. - * @name proto.ClientPayload.ClientPayloadIOSAppExtension - * @enum {number} - * @property {number} SHARE_EXTENSION=0 SHARE_EXTENSION value - * @property {number} SERVICE_EXTENSION=1 SERVICE_EXTENSION value - * @property {number} INTENTS_EXTENSION=2 INTENTS_EXTENSION value - */ - ClientPayload.ClientPayloadIOSAppExtension = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SHARE_EXTENSION"] = 0; - values[valuesById[1] = "SERVICE_EXTENSION"] = 1; - values[valuesById[2] = "INTENTS_EXTENSION"] = 2; - return values; - })(); - - return ClientPayload; - })(); - - proto.CompanionRegData = (function() { - - /** - * Properties of a CompanionRegData. - * @memberof proto - * @interface ICompanionRegData - * @property {Uint8Array|null} [eRegid] CompanionRegData eRegid - * @property {Uint8Array|null} [eKeytype] CompanionRegData eKeytype - * @property {Uint8Array|null} [eIdent] CompanionRegData eIdent - * @property {Uint8Array|null} [eSkeyId] CompanionRegData eSkeyId - * @property {Uint8Array|null} [eSkeyVal] CompanionRegData eSkeyVal - * @property {Uint8Array|null} [eSkeySig] CompanionRegData eSkeySig - * @property {Uint8Array|null} [buildHash] CompanionRegData buildHash - * @property {Uint8Array|null} [companionProps] CompanionRegData companionProps - */ - - /** - * Constructs a new CompanionRegData. - * @memberof proto - * @classdesc Represents a CompanionRegData. - * @implements ICompanionRegData - * @constructor - * @param {proto.ICompanionRegData=} [properties] Properties to set - */ - function CompanionRegData(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CompanionRegData eRegid. - * @member {Uint8Array} eRegid - * @memberof proto.CompanionRegData - * @instance - */ - CompanionRegData.prototype.eRegid = $util.newBuffer([]); - - /** - * CompanionRegData eKeytype. - * @member {Uint8Array} eKeytype - * @memberof proto.CompanionRegData - * @instance - */ - CompanionRegData.prototype.eKeytype = $util.newBuffer([]); - - /** - * CompanionRegData eIdent. - * @member {Uint8Array} eIdent - * @memberof proto.CompanionRegData - * @instance - */ - CompanionRegData.prototype.eIdent = $util.newBuffer([]); - - /** - * CompanionRegData eSkeyId. - * @member {Uint8Array} eSkeyId - * @memberof proto.CompanionRegData - * @instance - */ - CompanionRegData.prototype.eSkeyId = $util.newBuffer([]); - - /** - * CompanionRegData eSkeyVal. - * @member {Uint8Array} eSkeyVal - * @memberof proto.CompanionRegData - * @instance - */ - CompanionRegData.prototype.eSkeyVal = $util.newBuffer([]); - - /** - * CompanionRegData eSkeySig. - * @member {Uint8Array} eSkeySig - * @memberof proto.CompanionRegData - * @instance - */ - CompanionRegData.prototype.eSkeySig = $util.newBuffer([]); - - /** - * CompanionRegData buildHash. - * @member {Uint8Array} buildHash - * @memberof proto.CompanionRegData - * @instance - */ - CompanionRegData.prototype.buildHash = $util.newBuffer([]); - - /** - * CompanionRegData companionProps. - * @member {Uint8Array} companionProps - * @memberof proto.CompanionRegData - * @instance - */ - CompanionRegData.prototype.companionProps = $util.newBuffer([]); - - /** - * Creates a new CompanionRegData instance using the specified properties. - * @function create - * @memberof proto.CompanionRegData - * @static - * @param {proto.ICompanionRegData=} [properties] Properties to set - * @returns {proto.CompanionRegData} CompanionRegData instance - */ - CompanionRegData.create = function create(properties) { - return new CompanionRegData(properties); - }; - - /** - * Encodes the specified CompanionRegData message. Does not implicitly {@link proto.CompanionRegData.verify|verify} messages. - * @function encode - * @memberof proto.CompanionRegData - * @static - * @param {proto.ICompanionRegData} message CompanionRegData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompanionRegData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.eRegid != null && Object.hasOwnProperty.call(message, "eRegid")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.eRegid); - if (message.eKeytype != null && Object.hasOwnProperty.call(message, "eKeytype")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.eKeytype); - if (message.eIdent != null && Object.hasOwnProperty.call(message, "eIdent")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.eIdent); - if (message.eSkeyId != null && Object.hasOwnProperty.call(message, "eSkeyId")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.eSkeyId); - if (message.eSkeyVal != null && Object.hasOwnProperty.call(message, "eSkeyVal")) - writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.eSkeyVal); - if (message.eSkeySig != null && Object.hasOwnProperty.call(message, "eSkeySig")) - writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.eSkeySig); - if (message.buildHash != null && Object.hasOwnProperty.call(message, "buildHash")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.buildHash); - if (message.companionProps != null && Object.hasOwnProperty.call(message, "companionProps")) - writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.companionProps); - return writer; - }; - - /** - * Encodes the specified CompanionRegData message, length delimited. Does not implicitly {@link proto.CompanionRegData.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.CompanionRegData - * @static - * @param {proto.ICompanionRegData} message CompanionRegData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompanionRegData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CompanionRegData message from the specified reader or buffer. - * @function decode - * @memberof proto.CompanionRegData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.CompanionRegData} CompanionRegData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompanionRegData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.CompanionRegData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eRegid = reader.bytes(); - break; - case 2: - message.eKeytype = reader.bytes(); - break; - case 3: - message.eIdent = reader.bytes(); - break; - case 4: - message.eSkeyId = reader.bytes(); - break; - case 5: - message.eSkeyVal = reader.bytes(); - break; - case 6: - message.eSkeySig = reader.bytes(); - break; - case 7: - message.buildHash = reader.bytes(); - break; - case 8: - message.companionProps = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CompanionRegData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.CompanionRegData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.CompanionRegData} CompanionRegData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompanionRegData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CompanionRegData message. - * @function verify - * @memberof proto.CompanionRegData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CompanionRegData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.eRegid != null && message.hasOwnProperty("eRegid")) - if (!(message.eRegid && typeof message.eRegid.length === "number" || $util.isString(message.eRegid))) - return "eRegid: buffer expected"; - if (message.eKeytype != null && message.hasOwnProperty("eKeytype")) - if (!(message.eKeytype && typeof message.eKeytype.length === "number" || $util.isString(message.eKeytype))) - return "eKeytype: buffer expected"; - if (message.eIdent != null && message.hasOwnProperty("eIdent")) - if (!(message.eIdent && typeof message.eIdent.length === "number" || $util.isString(message.eIdent))) - return "eIdent: buffer expected"; - if (message.eSkeyId != null && message.hasOwnProperty("eSkeyId")) - if (!(message.eSkeyId && typeof message.eSkeyId.length === "number" || $util.isString(message.eSkeyId))) - return "eSkeyId: buffer expected"; - if (message.eSkeyVal != null && message.hasOwnProperty("eSkeyVal")) - if (!(message.eSkeyVal && typeof message.eSkeyVal.length === "number" || $util.isString(message.eSkeyVal))) - return "eSkeyVal: buffer expected"; - if (message.eSkeySig != null && message.hasOwnProperty("eSkeySig")) - if (!(message.eSkeySig && typeof message.eSkeySig.length === "number" || $util.isString(message.eSkeySig))) - return "eSkeySig: buffer expected"; - if (message.buildHash != null && message.hasOwnProperty("buildHash")) - if (!(message.buildHash && typeof message.buildHash.length === "number" || $util.isString(message.buildHash))) - return "buildHash: buffer expected"; - if (message.companionProps != null && message.hasOwnProperty("companionProps")) - if (!(message.companionProps && typeof message.companionProps.length === "number" || $util.isString(message.companionProps))) - return "companionProps: buffer expected"; - return null; - }; - - /** - * Creates a CompanionRegData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.CompanionRegData - * @static - * @param {Object.} object Plain object - * @returns {proto.CompanionRegData} CompanionRegData - */ - CompanionRegData.fromObject = function fromObject(object) { - if (object instanceof $root.proto.CompanionRegData) - return object; - var message = new $root.proto.CompanionRegData(); - if (object.eRegid != null) - if (typeof object.eRegid === "string") - $util.base64.decode(object.eRegid, message.eRegid = $util.newBuffer($util.base64.length(object.eRegid)), 0); - else if (object.eRegid.length) - message.eRegid = object.eRegid; - if (object.eKeytype != null) - if (typeof object.eKeytype === "string") - $util.base64.decode(object.eKeytype, message.eKeytype = $util.newBuffer($util.base64.length(object.eKeytype)), 0); - else if (object.eKeytype.length) - message.eKeytype = object.eKeytype; - if (object.eIdent != null) - if (typeof object.eIdent === "string") - $util.base64.decode(object.eIdent, message.eIdent = $util.newBuffer($util.base64.length(object.eIdent)), 0); - else if (object.eIdent.length) - message.eIdent = object.eIdent; - if (object.eSkeyId != null) - if (typeof object.eSkeyId === "string") - $util.base64.decode(object.eSkeyId, message.eSkeyId = $util.newBuffer($util.base64.length(object.eSkeyId)), 0); - else if (object.eSkeyId.length) - message.eSkeyId = object.eSkeyId; - if (object.eSkeyVal != null) - if (typeof object.eSkeyVal === "string") - $util.base64.decode(object.eSkeyVal, message.eSkeyVal = $util.newBuffer($util.base64.length(object.eSkeyVal)), 0); - else if (object.eSkeyVal.length) - message.eSkeyVal = object.eSkeyVal; - if (object.eSkeySig != null) - if (typeof object.eSkeySig === "string") - $util.base64.decode(object.eSkeySig, message.eSkeySig = $util.newBuffer($util.base64.length(object.eSkeySig)), 0); - else if (object.eSkeySig.length) - message.eSkeySig = object.eSkeySig; - if (object.buildHash != null) - if (typeof object.buildHash === "string") - $util.base64.decode(object.buildHash, message.buildHash = $util.newBuffer($util.base64.length(object.buildHash)), 0); - else if (object.buildHash.length) - message.buildHash = object.buildHash; - if (object.companionProps != null) - if (typeof object.companionProps === "string") - $util.base64.decode(object.companionProps, message.companionProps = $util.newBuffer($util.base64.length(object.companionProps)), 0); - else if (object.companionProps.length) - message.companionProps = object.companionProps; - return message; - }; - - /** - * Creates a plain object from a CompanionRegData message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.CompanionRegData - * @static - * @param {proto.CompanionRegData} message CompanionRegData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CompanionRegData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.eRegid = ""; - else { - object.eRegid = []; - if (options.bytes !== Array) - object.eRegid = $util.newBuffer(object.eRegid); - } - if (options.bytes === String) - object.eKeytype = ""; - else { - object.eKeytype = []; - if (options.bytes !== Array) - object.eKeytype = $util.newBuffer(object.eKeytype); - } - if (options.bytes === String) - object.eIdent = ""; - else { - object.eIdent = []; - if (options.bytes !== Array) - object.eIdent = $util.newBuffer(object.eIdent); - } - if (options.bytes === String) - object.eSkeyId = ""; - else { - object.eSkeyId = []; - if (options.bytes !== Array) - object.eSkeyId = $util.newBuffer(object.eSkeyId); - } - if (options.bytes === String) - object.eSkeyVal = ""; - else { - object.eSkeyVal = []; - if (options.bytes !== Array) - object.eSkeyVal = $util.newBuffer(object.eSkeyVal); - } - if (options.bytes === String) - object.eSkeySig = ""; - else { - object.eSkeySig = []; - if (options.bytes !== Array) - object.eSkeySig = $util.newBuffer(object.eSkeySig); - } - if (options.bytes === String) - object.buildHash = ""; - else { - object.buildHash = []; - if (options.bytes !== Array) - object.buildHash = $util.newBuffer(object.buildHash); - } - if (options.bytes === String) - object.companionProps = ""; - else { - object.companionProps = []; - if (options.bytes !== Array) - object.companionProps = $util.newBuffer(object.companionProps); - } - } - if (message.eRegid != null && message.hasOwnProperty("eRegid")) - object.eRegid = options.bytes === String ? $util.base64.encode(message.eRegid, 0, message.eRegid.length) : options.bytes === Array ? Array.prototype.slice.call(message.eRegid) : message.eRegid; - if (message.eKeytype != null && message.hasOwnProperty("eKeytype")) - object.eKeytype = options.bytes === String ? $util.base64.encode(message.eKeytype, 0, message.eKeytype.length) : options.bytes === Array ? Array.prototype.slice.call(message.eKeytype) : message.eKeytype; - if (message.eIdent != null && message.hasOwnProperty("eIdent")) - object.eIdent = options.bytes === String ? $util.base64.encode(message.eIdent, 0, message.eIdent.length) : options.bytes === Array ? Array.prototype.slice.call(message.eIdent) : message.eIdent; - if (message.eSkeyId != null && message.hasOwnProperty("eSkeyId")) - object.eSkeyId = options.bytes === String ? $util.base64.encode(message.eSkeyId, 0, message.eSkeyId.length) : options.bytes === Array ? Array.prototype.slice.call(message.eSkeyId) : message.eSkeyId; - if (message.eSkeyVal != null && message.hasOwnProperty("eSkeyVal")) - object.eSkeyVal = options.bytes === String ? $util.base64.encode(message.eSkeyVal, 0, message.eSkeyVal.length) : options.bytes === Array ? Array.prototype.slice.call(message.eSkeyVal) : message.eSkeyVal; - if (message.eSkeySig != null && message.hasOwnProperty("eSkeySig")) - object.eSkeySig = options.bytes === String ? $util.base64.encode(message.eSkeySig, 0, message.eSkeySig.length) : options.bytes === Array ? Array.prototype.slice.call(message.eSkeySig) : message.eSkeySig; - if (message.buildHash != null && message.hasOwnProperty("buildHash")) - object.buildHash = options.bytes === String ? $util.base64.encode(message.buildHash, 0, message.buildHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.buildHash) : message.buildHash; - if (message.companionProps != null && message.hasOwnProperty("companionProps")) - object.companionProps = options.bytes === String ? $util.base64.encode(message.companionProps, 0, message.companionProps.length) : options.bytes === Array ? Array.prototype.slice.call(message.companionProps) : message.companionProps; - return object; - }; - - /** - * Converts this CompanionRegData to JSON. - * @function toJSON - * @memberof proto.CompanionRegData - * @instance - * @returns {Object.} JSON object - */ - CompanionRegData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CompanionRegData; - })(); - - proto.Details = (function() { - - /** - * Properties of a Details. - * @memberof proto - * @interface IDetails - * @property {number|null} [serial] Details serial - * @property {number|null} [issuerSerial] Details issuerSerial - * @property {Uint8Array|null} [key] Details key - * @property {number|Long|null} [notBefore] Details notBefore - * @property {number|Long|null} [notAfter] Details notAfter - */ - - /** - * Constructs a new Details. - * @memberof proto - * @classdesc Represents a Details. - * @implements IDetails - * @constructor - * @param {proto.IDetails=} [properties] Properties to set - */ - function Details(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Details serial. - * @member {number} serial - * @memberof proto.Details - * @instance - */ - Details.prototype.serial = 0; - - /** - * Details issuerSerial. - * @member {number} issuerSerial - * @memberof proto.Details - * @instance - */ - Details.prototype.issuerSerial = 0; - - /** - * Details key. - * @member {Uint8Array} key - * @memberof proto.Details - * @instance - */ - Details.prototype.key = $util.newBuffer([]); - - /** - * Details notBefore. - * @member {number|Long} notBefore - * @memberof proto.Details - * @instance - */ - Details.prototype.notBefore = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Details notAfter. - * @member {number|Long} notAfter - * @memberof proto.Details - * @instance - */ - Details.prototype.notAfter = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Creates a new Details instance using the specified properties. - * @function create - * @memberof proto.Details - * @static - * @param {proto.IDetails=} [properties] Properties to set - * @returns {proto.Details} Details instance - */ - Details.create = function create(properties) { - return new Details(properties); - }; - - /** - * Encodes the specified Details message. Does not implicitly {@link proto.Details.verify|verify} messages. - * @function encode - * @memberof proto.Details - * @static - * @param {proto.IDetails} message Details message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Details.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.serial != null && Object.hasOwnProperty.call(message, "serial")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.serial); - if (message.issuerSerial != null && Object.hasOwnProperty.call(message, "issuerSerial")) - writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.issuerSerial); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.key); - if (message.notBefore != null && Object.hasOwnProperty.call(message, "notBefore")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.notBefore); - if (message.notAfter != null && Object.hasOwnProperty.call(message, "notAfter")) - writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.notAfter); - return writer; - }; - - /** - * Encodes the specified Details message, length delimited. Does not implicitly {@link proto.Details.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.Details - * @static - * @param {proto.IDetails} message Details message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Details.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Details message from the specified reader or buffer. - * @function decode - * @memberof proto.Details - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.Details} Details - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Details.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Details(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.serial = reader.uint32(); - break; - case 2: - message.issuerSerial = reader.uint32(); - break; - case 3: - message.key = reader.bytes(); - break; - case 4: - message.notBefore = reader.uint64(); - break; - case 5: - message.notAfter = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Details message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.Details - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Details} Details - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Details.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Details message. - * @function verify - * @memberof proto.Details - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Details.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.serial != null && message.hasOwnProperty("serial")) - if (!$util.isInteger(message.serial)) - return "serial: integer expected"; - if (message.issuerSerial != null && message.hasOwnProperty("issuerSerial")) - if (!$util.isInteger(message.issuerSerial)) - return "issuerSerial: integer expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) - return "key: buffer expected"; - if (message.notBefore != null && message.hasOwnProperty("notBefore")) - if (!$util.isInteger(message.notBefore) && !(message.notBefore && $util.isInteger(message.notBefore.low) && $util.isInteger(message.notBefore.high))) - return "notBefore: integer|Long expected"; - if (message.notAfter != null && message.hasOwnProperty("notAfter")) - if (!$util.isInteger(message.notAfter) && !(message.notAfter && $util.isInteger(message.notAfter.low) && $util.isInteger(message.notAfter.high))) - return "notAfter: integer|Long expected"; - return null; - }; - - /** - * Creates a Details message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.Details - * @static - * @param {Object.} object Plain object - * @returns {proto.Details} Details - */ - Details.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Details) - return object; - var message = new $root.proto.Details(); - if (object.serial != null) - message.serial = object.serial >>> 0; - if (object.issuerSerial != null) - message.issuerSerial = object.issuerSerial >>> 0; - if (object.key != null) - if (typeof object.key === "string") - $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); - else if (object.key.length) - message.key = object.key; - if (object.notBefore != null) - if ($util.Long) - (message.notBefore = $util.Long.fromValue(object.notBefore)).unsigned = true; - else if (typeof object.notBefore === "string") - message.notBefore = parseInt(object.notBefore, 10); - else if (typeof object.notBefore === "number") - message.notBefore = object.notBefore; - else if (typeof object.notBefore === "object") - message.notBefore = new $util.LongBits(object.notBefore.low >>> 0, object.notBefore.high >>> 0).toNumber(true); - if (object.notAfter != null) - if ($util.Long) - (message.notAfter = $util.Long.fromValue(object.notAfter)).unsigned = true; - else if (typeof object.notAfter === "string") - message.notAfter = parseInt(object.notAfter, 10); - else if (typeof object.notAfter === "number") - message.notAfter = object.notAfter; - else if (typeof object.notAfter === "object") - message.notAfter = new $util.LongBits(object.notAfter.low >>> 0, object.notAfter.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a Details message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.Details - * @static - * @param {proto.Details} message Details - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Details.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.serial = 0; - object.issuerSerial = 0; - if (options.bytes === String) - object.key = ""; - else { - object.key = []; - if (options.bytes !== Array) - object.key = $util.newBuffer(object.key); - } - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.notBefore = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.notBefore = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.notAfter = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.notAfter = options.longs === String ? "0" : 0; - } - if (message.serial != null && message.hasOwnProperty("serial")) - object.serial = message.serial; - if (message.issuerSerial != null && message.hasOwnProperty("issuerSerial")) - object.issuerSerial = message.issuerSerial; - if (message.key != null && message.hasOwnProperty("key")) - object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; - if (message.notBefore != null && message.hasOwnProperty("notBefore")) - if (typeof message.notBefore === "number") - object.notBefore = options.longs === String ? String(message.notBefore) : message.notBefore; - else - object.notBefore = options.longs === String ? $util.Long.prototype.toString.call(message.notBefore) : options.longs === Number ? new $util.LongBits(message.notBefore.low >>> 0, message.notBefore.high >>> 0).toNumber(true) : message.notBefore; - if (message.notAfter != null && message.hasOwnProperty("notAfter")) - if (typeof message.notAfter === "number") - object.notAfter = options.longs === String ? String(message.notAfter) : message.notAfter; - else - object.notAfter = options.longs === String ? $util.Long.prototype.toString.call(message.notAfter) : options.longs === Number ? new $util.LongBits(message.notAfter.low >>> 0, message.notAfter.high >>> 0).toNumber(true) : message.notAfter; - return object; - }; - - /** - * Converts this Details to JSON. - * @function toJSON - * @memberof proto.Details - * @instance - * @returns {Object.} JSON object - */ - Details.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Details; - })(); - - proto.DNSSource = (function() { - - /** - * Properties of a DNSSource. - * @memberof proto - * @interface IDNSSource - * @property {proto.DNSSource.DNSSourceDNSResolutionMethod|null} [dnsMethod] DNSSource dnsMethod - * @property {boolean|null} [appCached] DNSSource appCached - */ - - /** - * Constructs a new DNSSource. - * @memberof proto - * @classdesc Represents a DNSSource. - * @implements IDNSSource - * @constructor - * @param {proto.IDNSSource=} [properties] Properties to set - */ - function DNSSource(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DNSSource dnsMethod. - * @member {proto.DNSSource.DNSSourceDNSResolutionMethod} dnsMethod - * @memberof proto.DNSSource - * @instance - */ - DNSSource.prototype.dnsMethod = 0; - - /** - * DNSSource appCached. - * @member {boolean} appCached - * @memberof proto.DNSSource - * @instance - */ - DNSSource.prototype.appCached = false; - - /** - * Creates a new DNSSource instance using the specified properties. - * @function create - * @memberof proto.DNSSource - * @static - * @param {proto.IDNSSource=} [properties] Properties to set - * @returns {proto.DNSSource} DNSSource instance - */ - DNSSource.create = function create(properties) { - return new DNSSource(properties); - }; - - /** - * Encodes the specified DNSSource message. Does not implicitly {@link proto.DNSSource.verify|verify} messages. - * @function encode - * @memberof proto.DNSSource - * @static - * @param {proto.IDNSSource} message DNSSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DNSSource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dnsMethod != null && Object.hasOwnProperty.call(message, "dnsMethod")) - writer.uint32(/* id 15, wireType 0 =*/120).int32(message.dnsMethod); - if (message.appCached != null && Object.hasOwnProperty.call(message, "appCached")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.appCached); - return writer; - }; - - /** - * Encodes the specified DNSSource message, length delimited. Does not implicitly {@link proto.DNSSource.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.DNSSource - * @static - * @param {proto.IDNSSource} message DNSSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DNSSource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DNSSource message from the specified reader or buffer. - * @function decode - * @memberof proto.DNSSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.DNSSource} DNSSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DNSSource.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.DNSSource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 15: - message.dnsMethod = reader.int32(); - break; - case 16: - message.appCached = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DNSSource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.DNSSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.DNSSource} DNSSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DNSSource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DNSSource message. - * @function verify - * @memberof proto.DNSSource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DNSSource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dnsMethod != null && message.hasOwnProperty("dnsMethod")) - switch (message.dnsMethod) { - default: - return "dnsMethod: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.appCached != null && message.hasOwnProperty("appCached")) - if (typeof message.appCached !== "boolean") - return "appCached: boolean expected"; - return null; - }; - - /** - * Creates a DNSSource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.DNSSource - * @static - * @param {Object.} object Plain object - * @returns {proto.DNSSource} DNSSource - */ - DNSSource.fromObject = function fromObject(object) { - if (object instanceof $root.proto.DNSSource) - return object; - var message = new $root.proto.DNSSource(); - switch (object.dnsMethod) { - case "SYSTEM": - case 0: - message.dnsMethod = 0; - break; - case "GOOGLE": - case 1: - message.dnsMethod = 1; - break; - case "HARDCODED": - case 2: - message.dnsMethod = 2; - break; - case "OVERRIDE": - case 3: - message.dnsMethod = 3; - break; - case "FALLBACK": - case 4: - message.dnsMethod = 4; - break; - } - if (object.appCached != null) - message.appCached = Boolean(object.appCached); - return message; - }; - - /** - * Creates a plain object from a DNSSource message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.DNSSource - * @static - * @param {proto.DNSSource} message DNSSource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DNSSource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.dnsMethod = options.enums === String ? "SYSTEM" : 0; - object.appCached = false; - } - if (message.dnsMethod != null && message.hasOwnProperty("dnsMethod")) - object.dnsMethod = options.enums === String ? $root.proto.DNSSource.DNSSourceDNSResolutionMethod[message.dnsMethod] : message.dnsMethod; - if (message.appCached != null && message.hasOwnProperty("appCached")) - object.appCached = message.appCached; - return object; - }; - - /** - * Converts this DNSSource to JSON. - * @function toJSON - * @memberof proto.DNSSource - * @instance - * @returns {Object.} JSON object - */ - DNSSource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * DNSSourceDNSResolutionMethod enum. - * @name proto.DNSSource.DNSSourceDNSResolutionMethod - * @enum {number} - * @property {number} SYSTEM=0 SYSTEM value - * @property {number} GOOGLE=1 GOOGLE value - * @property {number} HARDCODED=2 HARDCODED value - * @property {number} OVERRIDE=3 OVERRIDE value - * @property {number} FALLBACK=4 FALLBACK value - */ - DNSSource.DNSSourceDNSResolutionMethod = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SYSTEM"] = 0; - values[valuesById[1] = "GOOGLE"] = 1; - values[valuesById[2] = "HARDCODED"] = 2; - values[valuesById[3] = "OVERRIDE"] = 3; - values[valuesById[4] = "FALLBACK"] = 4; - return values; - })(); - - return DNSSource; - })(); - - proto.HandshakeMessage = (function() { - - /** - * Properties of a HandshakeMessage. - * @memberof proto - * @interface IHandshakeMessage - * @property {proto.IClientHello|null} [clientHello] HandshakeMessage clientHello - * @property {proto.IServerHello|null} [serverHello] HandshakeMessage serverHello - * @property {proto.IClientFinish|null} [clientFinish] HandshakeMessage clientFinish - */ - - /** - * Constructs a new HandshakeMessage. - * @memberof proto - * @classdesc Represents a HandshakeMessage. - * @implements IHandshakeMessage - * @constructor - * @param {proto.IHandshakeMessage=} [properties] Properties to set - */ - function HandshakeMessage(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HandshakeMessage clientHello. - * @member {proto.IClientHello|null|undefined} clientHello - * @memberof proto.HandshakeMessage - * @instance - */ - HandshakeMessage.prototype.clientHello = null; - - /** - * HandshakeMessage serverHello. - * @member {proto.IServerHello|null|undefined} serverHello - * @memberof proto.HandshakeMessage - * @instance - */ - HandshakeMessage.prototype.serverHello = null; - - /** - * HandshakeMessage clientFinish. - * @member {proto.IClientFinish|null|undefined} clientFinish - * @memberof proto.HandshakeMessage - * @instance - */ - HandshakeMessage.prototype.clientFinish = null; - - /** - * Creates a new HandshakeMessage instance using the specified properties. - * @function create - * @memberof proto.HandshakeMessage - * @static - * @param {proto.IHandshakeMessage=} [properties] Properties to set - * @returns {proto.HandshakeMessage} HandshakeMessage instance - */ - HandshakeMessage.create = function create(properties) { - return new HandshakeMessage(properties); - }; - - /** - * Encodes the specified HandshakeMessage message. Does not implicitly {@link proto.HandshakeMessage.verify|verify} messages. - * @function encode - * @memberof proto.HandshakeMessage - * @static - * @param {proto.IHandshakeMessage} message HandshakeMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HandshakeMessage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.clientHello != null && Object.hasOwnProperty.call(message, "clientHello")) - $root.proto.ClientHello.encode(message.clientHello, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.serverHello != null && Object.hasOwnProperty.call(message, "serverHello")) - $root.proto.ServerHello.encode(message.serverHello, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.clientFinish != null && Object.hasOwnProperty.call(message, "clientFinish")) - $root.proto.ClientFinish.encode(message.clientFinish, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified HandshakeMessage message, length delimited. Does not implicitly {@link proto.HandshakeMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.HandshakeMessage - * @static - * @param {proto.IHandshakeMessage} message HandshakeMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HandshakeMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HandshakeMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.HandshakeMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.HandshakeMessage} HandshakeMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HandshakeMessage.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.HandshakeMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.clientHello = $root.proto.ClientHello.decode(reader, reader.uint32()); - break; - case 3: - message.serverHello = $root.proto.ServerHello.decode(reader, reader.uint32()); - break; - case 4: - message.clientFinish = $root.proto.ClientFinish.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HandshakeMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.HandshakeMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.HandshakeMessage} HandshakeMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HandshakeMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HandshakeMessage message. - * @function verify - * @memberof proto.HandshakeMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HandshakeMessage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.clientHello != null && message.hasOwnProperty("clientHello")) { - var error = $root.proto.ClientHello.verify(message.clientHello); - if (error) - return "clientHello." + error; - } - if (message.serverHello != null && message.hasOwnProperty("serverHello")) { - var error = $root.proto.ServerHello.verify(message.serverHello); - if (error) - return "serverHello." + error; - } - if (message.clientFinish != null && message.hasOwnProperty("clientFinish")) { - var error = $root.proto.ClientFinish.verify(message.clientFinish); - if (error) - return "clientFinish." + error; - } - return null; - }; - - /** - * Creates a HandshakeMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.HandshakeMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.HandshakeMessage} HandshakeMessage - */ - HandshakeMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.HandshakeMessage) - return object; - var message = new $root.proto.HandshakeMessage(); - if (object.clientHello != null) { - if (typeof object.clientHello !== "object") - throw TypeError(".proto.HandshakeMessage.clientHello: object expected"); - message.clientHello = $root.proto.ClientHello.fromObject(object.clientHello); - } - if (object.serverHello != null) { - if (typeof object.serverHello !== "object") - throw TypeError(".proto.HandshakeMessage.serverHello: object expected"); - message.serverHello = $root.proto.ServerHello.fromObject(object.serverHello); - } - if (object.clientFinish != null) { - if (typeof object.clientFinish !== "object") - throw TypeError(".proto.HandshakeMessage.clientFinish: object expected"); - message.clientFinish = $root.proto.ClientFinish.fromObject(object.clientFinish); - } - return message; - }; - - /** - * Creates a plain object from a HandshakeMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.HandshakeMessage - * @static - * @param {proto.HandshakeMessage} message HandshakeMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HandshakeMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.clientHello = null; - object.serverHello = null; - object.clientFinish = null; - } - if (message.clientHello != null && message.hasOwnProperty("clientHello")) - object.clientHello = $root.proto.ClientHello.toObject(message.clientHello, options); - if (message.serverHello != null && message.hasOwnProperty("serverHello")) - object.serverHello = $root.proto.ServerHello.toObject(message.serverHello, options); - if (message.clientFinish != null && message.hasOwnProperty("clientFinish")) - object.clientFinish = $root.proto.ClientFinish.toObject(message.clientFinish, options); - return object; - }; - - /** - * Converts this HandshakeMessage to JSON. - * @function toJSON - * @memberof proto.HandshakeMessage - * @instance - * @returns {Object.} JSON object - */ - HandshakeMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return HandshakeMessage; - })(); - - proto.NoiseCertificate = (function() { - - /** - * Properties of a NoiseCertificate. - * @memberof proto - * @interface INoiseCertificate - * @property {Uint8Array|null} [details] NoiseCertificate details - * @property {Uint8Array|null} [signature] NoiseCertificate signature - */ - - /** - * Constructs a new NoiseCertificate. - * @memberof proto - * @classdesc Represents a NoiseCertificate. - * @implements INoiseCertificate - * @constructor - * @param {proto.INoiseCertificate=} [properties] Properties to set - */ - function NoiseCertificate(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NoiseCertificate details. - * @member {Uint8Array} details - * @memberof proto.NoiseCertificate - * @instance - */ - NoiseCertificate.prototype.details = $util.newBuffer([]); - - /** - * NoiseCertificate signature. - * @member {Uint8Array} signature - * @memberof proto.NoiseCertificate - * @instance - */ - NoiseCertificate.prototype.signature = $util.newBuffer([]); - - /** - * Creates a new NoiseCertificate instance using the specified properties. - * @function create - * @memberof proto.NoiseCertificate - * @static - * @param {proto.INoiseCertificate=} [properties] Properties to set - * @returns {proto.NoiseCertificate} NoiseCertificate instance - */ - NoiseCertificate.create = function create(properties) { - return new NoiseCertificate(properties); - }; - - /** - * Encodes the specified NoiseCertificate message. Does not implicitly {@link proto.NoiseCertificate.verify|verify} messages. - * @function encode - * @memberof proto.NoiseCertificate - * @static - * @param {proto.INoiseCertificate} message NoiseCertificate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NoiseCertificate.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.details != null && Object.hasOwnProperty.call(message, "details")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.details); - if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.signature); - return writer; - }; - - /** - * Encodes the specified NoiseCertificate message, length delimited. Does not implicitly {@link proto.NoiseCertificate.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.NoiseCertificate - * @static - * @param {proto.INoiseCertificate} message NoiseCertificate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NoiseCertificate.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NoiseCertificate message from the specified reader or buffer. - * @function decode - * @memberof proto.NoiseCertificate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.NoiseCertificate} NoiseCertificate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NoiseCertificate.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.NoiseCertificate(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.details = reader.bytes(); - break; - case 2: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NoiseCertificate message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.NoiseCertificate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.NoiseCertificate} NoiseCertificate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NoiseCertificate.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NoiseCertificate message. - * @function verify - * @memberof proto.NoiseCertificate - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NoiseCertificate.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.details != null && message.hasOwnProperty("details")) - if (!(message.details && typeof message.details.length === "number" || $util.isString(message.details))) - return "details: buffer expected"; - if (message.signature != null && message.hasOwnProperty("signature")) - if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) - return "signature: buffer expected"; - return null; - }; - - /** - * Creates a NoiseCertificate message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.NoiseCertificate - * @static - * @param {Object.} object Plain object - * @returns {proto.NoiseCertificate} NoiseCertificate - */ - NoiseCertificate.fromObject = function fromObject(object) { - if (object instanceof $root.proto.NoiseCertificate) - return object; - var message = new $root.proto.NoiseCertificate(); - if (object.details != null) - if (typeof object.details === "string") - $util.base64.decode(object.details, message.details = $util.newBuffer($util.base64.length(object.details)), 0); - else if (object.details.length) - message.details = object.details; - if (object.signature != null) - if (typeof object.signature === "string") - $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); - else if (object.signature.length) - message.signature = object.signature; - return message; - }; - - /** - * Creates a plain object from a NoiseCertificate message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.NoiseCertificate - * @static - * @param {proto.NoiseCertificate} message NoiseCertificate - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NoiseCertificate.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.details = ""; - else { - object.details = []; - if (options.bytes !== Array) - object.details = $util.newBuffer(object.details); - } - if (options.bytes === String) - object.signature = ""; - else { - object.signature = []; - if (options.bytes !== Array) - object.signature = $util.newBuffer(object.signature); - } - } - if (message.details != null && message.hasOwnProperty("details")) - object.details = options.bytes === String ? $util.base64.encode(message.details, 0, message.details.length) : options.bytes === Array ? Array.prototype.slice.call(message.details) : message.details; - if (message.signature != null && message.hasOwnProperty("signature")) - object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; - return object; - }; - - /** - * Converts this NoiseCertificate to JSON. - * @function toJSON - * @memberof proto.NoiseCertificate - * @instance - * @returns {Object.} JSON object - */ - NoiseCertificate.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return NoiseCertificate; - })(); - - proto.ServerHello = (function() { - - /** - * Properties of a ServerHello. - * @memberof proto - * @interface IServerHello - * @property {Uint8Array|null} [ephemeral] ServerHello ephemeral - * @property {Uint8Array|null} ["static"] ServerHello static - * @property {Uint8Array|null} [payload] ServerHello payload - */ - - /** - * Constructs a new ServerHello. - * @memberof proto - * @classdesc Represents a ServerHello. - * @implements IServerHello - * @constructor - * @param {proto.IServerHello=} [properties] Properties to set - */ - function ServerHello(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServerHello ephemeral. - * @member {Uint8Array} ephemeral - * @memberof proto.ServerHello - * @instance - */ - ServerHello.prototype.ephemeral = $util.newBuffer([]); - - /** - * ServerHello static. - * @member {Uint8Array} static - * @memberof proto.ServerHello - * @instance - */ - ServerHello.prototype["static"] = $util.newBuffer([]); - - /** - * ServerHello payload. - * @member {Uint8Array} payload - * @memberof proto.ServerHello - * @instance - */ - ServerHello.prototype.payload = $util.newBuffer([]); - - /** - * Creates a new ServerHello instance using the specified properties. - * @function create - * @memberof proto.ServerHello - * @static - * @param {proto.IServerHello=} [properties] Properties to set - * @returns {proto.ServerHello} ServerHello instance - */ - ServerHello.create = function create(properties) { - return new ServerHello(properties); - }; - - /** - * Encodes the specified ServerHello message. Does not implicitly {@link proto.ServerHello.verify|verify} messages. - * @function encode - * @memberof proto.ServerHello - * @static - * @param {proto.IServerHello} message ServerHello message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServerHello.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ephemeral != null && Object.hasOwnProperty.call(message, "ephemeral")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.ephemeral); - if (message["static"] != null && Object.hasOwnProperty.call(message, "static")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message["static"]); - if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.payload); - return writer; - }; - - /** - * Encodes the specified ServerHello message, length delimited. Does not implicitly {@link proto.ServerHello.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.ServerHello - * @static - * @param {proto.IServerHello} message ServerHello message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServerHello.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServerHello message from the specified reader or buffer. - * @function decode - * @memberof proto.ServerHello - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.ServerHello} ServerHello - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServerHello.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ServerHello(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ephemeral = reader.bytes(); - break; - case 2: - message["static"] = reader.bytes(); - break; - case 3: - message.payload = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServerHello message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.ServerHello - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ServerHello} ServerHello - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServerHello.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServerHello message. - * @function verify - * @memberof proto.ServerHello - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServerHello.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ephemeral != null && message.hasOwnProperty("ephemeral")) - if (!(message.ephemeral && typeof message.ephemeral.length === "number" || $util.isString(message.ephemeral))) - return "ephemeral: buffer expected"; - if (message["static"] != null && message.hasOwnProperty("static")) - if (!(message["static"] && typeof message["static"].length === "number" || $util.isString(message["static"]))) - return "static: buffer expected"; - if (message.payload != null && message.hasOwnProperty("payload")) - if (!(message.payload && typeof message.payload.length === "number" || $util.isString(message.payload))) - return "payload: buffer expected"; - return null; - }; - - /** - * Creates a ServerHello message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.ServerHello - * @static - * @param {Object.} object Plain object - * @returns {proto.ServerHello} ServerHello - */ - ServerHello.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ServerHello) - return object; - var message = new $root.proto.ServerHello(); - if (object.ephemeral != null) - if (typeof object.ephemeral === "string") - $util.base64.decode(object.ephemeral, message.ephemeral = $util.newBuffer($util.base64.length(object.ephemeral)), 0); - else if (object.ephemeral.length) - message.ephemeral = object.ephemeral; - if (object["static"] != null) - if (typeof object["static"] === "string") - $util.base64.decode(object["static"], message["static"] = $util.newBuffer($util.base64.length(object["static"])), 0); - else if (object["static"].length) - message["static"] = object["static"]; - if (object.payload != null) - if (typeof object.payload === "string") - $util.base64.decode(object.payload, message.payload = $util.newBuffer($util.base64.length(object.payload)), 0); - else if (object.payload.length) - message.payload = object.payload; - return message; - }; - - /** - * Creates a plain object from a ServerHello message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.ServerHello - * @static - * @param {proto.ServerHello} message ServerHello - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServerHello.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.ephemeral = ""; - else { - object.ephemeral = []; - if (options.bytes !== Array) - object.ephemeral = $util.newBuffer(object.ephemeral); - } - if (options.bytes === String) - object["static"] = ""; - else { - object["static"] = []; - if (options.bytes !== Array) - object["static"] = $util.newBuffer(object["static"]); - } - if (options.bytes === String) - object.payload = ""; - else { - object.payload = []; - if (options.bytes !== Array) - object.payload = $util.newBuffer(object.payload); - } - } - if (message.ephemeral != null && message.hasOwnProperty("ephemeral")) - object.ephemeral = options.bytes === String ? $util.base64.encode(message.ephemeral, 0, message.ephemeral.length) : options.bytes === Array ? Array.prototype.slice.call(message.ephemeral) : message.ephemeral; - if (message["static"] != null && message.hasOwnProperty("static")) - object["static"] = options.bytes === String ? $util.base64.encode(message["static"], 0, message["static"].length) : options.bytes === Array ? Array.prototype.slice.call(message["static"]) : message["static"]; - if (message.payload != null && message.hasOwnProperty("payload")) - object.payload = options.bytes === String ? $util.base64.encode(message.payload, 0, message.payload.length) : options.bytes === Array ? Array.prototype.slice.call(message.payload) : message.payload; - return object; - }; - - /** - * Converts this ServerHello to JSON. - * @function toJSON - * @memberof proto.ServerHello - * @instance - * @returns {Object.} JSON object - */ - ServerHello.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ServerHello; - })(); - proto.UserAgent = (function() { /** @@ -55902,3255 +62105,6 @@ $root.proto = (function() { return UserAgent; })(); - proto.WebdPayload = (function() { - - /** - * Properties of a WebdPayload. - * @memberof proto - * @interface IWebdPayload - * @property {boolean|null} [usesParticipantInKey] WebdPayload usesParticipantInKey - * @property {boolean|null} [supportsStarredMessages] WebdPayload supportsStarredMessages - * @property {boolean|null} [supportsDocumentMessages] WebdPayload supportsDocumentMessages - * @property {boolean|null} [supportsUrlMessages] WebdPayload supportsUrlMessages - * @property {boolean|null} [supportsMediaRetry] WebdPayload supportsMediaRetry - * @property {boolean|null} [supportsE2EImage] WebdPayload supportsE2EImage - * @property {boolean|null} [supportsE2EVideo] WebdPayload supportsE2EVideo - * @property {boolean|null} [supportsE2EAudio] WebdPayload supportsE2EAudio - * @property {boolean|null} [supportsE2EDocument] WebdPayload supportsE2EDocument - * @property {string|null} [documentTypes] WebdPayload documentTypes - * @property {Uint8Array|null} [features] WebdPayload features - */ - - /** - * Constructs a new WebdPayload. - * @memberof proto - * @classdesc Represents a WebdPayload. - * @implements IWebdPayload - * @constructor - * @param {proto.IWebdPayload=} [properties] Properties to set - */ - function WebdPayload(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WebdPayload usesParticipantInKey. - * @member {boolean} usesParticipantInKey - * @memberof proto.WebdPayload - * @instance - */ - WebdPayload.prototype.usesParticipantInKey = false; - - /** - * WebdPayload supportsStarredMessages. - * @member {boolean} supportsStarredMessages - * @memberof proto.WebdPayload - * @instance - */ - WebdPayload.prototype.supportsStarredMessages = false; - - /** - * WebdPayload supportsDocumentMessages. - * @member {boolean} supportsDocumentMessages - * @memberof proto.WebdPayload - * @instance - */ - WebdPayload.prototype.supportsDocumentMessages = false; - - /** - * WebdPayload supportsUrlMessages. - * @member {boolean} supportsUrlMessages - * @memberof proto.WebdPayload - * @instance - */ - WebdPayload.prototype.supportsUrlMessages = false; - - /** - * WebdPayload supportsMediaRetry. - * @member {boolean} supportsMediaRetry - * @memberof proto.WebdPayload - * @instance - */ - WebdPayload.prototype.supportsMediaRetry = false; - - /** - * WebdPayload supportsE2EImage. - * @member {boolean} supportsE2EImage - * @memberof proto.WebdPayload - * @instance - */ - WebdPayload.prototype.supportsE2EImage = false; - - /** - * WebdPayload supportsE2EVideo. - * @member {boolean} supportsE2EVideo - * @memberof proto.WebdPayload - * @instance - */ - WebdPayload.prototype.supportsE2EVideo = false; - - /** - * WebdPayload supportsE2EAudio. - * @member {boolean} supportsE2EAudio - * @memberof proto.WebdPayload - * @instance - */ - WebdPayload.prototype.supportsE2EAudio = false; - - /** - * WebdPayload supportsE2EDocument. - * @member {boolean} supportsE2EDocument - * @memberof proto.WebdPayload - * @instance - */ - WebdPayload.prototype.supportsE2EDocument = false; - - /** - * WebdPayload documentTypes. - * @member {string} documentTypes - * @memberof proto.WebdPayload - * @instance - */ - WebdPayload.prototype.documentTypes = ""; - - /** - * WebdPayload features. - * @member {Uint8Array} features - * @memberof proto.WebdPayload - * @instance - */ - WebdPayload.prototype.features = $util.newBuffer([]); - - /** - * Creates a new WebdPayload instance using the specified properties. - * @function create - * @memberof proto.WebdPayload - * @static - * @param {proto.IWebdPayload=} [properties] Properties to set - * @returns {proto.WebdPayload} WebdPayload instance - */ - WebdPayload.create = function create(properties) { - return new WebdPayload(properties); - }; - - /** - * Encodes the specified WebdPayload message. Does not implicitly {@link proto.WebdPayload.verify|verify} messages. - * @function encode - * @memberof proto.WebdPayload - * @static - * @param {proto.IWebdPayload} message WebdPayload message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WebdPayload.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.usesParticipantInKey != null && Object.hasOwnProperty.call(message, "usesParticipantInKey")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.usesParticipantInKey); - if (message.supportsStarredMessages != null && Object.hasOwnProperty.call(message, "supportsStarredMessages")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.supportsStarredMessages); - if (message.supportsDocumentMessages != null && Object.hasOwnProperty.call(message, "supportsDocumentMessages")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.supportsDocumentMessages); - if (message.supportsUrlMessages != null && Object.hasOwnProperty.call(message, "supportsUrlMessages")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.supportsUrlMessages); - if (message.supportsMediaRetry != null && Object.hasOwnProperty.call(message, "supportsMediaRetry")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.supportsMediaRetry); - if (message.supportsE2EImage != null && Object.hasOwnProperty.call(message, "supportsE2EImage")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.supportsE2EImage); - if (message.supportsE2EVideo != null && Object.hasOwnProperty.call(message, "supportsE2EVideo")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.supportsE2EVideo); - if (message.supportsE2EAudio != null && Object.hasOwnProperty.call(message, "supportsE2EAudio")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.supportsE2EAudio); - if (message.supportsE2EDocument != null && Object.hasOwnProperty.call(message, "supportsE2EDocument")) - writer.uint32(/* id 9, wireType 0 =*/72).bool(message.supportsE2EDocument); - if (message.documentTypes != null && Object.hasOwnProperty.call(message, "documentTypes")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.documentTypes); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - writer.uint32(/* id 11, wireType 2 =*/90).bytes(message.features); - return writer; - }; - - /** - * Encodes the specified WebdPayload message, length delimited. Does not implicitly {@link proto.WebdPayload.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.WebdPayload - * @static - * @param {proto.IWebdPayload} message WebdPayload message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WebdPayload.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WebdPayload message from the specified reader or buffer. - * @function decode - * @memberof proto.WebdPayload - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.WebdPayload} WebdPayload - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WebdPayload.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.WebdPayload(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.usesParticipantInKey = reader.bool(); - break; - case 2: - message.supportsStarredMessages = reader.bool(); - break; - case 3: - message.supportsDocumentMessages = reader.bool(); - break; - case 4: - message.supportsUrlMessages = reader.bool(); - break; - case 5: - message.supportsMediaRetry = reader.bool(); - break; - case 6: - message.supportsE2EImage = reader.bool(); - break; - case 7: - message.supportsE2EVideo = reader.bool(); - break; - case 8: - message.supportsE2EAudio = reader.bool(); - break; - case 9: - message.supportsE2EDocument = reader.bool(); - break; - case 10: - message.documentTypes = reader.string(); - break; - case 11: - message.features = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WebdPayload message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.WebdPayload - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.WebdPayload} WebdPayload - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WebdPayload.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WebdPayload message. - * @function verify - * @memberof proto.WebdPayload - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WebdPayload.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.usesParticipantInKey != null && message.hasOwnProperty("usesParticipantInKey")) - if (typeof message.usesParticipantInKey !== "boolean") - return "usesParticipantInKey: boolean expected"; - if (message.supportsStarredMessages != null && message.hasOwnProperty("supportsStarredMessages")) - if (typeof message.supportsStarredMessages !== "boolean") - return "supportsStarredMessages: boolean expected"; - if (message.supportsDocumentMessages != null && message.hasOwnProperty("supportsDocumentMessages")) - if (typeof message.supportsDocumentMessages !== "boolean") - return "supportsDocumentMessages: boolean expected"; - if (message.supportsUrlMessages != null && message.hasOwnProperty("supportsUrlMessages")) - if (typeof message.supportsUrlMessages !== "boolean") - return "supportsUrlMessages: boolean expected"; - if (message.supportsMediaRetry != null && message.hasOwnProperty("supportsMediaRetry")) - if (typeof message.supportsMediaRetry !== "boolean") - return "supportsMediaRetry: boolean expected"; - if (message.supportsE2EImage != null && message.hasOwnProperty("supportsE2EImage")) - if (typeof message.supportsE2EImage !== "boolean") - return "supportsE2EImage: boolean expected"; - if (message.supportsE2EVideo != null && message.hasOwnProperty("supportsE2EVideo")) - if (typeof message.supportsE2EVideo !== "boolean") - return "supportsE2EVideo: boolean expected"; - if (message.supportsE2EAudio != null && message.hasOwnProperty("supportsE2EAudio")) - if (typeof message.supportsE2EAudio !== "boolean") - return "supportsE2EAudio: boolean expected"; - if (message.supportsE2EDocument != null && message.hasOwnProperty("supportsE2EDocument")) - if (typeof message.supportsE2EDocument !== "boolean") - return "supportsE2EDocument: boolean expected"; - if (message.documentTypes != null && message.hasOwnProperty("documentTypes")) - if (!$util.isString(message.documentTypes)) - return "documentTypes: string expected"; - if (message.features != null && message.hasOwnProperty("features")) - if (!(message.features && typeof message.features.length === "number" || $util.isString(message.features))) - return "features: buffer expected"; - return null; - }; - - /** - * Creates a WebdPayload message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.WebdPayload - * @static - * @param {Object.} object Plain object - * @returns {proto.WebdPayload} WebdPayload - */ - WebdPayload.fromObject = function fromObject(object) { - if (object instanceof $root.proto.WebdPayload) - return object; - var message = new $root.proto.WebdPayload(); - if (object.usesParticipantInKey != null) - message.usesParticipantInKey = Boolean(object.usesParticipantInKey); - if (object.supportsStarredMessages != null) - message.supportsStarredMessages = Boolean(object.supportsStarredMessages); - if (object.supportsDocumentMessages != null) - message.supportsDocumentMessages = Boolean(object.supportsDocumentMessages); - if (object.supportsUrlMessages != null) - message.supportsUrlMessages = Boolean(object.supportsUrlMessages); - if (object.supportsMediaRetry != null) - message.supportsMediaRetry = Boolean(object.supportsMediaRetry); - if (object.supportsE2EImage != null) - message.supportsE2EImage = Boolean(object.supportsE2EImage); - if (object.supportsE2EVideo != null) - message.supportsE2EVideo = Boolean(object.supportsE2EVideo); - if (object.supportsE2EAudio != null) - message.supportsE2EAudio = Boolean(object.supportsE2EAudio); - if (object.supportsE2EDocument != null) - message.supportsE2EDocument = Boolean(object.supportsE2EDocument); - if (object.documentTypes != null) - message.documentTypes = String(object.documentTypes); - if (object.features != null) - if (typeof object.features === "string") - $util.base64.decode(object.features, message.features = $util.newBuffer($util.base64.length(object.features)), 0); - else if (object.features.length) - message.features = object.features; - return message; - }; - - /** - * Creates a plain object from a WebdPayload message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.WebdPayload - * @static - * @param {proto.WebdPayload} message WebdPayload - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WebdPayload.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.usesParticipantInKey = false; - object.supportsStarredMessages = false; - object.supportsDocumentMessages = false; - object.supportsUrlMessages = false; - object.supportsMediaRetry = false; - object.supportsE2EImage = false; - object.supportsE2EVideo = false; - object.supportsE2EAudio = false; - object.supportsE2EDocument = false; - object.documentTypes = ""; - if (options.bytes === String) - object.features = ""; - else { - object.features = []; - if (options.bytes !== Array) - object.features = $util.newBuffer(object.features); - } - } - if (message.usesParticipantInKey != null && message.hasOwnProperty("usesParticipantInKey")) - object.usesParticipantInKey = message.usesParticipantInKey; - if (message.supportsStarredMessages != null && message.hasOwnProperty("supportsStarredMessages")) - object.supportsStarredMessages = message.supportsStarredMessages; - if (message.supportsDocumentMessages != null && message.hasOwnProperty("supportsDocumentMessages")) - object.supportsDocumentMessages = message.supportsDocumentMessages; - if (message.supportsUrlMessages != null && message.hasOwnProperty("supportsUrlMessages")) - object.supportsUrlMessages = message.supportsUrlMessages; - if (message.supportsMediaRetry != null && message.hasOwnProperty("supportsMediaRetry")) - object.supportsMediaRetry = message.supportsMediaRetry; - if (message.supportsE2EImage != null && message.hasOwnProperty("supportsE2EImage")) - object.supportsE2EImage = message.supportsE2EImage; - if (message.supportsE2EVideo != null && message.hasOwnProperty("supportsE2EVideo")) - object.supportsE2EVideo = message.supportsE2EVideo; - if (message.supportsE2EAudio != null && message.hasOwnProperty("supportsE2EAudio")) - object.supportsE2EAudio = message.supportsE2EAudio; - if (message.supportsE2EDocument != null && message.hasOwnProperty("supportsE2EDocument")) - object.supportsE2EDocument = message.supportsE2EDocument; - if (message.documentTypes != null && message.hasOwnProperty("documentTypes")) - object.documentTypes = message.documentTypes; - if (message.features != null && message.hasOwnProperty("features")) - object.features = options.bytes === String ? $util.base64.encode(message.features, 0, message.features.length) : options.bytes === Array ? Array.prototype.slice.call(message.features) : message.features; - return object; - }; - - /** - * Converts this WebdPayload to JSON. - * @function toJSON - * @memberof proto.WebdPayload - * @instance - * @returns {Object.} JSON object - */ - WebdPayload.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return WebdPayload; - })(); - - proto.WebInfo = (function() { - - /** - * Properties of a WebInfo. - * @memberof proto - * @interface IWebInfo - * @property {string|null} [refToken] WebInfo refToken - * @property {string|null} [version] WebInfo version - * @property {proto.IWebdPayload|null} [webdPayload] WebInfo webdPayload - * @property {proto.WebInfo.WebInfoWebSubPlatform|null} [webSubPlatform] WebInfo webSubPlatform - */ - - /** - * Constructs a new WebInfo. - * @memberof proto - * @classdesc Represents a WebInfo. - * @implements IWebInfo - * @constructor - * @param {proto.IWebInfo=} [properties] Properties to set - */ - function WebInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WebInfo refToken. - * @member {string} refToken - * @memberof proto.WebInfo - * @instance - */ - WebInfo.prototype.refToken = ""; - - /** - * WebInfo version. - * @member {string} version - * @memberof proto.WebInfo - * @instance - */ - WebInfo.prototype.version = ""; - - /** - * WebInfo webdPayload. - * @member {proto.IWebdPayload|null|undefined} webdPayload - * @memberof proto.WebInfo - * @instance - */ - WebInfo.prototype.webdPayload = null; - - /** - * WebInfo webSubPlatform. - * @member {proto.WebInfo.WebInfoWebSubPlatform} webSubPlatform - * @memberof proto.WebInfo - * @instance - */ - WebInfo.prototype.webSubPlatform = 0; - - /** - * Creates a new WebInfo instance using the specified properties. - * @function create - * @memberof proto.WebInfo - * @static - * @param {proto.IWebInfo=} [properties] Properties to set - * @returns {proto.WebInfo} WebInfo instance - */ - WebInfo.create = function create(properties) { - return new WebInfo(properties); - }; - - /** - * Encodes the specified WebInfo message. Does not implicitly {@link proto.WebInfo.verify|verify} messages. - * @function encode - * @memberof proto.WebInfo - * @static - * @param {proto.IWebInfo} message WebInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WebInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.refToken != null && Object.hasOwnProperty.call(message, "refToken")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.refToken); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); - if (message.webdPayload != null && Object.hasOwnProperty.call(message, "webdPayload")) - $root.proto.WebdPayload.encode(message.webdPayload, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.webSubPlatform != null && Object.hasOwnProperty.call(message, "webSubPlatform")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.webSubPlatform); - return writer; - }; - - /** - * Encodes the specified WebInfo message, length delimited. Does not implicitly {@link proto.WebInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.WebInfo - * @static - * @param {proto.IWebInfo} message WebInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WebInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WebInfo message from the specified reader or buffer. - * @function decode - * @memberof proto.WebInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.WebInfo} WebInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WebInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.WebInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.refToken = reader.string(); - break; - case 2: - message.version = reader.string(); - break; - case 3: - message.webdPayload = $root.proto.WebdPayload.decode(reader, reader.uint32()); - break; - case 4: - message.webSubPlatform = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WebInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.WebInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.WebInfo} WebInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WebInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WebInfo message. - * @function verify - * @memberof proto.WebInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WebInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.refToken != null && message.hasOwnProperty("refToken")) - if (!$util.isString(message.refToken)) - return "refToken: string expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.webdPayload != null && message.hasOwnProperty("webdPayload")) { - var error = $root.proto.WebdPayload.verify(message.webdPayload); - if (error) - return "webdPayload." + error; - } - if (message.webSubPlatform != null && message.hasOwnProperty("webSubPlatform")) - switch (message.webSubPlatform) { - default: - return "webSubPlatform: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - return null; - }; - - /** - * Creates a WebInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.WebInfo - * @static - * @param {Object.} object Plain object - * @returns {proto.WebInfo} WebInfo - */ - WebInfo.fromObject = function fromObject(object) { - if (object instanceof $root.proto.WebInfo) - return object; - var message = new $root.proto.WebInfo(); - if (object.refToken != null) - message.refToken = String(object.refToken); - if (object.version != null) - message.version = String(object.version); - if (object.webdPayload != null) { - if (typeof object.webdPayload !== "object") - throw TypeError(".proto.WebInfo.webdPayload: object expected"); - message.webdPayload = $root.proto.WebdPayload.fromObject(object.webdPayload); - } - switch (object.webSubPlatform) { - case "WEB_BROWSER": - case 0: - message.webSubPlatform = 0; - break; - case "APP_STORE": - case 1: - message.webSubPlatform = 1; - break; - case "WIN_STORE": - case 2: - message.webSubPlatform = 2; - break; - case "DARWIN": - case 3: - message.webSubPlatform = 3; - break; - case "WIN32": - case 4: - message.webSubPlatform = 4; - break; - } - return message; - }; - - /** - * Creates a plain object from a WebInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.WebInfo - * @static - * @param {proto.WebInfo} message WebInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WebInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.refToken = ""; - object.version = ""; - object.webdPayload = null; - object.webSubPlatform = options.enums === String ? "WEB_BROWSER" : 0; - } - if (message.refToken != null && message.hasOwnProperty("refToken")) - object.refToken = message.refToken; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.webdPayload != null && message.hasOwnProperty("webdPayload")) - object.webdPayload = $root.proto.WebdPayload.toObject(message.webdPayload, options); - if (message.webSubPlatform != null && message.hasOwnProperty("webSubPlatform")) - object.webSubPlatform = options.enums === String ? $root.proto.WebInfo.WebInfoWebSubPlatform[message.webSubPlatform] : message.webSubPlatform; - return object; - }; - - /** - * Converts this WebInfo to JSON. - * @function toJSON - * @memberof proto.WebInfo - * @instance - * @returns {Object.} JSON object - */ - WebInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * WebInfoWebSubPlatform enum. - * @name proto.WebInfo.WebInfoWebSubPlatform - * @enum {number} - * @property {number} WEB_BROWSER=0 WEB_BROWSER value - * @property {number} APP_STORE=1 APP_STORE value - * @property {number} WIN_STORE=2 WIN_STORE value - * @property {number} DARWIN=3 DARWIN value - * @property {number} WIN32=4 WIN32 value - */ - WebInfo.WebInfoWebSubPlatform = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "WEB_BROWSER"] = 0; - values[valuesById[1] = "APP_STORE"] = 1; - values[valuesById[2] = "WIN_STORE"] = 2; - values[valuesById[3] = "DARWIN"] = 3; - values[valuesById[4] = "WIN32"] = 4; - return values; - })(); - - return WebInfo; - })(); - - proto.MediaData = (function() { - - /** - * Properties of a MediaData. - * @memberof proto - * @interface IMediaData - * @property {string|null} [localPath] MediaData localPath - */ - - /** - * Constructs a new MediaData. - * @memberof proto - * @classdesc Represents a MediaData. - * @implements IMediaData - * @constructor - * @param {proto.IMediaData=} [properties] Properties to set - */ - function MediaData(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MediaData localPath. - * @member {string} localPath - * @memberof proto.MediaData - * @instance - */ - MediaData.prototype.localPath = ""; - - /** - * Creates a new MediaData instance using the specified properties. - * @function create - * @memberof proto.MediaData - * @static - * @param {proto.IMediaData=} [properties] Properties to set - * @returns {proto.MediaData} MediaData instance - */ - MediaData.create = function create(properties) { - return new MediaData(properties); - }; - - /** - * Encodes the specified MediaData message. Does not implicitly {@link proto.MediaData.verify|verify} messages. - * @function encode - * @memberof proto.MediaData - * @static - * @param {proto.IMediaData} message MediaData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MediaData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.localPath != null && Object.hasOwnProperty.call(message, "localPath")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.localPath); - return writer; - }; - - /** - * Encodes the specified MediaData message, length delimited. Does not implicitly {@link proto.MediaData.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.MediaData - * @static - * @param {proto.IMediaData} message MediaData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MediaData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MediaData message from the specified reader or buffer. - * @function decode - * @memberof proto.MediaData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.MediaData} MediaData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MediaData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.MediaData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.localPath = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MediaData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.MediaData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.MediaData} MediaData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MediaData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MediaData message. - * @function verify - * @memberof proto.MediaData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MediaData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.localPath != null && message.hasOwnProperty("localPath")) - if (!$util.isString(message.localPath)) - return "localPath: string expected"; - return null; - }; - - /** - * Creates a MediaData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.MediaData - * @static - * @param {Object.} object Plain object - * @returns {proto.MediaData} MediaData - */ - MediaData.fromObject = function fromObject(object) { - if (object instanceof $root.proto.MediaData) - return object; - var message = new $root.proto.MediaData(); - if (object.localPath != null) - message.localPath = String(object.localPath); - return message; - }; - - /** - * Creates a plain object from a MediaData message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.MediaData - * @static - * @param {proto.MediaData} message MediaData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MediaData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.localPath = ""; - if (message.localPath != null && message.hasOwnProperty("localPath")) - object.localPath = message.localPath; - return object; - }; - - /** - * Converts this MediaData to JSON. - * @function toJSON - * @memberof proto.MediaData - * @instance - * @returns {Object.} JSON object - */ - MediaData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MediaData; - })(); - - proto.NotificationMessageInfo = (function() { - - /** - * Properties of a NotificationMessageInfo. - * @memberof proto - * @interface INotificationMessageInfo - * @property {proto.IMessageKey|null} [key] NotificationMessageInfo key - * @property {proto.IMessage|null} [message] NotificationMessageInfo message - * @property {number|Long|null} [messageTimestamp] NotificationMessageInfo messageTimestamp - * @property {string|null} [participant] NotificationMessageInfo participant - */ - - /** - * Constructs a new NotificationMessageInfo. - * @memberof proto - * @classdesc Represents a NotificationMessageInfo. - * @implements INotificationMessageInfo - * @constructor - * @param {proto.INotificationMessageInfo=} [properties] Properties to set - */ - function NotificationMessageInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NotificationMessageInfo key. - * @member {proto.IMessageKey|null|undefined} key - * @memberof proto.NotificationMessageInfo - * @instance - */ - NotificationMessageInfo.prototype.key = null; - - /** - * NotificationMessageInfo message. - * @member {proto.IMessage|null|undefined} message - * @memberof proto.NotificationMessageInfo - * @instance - */ - NotificationMessageInfo.prototype.message = null; - - /** - * NotificationMessageInfo messageTimestamp. - * @member {number|Long} messageTimestamp - * @memberof proto.NotificationMessageInfo - * @instance - */ - NotificationMessageInfo.prototype.messageTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * NotificationMessageInfo participant. - * @member {string} participant - * @memberof proto.NotificationMessageInfo - * @instance - */ - NotificationMessageInfo.prototype.participant = ""; - - /** - * Creates a new NotificationMessageInfo instance using the specified properties. - * @function create - * @memberof proto.NotificationMessageInfo - * @static - * @param {proto.INotificationMessageInfo=} [properties] Properties to set - * @returns {proto.NotificationMessageInfo} NotificationMessageInfo instance - */ - NotificationMessageInfo.create = function create(properties) { - return new NotificationMessageInfo(properties); - }; - - /** - * Encodes the specified NotificationMessageInfo message. Does not implicitly {@link proto.NotificationMessageInfo.verify|verify} messages. - * @function encode - * @memberof proto.NotificationMessageInfo - * @static - * @param {proto.INotificationMessageInfo} message NotificationMessageInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NotificationMessageInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - $root.proto.MessageKey.encode(message.key, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - $root.proto.Message.encode(message.message, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.messageTimestamp != null && Object.hasOwnProperty.call(message, "messageTimestamp")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.messageTimestamp); - if (message.participant != null && Object.hasOwnProperty.call(message, "participant")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.participant); - return writer; - }; - - /** - * Encodes the specified NotificationMessageInfo message, length delimited. Does not implicitly {@link proto.NotificationMessageInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.NotificationMessageInfo - * @static - * @param {proto.INotificationMessageInfo} message NotificationMessageInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NotificationMessageInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NotificationMessageInfo message from the specified reader or buffer. - * @function decode - * @memberof proto.NotificationMessageInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.NotificationMessageInfo} NotificationMessageInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NotificationMessageInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.NotificationMessageInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = $root.proto.MessageKey.decode(reader, reader.uint32()); - break; - case 2: - message.message = $root.proto.Message.decode(reader, reader.uint32()); - break; - case 3: - message.messageTimestamp = reader.uint64(); - break; - case 4: - message.participant = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NotificationMessageInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.NotificationMessageInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.NotificationMessageInfo} NotificationMessageInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NotificationMessageInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NotificationMessageInfo message. - * @function verify - * @memberof proto.NotificationMessageInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NotificationMessageInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.key != null && message.hasOwnProperty("key")) { - var error = $root.proto.MessageKey.verify(message.key); - if (error) - return "key." + error; - } - if (message.message != null && message.hasOwnProperty("message")) { - var error = $root.proto.Message.verify(message.message); - if (error) - return "message." + error; - } - if (message.messageTimestamp != null && message.hasOwnProperty("messageTimestamp")) - if (!$util.isInteger(message.messageTimestamp) && !(message.messageTimestamp && $util.isInteger(message.messageTimestamp.low) && $util.isInteger(message.messageTimestamp.high))) - return "messageTimestamp: integer|Long expected"; - if (message.participant != null && message.hasOwnProperty("participant")) - if (!$util.isString(message.participant)) - return "participant: string expected"; - return null; - }; - - /** - * Creates a NotificationMessageInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.NotificationMessageInfo - * @static - * @param {Object.} object Plain object - * @returns {proto.NotificationMessageInfo} NotificationMessageInfo - */ - NotificationMessageInfo.fromObject = function fromObject(object) { - if (object instanceof $root.proto.NotificationMessageInfo) - return object; - var message = new $root.proto.NotificationMessageInfo(); - if (object.key != null) { - if (typeof object.key !== "object") - throw TypeError(".proto.NotificationMessageInfo.key: object expected"); - message.key = $root.proto.MessageKey.fromObject(object.key); - } - if (object.message != null) { - if (typeof object.message !== "object") - throw TypeError(".proto.NotificationMessageInfo.message: object expected"); - message.message = $root.proto.Message.fromObject(object.message); - } - if (object.messageTimestamp != null) - if ($util.Long) - (message.messageTimestamp = $util.Long.fromValue(object.messageTimestamp)).unsigned = true; - else if (typeof object.messageTimestamp === "string") - message.messageTimestamp = parseInt(object.messageTimestamp, 10); - else if (typeof object.messageTimestamp === "number") - message.messageTimestamp = object.messageTimestamp; - else if (typeof object.messageTimestamp === "object") - message.messageTimestamp = new $util.LongBits(object.messageTimestamp.low >>> 0, object.messageTimestamp.high >>> 0).toNumber(true); - if (object.participant != null) - message.participant = String(object.participant); - return message; - }; - - /** - * Creates a plain object from a NotificationMessageInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.NotificationMessageInfo - * @static - * @param {proto.NotificationMessageInfo} message NotificationMessageInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NotificationMessageInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.key = null; - object.message = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.messageTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.messageTimestamp = options.longs === String ? "0" : 0; - object.participant = ""; - } - if (message.key != null && message.hasOwnProperty("key")) - object.key = $root.proto.MessageKey.toObject(message.key, options); - if (message.message != null && message.hasOwnProperty("message")) - object.message = $root.proto.Message.toObject(message.message, options); - if (message.messageTimestamp != null && message.hasOwnProperty("messageTimestamp")) - if (typeof message.messageTimestamp === "number") - object.messageTimestamp = options.longs === String ? String(message.messageTimestamp) : message.messageTimestamp; - else - object.messageTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.messageTimestamp) : options.longs === Number ? new $util.LongBits(message.messageTimestamp.low >>> 0, message.messageTimestamp.high >>> 0).toNumber(true) : message.messageTimestamp; - if (message.participant != null && message.hasOwnProperty("participant")) - object.participant = message.participant; - return object; - }; - - /** - * Converts this NotificationMessageInfo to JSON. - * @function toJSON - * @memberof proto.NotificationMessageInfo - * @instance - * @returns {Object.} JSON object - */ - NotificationMessageInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return NotificationMessageInfo; - })(); - - proto.PaymentInfo = (function() { - - /** - * Properties of a PaymentInfo. - * @memberof proto - * @interface IPaymentInfo - * @property {proto.PaymentInfo.PaymentInfoCurrency|null} [currencyDeprecated] PaymentInfo currencyDeprecated - * @property {number|Long|null} [amount1000] PaymentInfo amount1000 - * @property {string|null} [receiverJid] PaymentInfo receiverJid - * @property {proto.PaymentInfo.PaymentInfoStatus|null} [status] PaymentInfo status - * @property {number|Long|null} [transactionTimestamp] PaymentInfo transactionTimestamp - * @property {proto.IMessageKey|null} [requestMessageKey] PaymentInfo requestMessageKey - * @property {number|Long|null} [expiryTimestamp] PaymentInfo expiryTimestamp - * @property {boolean|null} [futureproofed] PaymentInfo futureproofed - * @property {string|null} [currency] PaymentInfo currency - * @property {proto.PaymentInfo.PaymentInfoTxnStatus|null} [txnStatus] PaymentInfo txnStatus - * @property {boolean|null} [useNoviFiatFormat] PaymentInfo useNoviFiatFormat - * @property {proto.IMoney|null} [primaryAmount] PaymentInfo primaryAmount - * @property {proto.IMoney|null} [exchangeAmount] PaymentInfo exchangeAmount - */ - - /** - * Constructs a new PaymentInfo. - * @memberof proto - * @classdesc Represents a PaymentInfo. - * @implements IPaymentInfo - * @constructor - * @param {proto.IPaymentInfo=} [properties] Properties to set - */ - function PaymentInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PaymentInfo currencyDeprecated. - * @member {proto.PaymentInfo.PaymentInfoCurrency} currencyDeprecated - * @memberof proto.PaymentInfo - * @instance - */ - PaymentInfo.prototype.currencyDeprecated = 0; - - /** - * PaymentInfo amount1000. - * @member {number|Long} amount1000 - * @memberof proto.PaymentInfo - * @instance - */ - PaymentInfo.prototype.amount1000 = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * PaymentInfo receiverJid. - * @member {string} receiverJid - * @memberof proto.PaymentInfo - * @instance - */ - PaymentInfo.prototype.receiverJid = ""; - - /** - * PaymentInfo status. - * @member {proto.PaymentInfo.PaymentInfoStatus} status - * @memberof proto.PaymentInfo - * @instance - */ - PaymentInfo.prototype.status = 0; - - /** - * PaymentInfo transactionTimestamp. - * @member {number|Long} transactionTimestamp - * @memberof proto.PaymentInfo - * @instance - */ - PaymentInfo.prototype.transactionTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * PaymentInfo requestMessageKey. - * @member {proto.IMessageKey|null|undefined} requestMessageKey - * @memberof proto.PaymentInfo - * @instance - */ - PaymentInfo.prototype.requestMessageKey = null; - - /** - * PaymentInfo expiryTimestamp. - * @member {number|Long} expiryTimestamp - * @memberof proto.PaymentInfo - * @instance - */ - PaymentInfo.prototype.expiryTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * PaymentInfo futureproofed. - * @member {boolean} futureproofed - * @memberof proto.PaymentInfo - * @instance - */ - PaymentInfo.prototype.futureproofed = false; - - /** - * PaymentInfo currency. - * @member {string} currency - * @memberof proto.PaymentInfo - * @instance - */ - PaymentInfo.prototype.currency = ""; - - /** - * PaymentInfo txnStatus. - * @member {proto.PaymentInfo.PaymentInfoTxnStatus} txnStatus - * @memberof proto.PaymentInfo - * @instance - */ - PaymentInfo.prototype.txnStatus = 0; - - /** - * PaymentInfo useNoviFiatFormat. - * @member {boolean} useNoviFiatFormat - * @memberof proto.PaymentInfo - * @instance - */ - PaymentInfo.prototype.useNoviFiatFormat = false; - - /** - * PaymentInfo primaryAmount. - * @member {proto.IMoney|null|undefined} primaryAmount - * @memberof proto.PaymentInfo - * @instance - */ - PaymentInfo.prototype.primaryAmount = null; - - /** - * PaymentInfo exchangeAmount. - * @member {proto.IMoney|null|undefined} exchangeAmount - * @memberof proto.PaymentInfo - * @instance - */ - PaymentInfo.prototype.exchangeAmount = null; - - /** - * Creates a new PaymentInfo instance using the specified properties. - * @function create - * @memberof proto.PaymentInfo - * @static - * @param {proto.IPaymentInfo=} [properties] Properties to set - * @returns {proto.PaymentInfo} PaymentInfo instance - */ - PaymentInfo.create = function create(properties) { - return new PaymentInfo(properties); - }; - - /** - * Encodes the specified PaymentInfo message. Does not implicitly {@link proto.PaymentInfo.verify|verify} messages. - * @function encode - * @memberof proto.PaymentInfo - * @static - * @param {proto.IPaymentInfo} message PaymentInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PaymentInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.currencyDeprecated != null && Object.hasOwnProperty.call(message, "currencyDeprecated")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.currencyDeprecated); - if (message.amount1000 != null && Object.hasOwnProperty.call(message, "amount1000")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.amount1000); - if (message.receiverJid != null && Object.hasOwnProperty.call(message, "receiverJid")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.receiverJid); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.status); - if (message.transactionTimestamp != null && Object.hasOwnProperty.call(message, "transactionTimestamp")) - writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.transactionTimestamp); - if (message.requestMessageKey != null && Object.hasOwnProperty.call(message, "requestMessageKey")) - $root.proto.MessageKey.encode(message.requestMessageKey, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.expiryTimestamp != null && Object.hasOwnProperty.call(message, "expiryTimestamp")) - writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.expiryTimestamp); - if (message.futureproofed != null && Object.hasOwnProperty.call(message, "futureproofed")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.futureproofed); - if (message.currency != null && Object.hasOwnProperty.call(message, "currency")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.currency); - if (message.txnStatus != null && Object.hasOwnProperty.call(message, "txnStatus")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.txnStatus); - if (message.useNoviFiatFormat != null && Object.hasOwnProperty.call(message, "useNoviFiatFormat")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.useNoviFiatFormat); - if (message.primaryAmount != null && Object.hasOwnProperty.call(message, "primaryAmount")) - $root.proto.Money.encode(message.primaryAmount, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.exchangeAmount != null && Object.hasOwnProperty.call(message, "exchangeAmount")) - $root.proto.Money.encode(message.exchangeAmount, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PaymentInfo message, length delimited. Does not implicitly {@link proto.PaymentInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.PaymentInfo - * @static - * @param {proto.IPaymentInfo} message PaymentInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PaymentInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PaymentInfo message from the specified reader or buffer. - * @function decode - * @memberof proto.PaymentInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.PaymentInfo} PaymentInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PaymentInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.PaymentInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.currencyDeprecated = reader.int32(); - break; - case 2: - message.amount1000 = reader.uint64(); - break; - case 3: - message.receiverJid = reader.string(); - break; - case 4: - message.status = reader.int32(); - break; - case 5: - message.transactionTimestamp = reader.uint64(); - break; - case 6: - message.requestMessageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); - break; - case 7: - message.expiryTimestamp = reader.uint64(); - break; - case 8: - message.futureproofed = reader.bool(); - break; - case 9: - message.currency = reader.string(); - break; - case 10: - message.txnStatus = reader.int32(); - break; - case 11: - message.useNoviFiatFormat = reader.bool(); - break; - case 12: - message.primaryAmount = $root.proto.Money.decode(reader, reader.uint32()); - break; - case 13: - message.exchangeAmount = $root.proto.Money.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PaymentInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.PaymentInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.PaymentInfo} PaymentInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PaymentInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PaymentInfo message. - * @function verify - * @memberof proto.PaymentInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PaymentInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.currencyDeprecated != null && message.hasOwnProperty("currencyDeprecated")) - switch (message.currencyDeprecated) { - default: - return "currencyDeprecated: enum value expected"; - case 0: - case 1: - break; - } - if (message.amount1000 != null && message.hasOwnProperty("amount1000")) - if (!$util.isInteger(message.amount1000) && !(message.amount1000 && $util.isInteger(message.amount1000.low) && $util.isInteger(message.amount1000.high))) - return "amount1000: integer|Long expected"; - if (message.receiverJid != null && message.hasOwnProperty("receiverJid")) - if (!$util.isString(message.receiverJid)) - return "receiverJid: string expected"; - if (message.status != null && message.hasOwnProperty("status")) - switch (message.status) { - default: - return "status: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - break; - } - if (message.transactionTimestamp != null && message.hasOwnProperty("transactionTimestamp")) - if (!$util.isInteger(message.transactionTimestamp) && !(message.transactionTimestamp && $util.isInteger(message.transactionTimestamp.low) && $util.isInteger(message.transactionTimestamp.high))) - return "transactionTimestamp: integer|Long expected"; - if (message.requestMessageKey != null && message.hasOwnProperty("requestMessageKey")) { - var error = $root.proto.MessageKey.verify(message.requestMessageKey); - if (error) - return "requestMessageKey." + error; - } - if (message.expiryTimestamp != null && message.hasOwnProperty("expiryTimestamp")) - if (!$util.isInteger(message.expiryTimestamp) && !(message.expiryTimestamp && $util.isInteger(message.expiryTimestamp.low) && $util.isInteger(message.expiryTimestamp.high))) - return "expiryTimestamp: integer|Long expected"; - if (message.futureproofed != null && message.hasOwnProperty("futureproofed")) - if (typeof message.futureproofed !== "boolean") - return "futureproofed: boolean expected"; - if (message.currency != null && message.hasOwnProperty("currency")) - if (!$util.isString(message.currency)) - return "currency: string expected"; - if (message.txnStatus != null && message.hasOwnProperty("txnStatus")) - switch (message.txnStatus) { - default: - return "txnStatus: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - case 19: - case 20: - case 21: - case 22: - case 23: - case 24: - case 25: - case 26: - case 27: - case 28: - case 29: - case 30: - case 31: - break; - } - if (message.useNoviFiatFormat != null && message.hasOwnProperty("useNoviFiatFormat")) - if (typeof message.useNoviFiatFormat !== "boolean") - return "useNoviFiatFormat: boolean expected"; - if (message.primaryAmount != null && message.hasOwnProperty("primaryAmount")) { - var error = $root.proto.Money.verify(message.primaryAmount); - if (error) - return "primaryAmount." + error; - } - if (message.exchangeAmount != null && message.hasOwnProperty("exchangeAmount")) { - var error = $root.proto.Money.verify(message.exchangeAmount); - if (error) - return "exchangeAmount." + error; - } - return null; - }; - - /** - * Creates a PaymentInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.PaymentInfo - * @static - * @param {Object.} object Plain object - * @returns {proto.PaymentInfo} PaymentInfo - */ - PaymentInfo.fromObject = function fromObject(object) { - if (object instanceof $root.proto.PaymentInfo) - return object; - var message = new $root.proto.PaymentInfo(); - switch (object.currencyDeprecated) { - case "UNKNOWN_CURRENCY": - case 0: - message.currencyDeprecated = 0; - break; - case "INR": - case 1: - message.currencyDeprecated = 1; - break; - } - if (object.amount1000 != null) - if ($util.Long) - (message.amount1000 = $util.Long.fromValue(object.amount1000)).unsigned = true; - else if (typeof object.amount1000 === "string") - message.amount1000 = parseInt(object.amount1000, 10); - else if (typeof object.amount1000 === "number") - message.amount1000 = object.amount1000; - else if (typeof object.amount1000 === "object") - message.amount1000 = new $util.LongBits(object.amount1000.low >>> 0, object.amount1000.high >>> 0).toNumber(true); - if (object.receiverJid != null) - message.receiverJid = String(object.receiverJid); - switch (object.status) { - case "UNKNOWN_STATUS": - case 0: - message.status = 0; - break; - case "PROCESSING": - case 1: - message.status = 1; - break; - case "SENT": - case 2: - message.status = 2; - break; - case "NEED_TO_ACCEPT": - case 3: - message.status = 3; - break; - case "COMPLETE": - case 4: - message.status = 4; - break; - case "COULD_NOT_COMPLETE": - case 5: - message.status = 5; - break; - case "REFUNDED": - case 6: - message.status = 6; - break; - case "EXPIRED": - case 7: - message.status = 7; - break; - case "REJECTED": - case 8: - message.status = 8; - break; - case "CANCELLED": - case 9: - message.status = 9; - break; - case "WAITING_FOR_PAYER": - case 10: - message.status = 10; - break; - case "WAITING": - case 11: - message.status = 11; - break; - } - if (object.transactionTimestamp != null) - if ($util.Long) - (message.transactionTimestamp = $util.Long.fromValue(object.transactionTimestamp)).unsigned = true; - else if (typeof object.transactionTimestamp === "string") - message.transactionTimestamp = parseInt(object.transactionTimestamp, 10); - else if (typeof object.transactionTimestamp === "number") - message.transactionTimestamp = object.transactionTimestamp; - else if (typeof object.transactionTimestamp === "object") - message.transactionTimestamp = new $util.LongBits(object.transactionTimestamp.low >>> 0, object.transactionTimestamp.high >>> 0).toNumber(true); - if (object.requestMessageKey != null) { - if (typeof object.requestMessageKey !== "object") - throw TypeError(".proto.PaymentInfo.requestMessageKey: object expected"); - message.requestMessageKey = $root.proto.MessageKey.fromObject(object.requestMessageKey); - } - if (object.expiryTimestamp != null) - if ($util.Long) - (message.expiryTimestamp = $util.Long.fromValue(object.expiryTimestamp)).unsigned = true; - else if (typeof object.expiryTimestamp === "string") - message.expiryTimestamp = parseInt(object.expiryTimestamp, 10); - else if (typeof object.expiryTimestamp === "number") - message.expiryTimestamp = object.expiryTimestamp; - else if (typeof object.expiryTimestamp === "object") - message.expiryTimestamp = new $util.LongBits(object.expiryTimestamp.low >>> 0, object.expiryTimestamp.high >>> 0).toNumber(true); - if (object.futureproofed != null) - message.futureproofed = Boolean(object.futureproofed); - if (object.currency != null) - message.currency = String(object.currency); - switch (object.txnStatus) { - case "UNKNOWN": - case 0: - message.txnStatus = 0; - break; - case "PENDING_SETUP": - case 1: - message.txnStatus = 1; - break; - case "PENDING_RECEIVER_SETUP": - case 2: - message.txnStatus = 2; - break; - case "INIT": - case 3: - message.txnStatus = 3; - break; - case "SUCCESS": - case 4: - message.txnStatus = 4; - break; - case "COMPLETED": - case 5: - message.txnStatus = 5; - break; - case "FAILED": - case 6: - message.txnStatus = 6; - break; - case "FAILED_RISK": - case 7: - message.txnStatus = 7; - break; - case "FAILED_PROCESSING": - case 8: - message.txnStatus = 8; - break; - case "FAILED_RECEIVER_PROCESSING": - case 9: - message.txnStatus = 9; - break; - case "FAILED_DA": - case 10: - message.txnStatus = 10; - break; - case "FAILED_DA_FINAL": - case 11: - message.txnStatus = 11; - break; - case "REFUNDED_TXN": - case 12: - message.txnStatus = 12; - break; - case "REFUND_FAILED": - case 13: - message.txnStatus = 13; - break; - case "REFUND_FAILED_PROCESSING": - case 14: - message.txnStatus = 14; - break; - case "REFUND_FAILED_DA": - case 15: - message.txnStatus = 15; - break; - case "EXPIRED_TXN": - case 16: - message.txnStatus = 16; - break; - case "AUTH_CANCELED": - case 17: - message.txnStatus = 17; - break; - case "AUTH_CANCEL_FAILED_PROCESSING": - case 18: - message.txnStatus = 18; - break; - case "AUTH_CANCEL_FAILED": - case 19: - message.txnStatus = 19; - break; - case "COLLECT_INIT": - case 20: - message.txnStatus = 20; - break; - case "COLLECT_SUCCESS": - case 21: - message.txnStatus = 21; - break; - case "COLLECT_FAILED": - case 22: - message.txnStatus = 22; - break; - case "COLLECT_FAILED_RISK": - case 23: - message.txnStatus = 23; - break; - case "COLLECT_REJECTED": - case 24: - message.txnStatus = 24; - break; - case "COLLECT_EXPIRED": - case 25: - message.txnStatus = 25; - break; - case "COLLECT_CANCELED": - case 26: - message.txnStatus = 26; - break; - case "COLLECT_CANCELLING": - case 27: - message.txnStatus = 27; - break; - case "IN_REVIEW": - case 28: - message.txnStatus = 28; - break; - case "REVERSAL_SUCCESS": - case 29: - message.txnStatus = 29; - break; - case "REVERSAL_PENDING": - case 30: - message.txnStatus = 30; - break; - case "REFUND_PENDING": - case 31: - message.txnStatus = 31; - break; - } - if (object.useNoviFiatFormat != null) - message.useNoviFiatFormat = Boolean(object.useNoviFiatFormat); - if (object.primaryAmount != null) { - if (typeof object.primaryAmount !== "object") - throw TypeError(".proto.PaymentInfo.primaryAmount: object expected"); - message.primaryAmount = $root.proto.Money.fromObject(object.primaryAmount); - } - if (object.exchangeAmount != null) { - if (typeof object.exchangeAmount !== "object") - throw TypeError(".proto.PaymentInfo.exchangeAmount: object expected"); - message.exchangeAmount = $root.proto.Money.fromObject(object.exchangeAmount); - } - return message; - }; - - /** - * Creates a plain object from a PaymentInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.PaymentInfo - * @static - * @param {proto.PaymentInfo} message PaymentInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PaymentInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.currencyDeprecated = options.enums === String ? "UNKNOWN_CURRENCY" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.amount1000 = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.amount1000 = options.longs === String ? "0" : 0; - object.receiverJid = ""; - object.status = options.enums === String ? "UNKNOWN_STATUS" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.transactionTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.transactionTimestamp = options.longs === String ? "0" : 0; - object.requestMessageKey = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.expiryTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.expiryTimestamp = options.longs === String ? "0" : 0; - object.futureproofed = false; - object.currency = ""; - object.txnStatus = options.enums === String ? "UNKNOWN" : 0; - object.useNoviFiatFormat = false; - object.primaryAmount = null; - object.exchangeAmount = null; - } - if (message.currencyDeprecated != null && message.hasOwnProperty("currencyDeprecated")) - object.currencyDeprecated = options.enums === String ? $root.proto.PaymentInfo.PaymentInfoCurrency[message.currencyDeprecated] : message.currencyDeprecated; - if (message.amount1000 != null && message.hasOwnProperty("amount1000")) - if (typeof message.amount1000 === "number") - object.amount1000 = options.longs === String ? String(message.amount1000) : message.amount1000; - else - object.amount1000 = options.longs === String ? $util.Long.prototype.toString.call(message.amount1000) : options.longs === Number ? new $util.LongBits(message.amount1000.low >>> 0, message.amount1000.high >>> 0).toNumber(true) : message.amount1000; - if (message.receiverJid != null && message.hasOwnProperty("receiverJid")) - object.receiverJid = message.receiverJid; - if (message.status != null && message.hasOwnProperty("status")) - object.status = options.enums === String ? $root.proto.PaymentInfo.PaymentInfoStatus[message.status] : message.status; - if (message.transactionTimestamp != null && message.hasOwnProperty("transactionTimestamp")) - if (typeof message.transactionTimestamp === "number") - object.transactionTimestamp = options.longs === String ? String(message.transactionTimestamp) : message.transactionTimestamp; - else - object.transactionTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.transactionTimestamp) : options.longs === Number ? new $util.LongBits(message.transactionTimestamp.low >>> 0, message.transactionTimestamp.high >>> 0).toNumber(true) : message.transactionTimestamp; - if (message.requestMessageKey != null && message.hasOwnProperty("requestMessageKey")) - object.requestMessageKey = $root.proto.MessageKey.toObject(message.requestMessageKey, options); - if (message.expiryTimestamp != null && message.hasOwnProperty("expiryTimestamp")) - if (typeof message.expiryTimestamp === "number") - object.expiryTimestamp = options.longs === String ? String(message.expiryTimestamp) : message.expiryTimestamp; - else - object.expiryTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.expiryTimestamp) : options.longs === Number ? new $util.LongBits(message.expiryTimestamp.low >>> 0, message.expiryTimestamp.high >>> 0).toNumber(true) : message.expiryTimestamp; - if (message.futureproofed != null && message.hasOwnProperty("futureproofed")) - object.futureproofed = message.futureproofed; - if (message.currency != null && message.hasOwnProperty("currency")) - object.currency = message.currency; - if (message.txnStatus != null && message.hasOwnProperty("txnStatus")) - object.txnStatus = options.enums === String ? $root.proto.PaymentInfo.PaymentInfoTxnStatus[message.txnStatus] : message.txnStatus; - if (message.useNoviFiatFormat != null && message.hasOwnProperty("useNoviFiatFormat")) - object.useNoviFiatFormat = message.useNoviFiatFormat; - if (message.primaryAmount != null && message.hasOwnProperty("primaryAmount")) - object.primaryAmount = $root.proto.Money.toObject(message.primaryAmount, options); - if (message.exchangeAmount != null && message.hasOwnProperty("exchangeAmount")) - object.exchangeAmount = $root.proto.Money.toObject(message.exchangeAmount, options); - return object; - }; - - /** - * Converts this PaymentInfo to JSON. - * @function toJSON - * @memberof proto.PaymentInfo - * @instance - * @returns {Object.} JSON object - */ - PaymentInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * PaymentInfoCurrency enum. - * @name proto.PaymentInfo.PaymentInfoCurrency - * @enum {number} - * @property {number} UNKNOWN_CURRENCY=0 UNKNOWN_CURRENCY value - * @property {number} INR=1 INR value - */ - PaymentInfo.PaymentInfoCurrency = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN_CURRENCY"] = 0; - values[valuesById[1] = "INR"] = 1; - return values; - })(); - - /** - * PaymentInfoStatus enum. - * @name proto.PaymentInfo.PaymentInfoStatus - * @enum {number} - * @property {number} UNKNOWN_STATUS=0 UNKNOWN_STATUS value - * @property {number} PROCESSING=1 PROCESSING value - * @property {number} SENT=2 SENT value - * @property {number} NEED_TO_ACCEPT=3 NEED_TO_ACCEPT value - * @property {number} COMPLETE=4 COMPLETE value - * @property {number} COULD_NOT_COMPLETE=5 COULD_NOT_COMPLETE value - * @property {number} REFUNDED=6 REFUNDED value - * @property {number} EXPIRED=7 EXPIRED value - * @property {number} REJECTED=8 REJECTED value - * @property {number} CANCELLED=9 CANCELLED value - * @property {number} WAITING_FOR_PAYER=10 WAITING_FOR_PAYER value - * @property {number} WAITING=11 WAITING value - */ - PaymentInfo.PaymentInfoStatus = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN_STATUS"] = 0; - values[valuesById[1] = "PROCESSING"] = 1; - values[valuesById[2] = "SENT"] = 2; - values[valuesById[3] = "NEED_TO_ACCEPT"] = 3; - values[valuesById[4] = "COMPLETE"] = 4; - values[valuesById[5] = "COULD_NOT_COMPLETE"] = 5; - values[valuesById[6] = "REFUNDED"] = 6; - values[valuesById[7] = "EXPIRED"] = 7; - values[valuesById[8] = "REJECTED"] = 8; - values[valuesById[9] = "CANCELLED"] = 9; - values[valuesById[10] = "WAITING_FOR_PAYER"] = 10; - values[valuesById[11] = "WAITING"] = 11; - return values; - })(); - - /** - * PaymentInfoTxnStatus enum. - * @name proto.PaymentInfo.PaymentInfoTxnStatus - * @enum {number} - * @property {number} UNKNOWN=0 UNKNOWN value - * @property {number} PENDING_SETUP=1 PENDING_SETUP value - * @property {number} PENDING_RECEIVER_SETUP=2 PENDING_RECEIVER_SETUP value - * @property {number} INIT=3 INIT value - * @property {number} SUCCESS=4 SUCCESS value - * @property {number} COMPLETED=5 COMPLETED value - * @property {number} FAILED=6 FAILED value - * @property {number} FAILED_RISK=7 FAILED_RISK value - * @property {number} FAILED_PROCESSING=8 FAILED_PROCESSING value - * @property {number} FAILED_RECEIVER_PROCESSING=9 FAILED_RECEIVER_PROCESSING value - * @property {number} FAILED_DA=10 FAILED_DA value - * @property {number} FAILED_DA_FINAL=11 FAILED_DA_FINAL value - * @property {number} REFUNDED_TXN=12 REFUNDED_TXN value - * @property {number} REFUND_FAILED=13 REFUND_FAILED value - * @property {number} REFUND_FAILED_PROCESSING=14 REFUND_FAILED_PROCESSING value - * @property {number} REFUND_FAILED_DA=15 REFUND_FAILED_DA value - * @property {number} EXPIRED_TXN=16 EXPIRED_TXN value - * @property {number} AUTH_CANCELED=17 AUTH_CANCELED value - * @property {number} AUTH_CANCEL_FAILED_PROCESSING=18 AUTH_CANCEL_FAILED_PROCESSING value - * @property {number} AUTH_CANCEL_FAILED=19 AUTH_CANCEL_FAILED value - * @property {number} COLLECT_INIT=20 COLLECT_INIT value - * @property {number} COLLECT_SUCCESS=21 COLLECT_SUCCESS value - * @property {number} COLLECT_FAILED=22 COLLECT_FAILED value - * @property {number} COLLECT_FAILED_RISK=23 COLLECT_FAILED_RISK value - * @property {number} COLLECT_REJECTED=24 COLLECT_REJECTED value - * @property {number} COLLECT_EXPIRED=25 COLLECT_EXPIRED value - * @property {number} COLLECT_CANCELED=26 COLLECT_CANCELED value - * @property {number} COLLECT_CANCELLING=27 COLLECT_CANCELLING value - * @property {number} IN_REVIEW=28 IN_REVIEW value - * @property {number} REVERSAL_SUCCESS=29 REVERSAL_SUCCESS value - * @property {number} REVERSAL_PENDING=30 REVERSAL_PENDING value - * @property {number} REFUND_PENDING=31 REFUND_PENDING value - */ - PaymentInfo.PaymentInfoTxnStatus = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN"] = 0; - values[valuesById[1] = "PENDING_SETUP"] = 1; - values[valuesById[2] = "PENDING_RECEIVER_SETUP"] = 2; - values[valuesById[3] = "INIT"] = 3; - values[valuesById[4] = "SUCCESS"] = 4; - values[valuesById[5] = "COMPLETED"] = 5; - values[valuesById[6] = "FAILED"] = 6; - values[valuesById[7] = "FAILED_RISK"] = 7; - values[valuesById[8] = "FAILED_PROCESSING"] = 8; - values[valuesById[9] = "FAILED_RECEIVER_PROCESSING"] = 9; - values[valuesById[10] = "FAILED_DA"] = 10; - values[valuesById[11] = "FAILED_DA_FINAL"] = 11; - values[valuesById[12] = "REFUNDED_TXN"] = 12; - values[valuesById[13] = "REFUND_FAILED"] = 13; - values[valuesById[14] = "REFUND_FAILED_PROCESSING"] = 14; - values[valuesById[15] = "REFUND_FAILED_DA"] = 15; - values[valuesById[16] = "EXPIRED_TXN"] = 16; - values[valuesById[17] = "AUTH_CANCELED"] = 17; - values[valuesById[18] = "AUTH_CANCEL_FAILED_PROCESSING"] = 18; - values[valuesById[19] = "AUTH_CANCEL_FAILED"] = 19; - values[valuesById[20] = "COLLECT_INIT"] = 20; - values[valuesById[21] = "COLLECT_SUCCESS"] = 21; - values[valuesById[22] = "COLLECT_FAILED"] = 22; - values[valuesById[23] = "COLLECT_FAILED_RISK"] = 23; - values[valuesById[24] = "COLLECT_REJECTED"] = 24; - values[valuesById[25] = "COLLECT_EXPIRED"] = 25; - values[valuesById[26] = "COLLECT_CANCELED"] = 26; - values[valuesById[27] = "COLLECT_CANCELLING"] = 27; - values[valuesById[28] = "IN_REVIEW"] = 28; - values[valuesById[29] = "REVERSAL_SUCCESS"] = 29; - values[valuesById[30] = "REVERSAL_PENDING"] = 30; - values[valuesById[31] = "REFUND_PENDING"] = 31; - return values; - })(); - - return PaymentInfo; - })(); - - proto.PhotoChange = (function() { - - /** - * Properties of a PhotoChange. - * @memberof proto - * @interface IPhotoChange - * @property {Uint8Array|null} [oldPhoto] PhotoChange oldPhoto - * @property {Uint8Array|null} [newPhoto] PhotoChange newPhoto - * @property {number|null} [newPhotoId] PhotoChange newPhotoId - */ - - /** - * Constructs a new PhotoChange. - * @memberof proto - * @classdesc Represents a PhotoChange. - * @implements IPhotoChange - * @constructor - * @param {proto.IPhotoChange=} [properties] Properties to set - */ - function PhotoChange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PhotoChange oldPhoto. - * @member {Uint8Array} oldPhoto - * @memberof proto.PhotoChange - * @instance - */ - PhotoChange.prototype.oldPhoto = $util.newBuffer([]); - - /** - * PhotoChange newPhoto. - * @member {Uint8Array} newPhoto - * @memberof proto.PhotoChange - * @instance - */ - PhotoChange.prototype.newPhoto = $util.newBuffer([]); - - /** - * PhotoChange newPhotoId. - * @member {number} newPhotoId - * @memberof proto.PhotoChange - * @instance - */ - PhotoChange.prototype.newPhotoId = 0; - - /** - * Creates a new PhotoChange instance using the specified properties. - * @function create - * @memberof proto.PhotoChange - * @static - * @param {proto.IPhotoChange=} [properties] Properties to set - * @returns {proto.PhotoChange} PhotoChange instance - */ - PhotoChange.create = function create(properties) { - return new PhotoChange(properties); - }; - - /** - * Encodes the specified PhotoChange message. Does not implicitly {@link proto.PhotoChange.verify|verify} messages. - * @function encode - * @memberof proto.PhotoChange - * @static - * @param {proto.IPhotoChange} message PhotoChange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhotoChange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.oldPhoto != null && Object.hasOwnProperty.call(message, "oldPhoto")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.oldPhoto); - if (message.newPhoto != null && Object.hasOwnProperty.call(message, "newPhoto")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.newPhoto); - if (message.newPhotoId != null && Object.hasOwnProperty.call(message, "newPhotoId")) - writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.newPhotoId); - return writer; - }; - - /** - * Encodes the specified PhotoChange message, length delimited. Does not implicitly {@link proto.PhotoChange.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.PhotoChange - * @static - * @param {proto.IPhotoChange} message PhotoChange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhotoChange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PhotoChange message from the specified reader or buffer. - * @function decode - * @memberof proto.PhotoChange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.PhotoChange} PhotoChange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhotoChange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.PhotoChange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.oldPhoto = reader.bytes(); - break; - case 2: - message.newPhoto = reader.bytes(); - break; - case 3: - message.newPhotoId = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PhotoChange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.PhotoChange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.PhotoChange} PhotoChange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhotoChange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PhotoChange message. - * @function verify - * @memberof proto.PhotoChange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PhotoChange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.oldPhoto != null && message.hasOwnProperty("oldPhoto")) - if (!(message.oldPhoto && typeof message.oldPhoto.length === "number" || $util.isString(message.oldPhoto))) - return "oldPhoto: buffer expected"; - if (message.newPhoto != null && message.hasOwnProperty("newPhoto")) - if (!(message.newPhoto && typeof message.newPhoto.length === "number" || $util.isString(message.newPhoto))) - return "newPhoto: buffer expected"; - if (message.newPhotoId != null && message.hasOwnProperty("newPhotoId")) - if (!$util.isInteger(message.newPhotoId)) - return "newPhotoId: integer expected"; - return null; - }; - - /** - * Creates a PhotoChange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.PhotoChange - * @static - * @param {Object.} object Plain object - * @returns {proto.PhotoChange} PhotoChange - */ - PhotoChange.fromObject = function fromObject(object) { - if (object instanceof $root.proto.PhotoChange) - return object; - var message = new $root.proto.PhotoChange(); - if (object.oldPhoto != null) - if (typeof object.oldPhoto === "string") - $util.base64.decode(object.oldPhoto, message.oldPhoto = $util.newBuffer($util.base64.length(object.oldPhoto)), 0); - else if (object.oldPhoto.length) - message.oldPhoto = object.oldPhoto; - if (object.newPhoto != null) - if (typeof object.newPhoto === "string") - $util.base64.decode(object.newPhoto, message.newPhoto = $util.newBuffer($util.base64.length(object.newPhoto)), 0); - else if (object.newPhoto.length) - message.newPhoto = object.newPhoto; - if (object.newPhotoId != null) - message.newPhotoId = object.newPhotoId >>> 0; - return message; - }; - - /** - * Creates a plain object from a PhotoChange message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.PhotoChange - * @static - * @param {proto.PhotoChange} message PhotoChange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PhotoChange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.oldPhoto = ""; - else { - object.oldPhoto = []; - if (options.bytes !== Array) - object.oldPhoto = $util.newBuffer(object.oldPhoto); - } - if (options.bytes === String) - object.newPhoto = ""; - else { - object.newPhoto = []; - if (options.bytes !== Array) - object.newPhoto = $util.newBuffer(object.newPhoto); - } - object.newPhotoId = 0; - } - if (message.oldPhoto != null && message.hasOwnProperty("oldPhoto")) - object.oldPhoto = options.bytes === String ? $util.base64.encode(message.oldPhoto, 0, message.oldPhoto.length) : options.bytes === Array ? Array.prototype.slice.call(message.oldPhoto) : message.oldPhoto; - if (message.newPhoto != null && message.hasOwnProperty("newPhoto")) - object.newPhoto = options.bytes === String ? $util.base64.encode(message.newPhoto, 0, message.newPhoto.length) : options.bytes === Array ? Array.prototype.slice.call(message.newPhoto) : message.newPhoto; - if (message.newPhotoId != null && message.hasOwnProperty("newPhotoId")) - object.newPhotoId = message.newPhotoId; - return object; - }; - - /** - * Converts this PhotoChange to JSON. - * @function toJSON - * @memberof proto.PhotoChange - * @instance - * @returns {Object.} JSON object - */ - PhotoChange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PhotoChange; - })(); - - proto.PollAdditionalMetadata = (function() { - - /** - * Properties of a PollAdditionalMetadata. - * @memberof proto - * @interface IPollAdditionalMetadata - * @property {boolean|null} [pollInvalidated] PollAdditionalMetadata pollInvalidated - */ - - /** - * Constructs a new PollAdditionalMetadata. - * @memberof proto - * @classdesc Represents a PollAdditionalMetadata. - * @implements IPollAdditionalMetadata - * @constructor - * @param {proto.IPollAdditionalMetadata=} [properties] Properties to set - */ - function PollAdditionalMetadata(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PollAdditionalMetadata pollInvalidated. - * @member {boolean} pollInvalidated - * @memberof proto.PollAdditionalMetadata - * @instance - */ - PollAdditionalMetadata.prototype.pollInvalidated = false; - - /** - * Creates a new PollAdditionalMetadata instance using the specified properties. - * @function create - * @memberof proto.PollAdditionalMetadata - * @static - * @param {proto.IPollAdditionalMetadata=} [properties] Properties to set - * @returns {proto.PollAdditionalMetadata} PollAdditionalMetadata instance - */ - PollAdditionalMetadata.create = function create(properties) { - return new PollAdditionalMetadata(properties); - }; - - /** - * Encodes the specified PollAdditionalMetadata message. Does not implicitly {@link proto.PollAdditionalMetadata.verify|verify} messages. - * @function encode - * @memberof proto.PollAdditionalMetadata - * @static - * @param {proto.IPollAdditionalMetadata} message PollAdditionalMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PollAdditionalMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pollInvalidated != null && Object.hasOwnProperty.call(message, "pollInvalidated")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.pollInvalidated); - return writer; - }; - - /** - * Encodes the specified PollAdditionalMetadata message, length delimited. Does not implicitly {@link proto.PollAdditionalMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.PollAdditionalMetadata - * @static - * @param {proto.IPollAdditionalMetadata} message PollAdditionalMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PollAdditionalMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PollAdditionalMetadata message from the specified reader or buffer. - * @function decode - * @memberof proto.PollAdditionalMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.PollAdditionalMetadata} PollAdditionalMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PollAdditionalMetadata.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.PollAdditionalMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pollInvalidated = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PollAdditionalMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.PollAdditionalMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.PollAdditionalMetadata} PollAdditionalMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PollAdditionalMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PollAdditionalMetadata message. - * @function verify - * @memberof proto.PollAdditionalMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PollAdditionalMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pollInvalidated != null && message.hasOwnProperty("pollInvalidated")) - if (typeof message.pollInvalidated !== "boolean") - return "pollInvalidated: boolean expected"; - return null; - }; - - /** - * Creates a PollAdditionalMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.PollAdditionalMetadata - * @static - * @param {Object.} object Plain object - * @returns {proto.PollAdditionalMetadata} PollAdditionalMetadata - */ - PollAdditionalMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.proto.PollAdditionalMetadata) - return object; - var message = new $root.proto.PollAdditionalMetadata(); - if (object.pollInvalidated != null) - message.pollInvalidated = Boolean(object.pollInvalidated); - return message; - }; - - /** - * Creates a plain object from a PollAdditionalMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.PollAdditionalMetadata - * @static - * @param {proto.PollAdditionalMetadata} message PollAdditionalMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PollAdditionalMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.pollInvalidated = false; - if (message.pollInvalidated != null && message.hasOwnProperty("pollInvalidated")) - object.pollInvalidated = message.pollInvalidated; - return object; - }; - - /** - * Converts this PollAdditionalMetadata to JSON. - * @function toJSON - * @memberof proto.PollAdditionalMetadata - * @instance - * @returns {Object.} JSON object - */ - PollAdditionalMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PollAdditionalMetadata; - })(); - - proto.PollUpdate = (function() { - - /** - * Properties of a PollUpdate. - * @memberof proto - * @interface IPollUpdate - * @property {proto.IMessageKey|null} [pollUpdateMessageKey] PollUpdate pollUpdateMessageKey - * @property {proto.IPollVoteMessage|null} [vote] PollUpdate vote - */ - - /** - * Constructs a new PollUpdate. - * @memberof proto - * @classdesc Represents a PollUpdate. - * @implements IPollUpdate - * @constructor - * @param {proto.IPollUpdate=} [properties] Properties to set - */ - function PollUpdate(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PollUpdate pollUpdateMessageKey. - * @member {proto.IMessageKey|null|undefined} pollUpdateMessageKey - * @memberof proto.PollUpdate - * @instance - */ - PollUpdate.prototype.pollUpdateMessageKey = null; - - /** - * PollUpdate vote. - * @member {proto.IPollVoteMessage|null|undefined} vote - * @memberof proto.PollUpdate - * @instance - */ - PollUpdate.prototype.vote = null; - - /** - * Creates a new PollUpdate instance using the specified properties. - * @function create - * @memberof proto.PollUpdate - * @static - * @param {proto.IPollUpdate=} [properties] Properties to set - * @returns {proto.PollUpdate} PollUpdate instance - */ - PollUpdate.create = function create(properties) { - return new PollUpdate(properties); - }; - - /** - * Encodes the specified PollUpdate message. Does not implicitly {@link proto.PollUpdate.verify|verify} messages. - * @function encode - * @memberof proto.PollUpdate - * @static - * @param {proto.IPollUpdate} message PollUpdate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PollUpdate.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pollUpdateMessageKey != null && Object.hasOwnProperty.call(message, "pollUpdateMessageKey")) - $root.proto.MessageKey.encode(message.pollUpdateMessageKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.vote != null && Object.hasOwnProperty.call(message, "vote")) - $root.proto.PollVoteMessage.encode(message.vote, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PollUpdate message, length delimited. Does not implicitly {@link proto.PollUpdate.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.PollUpdate - * @static - * @param {proto.IPollUpdate} message PollUpdate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PollUpdate.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PollUpdate message from the specified reader or buffer. - * @function decode - * @memberof proto.PollUpdate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.PollUpdate} PollUpdate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PollUpdate.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.PollUpdate(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pollUpdateMessageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); - break; - case 2: - message.vote = $root.proto.PollVoteMessage.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PollUpdate message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.PollUpdate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.PollUpdate} PollUpdate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PollUpdate.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PollUpdate message. - * @function verify - * @memberof proto.PollUpdate - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PollUpdate.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pollUpdateMessageKey != null && message.hasOwnProperty("pollUpdateMessageKey")) { - var error = $root.proto.MessageKey.verify(message.pollUpdateMessageKey); - if (error) - return "pollUpdateMessageKey." + error; - } - if (message.vote != null && message.hasOwnProperty("vote")) { - var error = $root.proto.PollVoteMessage.verify(message.vote); - if (error) - return "vote." + error; - } - return null; - }; - - /** - * Creates a PollUpdate message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.PollUpdate - * @static - * @param {Object.} object Plain object - * @returns {proto.PollUpdate} PollUpdate - */ - PollUpdate.fromObject = function fromObject(object) { - if (object instanceof $root.proto.PollUpdate) - return object; - var message = new $root.proto.PollUpdate(); - if (object.pollUpdateMessageKey != null) { - if (typeof object.pollUpdateMessageKey !== "object") - throw TypeError(".proto.PollUpdate.pollUpdateMessageKey: object expected"); - message.pollUpdateMessageKey = $root.proto.MessageKey.fromObject(object.pollUpdateMessageKey); - } - if (object.vote != null) { - if (typeof object.vote !== "object") - throw TypeError(".proto.PollUpdate.vote: object expected"); - message.vote = $root.proto.PollVoteMessage.fromObject(object.vote); - } - return message; - }; - - /** - * Creates a plain object from a PollUpdate message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.PollUpdate - * @static - * @param {proto.PollUpdate} message PollUpdate - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PollUpdate.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.pollUpdateMessageKey = null; - object.vote = null; - } - if (message.pollUpdateMessageKey != null && message.hasOwnProperty("pollUpdateMessageKey")) - object.pollUpdateMessageKey = $root.proto.MessageKey.toObject(message.pollUpdateMessageKey, options); - if (message.vote != null && message.hasOwnProperty("vote")) - object.vote = $root.proto.PollVoteMessage.toObject(message.vote, options); - return object; - }; - - /** - * Converts this PollUpdate to JSON. - * @function toJSON - * @memberof proto.PollUpdate - * @instance - * @returns {Object.} JSON object - */ - PollUpdate.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PollUpdate; - })(); - - proto.Reaction = (function() { - - /** - * Properties of a Reaction. - * @memberof proto - * @interface IReaction - * @property {proto.IMessageKey|null} [key] Reaction key - * @property {string|null} [text] Reaction text - * @property {string|null} [groupingKey] Reaction groupingKey - * @property {number|Long|null} [senderTimestampMs] Reaction senderTimestampMs - * @property {boolean|null} [unread] Reaction unread - */ - - /** - * Constructs a new Reaction. - * @memberof proto - * @classdesc Represents a Reaction. - * @implements IReaction - * @constructor - * @param {proto.IReaction=} [properties] Properties to set - */ - function Reaction(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Reaction key. - * @member {proto.IMessageKey|null|undefined} key - * @memberof proto.Reaction - * @instance - */ - Reaction.prototype.key = null; - - /** - * Reaction text. - * @member {string} text - * @memberof proto.Reaction - * @instance - */ - Reaction.prototype.text = ""; - - /** - * Reaction groupingKey. - * @member {string} groupingKey - * @memberof proto.Reaction - * @instance - */ - Reaction.prototype.groupingKey = ""; - - /** - * Reaction senderTimestampMs. - * @member {number|Long} senderTimestampMs - * @memberof proto.Reaction - * @instance - */ - Reaction.prototype.senderTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Reaction unread. - * @member {boolean} unread - * @memberof proto.Reaction - * @instance - */ - Reaction.prototype.unread = false; - - /** - * Creates a new Reaction instance using the specified properties. - * @function create - * @memberof proto.Reaction - * @static - * @param {proto.IReaction=} [properties] Properties to set - * @returns {proto.Reaction} Reaction instance - */ - Reaction.create = function create(properties) { - return new Reaction(properties); - }; - - /** - * Encodes the specified Reaction message. Does not implicitly {@link proto.Reaction.verify|verify} messages. - * @function encode - * @memberof proto.Reaction - * @static - * @param {proto.IReaction} message Reaction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Reaction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - $root.proto.MessageKey.encode(message.key, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.text); - if (message.groupingKey != null && Object.hasOwnProperty.call(message, "groupingKey")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.groupingKey); - if (message.senderTimestampMs != null && Object.hasOwnProperty.call(message, "senderTimestampMs")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.senderTimestampMs); - if (message.unread != null && Object.hasOwnProperty.call(message, "unread")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.unread); - return writer; - }; - - /** - * Encodes the specified Reaction message, length delimited. Does not implicitly {@link proto.Reaction.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.Reaction - * @static - * @param {proto.IReaction} message Reaction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Reaction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Reaction message from the specified reader or buffer. - * @function decode - * @memberof proto.Reaction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.Reaction} Reaction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Reaction.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Reaction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = $root.proto.MessageKey.decode(reader, reader.uint32()); - break; - case 2: - message.text = reader.string(); - break; - case 3: - message.groupingKey = reader.string(); - break; - case 4: - message.senderTimestampMs = reader.int64(); - break; - case 5: - message.unread = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Reaction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.Reaction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Reaction} Reaction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Reaction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Reaction message. - * @function verify - * @memberof proto.Reaction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Reaction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.key != null && message.hasOwnProperty("key")) { - var error = $root.proto.MessageKey.verify(message.key); - if (error) - return "key." + error; - } - if (message.text != null && message.hasOwnProperty("text")) - if (!$util.isString(message.text)) - return "text: string expected"; - if (message.groupingKey != null && message.hasOwnProperty("groupingKey")) - if (!$util.isString(message.groupingKey)) - return "groupingKey: string expected"; - if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs")) - if (!$util.isInteger(message.senderTimestampMs) && !(message.senderTimestampMs && $util.isInteger(message.senderTimestampMs.low) && $util.isInteger(message.senderTimestampMs.high))) - return "senderTimestampMs: integer|Long expected"; - if (message.unread != null && message.hasOwnProperty("unread")) - if (typeof message.unread !== "boolean") - return "unread: boolean expected"; - return null; - }; - - /** - * Creates a Reaction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.Reaction - * @static - * @param {Object.} object Plain object - * @returns {proto.Reaction} Reaction - */ - Reaction.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Reaction) - return object; - var message = new $root.proto.Reaction(); - if (object.key != null) { - if (typeof object.key !== "object") - throw TypeError(".proto.Reaction.key: object expected"); - message.key = $root.proto.MessageKey.fromObject(object.key); - } - if (object.text != null) - message.text = String(object.text); - if (object.groupingKey != null) - message.groupingKey = String(object.groupingKey); - if (object.senderTimestampMs != null) - if ($util.Long) - (message.senderTimestampMs = $util.Long.fromValue(object.senderTimestampMs)).unsigned = false; - else if (typeof object.senderTimestampMs === "string") - message.senderTimestampMs = parseInt(object.senderTimestampMs, 10); - else if (typeof object.senderTimestampMs === "number") - message.senderTimestampMs = object.senderTimestampMs; - else if (typeof object.senderTimestampMs === "object") - message.senderTimestampMs = new $util.LongBits(object.senderTimestampMs.low >>> 0, object.senderTimestampMs.high >>> 0).toNumber(); - if (object.unread != null) - message.unread = Boolean(object.unread); - return message; - }; - - /** - * Creates a plain object from a Reaction message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.Reaction - * @static - * @param {proto.Reaction} message Reaction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Reaction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.key = null; - object.text = ""; - object.groupingKey = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.senderTimestampMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.senderTimestampMs = options.longs === String ? "0" : 0; - object.unread = false; - } - if (message.key != null && message.hasOwnProperty("key")) - object.key = $root.proto.MessageKey.toObject(message.key, options); - if (message.text != null && message.hasOwnProperty("text")) - object.text = message.text; - if (message.groupingKey != null && message.hasOwnProperty("groupingKey")) - object.groupingKey = message.groupingKey; - if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs")) - if (typeof message.senderTimestampMs === "number") - object.senderTimestampMs = options.longs === String ? String(message.senderTimestampMs) : message.senderTimestampMs; - else - object.senderTimestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.senderTimestampMs) : options.longs === Number ? new $util.LongBits(message.senderTimestampMs.low >>> 0, message.senderTimestampMs.high >>> 0).toNumber() : message.senderTimestampMs; - if (message.unread != null && message.hasOwnProperty("unread")) - object.unread = message.unread; - return object; - }; - - /** - * Converts this Reaction to JSON. - * @function toJSON - * @memberof proto.Reaction - * @instance - * @returns {Object.} JSON object - */ - Reaction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Reaction; - })(); - - proto.StatusPSA = (function() { - - /** - * Properties of a StatusPSA. - * @memberof proto - * @interface IStatusPSA - * @property {number|Long} campaignId StatusPSA campaignId - * @property {number|Long|null} [campaignExpirationTimestamp] StatusPSA campaignExpirationTimestamp - */ - - /** - * Constructs a new StatusPSA. - * @memberof proto - * @classdesc Represents a StatusPSA. - * @implements IStatusPSA - * @constructor - * @param {proto.IStatusPSA=} [properties] Properties to set - */ - function StatusPSA(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StatusPSA campaignId. - * @member {number|Long} campaignId - * @memberof proto.StatusPSA - * @instance - */ - StatusPSA.prototype.campaignId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * StatusPSA campaignExpirationTimestamp. - * @member {number|Long} campaignExpirationTimestamp - * @memberof proto.StatusPSA - * @instance - */ - StatusPSA.prototype.campaignExpirationTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Creates a new StatusPSA instance using the specified properties. - * @function create - * @memberof proto.StatusPSA - * @static - * @param {proto.IStatusPSA=} [properties] Properties to set - * @returns {proto.StatusPSA} StatusPSA instance - */ - StatusPSA.create = function create(properties) { - return new StatusPSA(properties); - }; - - /** - * Encodes the specified StatusPSA message. Does not implicitly {@link proto.StatusPSA.verify|verify} messages. - * @function encode - * @memberof proto.StatusPSA - * @static - * @param {proto.IStatusPSA} message StatusPSA message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StatusPSA.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - writer.uint32(/* id 44, wireType 0 =*/352).uint64(message.campaignId); - if (message.campaignExpirationTimestamp != null && Object.hasOwnProperty.call(message, "campaignExpirationTimestamp")) - writer.uint32(/* id 45, wireType 0 =*/360).uint64(message.campaignExpirationTimestamp); - return writer; - }; - - /** - * Encodes the specified StatusPSA message, length delimited. Does not implicitly {@link proto.StatusPSA.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.StatusPSA - * @static - * @param {proto.IStatusPSA} message StatusPSA message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StatusPSA.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StatusPSA message from the specified reader or buffer. - * @function decode - * @memberof proto.StatusPSA - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.StatusPSA} StatusPSA - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StatusPSA.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.StatusPSA(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 44: - message.campaignId = reader.uint64(); - break; - case 45: - message.campaignExpirationTimestamp = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - if (!message.hasOwnProperty("campaignId")) - throw $util.ProtocolError("missing required 'campaignId'", { instance: message }); - return message; - }; - - /** - * Decodes a StatusPSA message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.StatusPSA - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.StatusPSA} StatusPSA - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StatusPSA.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StatusPSA message. - * @function verify - * @memberof proto.StatusPSA - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StatusPSA.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (!$util.isInteger(message.campaignId) && !(message.campaignId && $util.isInteger(message.campaignId.low) && $util.isInteger(message.campaignId.high))) - return "campaignId: integer|Long expected"; - if (message.campaignExpirationTimestamp != null && message.hasOwnProperty("campaignExpirationTimestamp")) - if (!$util.isInteger(message.campaignExpirationTimestamp) && !(message.campaignExpirationTimestamp && $util.isInteger(message.campaignExpirationTimestamp.low) && $util.isInteger(message.campaignExpirationTimestamp.high))) - return "campaignExpirationTimestamp: integer|Long expected"; - return null; - }; - - /** - * Creates a StatusPSA message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.StatusPSA - * @static - * @param {Object.} object Plain object - * @returns {proto.StatusPSA} StatusPSA - */ - StatusPSA.fromObject = function fromObject(object) { - if (object instanceof $root.proto.StatusPSA) - return object; - var message = new $root.proto.StatusPSA(); - if (object.campaignId != null) - if ($util.Long) - (message.campaignId = $util.Long.fromValue(object.campaignId)).unsigned = true; - else if (typeof object.campaignId === "string") - message.campaignId = parseInt(object.campaignId, 10); - else if (typeof object.campaignId === "number") - message.campaignId = object.campaignId; - else if (typeof object.campaignId === "object") - message.campaignId = new $util.LongBits(object.campaignId.low >>> 0, object.campaignId.high >>> 0).toNumber(true); - if (object.campaignExpirationTimestamp != null) - if ($util.Long) - (message.campaignExpirationTimestamp = $util.Long.fromValue(object.campaignExpirationTimestamp)).unsigned = true; - else if (typeof object.campaignExpirationTimestamp === "string") - message.campaignExpirationTimestamp = parseInt(object.campaignExpirationTimestamp, 10); - else if (typeof object.campaignExpirationTimestamp === "number") - message.campaignExpirationTimestamp = object.campaignExpirationTimestamp; - else if (typeof object.campaignExpirationTimestamp === "object") - message.campaignExpirationTimestamp = new $util.LongBits(object.campaignExpirationTimestamp.low >>> 0, object.campaignExpirationTimestamp.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a StatusPSA message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.StatusPSA - * @static - * @param {proto.StatusPSA} message StatusPSA - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StatusPSA.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.campaignId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.campaignId = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.campaignExpirationTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.campaignExpirationTimestamp = options.longs === String ? "0" : 0; - } - if (message.campaignId != null && message.hasOwnProperty("campaignId")) - if (typeof message.campaignId === "number") - object.campaignId = options.longs === String ? String(message.campaignId) : message.campaignId; - else - object.campaignId = options.longs === String ? $util.Long.prototype.toString.call(message.campaignId) : options.longs === Number ? new $util.LongBits(message.campaignId.low >>> 0, message.campaignId.high >>> 0).toNumber(true) : message.campaignId; - if (message.campaignExpirationTimestamp != null && message.hasOwnProperty("campaignExpirationTimestamp")) - if (typeof message.campaignExpirationTimestamp === "number") - object.campaignExpirationTimestamp = options.longs === String ? String(message.campaignExpirationTimestamp) : message.campaignExpirationTimestamp; - else - object.campaignExpirationTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.campaignExpirationTimestamp) : options.longs === Number ? new $util.LongBits(message.campaignExpirationTimestamp.low >>> 0, message.campaignExpirationTimestamp.high >>> 0).toNumber(true) : message.campaignExpirationTimestamp; - return object; - }; - - /** - * Converts this StatusPSA to JSON. - * @function toJSON - * @memberof proto.StatusPSA - * @instance - * @returns {Object.} JSON object - */ - StatusPSA.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return StatusPSA; - })(); - proto.UserReceipt = (function() { /** @@ -59525,6 +62479,1812 @@ $root.proto = (function() { return UserReceipt; })(); + proto.UserStatusMuteAction = (function() { + + /** + * Properties of a UserStatusMuteAction. + * @memberof proto + * @interface IUserStatusMuteAction + * @property {boolean|null} [muted] UserStatusMuteAction muted + */ + + /** + * Constructs a new UserStatusMuteAction. + * @memberof proto + * @classdesc Represents a UserStatusMuteAction. + * @implements IUserStatusMuteAction + * @constructor + * @param {proto.IUserStatusMuteAction=} [properties] Properties to set + */ + function UserStatusMuteAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserStatusMuteAction muted. + * @member {boolean} muted + * @memberof proto.UserStatusMuteAction + * @instance + */ + UserStatusMuteAction.prototype.muted = false; + + /** + * Creates a new UserStatusMuteAction instance using the specified properties. + * @function create + * @memberof proto.UserStatusMuteAction + * @static + * @param {proto.IUserStatusMuteAction=} [properties] Properties to set + * @returns {proto.UserStatusMuteAction} UserStatusMuteAction instance + */ + UserStatusMuteAction.create = function create(properties) { + return new UserStatusMuteAction(properties); + }; + + /** + * Encodes the specified UserStatusMuteAction message. Does not implicitly {@link proto.UserStatusMuteAction.verify|verify} messages. + * @function encode + * @memberof proto.UserStatusMuteAction + * @static + * @param {proto.IUserStatusMuteAction} message UserStatusMuteAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserStatusMuteAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.muted != null && Object.hasOwnProperty.call(message, "muted")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.muted); + return writer; + }; + + /** + * Encodes the specified UserStatusMuteAction message, length delimited. Does not implicitly {@link proto.UserStatusMuteAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.UserStatusMuteAction + * @static + * @param {proto.IUserStatusMuteAction} message UserStatusMuteAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserStatusMuteAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserStatusMuteAction message from the specified reader or buffer. + * @function decode + * @memberof proto.UserStatusMuteAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.UserStatusMuteAction} UserStatusMuteAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserStatusMuteAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.UserStatusMuteAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.muted = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserStatusMuteAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.UserStatusMuteAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.UserStatusMuteAction} UserStatusMuteAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserStatusMuteAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserStatusMuteAction message. + * @function verify + * @memberof proto.UserStatusMuteAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserStatusMuteAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.muted != null && message.hasOwnProperty("muted")) + if (typeof message.muted !== "boolean") + return "muted: boolean expected"; + return null; + }; + + /** + * Creates a UserStatusMuteAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.UserStatusMuteAction + * @static + * @param {Object.} object Plain object + * @returns {proto.UserStatusMuteAction} UserStatusMuteAction + */ + UserStatusMuteAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.UserStatusMuteAction) + return object; + var message = new $root.proto.UserStatusMuteAction(); + if (object.muted != null) + message.muted = Boolean(object.muted); + return message; + }; + + /** + * Creates a plain object from a UserStatusMuteAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.UserStatusMuteAction + * @static + * @param {proto.UserStatusMuteAction} message UserStatusMuteAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserStatusMuteAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.muted = false; + if (message.muted != null && message.hasOwnProperty("muted")) + object.muted = message.muted; + return object; + }; + + /** + * Converts this UserStatusMuteAction to JSON. + * @function toJSON + * @memberof proto.UserStatusMuteAction + * @instance + * @returns {Object.} JSON object + */ + UserStatusMuteAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UserStatusMuteAction; + })(); + + proto.VerifiedNameCertificate = (function() { + + /** + * Properties of a VerifiedNameCertificate. + * @memberof proto + * @interface IVerifiedNameCertificate + * @property {Uint8Array|null} [details] VerifiedNameCertificate details + * @property {Uint8Array|null} [signature] VerifiedNameCertificate signature + * @property {Uint8Array|null} [serverSignature] VerifiedNameCertificate serverSignature + */ + + /** + * Constructs a new VerifiedNameCertificate. + * @memberof proto + * @classdesc Represents a VerifiedNameCertificate. + * @implements IVerifiedNameCertificate + * @constructor + * @param {proto.IVerifiedNameCertificate=} [properties] Properties to set + */ + function VerifiedNameCertificate(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VerifiedNameCertificate details. + * @member {Uint8Array} details + * @memberof proto.VerifiedNameCertificate + * @instance + */ + VerifiedNameCertificate.prototype.details = $util.newBuffer([]); + + /** + * VerifiedNameCertificate signature. + * @member {Uint8Array} signature + * @memberof proto.VerifiedNameCertificate + * @instance + */ + VerifiedNameCertificate.prototype.signature = $util.newBuffer([]); + + /** + * VerifiedNameCertificate serverSignature. + * @member {Uint8Array} serverSignature + * @memberof proto.VerifiedNameCertificate + * @instance + */ + VerifiedNameCertificate.prototype.serverSignature = $util.newBuffer([]); + + /** + * Creates a new VerifiedNameCertificate instance using the specified properties. + * @function create + * @memberof proto.VerifiedNameCertificate + * @static + * @param {proto.IVerifiedNameCertificate=} [properties] Properties to set + * @returns {proto.VerifiedNameCertificate} VerifiedNameCertificate instance + */ + VerifiedNameCertificate.create = function create(properties) { + return new VerifiedNameCertificate(properties); + }; + + /** + * Encodes the specified VerifiedNameCertificate message. Does not implicitly {@link proto.VerifiedNameCertificate.verify|verify} messages. + * @function encode + * @memberof proto.VerifiedNameCertificate + * @static + * @param {proto.IVerifiedNameCertificate} message VerifiedNameCertificate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VerifiedNameCertificate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.details != null && Object.hasOwnProperty.call(message, "details")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.details); + if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.signature); + if (message.serverSignature != null && Object.hasOwnProperty.call(message, "serverSignature")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.serverSignature); + return writer; + }; + + /** + * Encodes the specified VerifiedNameCertificate message, length delimited. Does not implicitly {@link proto.VerifiedNameCertificate.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.VerifiedNameCertificate + * @static + * @param {proto.IVerifiedNameCertificate} message VerifiedNameCertificate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VerifiedNameCertificate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VerifiedNameCertificate message from the specified reader or buffer. + * @function decode + * @memberof proto.VerifiedNameCertificate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.VerifiedNameCertificate} VerifiedNameCertificate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VerifiedNameCertificate.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.VerifiedNameCertificate(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.details = reader.bytes(); + break; + case 2: + message.signature = reader.bytes(); + break; + case 3: + message.serverSignature = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VerifiedNameCertificate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.VerifiedNameCertificate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.VerifiedNameCertificate} VerifiedNameCertificate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VerifiedNameCertificate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VerifiedNameCertificate message. + * @function verify + * @memberof proto.VerifiedNameCertificate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VerifiedNameCertificate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.details != null && message.hasOwnProperty("details")) + if (!(message.details && typeof message.details.length === "number" || $util.isString(message.details))) + return "details: buffer expected"; + if (message.signature != null && message.hasOwnProperty("signature")) + if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) + return "signature: buffer expected"; + if (message.serverSignature != null && message.hasOwnProperty("serverSignature")) + if (!(message.serverSignature && typeof message.serverSignature.length === "number" || $util.isString(message.serverSignature))) + return "serverSignature: buffer expected"; + return null; + }; + + /** + * Creates a VerifiedNameCertificate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.VerifiedNameCertificate + * @static + * @param {Object.} object Plain object + * @returns {proto.VerifiedNameCertificate} VerifiedNameCertificate + */ + VerifiedNameCertificate.fromObject = function fromObject(object) { + if (object instanceof $root.proto.VerifiedNameCertificate) + return object; + var message = new $root.proto.VerifiedNameCertificate(); + if (object.details != null) + if (typeof object.details === "string") + $util.base64.decode(object.details, message.details = $util.newBuffer($util.base64.length(object.details)), 0); + else if (object.details.length) + message.details = object.details; + if (object.signature != null) + if (typeof object.signature === "string") + $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); + else if (object.signature.length) + message.signature = object.signature; + if (object.serverSignature != null) + if (typeof object.serverSignature === "string") + $util.base64.decode(object.serverSignature, message.serverSignature = $util.newBuffer($util.base64.length(object.serverSignature)), 0); + else if (object.serverSignature.length) + message.serverSignature = object.serverSignature; + return message; + }; + + /** + * Creates a plain object from a VerifiedNameCertificate message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.VerifiedNameCertificate + * @static + * @param {proto.VerifiedNameCertificate} message VerifiedNameCertificate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VerifiedNameCertificate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.details = ""; + else { + object.details = []; + if (options.bytes !== Array) + object.details = $util.newBuffer(object.details); + } + if (options.bytes === String) + object.signature = ""; + else { + object.signature = []; + if (options.bytes !== Array) + object.signature = $util.newBuffer(object.signature); + } + if (options.bytes === String) + object.serverSignature = ""; + else { + object.serverSignature = []; + if (options.bytes !== Array) + object.serverSignature = $util.newBuffer(object.serverSignature); + } + } + if (message.details != null && message.hasOwnProperty("details")) + object.details = options.bytes === String ? $util.base64.encode(message.details, 0, message.details.length) : options.bytes === Array ? Array.prototype.slice.call(message.details) : message.details; + if (message.signature != null && message.hasOwnProperty("signature")) + object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; + if (message.serverSignature != null && message.hasOwnProperty("serverSignature")) + object.serverSignature = options.bytes === String ? $util.base64.encode(message.serverSignature, 0, message.serverSignature.length) : options.bytes === Array ? Array.prototype.slice.call(message.serverSignature) : message.serverSignature; + return object; + }; + + /** + * Converts this VerifiedNameCertificate to JSON. + * @function toJSON + * @memberof proto.VerifiedNameCertificate + * @instance + * @returns {Object.} JSON object + */ + VerifiedNameCertificate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return VerifiedNameCertificate; + })(); + + proto.VerifiedNameDetails = (function() { + + /** + * Properties of a VerifiedNameDetails. + * @memberof proto + * @interface IVerifiedNameDetails + * @property {number|Long|null} [serial] VerifiedNameDetails serial + * @property {string|null} [issuer] VerifiedNameDetails issuer + * @property {string|null} [verifiedName] VerifiedNameDetails verifiedName + * @property {Array.|null} [localizedNames] VerifiedNameDetails localizedNames + * @property {number|Long|null} [issueTime] VerifiedNameDetails issueTime + */ + + /** + * Constructs a new VerifiedNameDetails. + * @memberof proto + * @classdesc Represents a VerifiedNameDetails. + * @implements IVerifiedNameDetails + * @constructor + * @param {proto.IVerifiedNameDetails=} [properties] Properties to set + */ + function VerifiedNameDetails(properties) { + this.localizedNames = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VerifiedNameDetails serial. + * @member {number|Long} serial + * @memberof proto.VerifiedNameDetails + * @instance + */ + VerifiedNameDetails.prototype.serial = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * VerifiedNameDetails issuer. + * @member {string} issuer + * @memberof proto.VerifiedNameDetails + * @instance + */ + VerifiedNameDetails.prototype.issuer = ""; + + /** + * VerifiedNameDetails verifiedName. + * @member {string} verifiedName + * @memberof proto.VerifiedNameDetails + * @instance + */ + VerifiedNameDetails.prototype.verifiedName = ""; + + /** + * VerifiedNameDetails localizedNames. + * @member {Array.} localizedNames + * @memberof proto.VerifiedNameDetails + * @instance + */ + VerifiedNameDetails.prototype.localizedNames = $util.emptyArray; + + /** + * VerifiedNameDetails issueTime. + * @member {number|Long} issueTime + * @memberof proto.VerifiedNameDetails + * @instance + */ + VerifiedNameDetails.prototype.issueTime = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new VerifiedNameDetails instance using the specified properties. + * @function create + * @memberof proto.VerifiedNameDetails + * @static + * @param {proto.IVerifiedNameDetails=} [properties] Properties to set + * @returns {proto.VerifiedNameDetails} VerifiedNameDetails instance + */ + VerifiedNameDetails.create = function create(properties) { + return new VerifiedNameDetails(properties); + }; + + /** + * Encodes the specified VerifiedNameDetails message. Does not implicitly {@link proto.VerifiedNameDetails.verify|verify} messages. + * @function encode + * @memberof proto.VerifiedNameDetails + * @static + * @param {proto.IVerifiedNameDetails} message VerifiedNameDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VerifiedNameDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.serial != null && Object.hasOwnProperty.call(message, "serial")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.serial); + if (message.issuer != null && Object.hasOwnProperty.call(message, "issuer")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.issuer); + if (message.verifiedName != null && Object.hasOwnProperty.call(message, "verifiedName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.verifiedName); + if (message.localizedNames != null && message.localizedNames.length) + for (var i = 0; i < message.localizedNames.length; ++i) + $root.proto.LocalizedName.encode(message.localizedNames[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.issueTime != null && Object.hasOwnProperty.call(message, "issueTime")) + writer.uint32(/* id 10, wireType 0 =*/80).uint64(message.issueTime); + return writer; + }; + + /** + * Encodes the specified VerifiedNameDetails message, length delimited. Does not implicitly {@link proto.VerifiedNameDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.VerifiedNameDetails + * @static + * @param {proto.IVerifiedNameDetails} message VerifiedNameDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VerifiedNameDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VerifiedNameDetails message from the specified reader or buffer. + * @function decode + * @memberof proto.VerifiedNameDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.VerifiedNameDetails} VerifiedNameDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VerifiedNameDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.VerifiedNameDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.serial = reader.uint64(); + break; + case 2: + message.issuer = reader.string(); + break; + case 4: + message.verifiedName = reader.string(); + break; + case 8: + if (!(message.localizedNames && message.localizedNames.length)) + message.localizedNames = []; + message.localizedNames.push($root.proto.LocalizedName.decode(reader, reader.uint32())); + break; + case 10: + message.issueTime = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VerifiedNameDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.VerifiedNameDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.VerifiedNameDetails} VerifiedNameDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VerifiedNameDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VerifiedNameDetails message. + * @function verify + * @memberof proto.VerifiedNameDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VerifiedNameDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.serial != null && message.hasOwnProperty("serial")) + if (!$util.isInteger(message.serial) && !(message.serial && $util.isInteger(message.serial.low) && $util.isInteger(message.serial.high))) + return "serial: integer|Long expected"; + if (message.issuer != null && message.hasOwnProperty("issuer")) + if (!$util.isString(message.issuer)) + return "issuer: string expected"; + if (message.verifiedName != null && message.hasOwnProperty("verifiedName")) + if (!$util.isString(message.verifiedName)) + return "verifiedName: string expected"; + if (message.localizedNames != null && message.hasOwnProperty("localizedNames")) { + if (!Array.isArray(message.localizedNames)) + return "localizedNames: array expected"; + for (var i = 0; i < message.localizedNames.length; ++i) { + var error = $root.proto.LocalizedName.verify(message.localizedNames[i]); + if (error) + return "localizedNames." + error; + } + } + if (message.issueTime != null && message.hasOwnProperty("issueTime")) + if (!$util.isInteger(message.issueTime) && !(message.issueTime && $util.isInteger(message.issueTime.low) && $util.isInteger(message.issueTime.high))) + return "issueTime: integer|Long expected"; + return null; + }; + + /** + * Creates a VerifiedNameDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.VerifiedNameDetails + * @static + * @param {Object.} object Plain object + * @returns {proto.VerifiedNameDetails} VerifiedNameDetails + */ + VerifiedNameDetails.fromObject = function fromObject(object) { + if (object instanceof $root.proto.VerifiedNameDetails) + return object; + var message = new $root.proto.VerifiedNameDetails(); + if (object.serial != null) + if ($util.Long) + (message.serial = $util.Long.fromValue(object.serial)).unsigned = true; + else if (typeof object.serial === "string") + message.serial = parseInt(object.serial, 10); + else if (typeof object.serial === "number") + message.serial = object.serial; + else if (typeof object.serial === "object") + message.serial = new $util.LongBits(object.serial.low >>> 0, object.serial.high >>> 0).toNumber(true); + if (object.issuer != null) + message.issuer = String(object.issuer); + if (object.verifiedName != null) + message.verifiedName = String(object.verifiedName); + if (object.localizedNames) { + if (!Array.isArray(object.localizedNames)) + throw TypeError(".proto.VerifiedNameDetails.localizedNames: array expected"); + message.localizedNames = []; + for (var i = 0; i < object.localizedNames.length; ++i) { + if (typeof object.localizedNames[i] !== "object") + throw TypeError(".proto.VerifiedNameDetails.localizedNames: object expected"); + message.localizedNames[i] = $root.proto.LocalizedName.fromObject(object.localizedNames[i]); + } + } + if (object.issueTime != null) + if ($util.Long) + (message.issueTime = $util.Long.fromValue(object.issueTime)).unsigned = true; + else if (typeof object.issueTime === "string") + message.issueTime = parseInt(object.issueTime, 10); + else if (typeof object.issueTime === "number") + message.issueTime = object.issueTime; + else if (typeof object.issueTime === "object") + message.issueTime = new $util.LongBits(object.issueTime.low >>> 0, object.issueTime.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a VerifiedNameDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.VerifiedNameDetails + * @static + * @param {proto.VerifiedNameDetails} message VerifiedNameDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VerifiedNameDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.localizedNames = []; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.serial = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.serial = options.longs === String ? "0" : 0; + object.issuer = ""; + object.verifiedName = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.issueTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.issueTime = options.longs === String ? "0" : 0; + } + if (message.serial != null && message.hasOwnProperty("serial")) + if (typeof message.serial === "number") + object.serial = options.longs === String ? String(message.serial) : message.serial; + else + object.serial = options.longs === String ? $util.Long.prototype.toString.call(message.serial) : options.longs === Number ? new $util.LongBits(message.serial.low >>> 0, message.serial.high >>> 0).toNumber(true) : message.serial; + if (message.issuer != null && message.hasOwnProperty("issuer")) + object.issuer = message.issuer; + if (message.verifiedName != null && message.hasOwnProperty("verifiedName")) + object.verifiedName = message.verifiedName; + if (message.localizedNames && message.localizedNames.length) { + object.localizedNames = []; + for (var j = 0; j < message.localizedNames.length; ++j) + object.localizedNames[j] = $root.proto.LocalizedName.toObject(message.localizedNames[j], options); + } + if (message.issueTime != null && message.hasOwnProperty("issueTime")) + if (typeof message.issueTime === "number") + object.issueTime = options.longs === String ? String(message.issueTime) : message.issueTime; + else + object.issueTime = options.longs === String ? $util.Long.prototype.toString.call(message.issueTime) : options.longs === Number ? new $util.LongBits(message.issueTime.low >>> 0, message.issueTime.high >>> 0).toNumber(true) : message.issueTime; + return object; + }; + + /** + * Converts this VerifiedNameDetails to JSON. + * @function toJSON + * @memberof proto.VerifiedNameDetails + * @instance + * @returns {Object.} JSON object + */ + VerifiedNameDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return VerifiedNameDetails; + })(); + + proto.VideoMessage = (function() { + + /** + * Properties of a VideoMessage. + * @memberof proto + * @interface IVideoMessage + * @property {string|null} [url] VideoMessage url + * @property {string|null} [mimetype] VideoMessage mimetype + * @property {Uint8Array|null} [fileSha256] VideoMessage fileSha256 + * @property {number|Long|null} [fileLength] VideoMessage fileLength + * @property {number|null} [seconds] VideoMessage seconds + * @property {Uint8Array|null} [mediaKey] VideoMessage mediaKey + * @property {string|null} [caption] VideoMessage caption + * @property {boolean|null} [gifPlayback] VideoMessage gifPlayback + * @property {number|null} [height] VideoMessage height + * @property {number|null} [width] VideoMessage width + * @property {Uint8Array|null} [fileEncSha256] VideoMessage fileEncSha256 + * @property {Array.|null} [interactiveAnnotations] VideoMessage interactiveAnnotations + * @property {string|null} [directPath] VideoMessage directPath + * @property {number|Long|null} [mediaKeyTimestamp] VideoMessage mediaKeyTimestamp + * @property {Uint8Array|null} [jpegThumbnail] VideoMessage jpegThumbnail + * @property {proto.IContextInfo|null} [contextInfo] VideoMessage contextInfo + * @property {Uint8Array|null} [streamingSidecar] VideoMessage streamingSidecar + * @property {proto.VideoMessage.VideoMessageAttribution|null} [gifAttribution] VideoMessage gifAttribution + * @property {boolean|null} [viewOnce] VideoMessage viewOnce + * @property {string|null} [thumbnailDirectPath] VideoMessage thumbnailDirectPath + * @property {Uint8Array|null} [thumbnailSha256] VideoMessage thumbnailSha256 + * @property {Uint8Array|null} [thumbnailEncSha256] VideoMessage thumbnailEncSha256 + * @property {string|null} [staticUrl] VideoMessage staticUrl + */ + + /** + * Constructs a new VideoMessage. + * @memberof proto + * @classdesc Represents a VideoMessage. + * @implements IVideoMessage + * @constructor + * @param {proto.IVideoMessage=} [properties] Properties to set + */ + function VideoMessage(properties) { + this.interactiveAnnotations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VideoMessage url. + * @member {string} url + * @memberof proto.VideoMessage + * @instance + */ + VideoMessage.prototype.url = ""; + + /** + * VideoMessage mimetype. + * @member {string} mimetype + * @memberof proto.VideoMessage + * @instance + */ + VideoMessage.prototype.mimetype = ""; + + /** + * VideoMessage fileSha256. + * @member {Uint8Array} fileSha256 + * @memberof proto.VideoMessage + * @instance + */ + VideoMessage.prototype.fileSha256 = $util.newBuffer([]); + + /** + * VideoMessage fileLength. + * @member {number|Long} fileLength + * @memberof proto.VideoMessage + * @instance + */ + VideoMessage.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * VideoMessage seconds. + * @member {number} seconds + * @memberof proto.VideoMessage + * @instance + */ + VideoMessage.prototype.seconds = 0; + + /** + * VideoMessage mediaKey. + * @member {Uint8Array} mediaKey + * @memberof proto.VideoMessage + * @instance + */ + VideoMessage.prototype.mediaKey = $util.newBuffer([]); + + /** + * VideoMessage caption. + * @member {string} caption + * @memberof proto.VideoMessage + * @instance + */ + VideoMessage.prototype.caption = ""; + + /** + * VideoMessage gifPlayback. + * @member {boolean} gifPlayback + * @memberof proto.VideoMessage + * @instance + */ + VideoMessage.prototype.gifPlayback = false; + + /** + * VideoMessage height. + * @member {number} height + * @memberof proto.VideoMessage + * @instance + */ + VideoMessage.prototype.height = 0; + + /** + * VideoMessage width. + * @member {number} width + * @memberof proto.VideoMessage + * @instance + */ + VideoMessage.prototype.width = 0; + + /** + * VideoMessage fileEncSha256. + * @member {Uint8Array} fileEncSha256 + * @memberof proto.VideoMessage + * @instance + */ + VideoMessage.prototype.fileEncSha256 = $util.newBuffer([]); + + /** + * VideoMessage interactiveAnnotations. + * @member {Array.} interactiveAnnotations + * @memberof proto.VideoMessage + * @instance + */ + VideoMessage.prototype.interactiveAnnotations = $util.emptyArray; + + /** + * VideoMessage directPath. + * @member {string} directPath + * @memberof proto.VideoMessage + * @instance + */ + VideoMessage.prototype.directPath = ""; + + /** + * VideoMessage mediaKeyTimestamp. + * @member {number|Long} mediaKeyTimestamp + * @memberof proto.VideoMessage + * @instance + */ + VideoMessage.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * VideoMessage jpegThumbnail. + * @member {Uint8Array} jpegThumbnail + * @memberof proto.VideoMessage + * @instance + */ + VideoMessage.prototype.jpegThumbnail = $util.newBuffer([]); + + /** + * VideoMessage contextInfo. + * @member {proto.IContextInfo|null|undefined} contextInfo + * @memberof proto.VideoMessage + * @instance + */ + VideoMessage.prototype.contextInfo = null; + + /** + * VideoMessage streamingSidecar. + * @member {Uint8Array} streamingSidecar + * @memberof proto.VideoMessage + * @instance + */ + VideoMessage.prototype.streamingSidecar = $util.newBuffer([]); + + /** + * VideoMessage gifAttribution. + * @member {proto.VideoMessage.VideoMessageAttribution} gifAttribution + * @memberof proto.VideoMessage + * @instance + */ + VideoMessage.prototype.gifAttribution = 0; + + /** + * VideoMessage viewOnce. + * @member {boolean} viewOnce + * @memberof proto.VideoMessage + * @instance + */ + VideoMessage.prototype.viewOnce = false; + + /** + * VideoMessage thumbnailDirectPath. + * @member {string} thumbnailDirectPath + * @memberof proto.VideoMessage + * @instance + */ + VideoMessage.prototype.thumbnailDirectPath = ""; + + /** + * VideoMessage thumbnailSha256. + * @member {Uint8Array} thumbnailSha256 + * @memberof proto.VideoMessage + * @instance + */ + VideoMessage.prototype.thumbnailSha256 = $util.newBuffer([]); + + /** + * VideoMessage thumbnailEncSha256. + * @member {Uint8Array} thumbnailEncSha256 + * @memberof proto.VideoMessage + * @instance + */ + VideoMessage.prototype.thumbnailEncSha256 = $util.newBuffer([]); + + /** + * VideoMessage staticUrl. + * @member {string} staticUrl + * @memberof proto.VideoMessage + * @instance + */ + VideoMessage.prototype.staticUrl = ""; + + /** + * Creates a new VideoMessage instance using the specified properties. + * @function create + * @memberof proto.VideoMessage + * @static + * @param {proto.IVideoMessage=} [properties] Properties to set + * @returns {proto.VideoMessage} VideoMessage instance + */ + VideoMessage.create = function create(properties) { + return new VideoMessage(properties); + }; + + /** + * Encodes the specified VideoMessage message. Does not implicitly {@link proto.VideoMessage.verify|verify} messages. + * @function encode + * @memberof proto.VideoMessage + * @static + * @param {proto.IVideoMessage} message VideoMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VideoMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.url != null && Object.hasOwnProperty.call(message, "url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.url); + if (message.mimetype != null && Object.hasOwnProperty.call(message, "mimetype")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.mimetype); + if (message.fileSha256 != null && Object.hasOwnProperty.call(message, "fileSha256")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.fileSha256); + if (message.fileLength != null && Object.hasOwnProperty.call(message, "fileLength")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.fileLength); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.seconds); + if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.mediaKey); + if (message.caption != null && Object.hasOwnProperty.call(message, "caption")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.caption); + if (message.gifPlayback != null && Object.hasOwnProperty.call(message, "gifPlayback")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.gifPlayback); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.height); + if (message.width != null && Object.hasOwnProperty.call(message, "width")) + writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.width); + if (message.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256")) + writer.uint32(/* id 11, wireType 2 =*/90).bytes(message.fileEncSha256); + if (message.interactiveAnnotations != null && message.interactiveAnnotations.length) + for (var i = 0; i < message.interactiveAnnotations.length; ++i) + $root.proto.InteractiveAnnotation.encode(message.interactiveAnnotations[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.directPath); + if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp")) + writer.uint32(/* id 14, wireType 0 =*/112).int64(message.mediaKeyTimestamp); + if (message.jpegThumbnail != null && Object.hasOwnProperty.call(message, "jpegThumbnail")) + writer.uint32(/* id 16, wireType 2 =*/130).bytes(message.jpegThumbnail); + if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) + $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.streamingSidecar != null && Object.hasOwnProperty.call(message, "streamingSidecar")) + writer.uint32(/* id 18, wireType 2 =*/146).bytes(message.streamingSidecar); + if (message.gifAttribution != null && Object.hasOwnProperty.call(message, "gifAttribution")) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.gifAttribution); + if (message.viewOnce != null && Object.hasOwnProperty.call(message, "viewOnce")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.viewOnce); + if (message.thumbnailDirectPath != null && Object.hasOwnProperty.call(message, "thumbnailDirectPath")) + writer.uint32(/* id 21, wireType 2 =*/170).string(message.thumbnailDirectPath); + if (message.thumbnailSha256 != null && Object.hasOwnProperty.call(message, "thumbnailSha256")) + writer.uint32(/* id 22, wireType 2 =*/178).bytes(message.thumbnailSha256); + if (message.thumbnailEncSha256 != null && Object.hasOwnProperty.call(message, "thumbnailEncSha256")) + writer.uint32(/* id 23, wireType 2 =*/186).bytes(message.thumbnailEncSha256); + if (message.staticUrl != null && Object.hasOwnProperty.call(message, "staticUrl")) + writer.uint32(/* id 24, wireType 2 =*/194).string(message.staticUrl); + return writer; + }; + + /** + * Encodes the specified VideoMessage message, length delimited. Does not implicitly {@link proto.VideoMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.VideoMessage + * @static + * @param {proto.IVideoMessage} message VideoMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VideoMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VideoMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.VideoMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.VideoMessage} VideoMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VideoMessage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.VideoMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.url = reader.string(); + break; + case 2: + message.mimetype = reader.string(); + break; + case 3: + message.fileSha256 = reader.bytes(); + break; + case 4: + message.fileLength = reader.uint64(); + break; + case 5: + message.seconds = reader.uint32(); + break; + case 6: + message.mediaKey = reader.bytes(); + break; + case 7: + message.caption = reader.string(); + break; + case 8: + message.gifPlayback = reader.bool(); + break; + case 9: + message.height = reader.uint32(); + break; + case 10: + message.width = reader.uint32(); + break; + case 11: + message.fileEncSha256 = reader.bytes(); + break; + case 12: + if (!(message.interactiveAnnotations && message.interactiveAnnotations.length)) + message.interactiveAnnotations = []; + message.interactiveAnnotations.push($root.proto.InteractiveAnnotation.decode(reader, reader.uint32())); + break; + case 13: + message.directPath = reader.string(); + break; + case 14: + message.mediaKeyTimestamp = reader.int64(); + break; + case 16: + message.jpegThumbnail = reader.bytes(); + break; + case 17: + message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); + break; + case 18: + message.streamingSidecar = reader.bytes(); + break; + case 19: + message.gifAttribution = reader.int32(); + break; + case 20: + message.viewOnce = reader.bool(); + break; + case 21: + message.thumbnailDirectPath = reader.string(); + break; + case 22: + message.thumbnailSha256 = reader.bytes(); + break; + case 23: + message.thumbnailEncSha256 = reader.bytes(); + break; + case 24: + message.staticUrl = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VideoMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.VideoMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.VideoMessage} VideoMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VideoMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VideoMessage message. + * @function verify + * @memberof proto.VideoMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VideoMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.url != null && message.hasOwnProperty("url")) + if (!$util.isString(message.url)) + return "url: string expected"; + if (message.mimetype != null && message.hasOwnProperty("mimetype")) + if (!$util.isString(message.mimetype)) + return "mimetype: string expected"; + if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256))) + return "fileSha256: buffer expected"; + if (message.fileLength != null && message.hasOwnProperty("fileLength")) + if (!$util.isInteger(message.fileLength) && !(message.fileLength && $util.isInteger(message.fileLength.low) && $util.isInteger(message.fileLength.high))) + return "fileLength: integer|Long expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds)) + return "seconds: integer expected"; + if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) + if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey))) + return "mediaKey: buffer expected"; + if (message.caption != null && message.hasOwnProperty("caption")) + if (!$util.isString(message.caption)) + return "caption: string expected"; + if (message.gifPlayback != null && message.hasOwnProperty("gifPlayback")) + if (typeof message.gifPlayback !== "boolean") + return "gifPlayback: boolean expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height)) + return "height: integer expected"; + if (message.width != null && message.hasOwnProperty("width")) + if (!$util.isInteger(message.width)) + return "width: integer expected"; + if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) + if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256))) + return "fileEncSha256: buffer expected"; + if (message.interactiveAnnotations != null && message.hasOwnProperty("interactiveAnnotations")) { + if (!Array.isArray(message.interactiveAnnotations)) + return "interactiveAnnotations: array expected"; + for (var i = 0; i < message.interactiveAnnotations.length; ++i) { + var error = $root.proto.InteractiveAnnotation.verify(message.interactiveAnnotations[i]); + if (error) + return "interactiveAnnotations." + error; + } + } + if (message.directPath != null && message.hasOwnProperty("directPath")) + if (!$util.isString(message.directPath)) + return "directPath: string expected"; + if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) + if (!$util.isInteger(message.mediaKeyTimestamp) && !(message.mediaKeyTimestamp && $util.isInteger(message.mediaKeyTimestamp.low) && $util.isInteger(message.mediaKeyTimestamp.high))) + return "mediaKeyTimestamp: integer|Long expected"; + if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) + if (!(message.jpegThumbnail && typeof message.jpegThumbnail.length === "number" || $util.isString(message.jpegThumbnail))) + return "jpegThumbnail: buffer expected"; + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } + if (message.streamingSidecar != null && message.hasOwnProperty("streamingSidecar")) + if (!(message.streamingSidecar && typeof message.streamingSidecar.length === "number" || $util.isString(message.streamingSidecar))) + return "streamingSidecar: buffer expected"; + if (message.gifAttribution != null && message.hasOwnProperty("gifAttribution")) + switch (message.gifAttribution) { + default: + return "gifAttribution: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.viewOnce != null && message.hasOwnProperty("viewOnce")) + if (typeof message.viewOnce !== "boolean") + return "viewOnce: boolean expected"; + if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath")) + if (!$util.isString(message.thumbnailDirectPath)) + return "thumbnailDirectPath: string expected"; + if (message.thumbnailSha256 != null && message.hasOwnProperty("thumbnailSha256")) + if (!(message.thumbnailSha256 && typeof message.thumbnailSha256.length === "number" || $util.isString(message.thumbnailSha256))) + return "thumbnailSha256: buffer expected"; + if (message.thumbnailEncSha256 != null && message.hasOwnProperty("thumbnailEncSha256")) + if (!(message.thumbnailEncSha256 && typeof message.thumbnailEncSha256.length === "number" || $util.isString(message.thumbnailEncSha256))) + return "thumbnailEncSha256: buffer expected"; + if (message.staticUrl != null && message.hasOwnProperty("staticUrl")) + if (!$util.isString(message.staticUrl)) + return "staticUrl: string expected"; + return null; + }; + + /** + * Creates a VideoMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.VideoMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.VideoMessage} VideoMessage + */ + VideoMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.VideoMessage) + return object; + var message = new $root.proto.VideoMessage(); + if (object.url != null) + message.url = String(object.url); + if (object.mimetype != null) + message.mimetype = String(object.mimetype); + if (object.fileSha256 != null) + if (typeof object.fileSha256 === "string") + $util.base64.decode(object.fileSha256, message.fileSha256 = $util.newBuffer($util.base64.length(object.fileSha256)), 0); + else if (object.fileSha256.length) + message.fileSha256 = object.fileSha256; + if (object.fileLength != null) + if ($util.Long) + (message.fileLength = $util.Long.fromValue(object.fileLength)).unsigned = true; + else if (typeof object.fileLength === "string") + message.fileLength = parseInt(object.fileLength, 10); + else if (typeof object.fileLength === "number") + message.fileLength = object.fileLength; + else if (typeof object.fileLength === "object") + message.fileLength = new $util.LongBits(object.fileLength.low >>> 0, object.fileLength.high >>> 0).toNumber(true); + if (object.seconds != null) + message.seconds = object.seconds >>> 0; + if (object.mediaKey != null) + if (typeof object.mediaKey === "string") + $util.base64.decode(object.mediaKey, message.mediaKey = $util.newBuffer($util.base64.length(object.mediaKey)), 0); + else if (object.mediaKey.length) + message.mediaKey = object.mediaKey; + if (object.caption != null) + message.caption = String(object.caption); + if (object.gifPlayback != null) + message.gifPlayback = Boolean(object.gifPlayback); + if (object.height != null) + message.height = object.height >>> 0; + if (object.width != null) + message.width = object.width >>> 0; + if (object.fileEncSha256 != null) + if (typeof object.fileEncSha256 === "string") + $util.base64.decode(object.fileEncSha256, message.fileEncSha256 = $util.newBuffer($util.base64.length(object.fileEncSha256)), 0); + else if (object.fileEncSha256.length) + message.fileEncSha256 = object.fileEncSha256; + if (object.interactiveAnnotations) { + if (!Array.isArray(object.interactiveAnnotations)) + throw TypeError(".proto.VideoMessage.interactiveAnnotations: array expected"); + message.interactiveAnnotations = []; + for (var i = 0; i < object.interactiveAnnotations.length; ++i) { + if (typeof object.interactiveAnnotations[i] !== "object") + throw TypeError(".proto.VideoMessage.interactiveAnnotations: object expected"); + message.interactiveAnnotations[i] = $root.proto.InteractiveAnnotation.fromObject(object.interactiveAnnotations[i]); + } + } + if (object.directPath != null) + message.directPath = String(object.directPath); + if (object.mediaKeyTimestamp != null) + if ($util.Long) + (message.mediaKeyTimestamp = $util.Long.fromValue(object.mediaKeyTimestamp)).unsigned = false; + else if (typeof object.mediaKeyTimestamp === "string") + message.mediaKeyTimestamp = parseInt(object.mediaKeyTimestamp, 10); + else if (typeof object.mediaKeyTimestamp === "number") + message.mediaKeyTimestamp = object.mediaKeyTimestamp; + else if (typeof object.mediaKeyTimestamp === "object") + message.mediaKeyTimestamp = new $util.LongBits(object.mediaKeyTimestamp.low >>> 0, object.mediaKeyTimestamp.high >>> 0).toNumber(); + if (object.jpegThumbnail != null) + if (typeof object.jpegThumbnail === "string") + $util.base64.decode(object.jpegThumbnail, message.jpegThumbnail = $util.newBuffer($util.base64.length(object.jpegThumbnail)), 0); + else if (object.jpegThumbnail.length) + message.jpegThumbnail = object.jpegThumbnail; + if (object.contextInfo != null) { + if (typeof object.contextInfo !== "object") + throw TypeError(".proto.VideoMessage.contextInfo: object expected"); + message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); + } + if (object.streamingSidecar != null) + if (typeof object.streamingSidecar === "string") + $util.base64.decode(object.streamingSidecar, message.streamingSidecar = $util.newBuffer($util.base64.length(object.streamingSidecar)), 0); + else if (object.streamingSidecar.length) + message.streamingSidecar = object.streamingSidecar; + switch (object.gifAttribution) { + case "NONE": + case 0: + message.gifAttribution = 0; + break; + case "GIPHY": + case 1: + message.gifAttribution = 1; + break; + case "TENOR": + case 2: + message.gifAttribution = 2; + break; + } + if (object.viewOnce != null) + message.viewOnce = Boolean(object.viewOnce); + if (object.thumbnailDirectPath != null) + message.thumbnailDirectPath = String(object.thumbnailDirectPath); + if (object.thumbnailSha256 != null) + if (typeof object.thumbnailSha256 === "string") + $util.base64.decode(object.thumbnailSha256, message.thumbnailSha256 = $util.newBuffer($util.base64.length(object.thumbnailSha256)), 0); + else if (object.thumbnailSha256.length) + message.thumbnailSha256 = object.thumbnailSha256; + if (object.thumbnailEncSha256 != null) + if (typeof object.thumbnailEncSha256 === "string") + $util.base64.decode(object.thumbnailEncSha256, message.thumbnailEncSha256 = $util.newBuffer($util.base64.length(object.thumbnailEncSha256)), 0); + else if (object.thumbnailEncSha256.length) + message.thumbnailEncSha256 = object.thumbnailEncSha256; + if (object.staticUrl != null) + message.staticUrl = String(object.staticUrl); + return message; + }; + + /** + * Creates a plain object from a VideoMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.VideoMessage + * @static + * @param {proto.VideoMessage} message VideoMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VideoMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.interactiveAnnotations = []; + if (options.defaults) { + object.url = ""; + object.mimetype = ""; + if (options.bytes === String) + object.fileSha256 = ""; + else { + object.fileSha256 = []; + if (options.bytes !== Array) + object.fileSha256 = $util.newBuffer(object.fileSha256); + } + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.fileLength = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.fileLength = options.longs === String ? "0" : 0; + object.seconds = 0; + if (options.bytes === String) + object.mediaKey = ""; + else { + object.mediaKey = []; + if (options.bytes !== Array) + object.mediaKey = $util.newBuffer(object.mediaKey); + } + object.caption = ""; + object.gifPlayback = false; + object.height = 0; + object.width = 0; + if (options.bytes === String) + object.fileEncSha256 = ""; + else { + object.fileEncSha256 = []; + if (options.bytes !== Array) + object.fileEncSha256 = $util.newBuffer(object.fileEncSha256); + } + object.directPath = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.mediaKeyTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.mediaKeyTimestamp = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.jpegThumbnail = ""; + else { + object.jpegThumbnail = []; + if (options.bytes !== Array) + object.jpegThumbnail = $util.newBuffer(object.jpegThumbnail); + } + object.contextInfo = null; + if (options.bytes === String) + object.streamingSidecar = ""; + else { + object.streamingSidecar = []; + if (options.bytes !== Array) + object.streamingSidecar = $util.newBuffer(object.streamingSidecar); + } + object.gifAttribution = options.enums === String ? "NONE" : 0; + object.viewOnce = false; + object.thumbnailDirectPath = ""; + if (options.bytes === String) + object.thumbnailSha256 = ""; + else { + object.thumbnailSha256 = []; + if (options.bytes !== Array) + object.thumbnailSha256 = $util.newBuffer(object.thumbnailSha256); + } + if (options.bytes === String) + object.thumbnailEncSha256 = ""; + else { + object.thumbnailEncSha256 = []; + if (options.bytes !== Array) + object.thumbnailEncSha256 = $util.newBuffer(object.thumbnailEncSha256); + } + object.staticUrl = ""; + } + if (message.url != null && message.hasOwnProperty("url")) + object.url = message.url; + if (message.mimetype != null && message.hasOwnProperty("mimetype")) + object.mimetype = message.mimetype; + if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + object.fileSha256 = options.bytes === String ? $util.base64.encode(message.fileSha256, 0, message.fileSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileSha256) : message.fileSha256; + if (message.fileLength != null && message.hasOwnProperty("fileLength")) + if (typeof message.fileLength === "number") + object.fileLength = options.longs === String ? String(message.fileLength) : message.fileLength; + else + object.fileLength = options.longs === String ? $util.Long.prototype.toString.call(message.fileLength) : options.longs === Number ? new $util.LongBits(message.fileLength.low >>> 0, message.fileLength.high >>> 0).toNumber(true) : message.fileLength; + if (message.seconds != null && message.hasOwnProperty("seconds")) + object.seconds = message.seconds; + if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) + object.mediaKey = options.bytes === String ? $util.base64.encode(message.mediaKey, 0, message.mediaKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.mediaKey) : message.mediaKey; + if (message.caption != null && message.hasOwnProperty("caption")) + object.caption = message.caption; + if (message.gifPlayback != null && message.hasOwnProperty("gifPlayback")) + object.gifPlayback = message.gifPlayback; + if (message.height != null && message.hasOwnProperty("height")) + object.height = message.height; + if (message.width != null && message.hasOwnProperty("width")) + object.width = message.width; + if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) + object.fileEncSha256 = options.bytes === String ? $util.base64.encode(message.fileEncSha256, 0, message.fileEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileEncSha256) : message.fileEncSha256; + if (message.interactiveAnnotations && message.interactiveAnnotations.length) { + object.interactiveAnnotations = []; + for (var j = 0; j < message.interactiveAnnotations.length; ++j) + object.interactiveAnnotations[j] = $root.proto.InteractiveAnnotation.toObject(message.interactiveAnnotations[j], options); + } + if (message.directPath != null && message.hasOwnProperty("directPath")) + object.directPath = message.directPath; + if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) + if (typeof message.mediaKeyTimestamp === "number") + object.mediaKeyTimestamp = options.longs === String ? String(message.mediaKeyTimestamp) : message.mediaKeyTimestamp; + else + object.mediaKeyTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.mediaKeyTimestamp) : options.longs === Number ? new $util.LongBits(message.mediaKeyTimestamp.low >>> 0, message.mediaKeyTimestamp.high >>> 0).toNumber() : message.mediaKeyTimestamp; + if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) + object.jpegThumbnail = options.bytes === String ? $util.base64.encode(message.jpegThumbnail, 0, message.jpegThumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.jpegThumbnail) : message.jpegThumbnail; + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) + object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + if (message.streamingSidecar != null && message.hasOwnProperty("streamingSidecar")) + object.streamingSidecar = options.bytes === String ? $util.base64.encode(message.streamingSidecar, 0, message.streamingSidecar.length) : options.bytes === Array ? Array.prototype.slice.call(message.streamingSidecar) : message.streamingSidecar; + if (message.gifAttribution != null && message.hasOwnProperty("gifAttribution")) + object.gifAttribution = options.enums === String ? $root.proto.VideoMessage.VideoMessageAttribution[message.gifAttribution] : message.gifAttribution; + if (message.viewOnce != null && message.hasOwnProperty("viewOnce")) + object.viewOnce = message.viewOnce; + if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath")) + object.thumbnailDirectPath = message.thumbnailDirectPath; + if (message.thumbnailSha256 != null && message.hasOwnProperty("thumbnailSha256")) + object.thumbnailSha256 = options.bytes === String ? $util.base64.encode(message.thumbnailSha256, 0, message.thumbnailSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.thumbnailSha256) : message.thumbnailSha256; + if (message.thumbnailEncSha256 != null && message.hasOwnProperty("thumbnailEncSha256")) + object.thumbnailEncSha256 = options.bytes === String ? $util.base64.encode(message.thumbnailEncSha256, 0, message.thumbnailEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.thumbnailEncSha256) : message.thumbnailEncSha256; + if (message.staticUrl != null && message.hasOwnProperty("staticUrl")) + object.staticUrl = message.staticUrl; + return object; + }; + + /** + * Converts this VideoMessage to JSON. + * @function toJSON + * @memberof proto.VideoMessage + * @instance + * @returns {Object.} JSON object + */ + VideoMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * VideoMessageAttribution enum. + * @name proto.VideoMessage.VideoMessageAttribution + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} GIPHY=1 GIPHY value + * @property {number} TENOR=2 TENOR value + */ + VideoMessage.VideoMessageAttribution = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "GIPHY"] = 1; + values[valuesById[2] = "TENOR"] = 2; + return values; + })(); + + return VideoMessage; + })(); + + proto.WallpaperSettings = (function() { + + /** + * Properties of a WallpaperSettings. + * @memberof proto + * @interface IWallpaperSettings + * @property {string|null} [filename] WallpaperSettings filename + * @property {number|null} [opacity] WallpaperSettings opacity + */ + + /** + * Constructs a new WallpaperSettings. + * @memberof proto + * @classdesc Represents a WallpaperSettings. + * @implements IWallpaperSettings + * @constructor + * @param {proto.IWallpaperSettings=} [properties] Properties to set + */ + function WallpaperSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WallpaperSettings filename. + * @member {string} filename + * @memberof proto.WallpaperSettings + * @instance + */ + WallpaperSettings.prototype.filename = ""; + + /** + * WallpaperSettings opacity. + * @member {number} opacity + * @memberof proto.WallpaperSettings + * @instance + */ + WallpaperSettings.prototype.opacity = 0; + + /** + * Creates a new WallpaperSettings instance using the specified properties. + * @function create + * @memberof proto.WallpaperSettings + * @static + * @param {proto.IWallpaperSettings=} [properties] Properties to set + * @returns {proto.WallpaperSettings} WallpaperSettings instance + */ + WallpaperSettings.create = function create(properties) { + return new WallpaperSettings(properties); + }; + + /** + * Encodes the specified WallpaperSettings message. Does not implicitly {@link proto.WallpaperSettings.verify|verify} messages. + * @function encode + * @memberof proto.WallpaperSettings + * @static + * @param {proto.IWallpaperSettings} message WallpaperSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WallpaperSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filename != null && Object.hasOwnProperty.call(message, "filename")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filename); + if (message.opacity != null && Object.hasOwnProperty.call(message, "opacity")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.opacity); + return writer; + }; + + /** + * Encodes the specified WallpaperSettings message, length delimited. Does not implicitly {@link proto.WallpaperSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.WallpaperSettings + * @static + * @param {proto.IWallpaperSettings} message WallpaperSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WallpaperSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WallpaperSettings message from the specified reader or buffer. + * @function decode + * @memberof proto.WallpaperSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.WallpaperSettings} WallpaperSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WallpaperSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.WallpaperSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.filename = reader.string(); + break; + case 2: + message.opacity = reader.uint32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WallpaperSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.WallpaperSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.WallpaperSettings} WallpaperSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WallpaperSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WallpaperSettings message. + * @function verify + * @memberof proto.WallpaperSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WallpaperSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.filename != null && message.hasOwnProperty("filename")) + if (!$util.isString(message.filename)) + return "filename: string expected"; + if (message.opacity != null && message.hasOwnProperty("opacity")) + if (!$util.isInteger(message.opacity)) + return "opacity: integer expected"; + return null; + }; + + /** + * Creates a WallpaperSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.WallpaperSettings + * @static + * @param {Object.} object Plain object + * @returns {proto.WallpaperSettings} WallpaperSettings + */ + WallpaperSettings.fromObject = function fromObject(object) { + if (object instanceof $root.proto.WallpaperSettings) + return object; + var message = new $root.proto.WallpaperSettings(); + if (object.filename != null) + message.filename = String(object.filename); + if (object.opacity != null) + message.opacity = object.opacity >>> 0; + return message; + }; + + /** + * Creates a plain object from a WallpaperSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.WallpaperSettings + * @static + * @param {proto.WallpaperSettings} message WallpaperSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WallpaperSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filename = ""; + object.opacity = 0; + } + if (message.filename != null && message.hasOwnProperty("filename")) + object.filename = message.filename; + if (message.opacity != null && message.hasOwnProperty("opacity")) + object.opacity = message.opacity; + return object; + }; + + /** + * Converts this WallpaperSettings to JSON. + * @function toJSON + * @memberof proto.WallpaperSettings + * @instance + * @returns {Object.} JSON object + */ + WallpaperSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WallpaperSettings; + })(); + proto.WebFeatures = (function() { /** @@ -61734,6 +66494,313 @@ $root.proto = (function() { return WebFeatures; })(); + proto.WebInfo = (function() { + + /** + * Properties of a WebInfo. + * @memberof proto + * @interface IWebInfo + * @property {string|null} [refToken] WebInfo refToken + * @property {string|null} [version] WebInfo version + * @property {proto.IWebdPayload|null} [webdPayload] WebInfo webdPayload + * @property {proto.WebInfo.WebInfoWebSubPlatform|null} [webSubPlatform] WebInfo webSubPlatform + */ + + /** + * Constructs a new WebInfo. + * @memberof proto + * @classdesc Represents a WebInfo. + * @implements IWebInfo + * @constructor + * @param {proto.IWebInfo=} [properties] Properties to set + */ + function WebInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WebInfo refToken. + * @member {string} refToken + * @memberof proto.WebInfo + * @instance + */ + WebInfo.prototype.refToken = ""; + + /** + * WebInfo version. + * @member {string} version + * @memberof proto.WebInfo + * @instance + */ + WebInfo.prototype.version = ""; + + /** + * WebInfo webdPayload. + * @member {proto.IWebdPayload|null|undefined} webdPayload + * @memberof proto.WebInfo + * @instance + */ + WebInfo.prototype.webdPayload = null; + + /** + * WebInfo webSubPlatform. + * @member {proto.WebInfo.WebInfoWebSubPlatform} webSubPlatform + * @memberof proto.WebInfo + * @instance + */ + WebInfo.prototype.webSubPlatform = 0; + + /** + * Creates a new WebInfo instance using the specified properties. + * @function create + * @memberof proto.WebInfo + * @static + * @param {proto.IWebInfo=} [properties] Properties to set + * @returns {proto.WebInfo} WebInfo instance + */ + WebInfo.create = function create(properties) { + return new WebInfo(properties); + }; + + /** + * Encodes the specified WebInfo message. Does not implicitly {@link proto.WebInfo.verify|verify} messages. + * @function encode + * @memberof proto.WebInfo + * @static + * @param {proto.IWebInfo} message WebInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.refToken != null && Object.hasOwnProperty.call(message, "refToken")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.refToken); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); + if (message.webdPayload != null && Object.hasOwnProperty.call(message, "webdPayload")) + $root.proto.WebdPayload.encode(message.webdPayload, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.webSubPlatform != null && Object.hasOwnProperty.call(message, "webSubPlatform")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.webSubPlatform); + return writer; + }; + + /** + * Encodes the specified WebInfo message, length delimited. Does not implicitly {@link proto.WebInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.WebInfo + * @static + * @param {proto.IWebInfo} message WebInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WebInfo message from the specified reader or buffer. + * @function decode + * @memberof proto.WebInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.WebInfo} WebInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.WebInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.refToken = reader.string(); + break; + case 2: + message.version = reader.string(); + break; + case 3: + message.webdPayload = $root.proto.WebdPayload.decode(reader, reader.uint32()); + break; + case 4: + message.webSubPlatform = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WebInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.WebInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.WebInfo} WebInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WebInfo message. + * @function verify + * @memberof proto.WebInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WebInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.refToken != null && message.hasOwnProperty("refToken")) + if (!$util.isString(message.refToken)) + return "refToken: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.webdPayload != null && message.hasOwnProperty("webdPayload")) { + var error = $root.proto.WebdPayload.verify(message.webdPayload); + if (error) + return "webdPayload." + error; + } + if (message.webSubPlatform != null && message.hasOwnProperty("webSubPlatform")) + switch (message.webSubPlatform) { + default: + return "webSubPlatform: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a WebInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.WebInfo + * @static + * @param {Object.} object Plain object + * @returns {proto.WebInfo} WebInfo + */ + WebInfo.fromObject = function fromObject(object) { + if (object instanceof $root.proto.WebInfo) + return object; + var message = new $root.proto.WebInfo(); + if (object.refToken != null) + message.refToken = String(object.refToken); + if (object.version != null) + message.version = String(object.version); + if (object.webdPayload != null) { + if (typeof object.webdPayload !== "object") + throw TypeError(".proto.WebInfo.webdPayload: object expected"); + message.webdPayload = $root.proto.WebdPayload.fromObject(object.webdPayload); + } + switch (object.webSubPlatform) { + case "WEB_BROWSER": + case 0: + message.webSubPlatform = 0; + break; + case "APP_STORE": + case 1: + message.webSubPlatform = 1; + break; + case "WIN_STORE": + case 2: + message.webSubPlatform = 2; + break; + case "DARWIN": + case 3: + message.webSubPlatform = 3; + break; + case "WIN32": + case 4: + message.webSubPlatform = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a WebInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.WebInfo + * @static + * @param {proto.WebInfo} message WebInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WebInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.refToken = ""; + object.version = ""; + object.webdPayload = null; + object.webSubPlatform = options.enums === String ? "WEB_BROWSER" : 0; + } + if (message.refToken != null && message.hasOwnProperty("refToken")) + object.refToken = message.refToken; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.webdPayload != null && message.hasOwnProperty("webdPayload")) + object.webdPayload = $root.proto.WebdPayload.toObject(message.webdPayload, options); + if (message.webSubPlatform != null && message.hasOwnProperty("webSubPlatform")) + object.webSubPlatform = options.enums === String ? $root.proto.WebInfo.WebInfoWebSubPlatform[message.webSubPlatform] : message.webSubPlatform; + return object; + }; + + /** + * Converts this WebInfo to JSON. + * @function toJSON + * @memberof proto.WebInfo + * @instance + * @returns {Object.} JSON object + */ + WebInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * WebInfoWebSubPlatform enum. + * @name proto.WebInfo.WebInfoWebSubPlatform + * @enum {number} + * @property {number} WEB_BROWSER=0 WEB_BROWSER value + * @property {number} APP_STORE=1 APP_STORE value + * @property {number} WIN_STORE=2 WIN_STORE value + * @property {number} DARWIN=3 DARWIN value + * @property {number} WIN32=4 WIN32 value + */ + WebInfo.WebInfoWebSubPlatform = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "WEB_BROWSER"] = 0; + values[valuesById[1] = "APP_STORE"] = 1; + values[valuesById[2] = "WIN_STORE"] = 2; + values[valuesById[3] = "DARWIN"] = 3; + values[valuesById[4] = "WIN32"] = 4; + return values; + })(); + + return WebInfo; + })(); + proto.WebMessageInfo = (function() { /** @@ -61780,6 +66847,7 @@ $root.proto = (function() { * @property {string|null} [agentId] WebMessageInfo agentId * @property {boolean|null} [statusAlreadyViewed] WebMessageInfo statusAlreadyViewed * @property {Uint8Array|null} [messageSecret] WebMessageInfo messageSecret + * @property {proto.IKeepInChat|null} [keepInChat] WebMessageInfo keepInChat */ /** @@ -62122,6 +67190,14 @@ $root.proto = (function() { */ WebMessageInfo.prototype.messageSecret = $util.newBuffer([]); + /** + * WebMessageInfo keepInChat. + * @member {proto.IKeepInChat|null|undefined} keepInChat + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.keepInChat = null; + /** * Creates a new WebMessageInfo instance using the specified properties. * @function create @@ -62230,6 +67306,8 @@ $root.proto = (function() { writer.uint32(/* id 48, wireType 0 =*/384).bool(message.statusAlreadyViewed); if (message.messageSecret != null && Object.hasOwnProperty.call(message, "messageSecret")) writer.uint32(/* id 49, wireType 2 =*/394).bytes(message.messageSecret); + if (message.keepInChat != null && Object.hasOwnProperty.call(message, "keepInChat")) + $root.proto.KeepInChat.encode(message.keepInChat, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); return writer; }; @@ -62394,6 +67472,9 @@ $root.proto = (function() { case 49: message.messageSecret = reader.bytes(); break; + case 50: + message.keepInChat = $root.proto.KeepInChat.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -62633,6 +67714,7 @@ $root.proto = (function() { case 140: case 141: case 142: + case 143: break; } if (message.clearMedia != null && message.hasOwnProperty("clearMedia")) @@ -62759,6 +67841,11 @@ $root.proto = (function() { if (message.messageSecret != null && message.hasOwnProperty("messageSecret")) if (!(message.messageSecret && typeof message.messageSecret.length === "number" || $util.isString(message.messageSecret))) return "messageSecret: buffer expected"; + if (message.keepInChat != null && message.hasOwnProperty("keepInChat")) { + var error = $root.proto.KeepInChat.verify(message.keepInChat); + if (error) + return "keepInChat." + error; + } return null; }; @@ -63422,6 +68509,10 @@ $root.proto = (function() { case 142: message.messageStubType = 142; break; + case "EPHEMERAL_KEEP_IN_CHAT": + case 143: + message.messageStubType = 143; + break; } if (object.clearMedia != null) message.clearMedia = Boolean(object.clearMedia); @@ -63560,6 +68651,11 @@ $root.proto = (function() { $util.base64.decode(object.messageSecret, message.messageSecret = $util.newBuffer($util.base64.length(object.messageSecret)), 0); else if (object.messageSecret.length) message.messageSecret = object.messageSecret; + if (object.keepInChat != null) { + if (typeof object.keepInChat !== "object") + throw TypeError(".proto.WebMessageInfo.keepInChat: object expected"); + message.keepInChat = $root.proto.KeepInChat.fromObject(object.keepInChat); + } return message; }; @@ -63649,6 +68745,7 @@ $root.proto = (function() { if (options.bytes !== Array) object.messageSecret = $util.newBuffer(object.messageSecret); } + object.keepInChat = null; } if (message.key != null && message.hasOwnProperty("key")) object.key = $root.proto.MessageKey.toObject(message.key, options); @@ -63754,6 +68851,8 @@ $root.proto = (function() { object.statusAlreadyViewed = message.statusAlreadyViewed; if (message.messageSecret != null && message.hasOwnProperty("messageSecret")) object.messageSecret = options.bytes === String ? $util.base64.encode(message.messageSecret, 0, message.messageSecret.length) : options.bytes === Array ? Array.prototype.slice.call(message.messageSecret) : message.messageSecret; + if (message.keepInChat != null && message.hasOwnProperty("keepInChat")) + object.keepInChat = $root.proto.KeepInChat.toObject(message.keepInChat, options); return object; }; @@ -63937,6 +69036,7 @@ $root.proto = (function() { * @property {number} GROUP_PARTICIPANT_ACCEPT=140 GROUP_PARTICIPANT_ACCEPT value * @property {number} GROUP_PARTICIPANT_LINKED_GROUP_JOIN=141 GROUP_PARTICIPANT_LINKED_GROUP_JOIN value * @property {number} COMMUNITY_CREATE=142 COMMUNITY_CREATE value + * @property {number} EPHEMERAL_KEEP_IN_CHAT=143 EPHEMERAL_KEEP_IN_CHAT value */ WebMessageInfo.WebMessageInfoStubType = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -64083,6 +69183,7 @@ $root.proto = (function() { values[valuesById[140] = "GROUP_PARTICIPANT_ACCEPT"] = 140; values[valuesById[141] = "GROUP_PARTICIPANT_LINKED_GROUP_JOIN"] = 141; values[valuesById[142] = "COMMUNITY_CREATE"] = 142; + values[valuesById[143] = "EPHEMERAL_KEEP_IN_CHAT"] = 143; return values; })(); @@ -64397,6 +69498,423 @@ $root.proto = (function() { return WebNotificationsInfo; })(); + proto.WebdPayload = (function() { + + /** + * Properties of a WebdPayload. + * @memberof proto + * @interface IWebdPayload + * @property {boolean|null} [usesParticipantInKey] WebdPayload usesParticipantInKey + * @property {boolean|null} [supportsStarredMessages] WebdPayload supportsStarredMessages + * @property {boolean|null} [supportsDocumentMessages] WebdPayload supportsDocumentMessages + * @property {boolean|null} [supportsUrlMessages] WebdPayload supportsUrlMessages + * @property {boolean|null} [supportsMediaRetry] WebdPayload supportsMediaRetry + * @property {boolean|null} [supportsE2EImage] WebdPayload supportsE2EImage + * @property {boolean|null} [supportsE2EVideo] WebdPayload supportsE2EVideo + * @property {boolean|null} [supportsE2EAudio] WebdPayload supportsE2EAudio + * @property {boolean|null} [supportsE2EDocument] WebdPayload supportsE2EDocument + * @property {string|null} [documentTypes] WebdPayload documentTypes + * @property {Uint8Array|null} [features] WebdPayload features + */ + + /** + * Constructs a new WebdPayload. + * @memberof proto + * @classdesc Represents a WebdPayload. + * @implements IWebdPayload + * @constructor + * @param {proto.IWebdPayload=} [properties] Properties to set + */ + function WebdPayload(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WebdPayload usesParticipantInKey. + * @member {boolean} usesParticipantInKey + * @memberof proto.WebdPayload + * @instance + */ + WebdPayload.prototype.usesParticipantInKey = false; + + /** + * WebdPayload supportsStarredMessages. + * @member {boolean} supportsStarredMessages + * @memberof proto.WebdPayload + * @instance + */ + WebdPayload.prototype.supportsStarredMessages = false; + + /** + * WebdPayload supportsDocumentMessages. + * @member {boolean} supportsDocumentMessages + * @memberof proto.WebdPayload + * @instance + */ + WebdPayload.prototype.supportsDocumentMessages = false; + + /** + * WebdPayload supportsUrlMessages. + * @member {boolean} supportsUrlMessages + * @memberof proto.WebdPayload + * @instance + */ + WebdPayload.prototype.supportsUrlMessages = false; + + /** + * WebdPayload supportsMediaRetry. + * @member {boolean} supportsMediaRetry + * @memberof proto.WebdPayload + * @instance + */ + WebdPayload.prototype.supportsMediaRetry = false; + + /** + * WebdPayload supportsE2EImage. + * @member {boolean} supportsE2EImage + * @memberof proto.WebdPayload + * @instance + */ + WebdPayload.prototype.supportsE2EImage = false; + + /** + * WebdPayload supportsE2EVideo. + * @member {boolean} supportsE2EVideo + * @memberof proto.WebdPayload + * @instance + */ + WebdPayload.prototype.supportsE2EVideo = false; + + /** + * WebdPayload supportsE2EAudio. + * @member {boolean} supportsE2EAudio + * @memberof proto.WebdPayload + * @instance + */ + WebdPayload.prototype.supportsE2EAudio = false; + + /** + * WebdPayload supportsE2EDocument. + * @member {boolean} supportsE2EDocument + * @memberof proto.WebdPayload + * @instance + */ + WebdPayload.prototype.supportsE2EDocument = false; + + /** + * WebdPayload documentTypes. + * @member {string} documentTypes + * @memberof proto.WebdPayload + * @instance + */ + WebdPayload.prototype.documentTypes = ""; + + /** + * WebdPayload features. + * @member {Uint8Array} features + * @memberof proto.WebdPayload + * @instance + */ + WebdPayload.prototype.features = $util.newBuffer([]); + + /** + * Creates a new WebdPayload instance using the specified properties. + * @function create + * @memberof proto.WebdPayload + * @static + * @param {proto.IWebdPayload=} [properties] Properties to set + * @returns {proto.WebdPayload} WebdPayload instance + */ + WebdPayload.create = function create(properties) { + return new WebdPayload(properties); + }; + + /** + * Encodes the specified WebdPayload message. Does not implicitly {@link proto.WebdPayload.verify|verify} messages. + * @function encode + * @memberof proto.WebdPayload + * @static + * @param {proto.IWebdPayload} message WebdPayload message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebdPayload.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.usesParticipantInKey != null && Object.hasOwnProperty.call(message, "usesParticipantInKey")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.usesParticipantInKey); + if (message.supportsStarredMessages != null && Object.hasOwnProperty.call(message, "supportsStarredMessages")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.supportsStarredMessages); + if (message.supportsDocumentMessages != null && Object.hasOwnProperty.call(message, "supportsDocumentMessages")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.supportsDocumentMessages); + if (message.supportsUrlMessages != null && Object.hasOwnProperty.call(message, "supportsUrlMessages")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.supportsUrlMessages); + if (message.supportsMediaRetry != null && Object.hasOwnProperty.call(message, "supportsMediaRetry")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.supportsMediaRetry); + if (message.supportsE2EImage != null && Object.hasOwnProperty.call(message, "supportsE2EImage")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.supportsE2EImage); + if (message.supportsE2EVideo != null && Object.hasOwnProperty.call(message, "supportsE2EVideo")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.supportsE2EVideo); + if (message.supportsE2EAudio != null && Object.hasOwnProperty.call(message, "supportsE2EAudio")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.supportsE2EAudio); + if (message.supportsE2EDocument != null && Object.hasOwnProperty.call(message, "supportsE2EDocument")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.supportsE2EDocument); + if (message.documentTypes != null && Object.hasOwnProperty.call(message, "documentTypes")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.documentTypes); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + writer.uint32(/* id 11, wireType 2 =*/90).bytes(message.features); + return writer; + }; + + /** + * Encodes the specified WebdPayload message, length delimited. Does not implicitly {@link proto.WebdPayload.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.WebdPayload + * @static + * @param {proto.IWebdPayload} message WebdPayload message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebdPayload.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WebdPayload message from the specified reader or buffer. + * @function decode + * @memberof proto.WebdPayload + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.WebdPayload} WebdPayload + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebdPayload.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.WebdPayload(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.usesParticipantInKey = reader.bool(); + break; + case 2: + message.supportsStarredMessages = reader.bool(); + break; + case 3: + message.supportsDocumentMessages = reader.bool(); + break; + case 4: + message.supportsUrlMessages = reader.bool(); + break; + case 5: + message.supportsMediaRetry = reader.bool(); + break; + case 6: + message.supportsE2EImage = reader.bool(); + break; + case 7: + message.supportsE2EVideo = reader.bool(); + break; + case 8: + message.supportsE2EAudio = reader.bool(); + break; + case 9: + message.supportsE2EDocument = reader.bool(); + break; + case 10: + message.documentTypes = reader.string(); + break; + case 11: + message.features = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WebdPayload message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.WebdPayload + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.WebdPayload} WebdPayload + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebdPayload.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WebdPayload message. + * @function verify + * @memberof proto.WebdPayload + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WebdPayload.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.usesParticipantInKey != null && message.hasOwnProperty("usesParticipantInKey")) + if (typeof message.usesParticipantInKey !== "boolean") + return "usesParticipantInKey: boolean expected"; + if (message.supportsStarredMessages != null && message.hasOwnProperty("supportsStarredMessages")) + if (typeof message.supportsStarredMessages !== "boolean") + return "supportsStarredMessages: boolean expected"; + if (message.supportsDocumentMessages != null && message.hasOwnProperty("supportsDocumentMessages")) + if (typeof message.supportsDocumentMessages !== "boolean") + return "supportsDocumentMessages: boolean expected"; + if (message.supportsUrlMessages != null && message.hasOwnProperty("supportsUrlMessages")) + if (typeof message.supportsUrlMessages !== "boolean") + return "supportsUrlMessages: boolean expected"; + if (message.supportsMediaRetry != null && message.hasOwnProperty("supportsMediaRetry")) + if (typeof message.supportsMediaRetry !== "boolean") + return "supportsMediaRetry: boolean expected"; + if (message.supportsE2EImage != null && message.hasOwnProperty("supportsE2EImage")) + if (typeof message.supportsE2EImage !== "boolean") + return "supportsE2EImage: boolean expected"; + if (message.supportsE2EVideo != null && message.hasOwnProperty("supportsE2EVideo")) + if (typeof message.supportsE2EVideo !== "boolean") + return "supportsE2EVideo: boolean expected"; + if (message.supportsE2EAudio != null && message.hasOwnProperty("supportsE2EAudio")) + if (typeof message.supportsE2EAudio !== "boolean") + return "supportsE2EAudio: boolean expected"; + if (message.supportsE2EDocument != null && message.hasOwnProperty("supportsE2EDocument")) + if (typeof message.supportsE2EDocument !== "boolean") + return "supportsE2EDocument: boolean expected"; + if (message.documentTypes != null && message.hasOwnProperty("documentTypes")) + if (!$util.isString(message.documentTypes)) + return "documentTypes: string expected"; + if (message.features != null && message.hasOwnProperty("features")) + if (!(message.features && typeof message.features.length === "number" || $util.isString(message.features))) + return "features: buffer expected"; + return null; + }; + + /** + * Creates a WebdPayload message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.WebdPayload + * @static + * @param {Object.} object Plain object + * @returns {proto.WebdPayload} WebdPayload + */ + WebdPayload.fromObject = function fromObject(object) { + if (object instanceof $root.proto.WebdPayload) + return object; + var message = new $root.proto.WebdPayload(); + if (object.usesParticipantInKey != null) + message.usesParticipantInKey = Boolean(object.usesParticipantInKey); + if (object.supportsStarredMessages != null) + message.supportsStarredMessages = Boolean(object.supportsStarredMessages); + if (object.supportsDocumentMessages != null) + message.supportsDocumentMessages = Boolean(object.supportsDocumentMessages); + if (object.supportsUrlMessages != null) + message.supportsUrlMessages = Boolean(object.supportsUrlMessages); + if (object.supportsMediaRetry != null) + message.supportsMediaRetry = Boolean(object.supportsMediaRetry); + if (object.supportsE2EImage != null) + message.supportsE2EImage = Boolean(object.supportsE2EImage); + if (object.supportsE2EVideo != null) + message.supportsE2EVideo = Boolean(object.supportsE2EVideo); + if (object.supportsE2EAudio != null) + message.supportsE2EAudio = Boolean(object.supportsE2EAudio); + if (object.supportsE2EDocument != null) + message.supportsE2EDocument = Boolean(object.supportsE2EDocument); + if (object.documentTypes != null) + message.documentTypes = String(object.documentTypes); + if (object.features != null) + if (typeof object.features === "string") + $util.base64.decode(object.features, message.features = $util.newBuffer($util.base64.length(object.features)), 0); + else if (object.features.length) + message.features = object.features; + return message; + }; + + /** + * Creates a plain object from a WebdPayload message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.WebdPayload + * @static + * @param {proto.WebdPayload} message WebdPayload + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WebdPayload.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.usesParticipantInKey = false; + object.supportsStarredMessages = false; + object.supportsDocumentMessages = false; + object.supportsUrlMessages = false; + object.supportsMediaRetry = false; + object.supportsE2EImage = false; + object.supportsE2EVideo = false; + object.supportsE2EAudio = false; + object.supportsE2EDocument = false; + object.documentTypes = ""; + if (options.bytes === String) + object.features = ""; + else { + object.features = []; + if (options.bytes !== Array) + object.features = $util.newBuffer(object.features); + } + } + if (message.usesParticipantInKey != null && message.hasOwnProperty("usesParticipantInKey")) + object.usesParticipantInKey = message.usesParticipantInKey; + if (message.supportsStarredMessages != null && message.hasOwnProperty("supportsStarredMessages")) + object.supportsStarredMessages = message.supportsStarredMessages; + if (message.supportsDocumentMessages != null && message.hasOwnProperty("supportsDocumentMessages")) + object.supportsDocumentMessages = message.supportsDocumentMessages; + if (message.supportsUrlMessages != null && message.hasOwnProperty("supportsUrlMessages")) + object.supportsUrlMessages = message.supportsUrlMessages; + if (message.supportsMediaRetry != null && message.hasOwnProperty("supportsMediaRetry")) + object.supportsMediaRetry = message.supportsMediaRetry; + if (message.supportsE2EImage != null && message.hasOwnProperty("supportsE2EImage")) + object.supportsE2EImage = message.supportsE2EImage; + if (message.supportsE2EVideo != null && message.hasOwnProperty("supportsE2EVideo")) + object.supportsE2EVideo = message.supportsE2EVideo; + if (message.supportsE2EAudio != null && message.hasOwnProperty("supportsE2EAudio")) + object.supportsE2EAudio = message.supportsE2EAudio; + if (message.supportsE2EDocument != null && message.hasOwnProperty("supportsE2EDocument")) + object.supportsE2EDocument = message.supportsE2EDocument; + if (message.documentTypes != null && message.hasOwnProperty("documentTypes")) + object.documentTypes = message.documentTypes; + if (message.features != null && message.hasOwnProperty("features")) + object.features = options.bytes === String ? $util.base64.encode(message.features, 0, message.features.length) : options.bytes === Array ? Array.prototype.slice.call(message.features) : message.features; + return object; + }; + + /** + * Converts this WebdPayload to JSON. + * @function toJSON + * @memberof proto.WebdPayload + * @instance + * @returns {Object.} JSON object + */ + WebdPayload.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WebdPayload; + })(); + return proto; })(); diff --git a/src/Utils/noise-handler.ts b/src/Utils/noise-handler.ts index 4bc979c..68b6167 100644 --- a/src/Utils/noise-handler.ts +++ b/src/Utils/noise-handler.ts @@ -105,7 +105,7 @@ export const makeNoiseHandler = ( const certDecoded = decrypt(serverHello!.payload!) const { intermediate: certIntermediate } = proto.CertChain.decode(certDecoded) - const { issuerSerial } = proto.Details.decode(certIntermediate!.details!) + const { issuerSerial } = proto.CertChainNoiseCertificateDetails.decode(certIntermediate!.details!) if(issuerSerial !== WA_CERT_DETAILS.SERIAL) { throw new Boom('certification match failed', { statusCode: 400 }) diff --git a/src/Utils/validate-connection.ts b/src/Utils/validate-connection.ts index d637bc8..c6fd515 100644 --- a/src/Utils/validate-connection.ts +++ b/src/Utils/validate-connection.ts @@ -66,25 +66,26 @@ export const generateRegistrationNode = ( .digest() const browserVersion = config.browser[2].split('.') - const companion: proto.ICompanionProps = { + const companion: proto.IDeviceProps = { os: config.browser[0], version: { primary: +(browserVersion[0] || 0), secondary: +(browserVersion[1] || 1), tertiary: +(browserVersion[2] || 0), }, - platformType: proto.CompanionProps.CompanionPropsPlatformType[config.browser[1].toUpperCase()] || proto.CompanionProps.CompanionPropsPlatformType.UNKNOWN, + platformType: proto.DeviceProps.DevicePropsPlatformType[config.browser[1].toUpperCase()] + || proto.DeviceProps.DevicePropsPlatformType.UNKNOWN, requireFullSync: false, } - const companionProto = proto.CompanionProps.encode(companion).finish() + const companionProto = proto.DeviceProps.encode(companion).finish() const registerPayload: proto.IClientPayload = { ...getClientPayload(config), passive: false, - regData: { + devicePairingData: { buildHash: appVersionBuf, - companionProps: companionProto, + deviceProps: companionProto, eRegid: encodeBigEndian(registrationId), eKeytype: KEY_BUNDLE_TYPE, eIdent: signedIdentityKey.public,