From 2549d10be9b3ae4674822cd39ab5dd5e3a47f48c Mon Sep 17 00:00:00 2001 From: Adhiraj Singh Date: Mon, 1 Aug 2022 10:43:01 +0530 Subject: [PATCH] feat: update proto The new proto extract has a bunch of breaking changes, so if you were using the raw proto in your code somewhere -- then you may have to update your code to make it work with the new proto !BREAKING_CHANGE --- WAProto/WAProto.proto | 2759 +- WAProto/index.d.ts | 30844 +++++---- WAProto/index.js | 80376 +++++++++++----------- src/LegacySocket/messages.ts | 4 +- src/Socket/groups.ts | 4 +- src/Socket/messages-recv.ts | 8 +- src/Socket/messages-send.ts | 4 +- src/Types/Auth.ts | 2 +- src/Types/Chat.ts | 4 +- src/Types/Message.ts | 22 +- src/Utils/chat-utils.ts | 20 +- src/Utils/decode-wa-message.ts | 8 +- src/Utils/generics.ts | 10 +- src/Utils/history.ts | 12 +- src/Utils/messages-media.ts | 18 +- src/Utils/messages.ts | 38 +- src/Utils/noise-handler.ts | 2 +- src/Utils/process-message.ts | 8 +- src/Utils/signal.ts | 2 +- src/Utils/use-multi-file-auth-state.ts | 2 +- src/Utils/use-single-file-auth-state.ts | 2 +- src/Utils/validate-connection.ts | 22 +- 22 files changed, 58772 insertions(+), 55399 deletions(-) diff --git a/WAProto/WAProto.proto b/WAProto/WAProto.proto index 71660b4..640b268 100644 --- a/WAProto/WAProto.proto +++ b/WAProto/WAProto.proto @@ -36,91 +36,6 @@ message ActionLink { optional string buttonTitle = 2; } -message AdReplyInfo { - optional string advertiserName = 1; - enum AdReplyInfoMediaType { - NONE = 0; - IMAGE = 1; - VIDEO = 2; - } - optional AdReplyInfoMediaType mediaType = 2; - optional bytes jpegThumbnail = 16; - 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; -} - -message AppStateSyncKey { - optional AppStateSyncKeyId keyId = 1; - optional AppStateSyncKeyData keyData = 2; -} - -message AppStateSyncKeyData { - optional bytes keyData = 1; - optional AppStateSyncKeyFingerprint fingerprint = 2; - optional int64 timestamp = 3; -} - -message AppStateSyncKeyFingerprint { - optional uint32 rawId = 1; - optional uint32 currentIndex = 2; - repeated uint32 deviceIndexes = 3 [packed=true]; -} - -message AppStateSyncKeyId { - optional bytes keyId = 1; -} - -message AppStateSyncKeyRequest { - repeated AppStateSyncKeyId keyIds = 1; -} - -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; - optional bytes fileSha256 = 3; - optional uint64 fileLength = 4; - optional uint32 seconds = 5; - optional bool ptt = 6; - optional bytes mediaKey = 7; - optional bytes fileEncSha256 = 8; - optional string directPath = 9; - optional int64 mediaKeyTimestamp = 10; - optional ContextInfo contextInfo = 17; - optional bytes streamingSidecar = 18; - optional bytes waveform = 19; -} - message AutoDownloadSettings { optional bool downloadImages = 1; optional bool downloadAudio = 2; @@ -132,15 +47,15 @@ message BizAccountLinkInfo { optional uint64 whatsappBizAcctFbid = 1; optional string whatsappAcctNumber = 2; optional uint64 issueTime = 3; - enum BizAccountLinkInfoHostStorageType { + optional HostStorageType hostStorage = 4; + optional AccountType accountType = 5; + enum AccountType { + ENTERPRISE = 0; + } + enum HostStorageType { ON_PREMISE = 0; FACEBOOK = 1; } - optional BizAccountLinkInfoHostStorageType hostStorage = 4; - enum BizAccountLinkInfoAccountType { - ENTERPRISE = 0; - } - optional BizAccountLinkInfoAccountType accountType = 5; } message BizAccountPayload { @@ -149,122 +64,45 @@ message BizAccountPayload { } message BizIdentityInfo { - enum BizIdentityInfoVerifiedLevelValue { + optional VerifiedLevelValue vlevel = 1; + optional VerifiedNameCertificate vnameCert = 2; + optional bool signed = 3; + optional bool revoked = 4; + optional HostStorageType hostStorage = 5; + optional ActualActorsType actualActors = 6; + optional uint64 privacyModeTs = 7; + optional uint64 featureControls = 8; + enum ActualActorsType { + SELF = 0; + BSP = 1; + } + enum HostStorageType { + ON_PREMISE = 0; + FACEBOOK = 1; + } + enum VerifiedLevelValue { 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; - enum ButtonType { - UNKNOWN = 0; - RESPONSE = 1; - NATIVE_FLOW = 2; - } - optional ButtonType type = 3; - optional NativeFlowInfo nativeFlowInfo = 4; -} - -message ButtonText { - optional string displayText = 1; -} - -message ButtonsMessage { - optional string contentText = 6; - optional string footerText = 7; - optional ContextInfo contextInfo = 8; - repeated Button buttons = 9; - enum ButtonsMessageHeaderType { - UNKNOWN = 0; - EMPTY = 1; - TEXT = 2; - DOCUMENT = 3; - IMAGE = 4; - VIDEO = 5; - LOCATION = 6; - } - optional ButtonsMessageHeaderType headerType = 10; - oneof header { - string text = 1; - DocumentMessage documentMessage = 2; - ImageMessage imageMessage = 3; - VideoMessage videoMessage = 4; - LocationMessage locationMessage = 5; - } -} - -message ButtonsResponseMessage { - optional string selectedButtonId = 1; - optional ContextInfo contextInfo = 3; - enum ButtonsResponseMessageType { - UNKNOWN = 0; - DISPLAY_TEXT = 1; - } - optional ButtonsResponseMessageType type = 4; - oneof response { - string selectedDisplayText = 2; - } -} - -message Call { - optional bytes callKey = 1; - optional string conversionSource = 2; - optional bytes conversionData = 3; - optional uint32 conversionDelaySeconds = 4; -} - -message CallButton { - optional HighlyStructuredMessage displayText = 1; - optional HighlyStructuredMessage phoneNumber = 2; -} - -message CancelPaymentRequestMessage { - optional MessageKey key = 1; -} - -message CatalogSnapshot { - optional ImageMessage catalogImage = 1; - optional string title = 2; - 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; + optional NoiseCertificate leaf = 1; + optional NoiseCertificate intermediate = 2; + message NoiseCertificate { + optional bytes details = 1; + optional bytes signature = 2; + message Details { + optional uint32 serial = 1; + optional uint32 issuerSerial = 2; + optional bytes key = 3; + optional uint64 notBefore = 4; + optional uint64 notAfter = 5; + } + + } + } message Chain { @@ -279,26 +117,6 @@ message ChainKey { 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; @@ -307,7 +125,32 @@ message ClientPayload { optional string pushName = 7; optional sfixed32 sessionId = 9; optional bool shortConnect = 10; - enum ClientPayloadConnectType { + optional ConnectType connectType = 12; + optional ConnectReason connectReason = 13; + repeated int32 shards = 14; + optional DNSSource dnsSource = 15; + optional uint32 connectAttemptCount = 16; + optional uint32 device = 18; + optional DevicePairingRegistrationData devicePairingData = 19; + optional Product product = 20; + optional bytes fbCat = 21; + optional bytes fbUserAgent = 22; + optional bool oc = 23; + optional int32 lc = 24; + optional IOSAppExtension iosAppExtension = 30; + optional uint64 fbAppId = 31; + optional bytes fbDeviceId = 32; + optional bool pull = 33; + optional bytes paddingBytes = 34; + enum ConnectReason { + PUSH = 0; + USER_ACTIVATED = 1; + SCHEDULED = 2; + ERROR_RECONNECT = 3; + NETWORK_SWITCH = 4; + PING_RECONNECT = 5; + } + enum ConnectType { CELLULAR_UNKNOWN = 0; WIFI_UNKNOWN = 1; CELLULAR_EDGE = 100; @@ -324,63 +167,127 @@ message ClientPayload { 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; + message DNSSource { + optional DNSResolutionMethod dnsMethod = 15; + optional bool appCached = 16; + enum DNSResolutionMethod { + SYSTEM = 0; + GOOGLE = 1; + HARDCODED = 2; + OVERRIDE = 3; + FALLBACK = 4; + } } - 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; + + 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; } - optional ClientPayloadProduct product = 20; - optional bytes fbCat = 21; - optional bytes fbUserAgent = 22; - optional bool oc = 23; - optional int32 lc = 24; - enum ClientPayloadIOSAppExtension { + + enum IOSAppExtension { 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; - optional bytes paddingBytes = 34; -} - -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; - optional ContextInfo contextInfo = 17; -} - -message ContactsArrayMessage { - optional string displayName = 1; - repeated ContactMessage contacts = 2; - optional ContextInfo contextInfo = 17; + enum Product { + WHATSAPP = 0; + MESSENGER = 1; + } + message UserAgent { + optional Platform 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; + optional ReleaseChannel releaseChannel = 10; + optional string localeLanguageIso6391 = 11; + optional string localeCountryIso31661Alpha2 = 12; + optional string deviceBoard = 13; + message AppVersion { + optional uint32 primary = 1; + optional uint32 secondary = 2; + optional uint32 tertiary = 3; + optional uint32 quaternary = 4; + optional uint32 quinary = 5; + } + + enum Platform { + 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; + } + enum ReleaseChannel { + RELEASE = 0; + BETA = 1; + ALPHA = 2; + DEBUG = 3; + } + } + + message WebInfo { + optional string refToken = 1; + optional string version = 2; + optional WebdPayload webdPayload = 3; + optional WebSubPlatform webSubPlatform = 4; + enum WebSubPlatform { + WEB_BROWSER = 0; + APP_STORE = 1; + WIN_STORE = 2; + DARWIN = 3; + WIN32 = 4; + } + 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 ContextInfo { @@ -407,6 +314,38 @@ message ContextInfo { optional ActionLink actionLink = 33; optional string groupSubject = 34; optional string parentGroupJid = 35; + message AdReplyInfo { + optional string advertiserName = 1; + optional MediaType mediaType = 2; + optional bytes jpegThumbnail = 16; + optional string caption = 17; + enum MediaType { + NONE = 0; + IMAGE = 1; + VIDEO = 2; + } + } + + message ExternalAdReplyInfo { + optional string title = 1; + optional string body = 2; + optional MediaType mediaType = 3; + optional string thumbnailUrl = 4; + optional string mediaUrl = 5; + optional bytes thumbnail = 6; + optional string sourceType = 7; + optional string sourceId = 8; + optional string sourceUrl = 9; + optional bool containsAutoReply = 10; + optional bool renderLargerThumbnail = 11; + optional bool showAdAttribution = 12; + enum MediaType { + NONE = 0; + IMAGE = 1; + VIDEO = 2; + } + } + } message Conversation { @@ -420,11 +359,7 @@ message Conversation { 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 EndOfHistoryTransferType endOfHistoryTransferType = 11; optional uint64 conversationTimestamp = 12; optional string name = 13; optional string pHash = 14; @@ -453,32 +388,11 @@ message Conversation { 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 bool selfPnExposed = 40; + enum EndOfHistoryTransferType { + COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY = 0; + COMPLETE_AND_NO_MORE_MESSAGE_REMAIN_ON_PRIMARY = 1; } - 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 { @@ -490,21 +404,20 @@ 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 { + optional PlatformType platformType = 3; + optional bool requireFullSync = 4; + message AppVersion { + optional uint32 primary = 1; + optional uint32 secondary = 2; + optional uint32 tertiary = 3; + optional uint32 quaternary = 4; + optional uint32 quinary = 5; + } + + enum PlatformType { UNKNOWN = 0; CHROME = 1; FIREFOX = 2; @@ -520,46 +433,15 @@ message DeviceProps { CATALINA = 12; TCL_TV = 13; } - optional DevicePropsPlatformType platformType = 3; - optional bool requireFullSync = 4; -} - -message DeviceSentMessage { - optional string destinationJid = 1; - optional Message message = 2; - optional string phash = 3; } message DisappearingMode { - enum DisappearingModeInitiator { + optional Initiator initiator = 1; + enum Initiator { CHANGED_IN_CHAT = 0; INITIATED_BY_ME = 1; INITIATED_BY_OTHER = 2; } - optional DisappearingModeInitiator initiator = 1; -} - -message DocumentMessage { - optional string url = 1; - optional string mimetype = 2; - optional string title = 3; - optional bytes fileSha256 = 4; - optional uint64 fileLength = 5; - optional uint32 pageCount = 6; - optional bytes mediaKey = 7; - optional string fileName = 8; - optional bytes fileEncSha256 = 9; - optional string directPath = 10; - optional int64 mediaKeyTimestamp = 11; - optional bool contactVcard = 12; - optional string thumbnailDirectPath = 13; - optional bytes thumbnailSha256 = 14; - optional bytes thumbnailEncSha256 = 15; - optional bytes jpegThumbnail = 16; - optional ContextInfo contextInfo = 17; - optional uint32 thumbnailHeight = 18; - optional uint32 thumbnailWidth = 19; - optional string caption = 20; } message EphemeralSetting { @@ -572,68 +454,6 @@ message ExitCode { optional string text = 2; } -message ExtendedTextMessage { - optional string text = 1; - optional string matchedText = 2; - optional string canonicalUrl = 4; - optional string description = 5; - optional string title = 6; - optional fixed32 textArgb = 7; - optional fixed32 backgroundArgb = 8; - enum ExtendedTextMessageFontType { - SANS_SERIF = 0; - SERIF = 1; - NORICAN_REGULAR = 2; - BRYNDAN_WRITE = 3; - BEBASNEUE_REGULAR = 4; - OSWALD_HEAVY = 5; - } - optional ExtendedTextMessageFontType font = 9; - enum ExtendedTextMessagePreviewType { - NONE = 0; - VIDEO = 1; - } - optional ExtendedTextMessagePreviewType previewType = 10; - optional bytes jpegThumbnail = 16; - optional ContextInfo contextInfo = 17; - optional bool doNotPlayInline = 18; - optional string thumbnailDirectPath = 19; - optional bytes thumbnailSha256 = 20; - optional bytes thumbnailEncSha256 = 21; - optional bytes mediaKey = 22; - optional int64 mediaKeyTimestamp = 23; - optional uint32 thumbnailHeight = 24; - optional uint32 thumbnailWidth = 25; - enum ExtendedTextMessageInviteLinkGroupType { - DEFAULT = 0; - PARENT = 1; - } - optional ExtendedTextMessageInviteLinkGroupType inviteLinkGroupType = 26; - optional string inviteLinkParentGroupSubjectV2 = 27; - optional bytes inviteLinkParentGroupThumbnailV2 = 28; - optional ExtendedTextMessageInviteLinkGroupType inviteLinkGroupTypeV2 = 29; -} - -message ExternalAdReplyInfo { - optional string title = 1; - optional string body = 2; - enum ExternalAdReplyInfoMediaType { - NONE = 0; - IMAGE = 1; - VIDEO = 2; - } - optional ExternalAdReplyInfoMediaType mediaType = 3; - optional string thumbnailUrl = 4; - optional string mediaUrl = 5; - optional bytes thumbnail = 6; - optional string sourceType = 7; - optional string sourceId = 8; - optional string sourceUrl = 9; - optional bool containsAutoReply = 10; - optional bool renderLargerThumbnail = 11; - optional bool showAdAttribution = 12; -} - message ExternalBlobReference { optional bytes mediaKey = 1; optional string directPath = 2; @@ -643,38 +463,6 @@ message ExternalBlobReference { 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; -} - -message FourRowTemplate { - optional HighlyStructuredMessage content = 6; - optional HighlyStructuredMessage footer = 7; - repeated TemplateButton buttons = 8; - oneof title { - DocumentMessage documentMessage = 1; - HighlyStructuredMessage highlyStructuredMessage = 2; - ImageMessage imageMessage = 3; - VideoMessage videoMessage = 4; - LocationMessage locationMessage = 5; - } -} - -message FutureProofMessage { - optional Message message = 1; -} - message GlobalSettings { optional WallpaperSettings lightThemeWallpaper = 1; optional MediaVisibility mediaVisibility = 2; @@ -688,117 +476,41 @@ message GlobalSettings { optional int64 disappearingModeTimestamp = 10; } -message GroupInviteMessage { - optional string groupJid = 1; - optional string inviteCode = 2; - optional int64 inviteExpiration = 3; - optional string groupName = 4; - optional bytes jpegThumbnail = 5; - optional string caption = 6; - optional ContextInfo contextInfo = 7; - enum GroupInviteMessageGroupType { - DEFAULT = 0; - PARENT = 1; - } - optional GroupInviteMessageGroupType groupType = 8; -} - message GroupParticipant { required string userJid = 1; - enum GroupParticipantRank { + optional Rank rank = 2; + enum Rank { REGULAR = 0; ADMIN = 1; SUPERADMIN = 2; } - optional GroupParticipantRank rank = 2; -} - -message HSMCurrency { - optional string currencyCode = 1; - optional int64 amount1000 = 2; -} - -message HSMDateTime { - oneof datetimeOneof { - HSMDateTimeComponent component = 1; - HSMDateTimeUnixEpoch unixEpoch = 2; - } -} - -message HSMDateTimeComponent { - enum HSMDateTimeComponentDayOfWeekType { - MONDAY = 1; - TUESDAY = 2; - WEDNESDAY = 3; - THURSDAY = 4; - FRIDAY = 5; - SATURDAY = 6; - SUNDAY = 7; - } - optional HSMDateTimeComponentDayOfWeekType dayOfWeek = 1; - optional uint32 year = 2; - optional uint32 month = 3; - optional uint32 dayOfMonth = 4; - optional uint32 hour = 5; - optional uint32 minute = 6; - enum HSMDateTimeComponentCalendarType { - GREGORIAN = 1; - SOLAR_HIJRI = 2; - } - optional HSMDateTimeComponentCalendarType calendar = 7; -} - -message HSMDateTimeUnixEpoch { - optional int64 timestamp = 1; -} - -message HSMLocalizableParameter { - optional string default = 1; - oneof paramOneof { - HSMCurrency currency = 2; - HSMDateTime dateTime = 3; - } } 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 ClientFinish { + optional bytes static = 1; + optional bytes payload = 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 ClientHello { + optional bytes ephemeral = 1; + optional bytes static = 2; + optional bytes payload = 3; + } + + message ServerHello { + optional bytes ephemeral = 1; + optional bytes static = 2; + optional bytes payload = 3; + } + } message HistorySync { - enum HistorySyncHistorySyncType { - INITIAL_BOOTSTRAP = 0; - INITIAL_STATUS_V3 = 1; - FULL = 2; - RECENT = 3; - PUSH_NAME = 4; - } - required HistorySyncHistorySyncType syncType = 1; + required HistorySyncType syncType = 1; repeated Conversation conversations = 2; repeated WebMessageInfo statusV3Messages = 3; optional uint32 chunkOrder = 5; @@ -807,6 +519,16 @@ message HistorySync { optional GlobalSettings globalSettings = 8; optional bytes threadIdUserSecret = 9; optional uint32 threadDsTimeframeOffset = 10; + repeated StickerMetadata recentStickers = 11; + repeated PastParticipants pastParticipants = 12; + enum HistorySyncType { + INITIAL_BOOTSTRAP = 0; + INITIAL_STATUS_V3 = 1; + FULL = 2; + RECENT = 3; + PUSH_NAME = 4; + UNBLOCKING_DATA = 5; + } } message HistorySyncMsg { @@ -814,60 +536,28 @@ message HistorySyncMsg { 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; -} - -message HydratedFourRowTemplate { - optional string hydratedContentText = 6; - optional string hydratedFooterText = 7; - repeated HydratedTemplateButton hydratedButtons = 8; - optional string templateId = 9; - oneof title { - DocumentMessage documentMessage = 1; - string hydratedTitleText = 2; - ImageMessage imageMessage = 3; - VideoMessage videoMessage = 4; - LocationMessage locationMessage = 5; - } -} - -message HydratedQuickReplyButton { - optional string displayText = 1; - optional string id = 2; -} - message HydratedTemplateButton { optional uint32 index = 4; oneof hydratedButton { - HydratedQuickReplyButton quickReplyButton = 1; - HydratedURLButton urlButton = 2; - HydratedCallButton callButton = 3; + HydratedTemplateButton.HydratedQuickReplyButton quickReplyButton = 1; + HydratedTemplateButton.HydratedURLButton urlButton = 2; + HydratedTemplateButton.HydratedCallButton callButton = 3; } -} - -message HydratedURLButton { - optional string displayText = 1; - optional string url = 2; + message HydratedCallButton { + optional string displayText = 1; + optional string phoneNumber = 2; + } + + message HydratedQuickReplyButton { + optional string displayText = 1; + optional string id = 2; + } + + message HydratedURLButton { + optional string displayText = 1; + optional string url = 2; + } + } message IdentityKeyPairStructure { @@ -875,39 +565,6 @@ message IdentityKeyPairStructure { optional bytes privateKey = 2; } -message ImageMessage { - optional string url = 1; - optional string mimetype = 2; - optional string caption = 3; - optional bytes fileSha256 = 4; - optional uint64 fileLength = 5; - optional uint32 height = 6; - optional uint32 width = 7; - optional bytes mediaKey = 8; - optional bytes fileEncSha256 = 9; - repeated InteractiveAnnotation interactiveAnnotations = 10; - optional string directPath = 11; - optional int64 mediaKeyTimestamp = 12; - optional bytes jpegThumbnail = 16; - optional ContextInfo contextInfo = 17; - optional bytes firstScanSidecar = 18; - optional uint32 firstScanLength = 19; - optional uint32 experimentGroupId = 20; - optional bytes scansSidecar = 21; - repeated uint32 scanLengths = 22; - optional bytes midQualityFileSha256 = 23; - optional bytes midQualityFileEncSha256 = 24; - optional bool viewOnce = 25; - optional string thumbnailDirectPath = 26; - optional bytes thumbnailSha256 = 27; - optional bytes thumbnailEncSha256 = 28; - optional string staticUrl = 29; -} - -message InitialSecurityNotificationSettingSync { - optional bool securityNotificationEnabled = 1; -} - message InteractiveAnnotation { repeated Point polygonVertices = 1; oneof action { @@ -915,63 +572,11 @@ message InteractiveAnnotation { } } -message InteractiveMessage { - optional Header header = 1; - optional InteractiveMessageBody body = 2; - optional Footer footer = 3; - optional ContextInfo contextInfo = 15; - oneof interactiveMessage { - ShopMessage shopStorefrontMessage = 4; - CollectionMessage collectionMessage = 5; - NativeFlowMessage nativeFlowMessage = 6; - } -} - -// Renamed from Message$InteractiveMessage$Body -message InteractiveMessageBody { - optional string text = 1; -} - -message InteractiveResponseMessage { - optional InteractiveResponseMessageBody body = 1; - optional ContextInfo contextInfo = 15; - oneof interactiveResponseMessage { - NativeFlowResponseMessage nativeFlowResponseMessage = 2; - } -} - -// Renamed from Message$InteractiveResponseMessage$Body -message InteractiveResponseMessageBody { - optional string text = 1; -} - -message InvoiceMessage { - optional string note = 1; - optional string token = 2; - enum InvoiceMessageAttachmentType { - IMAGE = 0; - PDF = 1; - } - optional InvoiceMessageAttachmentType attachmentType = 3; - optional string attachmentMimetype = 4; - optional bytes attachmentMediaKey = 5; - optional int64 attachmentMediaKeyTimestamp = 6; - optional bytes attachmentFileSha256 = 7; - optional bytes attachmentFileEncSha256 = 8; - optional string attachmentDirectPath = 9; - 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; + optional MessageKey key = 3; + optional string deviceJid = 4; } enum KeepType { @@ -979,70 +584,10 @@ enum KeepType { 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; - optional string buttonText = 3; - enum ListMessageListType { - UNKNOWN = 0; - SINGLE_SELECT = 1; - PRODUCT_LIST = 2; - } - optional ListMessageListType listType = 4; - repeated Section sections = 5; - optional ProductListInfo productListInfo = 6; - optional string footerText = 7; - optional ContextInfo contextInfo = 8; -} - -message ListResponseMessage { - optional string title = 1; - enum ListResponseMessageListType { - UNKNOWN = 0; - SINGLE_SELECT = 1; - } - optional ListResponseMessageListType listType = 2; - optional SingleSelectReply singleSelectReply = 3; - optional ContextInfo contextInfo = 4; - optional string description = 5; -} - -message LiveLocationMessage { - optional double degreesLatitude = 1; - optional double degreesLongitude = 2; - optional uint32 accuracyInMeters = 3; - optional float speedInMps = 4; - optional uint32 degreesClockwiseFromMagneticNorth = 5; - optional string caption = 6; - optional int64 sequenceNumber = 7; - optional uint32 timeOffset = 8; - optional bytes jpegThumbnail = 16; - optional ContextInfo contextInfo = 17; -} - -message LocaleSetting { - optional string locale = 1; -} - message LocalizedName { optional string lg = 1; optional string lc = 2; @@ -1055,26 +600,6 @@ message Location { optional string name = 3; } -message LocationMessage { - optional double degreesLatitude = 1; - optional double degreesLongitude = 2; - optional string name = 3; - optional string address = 4; - optional string url = 5; - optional bool isLive = 6; - optional uint32 accuracyInMeters = 7; - optional float speedInMps = 8; - optional uint32 degreesClockwiseFromMagneticNorth = 9; - optional string comment = 11; - optional bytes jpegThumbnail = 16; - optional ContextInfo contextInfo = 17; -} - -message MarkChatAsReadAction { - optional bool read = 1; - optional SyncActionMessageRange messageRange = 2; -} - message MediaData { optional string localPath = 1; } @@ -1082,13 +607,13 @@ message MediaData { message MediaRetryNotification { optional string stanzaId = 1; optional string directPath = 2; - enum MediaRetryNotificationResultType { + optional ResultType result = 3; + enum ResultType { GENERAL_ERROR = 0; SUCCESS = 1; NOT_FOUND = 2; DECRYPTION_ERROR = 3; } - optional MediaRetryNotificationResultType result = 3; } enum MediaVisibility { @@ -1140,7 +665,817 @@ message Message { optional PollCreationMessage pollCreationMessage = 49; optional PollUpdateMessage pollUpdateMessage = 50; optional KeepInChatMessage keepInChatMessage = 51; - optional FutureProofMessage documentWithCaptionMessage = 52; + optional FutureProofMessage documentWithCaptionMessage = 53; + optional RequestPhoneNumberMessage requestPhoneNumberMessage = 54; + optional FutureProofMessage viewOnceMessageV2 = 55; + message AppStateFatalExceptionNotification { + repeated string collectionNames = 1; + optional int64 timestamp = 2; + } + + message AppStateSyncKeyData { + optional bytes keyData = 1; + optional Message.AppStateSyncKeyFingerprint fingerprint = 2; + optional int64 timestamp = 3; + } + + message AppStateSyncKeyFingerprint { + optional uint32 rawId = 1; + optional uint32 currentIndex = 2; + repeated uint32 deviceIndexes = 3 [packed=true]; + } + + message AppStateSyncKeyId { + optional bytes keyId = 1; + } + + message AppStateSyncKeyRequest { + repeated Message.AppStateSyncKeyId keyIds = 1; + } + + message AppStateSyncKeyShare { + repeated Message.AppStateSyncKey keys = 1; + } + + message AppStateSyncKey { + optional Message.AppStateSyncKeyId keyId = 1; + optional Message.AppStateSyncKeyData keyData = 2; + } + + message AudioMessage { + optional string url = 1; + optional string mimetype = 2; + optional bytes fileSha256 = 3; + optional uint64 fileLength = 4; + optional uint32 seconds = 5; + optional bool ptt = 6; + optional bytes mediaKey = 7; + optional bytes fileEncSha256 = 8; + optional string directPath = 9; + optional int64 mediaKeyTimestamp = 10; + optional ContextInfo contextInfo = 17; + optional bytes streamingSidecar = 18; + optional bytes waveform = 19; + } + + message ButtonsMessage { + optional string contentText = 6; + optional string footerText = 7; + optional ContextInfo contextInfo = 8; + repeated Button buttons = 9; + optional HeaderType headerType = 10; + oneof header { + string text = 1; + Message.DocumentMessage documentMessage = 2; + Message.ImageMessage imageMessage = 3; + Message.VideoMessage videoMessage = 4; + Message.LocationMessage locationMessage = 5; + } + message Button { + optional string buttonId = 1; + optional ButtonText buttonText = 2; + optional Type type = 3; + optional NativeFlowInfo nativeFlowInfo = 4; + message ButtonText { + optional string displayText = 1; + } + + message NativeFlowInfo { + optional string name = 1; + optional string paramsJson = 2; + } + + enum Type { + UNKNOWN = 0; + RESPONSE = 1; + NATIVE_FLOW = 2; + } + } + + enum HeaderType { + UNKNOWN = 0; + EMPTY = 1; + TEXT = 2; + DOCUMENT = 3; + IMAGE = 4; + VIDEO = 5; + LOCATION = 6; + } + } + + message ButtonsResponseMessage { + optional string selectedButtonId = 1; + optional ContextInfo contextInfo = 3; + optional Type type = 4; + oneof response { + string selectedDisplayText = 2; + } + enum Type { + UNKNOWN = 0; + DISPLAY_TEXT = 1; + } + } + + message Call { + optional bytes callKey = 1; + optional string conversionSource = 2; + optional bytes conversionData = 3; + optional uint32 conversionDelaySeconds = 4; + } + + message CancelPaymentRequestMessage { + optional MessageKey key = 1; + } + + message Chat { + optional string displayName = 1; + optional string id = 2; + } + + message ContactMessage { + optional string displayName = 1; + optional string vcard = 16; + optional ContextInfo contextInfo = 17; + } + + message ContactsArrayMessage { + optional string displayName = 1; + repeated Message.ContactMessage contacts = 2; + optional ContextInfo contextInfo = 17; + } + + message DeclinePaymentRequestMessage { + optional MessageKey key = 1; + } + + message DeviceSentMessage { + optional string destinationJid = 1; + optional Message message = 2; + optional string phash = 3; + } + + message DocumentMessage { + optional string url = 1; + optional string mimetype = 2; + optional string title = 3; + optional bytes fileSha256 = 4; + optional uint64 fileLength = 5; + optional uint32 pageCount = 6; + optional bytes mediaKey = 7; + optional string fileName = 8; + optional bytes fileEncSha256 = 9; + optional string directPath = 10; + optional int64 mediaKeyTimestamp = 11; + optional bool contactVcard = 12; + optional string thumbnailDirectPath = 13; + optional bytes thumbnailSha256 = 14; + optional bytes thumbnailEncSha256 = 15; + optional bytes jpegThumbnail = 16; + optional ContextInfo contextInfo = 17; + optional uint32 thumbnailHeight = 18; + optional uint32 thumbnailWidth = 19; + optional string caption = 20; + } + + message ExtendedTextMessage { + optional string text = 1; + optional string matchedText = 2; + optional string canonicalUrl = 4; + optional string description = 5; + optional string title = 6; + optional fixed32 textArgb = 7; + optional fixed32 backgroundArgb = 8; + optional FontType font = 9; + optional PreviewType previewType = 10; + optional bytes jpegThumbnail = 16; + optional ContextInfo contextInfo = 17; + optional bool doNotPlayInline = 18; + optional string thumbnailDirectPath = 19; + optional bytes thumbnailSha256 = 20; + optional bytes thumbnailEncSha256 = 21; + optional bytes mediaKey = 22; + optional int64 mediaKeyTimestamp = 23; + optional uint32 thumbnailHeight = 24; + optional uint32 thumbnailWidth = 25; + optional InviteLinkGroupType inviteLinkGroupType = 26; + optional string inviteLinkParentGroupSubjectV2 = 27; + optional bytes inviteLinkParentGroupThumbnailV2 = 28; + optional InviteLinkGroupType inviteLinkGroupTypeV2 = 29; + enum FontType { + SANS_SERIF = 0; + SERIF = 1; + NORICAN_REGULAR = 2; + BRYNDAN_WRITE = 3; + BEBASNEUE_REGULAR = 4; + OSWALD_HEAVY = 5; + } + enum InviteLinkGroupType { + DEFAULT = 0; + PARENT = 1; + SUB = 2; + DEFAULT_SUB = 3; + } + enum PreviewType { + NONE = 0; + VIDEO = 1; + } + } + + message FutureProofMessage { + optional Message message = 1; + } + + message GroupInviteMessage { + optional string groupJid = 1; + optional string inviteCode = 2; + optional int64 inviteExpiration = 3; + optional string groupName = 4; + optional bytes jpegThumbnail = 5; + optional string caption = 6; + optional ContextInfo contextInfo = 7; + optional GroupType groupType = 8; + enum GroupType { + DEFAULT = 0; + PARENT = 1; + } + } + + 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 Message.TemplateMessage hydratedHsm = 9; + message HSMLocalizableParameter { + optional string default = 1; + oneof paramOneof { + Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency currency = 2; + Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime dateTime = 3; + } + message HSMCurrency { + optional string currencyCode = 1; + optional int64 amount1000 = 2; + } + + message HSMDateTime { + oneof datetimeOneof { + Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent component = 1; + Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch unixEpoch = 2; + } + message HSMDateTimeComponent { + optional DayOfWeekType dayOfWeek = 1; + optional uint32 year = 2; + optional uint32 month = 3; + optional uint32 dayOfMonth = 4; + optional uint32 hour = 5; + optional uint32 minute = 6; + optional CalendarType calendar = 7; + enum CalendarType { + GREGORIAN = 1; + SOLAR_HIJRI = 2; + } + enum DayOfWeekType { + MONDAY = 1; + TUESDAY = 2; + WEDNESDAY = 3; + THURSDAY = 4; + FRIDAY = 5; + SATURDAY = 6; + SUNDAY = 7; + } + } + + message HSMDateTimeUnixEpoch { + optional int64 timestamp = 1; + } + + } + + } + + } + + message HistorySyncNotification { + optional bytes fileSha256 = 1; + optional uint64 fileLength = 2; + optional bytes mediaKey = 3; + optional bytes fileEncSha256 = 4; + optional string directPath = 5; + optional HistorySyncType syncType = 6; + optional uint32 chunkOrder = 7; + optional string originalMessageId = 8; + optional uint32 progress = 9; + enum HistorySyncType { + INITIAL_BOOTSTRAP = 0; + INITIAL_STATUS_V3 = 1; + FULL = 2; + RECENT = 3; + PUSH_NAME = 4; + } + } + + message ImageMessage { + optional string url = 1; + optional string mimetype = 2; + optional string caption = 3; + optional bytes fileSha256 = 4; + optional uint64 fileLength = 5; + optional uint32 height = 6; + optional uint32 width = 7; + optional bytes mediaKey = 8; + optional bytes fileEncSha256 = 9; + repeated InteractiveAnnotation interactiveAnnotations = 10; + optional string directPath = 11; + optional int64 mediaKeyTimestamp = 12; + optional bytes jpegThumbnail = 16; + optional ContextInfo contextInfo = 17; + optional bytes firstScanSidecar = 18; + optional uint32 firstScanLength = 19; + optional uint32 experimentGroupId = 20; + optional bytes scansSidecar = 21; + repeated uint32 scanLengths = 22; + optional bytes midQualityFileSha256 = 23; + optional bytes midQualityFileEncSha256 = 24; + optional bool viewOnce = 25; + optional string thumbnailDirectPath = 26; + optional bytes thumbnailSha256 = 27; + optional bytes thumbnailEncSha256 = 28; + optional string staticUrl = 29; + } + + message InitialSecurityNotificationSettingSync { + optional bool securityNotificationEnabled = 1; + } + + message InteractiveMessage { + optional Header header = 1; + optional Body body = 2; + optional Footer footer = 3; + optional ContextInfo contextInfo = 15; + oneof interactiveMessage { + Message.InteractiveMessage.ShopMessage shopStorefrontMessage = 4; + Message.InteractiveMessage.CollectionMessage collectionMessage = 5; + Message.InteractiveMessage.NativeFlowMessage nativeFlowMessage = 6; + } + message Body { + optional string text = 1; + } + + message CollectionMessage { + optional string bizJid = 1; + optional string id = 2; + optional int32 messageVersion = 3; + } + + message Footer { + optional string text = 1; + } + + message Header { + optional string title = 1; + optional string subtitle = 2; + optional bool hasMediaAttachment = 5; + oneof media { + Message.DocumentMessage documentMessage = 3; + Message.ImageMessage imageMessage = 4; + bytes jpegThumbnail = 6; + Message.VideoMessage videoMessage = 7; + } + } + + message NativeFlowMessage { + repeated NativeFlowButton buttons = 1; + optional string messageParamsJson = 2; + optional int32 messageVersion = 3; + message NativeFlowButton { + optional string name = 1; + optional string buttonParamsJson = 2; + } + + } + + message ShopMessage { + optional string id = 1; + optional Surface surface = 2; + optional int32 messageVersion = 3; + enum Surface { + UNKNOWN_SURFACE = 0; + FB = 1; + IG = 2; + WA = 3; + } + } + + } + + message InteractiveResponseMessage { + optional Body body = 1; + optional ContextInfo contextInfo = 15; + oneof interactiveResponseMessage { + Message.InteractiveResponseMessage.NativeFlowResponseMessage nativeFlowResponseMessage = 2; + } + message Body { + optional string text = 1; + } + + message NativeFlowResponseMessage { + optional string name = 1; + optional string paramsJson = 2; + optional int32 version = 3; + } + + } + + message InvoiceMessage { + optional string note = 1; + optional string token = 2; + optional AttachmentType attachmentType = 3; + optional string attachmentMimetype = 4; + optional bytes attachmentMediaKey = 5; + optional int64 attachmentMediaKeyTimestamp = 6; + optional bytes attachmentFileSha256 = 7; + optional bytes attachmentFileEncSha256 = 8; + optional string attachmentDirectPath = 9; + optional bytes attachmentJpegThumbnail = 10; + enum AttachmentType { + IMAGE = 0; + PDF = 1; + } + } + + message KeepInChatMessage { + optional MessageKey key = 1; + optional KeepType keepType = 2; + optional int64 timestampMs = 3; + } + + message ListMessage { + optional string title = 1; + optional string description = 2; + optional string buttonText = 3; + optional ListType listType = 4; + repeated Section sections = 5; + optional ProductListInfo productListInfo = 6; + optional string footerText = 7; + optional ContextInfo contextInfo = 8; + enum ListType { + UNKNOWN = 0; + SINGLE_SELECT = 1; + PRODUCT_LIST = 2; + } + message ProductListHeaderImage { + optional string productId = 1; + optional bytes jpegThumbnail = 2; + } + + message ProductListInfo { + repeated Message.ListMessage.ProductSection productSections = 1; + optional Message.ListMessage.ProductListHeaderImage headerImage = 2; + optional string businessOwnerJid = 3; + } + + message ProductSection { + optional string title = 1; + repeated Message.ListMessage.Product products = 2; + } + + message Product { + optional string productId = 1; + } + + message Row { + optional string title = 1; + optional string description = 2; + optional string rowId = 3; + } + + message Section { + optional string title = 1; + repeated Message.ListMessage.Row rows = 2; + } + + } + + message ListResponseMessage { + optional string title = 1; + optional ListType listType = 2; + optional SingleSelectReply singleSelectReply = 3; + optional ContextInfo contextInfo = 4; + optional string description = 5; + enum ListType { + UNKNOWN = 0; + SINGLE_SELECT = 1; + } + message SingleSelectReply { + optional string selectedRowId = 1; + } + + } + + message LiveLocationMessage { + optional double degreesLatitude = 1; + optional double degreesLongitude = 2; + optional uint32 accuracyInMeters = 3; + optional float speedInMps = 4; + optional uint32 degreesClockwiseFromMagneticNorth = 5; + optional string caption = 6; + optional int64 sequenceNumber = 7; + optional uint32 timeOffset = 8; + optional bytes jpegThumbnail = 16; + optional ContextInfo contextInfo = 17; + } + + message LocationMessage { + optional double degreesLatitude = 1; + optional double degreesLongitude = 2; + optional string name = 3; + optional string address = 4; + optional string url = 5; + optional bool isLive = 6; + optional uint32 accuracyInMeters = 7; + optional float speedInMps = 8; + optional uint32 degreesClockwiseFromMagneticNorth = 9; + optional string comment = 11; + optional bytes jpegThumbnail = 16; + optional ContextInfo contextInfo = 17; + } + + message OrderMessage { + optional string orderId = 1; + optional bytes thumbnail = 2; + optional int32 itemCount = 3; + optional OrderStatus status = 4; + optional OrderSurface surface = 5; + optional string message = 6; + optional string orderTitle = 7; + optional string sellerJid = 8; + optional string token = 9; + optional int64 totalAmount1000 = 10; + optional string totalCurrencyCode = 11; + optional ContextInfo contextInfo = 17; + enum OrderStatus { + INQUIRY = 1; + } + enum OrderSurface { + CATALOG = 1; + } + } + + message PaymentInviteMessage { + optional ServiceType serviceType = 1; + optional int64 expiryTimestamp = 2; + enum ServiceType { + UNKNOWN = 0; + FBPAY = 1; + NOVI = 2; + UPI = 3; + } + } + + message PollCreationMessage { + optional bytes encKey = 1; + optional string name = 2; + repeated Option options = 3; + optional uint32 selectableOptionsCount = 4; + optional ContextInfo contextInfo = 5; + message Option { + optional string optionName = 1; + } + + } + + message PollEncValue { + optional bytes encPayload = 1; + optional bytes encIv = 2; + } + + message PollUpdateMessageMetadata { + } + + message PollUpdateMessage { + optional MessageKey pollCreationMessageKey = 1; + optional Message.PollEncValue vote = 2; + optional Message.PollUpdateMessageMetadata metadata = 3; + optional int64 senderTimestampMs = 4; + } + + message PollVoteMessage { + repeated bytes selectedOptions = 1; + } + + 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 CatalogSnapshot { + optional Message.ImageMessage catalogImage = 1; + optional string title = 2; + optional string description = 3; + } + + message ProductSnapshot { + optional Message.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; + optional Type type = 2; + optional uint32 ephemeralExpiration = 4; + optional int64 ephemeralSettingTimestamp = 5; + optional Message.HistorySyncNotification historySyncNotification = 6; + optional Message.AppStateSyncKeyShare appStateSyncKeyShare = 7; + optional Message.AppStateSyncKeyRequest appStateSyncKeyRequest = 8; + optional Message.InitialSecurityNotificationSettingSync initialSecurityNotificationSettingSync = 9; + optional Message.AppStateFatalExceptionNotification appStateFatalExceptionNotification = 10; + optional DisappearingMode disappearingMode = 11; + optional Message.RequestMediaUploadMessage requestMediaUploadMessage = 12; + optional Message.RequestMediaUploadResponseMessage requestMediaUploadResponseMessage = 13; + enum Type { + 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; + SHARE_PHONE_NUMBER = 11; + REQUEST_MEDIA_UPLOAD_MESSAGE = 12; + REQUEST_MEDIA_UPLOAD_RESPONSE_MESSAGE = 13; + } + } + + message ReactionMessage { + optional MessageKey key = 1; + optional string text = 2; + optional string groupingKey = 3; + optional int64 senderTimestampMs = 4; + } + + message RequestMediaUploadMessage { + repeated string fileSha256 = 1; + optional Message.RmrSource rmrSource = 2; + } + + message RequestMediaUploadResponseMessage { + optional Message.RmrSource rmrSource = 1; + optional string stanzaId = 2; + repeated RequestMediaUploadResult reuploadResult = 3; + message RequestMediaUploadResult { + optional string fileSha256 = 1; + optional MediaRetryNotification.ResultType mediaUploadResult = 2; + optional Message.StickerMessage stickerMessage = 3; + } + + } + + 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 RequestPhoneNumberMessage { + optional ContextInfo contextInfo = 1; + } + + enum RmrSource { + FAVORITE_STICKER = 0; + RECENT_STICKER = 1; + } + message SendPaymentMessage { + optional Message noteMessage = 2; + optional MessageKey requestMessageKey = 3; + optional PaymentBackground background = 4; + } + + message SenderKeyDistributionMessage { + optional string groupId = 1; + optional bytes axolotlSenderKeyDistributionMessage = 2; + } + + 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 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 { + Message.TemplateMessage.FourRowTemplate fourRowTemplate = 1; + Message.TemplateMessage.HydratedFourRowTemplate hydratedFourRowTemplate = 2; + } + message FourRowTemplate { + optional Message.HighlyStructuredMessage content = 6; + optional Message.HighlyStructuredMessage footer = 7; + repeated TemplateButton buttons = 8; + oneof title { + Message.DocumentMessage documentMessage = 1; + Message.HighlyStructuredMessage highlyStructuredMessage = 2; + Message.ImageMessage imageMessage = 3; + Message.VideoMessage videoMessage = 4; + Message.LocationMessage locationMessage = 5; + } + } + + message HydratedFourRowTemplate { + optional string hydratedContentText = 6; + optional string hydratedFooterText = 7; + repeated HydratedTemplateButton hydratedButtons = 8; + optional string templateId = 9; + oneof title { + Message.DocumentMessage documentMessage = 1; + string hydratedTitleText = 2; + Message.ImageMessage imageMessage = 3; + Message.VideoMessage videoMessage = 4; + Message.LocationMessage locationMessage = 5; + } + } + + } + + 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; + optional Attribution gifAttribution = 19; + optional bool viewOnce = 20; + optional string thumbnailDirectPath = 21; + optional bytes thumbnailSha256 = 22; + optional bytes thumbnailEncSha256 = 23; + optional string staticUrl = 24; + enum Attribution { + NONE = 0; + GIPHY = 1; + TENOR = 2; + } + } + } message MessageContextInfo { @@ -1182,6 +1517,13 @@ message MsgOpaqueData { repeated PollOption pollOptions = 18; optional uint32 pollSelectableOptionsCount = 20; optional bytes messageSecret = 21; + optional int64 senderTimestampMs = 22; + optional string pollUpdateParentKey = 23; + optional PollEncValue encPollVote = 24; + message PollOption { + optional string name = 1; + } + } message MsgRowOpaqueData { @@ -1189,45 +1531,17 @@ message MsgRowOpaqueData { optional MsgOpaqueData quotedMsg = 2; } -message MuteAction { - optional bool muted = 1; - optional int64 muteEndTimestamp = 2; -} - -message NativeFlowButton { - optional string name = 1; - optional string buttonParamsJson = 2; -} - -message NativeFlowInfo { - optional string name = 1; - optional string paramsJson = 2; -} - -message NativeFlowMessage { - repeated NativeFlowButton buttons = 1; - optional string messageParamsJson = 2; - optional int32 messageVersion = 3; -} - -message NativeFlowResponseMessage { - optional string name = 1; - optional string paramsJson = 2; - 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 Details { + optional uint32 serial = 1; + optional string issuer = 2; + optional uint64 expires = 3; + optional string subject = 4; + optional bytes key = 5; + } + } message NotificationMessageInfo { @@ -1237,42 +1551,19 @@ message NotificationMessageInfo { optional string participant = 4; } -message NuxAction { - optional bool acknowledged = 1; -} - -message Option { - optional string optionName = 1; -} - -message OrderMessage { - optional string orderId = 1; - optional bytes thumbnail = 2; - optional int32 itemCount = 3; - enum OrderMessageOrderStatus { - INQUIRY = 1; +message PastParticipant { + required string userJid = 1; + required LeaveReason leaveReason = 2; + required uint64 leaveTs = 3; + enum LeaveReason { + LEFT = 0; + REMOVED = 1; } - optional OrderMessageOrderStatus status = 4; - enum OrderMessageOrderSurface { - CATALOG = 1; - } - optional OrderMessageOrderSurface surface = 5; - optional string message = 6; - optional string orderTitle = 7; - optional string sellerJid = 8; - optional string token = 9; - optional int64 totalAmount1000 = 10; - optional string totalCurrencyCode = 11; - 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 PastParticipants { + required string groupJid = 1; + repeated PastParticipant pastParticipants = 2; } message PaymentBackground { @@ -1284,23 +1575,41 @@ message PaymentBackground { optional fixed32 placeholderArgb = 6; optional fixed32 textArgb = 7; optional fixed32 subtextArgb = 8; - optional PBMediaData mediaData = 9; - enum PaymentBackgroundType { + optional MediaData mediaData = 9; + optional Type type = 10; + message MediaData { + optional bytes mediaKey = 1; + optional int64 mediaKeyTimestamp = 2; + optional bytes fileSha256 = 3; + optional bytes fileEncSha256 = 4; + optional string directPath = 5; + } + + enum Type { UNKNOWN = 0; DEFAULT = 1; } - optional PaymentBackgroundType type = 10; } message PaymentInfo { - enum PaymentInfoCurrency { + optional Currency currencyDeprecated = 1; + optional uint64 amount1000 = 2; + optional string receiverJid = 3; + optional Status status = 4; + optional uint64 transactionTimestamp = 5; + optional MessageKey requestMessageKey = 6; + optional uint64 expiryTimestamp = 7; + optional bool futureproofed = 8; + optional string currency = 9; + optional TxnStatus txnStatus = 10; + optional bool useNoviFiatFormat = 11; + optional Money primaryAmount = 12; + optional Money exchangeAmount = 13; + enum Currency { UNKNOWN_CURRENCY = 0; INR = 1; } - optional PaymentInfoCurrency currencyDeprecated = 1; - optional uint64 amount1000 = 2; - optional string receiverJid = 3; - enum PaymentInfoStatus { + enum Status { UNKNOWN_STATUS = 0; PROCESSING = 1; SENT = 2; @@ -1314,13 +1623,7 @@ message PaymentInfo { WAITING_FOR_PAYER = 10; WAITING = 11; } - optional PaymentInfoStatus status = 4; - optional uint64 transactionTimestamp = 5; - optional MessageKey requestMessageKey = 6; - optional uint64 expiryTimestamp = 7; - optional bool futureproofed = 8; - optional string currency = 9; - enum PaymentInfoTxnStatus { + enum TxnStatus { UNKNOWN = 0; PENDING_SETUP = 1; PENDING_RECEIVER_SETUP = 2; @@ -1354,21 +1657,6 @@ message PaymentInfo { REVERSAL_PENDING = 30; REFUND_PENDING = 31; } - optional PaymentInfoTxnStatus txnStatus = 10; - optional bool useNoviFiatFormat = 11; - optional Money primaryAmount = 12; - 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 { @@ -1393,10 +1681,6 @@ message PhotoChange { optional uint32 newPhotoId = 3; } -message PinAction { - optional bool pinned = 1; -} - message Point { optional int32 xDeprecated = 1; optional int32 yDeprecated = 2; @@ -1408,40 +1692,15 @@ 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; + optional Message.PollVoteMessage vote = 2; + optional int64 senderTimestampMs = 3; } message PreKeyRecordStructure { @@ -1450,99 +1709,11 @@ message PreKeyRecordStructure { 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; @@ -1551,87 +1722,21 @@ 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; } @@ -1657,12 +1762,6 @@ 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; @@ -1679,18 +1778,6 @@ message SessionStructure { 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; @@ -1699,20 +1786,12 @@ message SignedPreKeyRecordStructure { 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 { +message StickerMetadata { optional string url = 1; optional bytes fileSha256 = 2; optional bytes fileEncSha256 = 3; @@ -1722,24 +1801,7 @@ message StickerMessage { 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; + optional float weight = 10; } message SyncActionData { @@ -1749,17 +1811,6 @@ message SyncActionData { 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; @@ -1769,8 +1820,6 @@ message SyncActionValue { 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; @@ -1783,13 +1832,158 @@ message SyncActionValue { 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; optional NuxAction nuxAction = 31; + optional PrimaryVersionAction primaryVersionAction = 32; + optional StickerAction stickerAction = 33; + 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 SyncActionValue.SyncActionMessageRange messageRange = 2; + } + + message ClearChatAction { + optional SyncActionValue.SyncActionMessageRange messageRange = 1; + } + + message ContactAction { + optional string fullName = 1; + optional string firstName = 2; + } + + message DeleteChatAction { + optional SyncActionValue.SyncActionMessageRange messageRange = 1; + } + + message DeleteMessageForMeAction { + optional bool deleteMedia = 1; + optional int64 messageTimestamp = 2; + } + + 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 SyncActionValue.SyncActionMessageRange messageRange = 2; + } + + message MuteAction { + optional bool muted = 1; + optional int64 muteEndTimestamp = 2; + } + + message NuxAction { + optional bool acknowledged = 1; + } + + message PinAction { + optional bool pinned = 1; + } + + message PrimaryFeature { + repeated string flags = 1; + } + + message PrimaryVersionAction { + optional string version = 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 RecentEmojiWeightsAction { + repeated RecentEmojiWeight weights = 1; + } + + message SecurityNotificationSetting { + optional bool showNotification = 1; + } + + message StarAction { + optional bool starred = 1; + } + + message StickerAction { + optional string url = 1; + optional bytes fileEncSha256 = 2; + optional bytes mediaKey = 3; + optional string mimetype = 4; + optional uint32 height = 5; + optional uint32 width = 6; + optional string directPath = 7; + optional uint64 fileLength = 8; + optional bool isFavorite = 9; + optional uint32 deviceIdHint = 10; + } + + message SubscriptionAction { + optional bool isDeactivated = 1; + optional bool isAutoRenewing = 2; + optional int64 expirationDate = 3; + } + + message SyncActionMessageRange { + optional int64 lastMessageTimestamp = 1; + optional int64 lastSystemMessageTimestamp = 2; + repeated SyncActionValue.SyncActionMessage messages = 3; + } + + message SyncActionMessage { + optional MessageKey key = 1; + optional int64 timestamp = 2; + } + + message TimeFormatAction { + optional bool isTwentyFourHourFormatEnabled = 1; + } + + message UnarchiveChatsSetting { + optional bool unarchiveChats = 1; + } + + message UserStatusMuteAction { + optional bool muted = 1; + } + } message SyncdIndex { @@ -1797,12 +1991,12 @@ message SyncdIndex { } message SyncdMutation { - enum SyncdMutationSyncdOperation { + optional SyncdOperation operation = 1; + optional SyncdRecord record = 2; + enum SyncdOperation { SET = 0; REMOVE = 1; } - optional SyncdMutationSyncdOperation operation = 1; - optional SyncdRecord record = 2; } message SyncdMutations { @@ -1844,92 +2038,25 @@ message SyncdVersion { message TemplateButton { optional uint32 index = 4; oneof button { - QuickReplyButton quickReplyButton = 1; - URLButton urlButton = 2; - CallButton callButton = 3; + TemplateButton.QuickReplyButton quickReplyButton = 1; + TemplateButton.URLButton urlButton = 2; + TemplateButton.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 CallButton { + optional Message.HighlyStructuredMessage displayText = 1; + optional Message.HighlyStructuredMessage phoneNumber = 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; + + message QuickReplyButton { + optional Message.HighlyStructuredMessage displayText = 1; + optional string id = 2; } - 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; + + message URLButton { + optional Message.HighlyStructuredMessage displayText = 1; + optional Message.HighlyStructuredMessage url = 2; } - optional UserAgentReleaseChannel releaseChannel = 10; - optional string localeLanguageIso6391 = 11; - optional string localeCountryIso31661Alpha2 = 12; - optional string deviceBoard = 13; + } message UserReceipt { @@ -1941,54 +2068,18 @@ 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; + message Details { + optional uint64 serial = 1; + optional string issuer = 2; + optional string verifiedName = 4; + repeated LocalizedName localizedNames = 8; + optional uint64 issueTime = 10; } - 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 { @@ -1997,86 +2088,64 @@ message WallpaperSettings { } message WebFeatures { - enum WebFeaturesFlag { + optional Flag labelsDisplay = 1; + optional Flag voipIndividualOutgoing = 2; + optional Flag groupsV3 = 3; + optional Flag groupsV3Create = 4; + optional Flag changeNumberV2 = 5; + optional Flag queryStatusV3Thumbnail = 6; + optional Flag liveLocations = 7; + optional Flag queryVname = 8; + optional Flag voipIndividualIncoming = 9; + optional Flag quickRepliesQuery = 10; + optional Flag payments = 11; + optional Flag stickerPackQuery = 12; + optional Flag liveLocationsFinal = 13; + optional Flag labelsEdit = 14; + optional Flag mediaUpload = 15; + optional Flag mediaUploadRichQuickReplies = 18; + optional Flag vnameV2 = 19; + optional Flag videoPlaybackUrl = 20; + optional Flag statusRanking = 21; + optional Flag voipIndividualVideo = 22; + optional Flag thirdPartyStickers = 23; + optional Flag frequentlyForwardedSetting = 24; + optional Flag groupsV4JoinPermission = 25; + optional Flag recentStickers = 26; + optional Flag catalog = 27; + optional Flag starredStickers = 28; + optional Flag voipGroupCall = 29; + optional Flag templateMessage = 30; + optional Flag templateMessageInteractivity = 31; + optional Flag ephemeralMessages = 32; + optional Flag e2ENotificationSync = 33; + optional Flag recentStickersV2 = 34; + optional Flag recentStickersV3 = 36; + optional Flag userNotice = 37; + optional Flag support = 39; + optional Flag groupUiiCleanup = 40; + optional Flag groupDogfoodingInternalOnly = 41; + optional Flag settingsSync = 42; + optional Flag archiveV2 = 43; + optional Flag ephemeralAllowGroupMembers = 44; + optional Flag ephemeral24HDuration = 45; + optional Flag mdForceUpgrade = 46; + optional Flag disappearingMode = 47; + optional Flag externalMdOptInAvailable = 48; + optional Flag noDeleteMessageTimeLimit = 49; + enum Flag { NOT_STARTED = 0; FORCE_UPGRADE = 1; DEVELOPMENT = 2; PRODUCTION = 3; } - optional WebFeaturesFlag labelsDisplay = 1; - optional WebFeaturesFlag voipIndividualOutgoing = 2; - optional WebFeaturesFlag groupsV3 = 3; - optional WebFeaturesFlag groupsV3Create = 4; - optional WebFeaturesFlag changeNumberV2 = 5; - optional WebFeaturesFlag queryStatusV3Thumbnail = 6; - optional WebFeaturesFlag liveLocations = 7; - optional WebFeaturesFlag queryVname = 8; - optional WebFeaturesFlag voipIndividualIncoming = 9; - optional WebFeaturesFlag quickRepliesQuery = 10; - optional WebFeaturesFlag payments = 11; - optional WebFeaturesFlag stickerPackQuery = 12; - optional WebFeaturesFlag liveLocationsFinal = 13; - optional WebFeaturesFlag labelsEdit = 14; - optional WebFeaturesFlag mediaUpload = 15; - optional WebFeaturesFlag mediaUploadRichQuickReplies = 18; - optional WebFeaturesFlag vnameV2 = 19; - optional WebFeaturesFlag videoPlaybackUrl = 20; - optional WebFeaturesFlag statusRanking = 21; - optional WebFeaturesFlag voipIndividualVideo = 22; - optional WebFeaturesFlag thirdPartyStickers = 23; - optional WebFeaturesFlag frequentlyForwardedSetting = 24; - optional WebFeaturesFlag groupsV4JoinPermission = 25; - optional WebFeaturesFlag recentStickers = 26; - optional WebFeaturesFlag catalog = 27; - optional WebFeaturesFlag starredStickers = 28; - optional WebFeaturesFlag voipGroupCall = 29; - optional WebFeaturesFlag templateMessage = 30; - optional WebFeaturesFlag templateMessageInteractivity = 31; - optional WebFeaturesFlag ephemeralMessages = 32; - optional WebFeaturesFlag e2ENotificationSync = 33; - optional WebFeaturesFlag recentStickersV2 = 34; - optional WebFeaturesFlag recentStickersV3 = 36; - optional WebFeaturesFlag userNotice = 37; - optional WebFeaturesFlag support = 39; - optional WebFeaturesFlag groupUiiCleanup = 40; - optional WebFeaturesFlag groupDogfoodingInternalOnly = 41; - optional WebFeaturesFlag settingsSync = 42; - optional WebFeaturesFlag archiveV2 = 43; - optional WebFeaturesFlag ephemeralAllowGroupMembers = 44; - optional WebFeaturesFlag ephemeral24HDuration = 45; - optional WebFeaturesFlag mdForceUpgrade = 46; - optional WebFeaturesFlag disappearingMode = 47; - optional WebFeaturesFlag externalMdOptInAvailable = 48; - 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; optional uint64 messageTimestamp = 3; - enum WebMessageInfoStatus { - ERROR = 0; - PENDING = 1; - SERVER_ACK = 2; - DELIVERY_ACK = 3; - READ = 4; - PLAYED = 5; - } - optional WebMessageInfoStatus status = 4; + optional Status status = 4; optional string participant = 5; optional uint64 messageC2STimestamp = 6; optional bool ignore = 16; @@ -2087,7 +2156,50 @@ message WebMessageInfo { optional bool multicast = 21; optional bool urlText = 22; optional bool urlNumber = 23; - enum WebMessageInfoStubType { + optional StubType messageStubType = 24; + optional bool clearMedia = 25; + repeated string messageStubParameters = 26; + optional uint32 duration = 27; + repeated string labels = 28; + optional PaymentInfo paymentInfo = 29; + optional Message.LiveLocationMessage finalLiveLocation = 30; + optional PaymentInfo quotedPaymentInfo = 31; + optional uint64 ephemeralStartTimestamp = 32; + optional uint32 ephemeralDuration = 33; + optional bool ephemeralOffToOn = 34; + optional bool ephemeralOutOfSync = 35; + optional BizPrivacyStatus bizPrivacyStatus = 36; + optional string verifiedBizName = 37; + optional MediaData mediaData = 38; + optional PhotoChange photoChange = 39; + repeated UserReceipt userReceipt = 40; + repeated Reaction reactions = 41; + optional MediaData quotedStickerData = 42; + optional bytes futureproofData = 43; + optional StatusPSA statusPsa = 44; + repeated PollUpdate pollUpdates = 45; + optional PollAdditionalMetadata pollAdditionalMetadata = 46; + optional string agentId = 47; + optional bool statusAlreadyViewed = 48; + optional bytes messageSecret = 49; + optional KeepInChat keepInChat = 50; + optional string originalSelfAuthorUserJidString = 51; + optional uint64 revokeMessageTimestamp = 52; + enum BizPrivacyStatus { + E2EE = 0; + FB = 2; + BSP = 1; + BSP_AND_FB = 3; + } + enum Status { + ERROR = 0; + PENDING = 1; + SERVER_ACK = 2; + DELIVERY_ACK = 3; + READ = 4; + PLAYED = 5; + } + enum StubType { UNKNOWN = 0; REVOKE = 1; CIPHERTEXT = 2; @@ -2232,40 +2344,13 @@ message WebMessageInfo { GROUP_PARTICIPANT_LINKED_GROUP_JOIN = 141; COMMUNITY_CREATE = 142; EPHEMERAL_KEEP_IN_CHAT = 143; + GROUP_MEMBERSHIP_JOIN_APPROVAL_REQUEST = 144; + GROUP_MEMBERSHIP_JOIN_APPROVAL_MODE = 145; + INTEGRITY_UNLINK_PARENT_GROUP = 146; + COMMUNITY_PARTICIPANT_PROMOTE = 147; + COMMUNITY_PARTICIPANT_DEMOTE = 148; + COMMUNITY_PARENT_GROUP_DELETED = 149; } - optional WebMessageInfoStubType messageStubType = 24; - optional bool clearMedia = 25; - repeated string messageStubParameters = 26; - optional uint32 duration = 27; - repeated string labels = 28; - optional PaymentInfo paymentInfo = 29; - optional LiveLocationMessage finalLiveLocation = 30; - optional PaymentInfo quotedPaymentInfo = 31; - optional uint64 ephemeralStartTimestamp = 32; - optional uint32 ephemeralDuration = 33; - optional bool ephemeralOffToOn = 34; - optional bool ephemeralOutOfSync = 35; - enum WebMessageInfoBizPrivacyStatus { - E2EE = 0; - FB = 2; - BSP = 1; - BSP_AND_FB = 3; - } - optional WebMessageInfoBizPrivacyStatus bizPrivacyStatus = 36; - optional string verifiedBizName = 37; - optional MediaData mediaData = 38; - optional PhotoChange photoChange = 39; - repeated UserReceipt userReceipt = 40; - repeated Reaction reactions = 41; - optional MediaData quotedStickerData = 42; - optional bytes futureproofData = 43; - optional StatusPSA statusPsa = 44; - repeated PollUpdate pollUpdates = 45; - optional PollAdditionalMetadata pollAdditionalMetadata = 46; - optional string agentId = 47; - optional bool statusAlreadyViewed = 48; - optional bytes messageSecret = 49; - optional KeepInChat keepInChat = 50; } message WebNotificationsInfo { @@ -2274,17 +2359,3 @@ 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 bc46bbb..5c49d01 100644 --- a/WAProto/index.d.ts +++ b/WAProto/index.d.ts @@ -608,1354 +608,6 @@ export namespace proto { public toJSON(): { [k: string]: any }; } - /** Properties of an AdReplyInfo. */ - interface IAdReplyInfo { - - /** AdReplyInfo advertiserName */ - advertiserName?: (string|null); - - /** AdReplyInfo mediaType */ - mediaType?: (proto.AdReplyInfo.AdReplyInfoMediaType|null); - - /** AdReplyInfo jpegThumbnail */ - jpegThumbnail?: (Uint8Array|null); - - /** AdReplyInfo caption */ - caption?: (string|null); - } - - /** Represents an AdReplyInfo. */ - class AdReplyInfo implements IAdReplyInfo { - - /** - * Constructs a new AdReplyInfo. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IAdReplyInfo); - - /** AdReplyInfo advertiserName. */ - public advertiserName: string; - - /** AdReplyInfo mediaType. */ - public mediaType: proto.AdReplyInfo.AdReplyInfoMediaType; - - /** AdReplyInfo jpegThumbnail. */ - public jpegThumbnail: Uint8Array; - - /** AdReplyInfo caption. */ - public caption: string; - - /** - * Creates a new AdReplyInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns AdReplyInfo instance - */ - public static create(properties?: proto.IAdReplyInfo): proto.AdReplyInfo; - - /** - * Encodes the specified AdReplyInfo message. Does not implicitly {@link proto.AdReplyInfo.verify|verify} messages. - * @param message AdReplyInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IAdReplyInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AdReplyInfo message, length delimited. Does not implicitly {@link proto.AdReplyInfo.verify|verify} messages. - * @param message AdReplyInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IAdReplyInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AdReplyInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AdReplyInfo - * @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.AdReplyInfo; - - /** - * Decodes an AdReplyInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AdReplyInfo - * @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.AdReplyInfo; - - /** - * Verifies an AdReplyInfo 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 AdReplyInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AdReplyInfo - */ - public static fromObject(object: { [k: string]: any }): proto.AdReplyInfo; - - /** - * Creates a plain object from an AdReplyInfo message. Also converts values to other types if specified. - * @param message AdReplyInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.AdReplyInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AdReplyInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace AdReplyInfo { - - /** AdReplyInfoMediaType enum. */ - enum AdReplyInfoMediaType { - NONE = 0, - IMAGE = 1, - VIDEO = 2 - } - } - - /** 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 { - - /** AppStateFatalExceptionNotification collectionNames */ - collectionNames?: (string[]|null); - - /** AppStateFatalExceptionNotification timestamp */ - timestamp?: (number|Long|null); - } - - /** Represents an AppStateFatalExceptionNotification. */ - class AppStateFatalExceptionNotification implements IAppStateFatalExceptionNotification { - - /** - * Constructs a new AppStateFatalExceptionNotification. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IAppStateFatalExceptionNotification); - - /** AppStateFatalExceptionNotification collectionNames. */ - public collectionNames: string[]; - - /** AppStateFatalExceptionNotification timestamp. */ - public timestamp: (number|Long); - - /** - * Creates a new AppStateFatalExceptionNotification instance using the specified properties. - * @param [properties] Properties to set - * @returns AppStateFatalExceptionNotification instance - */ - public static create(properties?: proto.IAppStateFatalExceptionNotification): proto.AppStateFatalExceptionNotification; - - /** - * Encodes the specified AppStateFatalExceptionNotification message. Does not implicitly {@link proto.AppStateFatalExceptionNotification.verify|verify} messages. - * @param message AppStateFatalExceptionNotification message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IAppStateFatalExceptionNotification, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AppStateFatalExceptionNotification message, length delimited. Does not implicitly {@link proto.AppStateFatalExceptionNotification.verify|verify} messages. - * @param message AppStateFatalExceptionNotification message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IAppStateFatalExceptionNotification, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AppStateFatalExceptionNotification message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AppStateFatalExceptionNotification - * @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.AppStateFatalExceptionNotification; - - /** - * Decodes an AppStateFatalExceptionNotification message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AppStateFatalExceptionNotification - * @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.AppStateFatalExceptionNotification; - - /** - * Verifies an AppStateFatalExceptionNotification 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 AppStateFatalExceptionNotification message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AppStateFatalExceptionNotification - */ - public static fromObject(object: { [k: string]: any }): proto.AppStateFatalExceptionNotification; - - /** - * Creates a plain object from an AppStateFatalExceptionNotification message. Also converts values to other types if specified. - * @param message AppStateFatalExceptionNotification - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.AppStateFatalExceptionNotification, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AppStateFatalExceptionNotification to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an AppStateSyncKey. */ - interface IAppStateSyncKey { - - /** AppStateSyncKey keyId */ - keyId?: (proto.IAppStateSyncKeyId|null); - - /** AppStateSyncKey keyData */ - keyData?: (proto.IAppStateSyncKeyData|null); - } - - /** Represents an AppStateSyncKey. */ - class AppStateSyncKey implements IAppStateSyncKey { - - /** - * Constructs a new AppStateSyncKey. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IAppStateSyncKey); - - /** AppStateSyncKey keyId. */ - public keyId?: (proto.IAppStateSyncKeyId|null); - - /** AppStateSyncKey keyData. */ - public keyData?: (proto.IAppStateSyncKeyData|null); - - /** - * Creates a new AppStateSyncKey instance using the specified properties. - * @param [properties] Properties to set - * @returns AppStateSyncKey instance - */ - public static create(properties?: proto.IAppStateSyncKey): proto.AppStateSyncKey; - - /** - * Encodes the specified AppStateSyncKey message. Does not implicitly {@link proto.AppStateSyncKey.verify|verify} messages. - * @param message AppStateSyncKey message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IAppStateSyncKey, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AppStateSyncKey message, length delimited. Does not implicitly {@link proto.AppStateSyncKey.verify|verify} messages. - * @param message AppStateSyncKey message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IAppStateSyncKey, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AppStateSyncKey message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AppStateSyncKey - * @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.AppStateSyncKey; - - /** - * Decodes an AppStateSyncKey message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AppStateSyncKey - * @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.AppStateSyncKey; - - /** - * Verifies an AppStateSyncKey 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 AppStateSyncKey message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AppStateSyncKey - */ - public static fromObject(object: { [k: string]: any }): proto.AppStateSyncKey; - - /** - * Creates a plain object from an AppStateSyncKey message. Also converts values to other types if specified. - * @param message AppStateSyncKey - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.AppStateSyncKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AppStateSyncKey to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an AppStateSyncKeyData. */ - interface IAppStateSyncKeyData { - - /** AppStateSyncKeyData keyData */ - keyData?: (Uint8Array|null); - - /** AppStateSyncKeyData fingerprint */ - fingerprint?: (proto.IAppStateSyncKeyFingerprint|null); - - /** AppStateSyncKeyData timestamp */ - timestamp?: (number|Long|null); - } - - /** Represents an AppStateSyncKeyData. */ - class AppStateSyncKeyData implements IAppStateSyncKeyData { - - /** - * Constructs a new AppStateSyncKeyData. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IAppStateSyncKeyData); - - /** AppStateSyncKeyData keyData. */ - public keyData: Uint8Array; - - /** AppStateSyncKeyData fingerprint. */ - public fingerprint?: (proto.IAppStateSyncKeyFingerprint|null); - - /** AppStateSyncKeyData timestamp. */ - public timestamp: (number|Long); - - /** - * Creates a new AppStateSyncKeyData instance using the specified properties. - * @param [properties] Properties to set - * @returns AppStateSyncKeyData instance - */ - public static create(properties?: proto.IAppStateSyncKeyData): proto.AppStateSyncKeyData; - - /** - * Encodes the specified AppStateSyncKeyData message. Does not implicitly {@link proto.AppStateSyncKeyData.verify|verify} messages. - * @param message AppStateSyncKeyData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IAppStateSyncKeyData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AppStateSyncKeyData message, length delimited. Does not implicitly {@link proto.AppStateSyncKeyData.verify|verify} messages. - * @param message AppStateSyncKeyData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IAppStateSyncKeyData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AppStateSyncKeyData message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AppStateSyncKeyData - * @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.AppStateSyncKeyData; - - /** - * Decodes an AppStateSyncKeyData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AppStateSyncKeyData - * @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.AppStateSyncKeyData; - - /** - * Verifies an AppStateSyncKeyData 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 AppStateSyncKeyData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AppStateSyncKeyData - */ - public static fromObject(object: { [k: string]: any }): proto.AppStateSyncKeyData; - - /** - * Creates a plain object from an AppStateSyncKeyData message. Also converts values to other types if specified. - * @param message AppStateSyncKeyData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.AppStateSyncKeyData, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AppStateSyncKeyData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an AppStateSyncKeyFingerprint. */ - interface IAppStateSyncKeyFingerprint { - - /** AppStateSyncKeyFingerprint rawId */ - rawId?: (number|null); - - /** AppStateSyncKeyFingerprint currentIndex */ - currentIndex?: (number|null); - - /** AppStateSyncKeyFingerprint deviceIndexes */ - deviceIndexes?: (number[]|null); - } - - /** Represents an AppStateSyncKeyFingerprint. */ - class AppStateSyncKeyFingerprint implements IAppStateSyncKeyFingerprint { - - /** - * Constructs a new AppStateSyncKeyFingerprint. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IAppStateSyncKeyFingerprint); - - /** AppStateSyncKeyFingerprint rawId. */ - public rawId: number; - - /** AppStateSyncKeyFingerprint currentIndex. */ - public currentIndex: number; - - /** AppStateSyncKeyFingerprint deviceIndexes. */ - public deviceIndexes: number[]; - - /** - * Creates a new AppStateSyncKeyFingerprint instance using the specified properties. - * @param [properties] Properties to set - * @returns AppStateSyncKeyFingerprint instance - */ - public static create(properties?: proto.IAppStateSyncKeyFingerprint): proto.AppStateSyncKeyFingerprint; - - /** - * Encodes the specified AppStateSyncKeyFingerprint message. Does not implicitly {@link proto.AppStateSyncKeyFingerprint.verify|verify} messages. - * @param message AppStateSyncKeyFingerprint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IAppStateSyncKeyFingerprint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AppStateSyncKeyFingerprint message, length delimited. Does not implicitly {@link proto.AppStateSyncKeyFingerprint.verify|verify} messages. - * @param message AppStateSyncKeyFingerprint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IAppStateSyncKeyFingerprint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AppStateSyncKeyFingerprint message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AppStateSyncKeyFingerprint - * @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.AppStateSyncKeyFingerprint; - - /** - * Decodes an AppStateSyncKeyFingerprint message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AppStateSyncKeyFingerprint - * @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.AppStateSyncKeyFingerprint; - - /** - * Verifies an AppStateSyncKeyFingerprint 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 AppStateSyncKeyFingerprint message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AppStateSyncKeyFingerprint - */ - public static fromObject(object: { [k: string]: any }): proto.AppStateSyncKeyFingerprint; - - /** - * Creates a plain object from an AppStateSyncKeyFingerprint message. Also converts values to other types if specified. - * @param message AppStateSyncKeyFingerprint - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.AppStateSyncKeyFingerprint, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AppStateSyncKeyFingerprint to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an AppStateSyncKeyId. */ - interface IAppStateSyncKeyId { - - /** AppStateSyncKeyId keyId */ - keyId?: (Uint8Array|null); - } - - /** Represents an AppStateSyncKeyId. */ - class AppStateSyncKeyId implements IAppStateSyncKeyId { - - /** - * Constructs a new AppStateSyncKeyId. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IAppStateSyncKeyId); - - /** AppStateSyncKeyId keyId. */ - public keyId: Uint8Array; - - /** - * Creates a new AppStateSyncKeyId instance using the specified properties. - * @param [properties] Properties to set - * @returns AppStateSyncKeyId instance - */ - public static create(properties?: proto.IAppStateSyncKeyId): proto.AppStateSyncKeyId; - - /** - * Encodes the specified AppStateSyncKeyId message. Does not implicitly {@link proto.AppStateSyncKeyId.verify|verify} messages. - * @param message AppStateSyncKeyId message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IAppStateSyncKeyId, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AppStateSyncKeyId message, length delimited. Does not implicitly {@link proto.AppStateSyncKeyId.verify|verify} messages. - * @param message AppStateSyncKeyId message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IAppStateSyncKeyId, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AppStateSyncKeyId message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AppStateSyncKeyId - * @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.AppStateSyncKeyId; - - /** - * Decodes an AppStateSyncKeyId message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AppStateSyncKeyId - * @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.AppStateSyncKeyId; - - /** - * Verifies an AppStateSyncKeyId 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 AppStateSyncKeyId message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AppStateSyncKeyId - */ - public static fromObject(object: { [k: string]: any }): proto.AppStateSyncKeyId; - - /** - * Creates a plain object from an AppStateSyncKeyId message. Also converts values to other types if specified. - * @param message AppStateSyncKeyId - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.AppStateSyncKeyId, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AppStateSyncKeyId to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an AppStateSyncKeyRequest. */ - interface IAppStateSyncKeyRequest { - - /** AppStateSyncKeyRequest keyIds */ - keyIds?: (proto.IAppStateSyncKeyId[]|null); - } - - /** Represents an AppStateSyncKeyRequest. */ - class AppStateSyncKeyRequest implements IAppStateSyncKeyRequest { - - /** - * Constructs a new AppStateSyncKeyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IAppStateSyncKeyRequest); - - /** AppStateSyncKeyRequest keyIds. */ - public keyIds: proto.IAppStateSyncKeyId[]; - - /** - * Creates a new AppStateSyncKeyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns AppStateSyncKeyRequest instance - */ - public static create(properties?: proto.IAppStateSyncKeyRequest): proto.AppStateSyncKeyRequest; - - /** - * Encodes the specified AppStateSyncKeyRequest message. Does not implicitly {@link proto.AppStateSyncKeyRequest.verify|verify} messages. - * @param message AppStateSyncKeyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IAppStateSyncKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AppStateSyncKeyRequest message, length delimited. Does not implicitly {@link proto.AppStateSyncKeyRequest.verify|verify} messages. - * @param message AppStateSyncKeyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IAppStateSyncKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AppStateSyncKeyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AppStateSyncKeyRequest - * @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.AppStateSyncKeyRequest; - - /** - * Decodes an AppStateSyncKeyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AppStateSyncKeyRequest - * @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.AppStateSyncKeyRequest; - - /** - * Verifies an AppStateSyncKeyRequest 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 AppStateSyncKeyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AppStateSyncKeyRequest - */ - public static fromObject(object: { [k: string]: any }): proto.AppStateSyncKeyRequest; - - /** - * Creates a plain object from an AppStateSyncKeyRequest message. Also converts values to other types if specified. - * @param message AppStateSyncKeyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.AppStateSyncKeyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AppStateSyncKeyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an AppStateSyncKeyShare. */ - interface IAppStateSyncKeyShare { - - /** AppStateSyncKeyShare keys */ - keys?: (proto.IAppStateSyncKey[]|null); - } - - /** Represents an AppStateSyncKeyShare. */ - class AppStateSyncKeyShare implements IAppStateSyncKeyShare { - - /** - * Constructs a new AppStateSyncKeyShare. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IAppStateSyncKeyShare); - - /** AppStateSyncKeyShare keys. */ - public keys: proto.IAppStateSyncKey[]; - - /** - * Creates a new AppStateSyncKeyShare instance using the specified properties. - * @param [properties] Properties to set - * @returns AppStateSyncKeyShare instance - */ - public static create(properties?: proto.IAppStateSyncKeyShare): proto.AppStateSyncKeyShare; - - /** - * Encodes the specified AppStateSyncKeyShare message. Does not implicitly {@link proto.AppStateSyncKeyShare.verify|verify} messages. - * @param message AppStateSyncKeyShare message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IAppStateSyncKeyShare, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AppStateSyncKeyShare message, length delimited. Does not implicitly {@link proto.AppStateSyncKeyShare.verify|verify} messages. - * @param message AppStateSyncKeyShare message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IAppStateSyncKeyShare, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AppStateSyncKeyShare message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AppStateSyncKeyShare - * @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.AppStateSyncKeyShare; - - /** - * Decodes an AppStateSyncKeyShare message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AppStateSyncKeyShare - * @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.AppStateSyncKeyShare; - - /** - * Verifies an AppStateSyncKeyShare 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 AppStateSyncKeyShare message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AppStateSyncKeyShare - */ - public static fromObject(object: { [k: string]: any }): proto.AppStateSyncKeyShare; - - /** - * Creates a plain object from an AppStateSyncKeyShare message. Also converts values to other types if specified. - * @param message AppStateSyncKeyShare - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.AppStateSyncKeyShare, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AppStateSyncKeyShare to JSON. - * @returns JSON object - */ - 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 { - - /** AudioMessage url */ - url?: (string|null); - - /** AudioMessage mimetype */ - mimetype?: (string|null); - - /** AudioMessage fileSha256 */ - fileSha256?: (Uint8Array|null); - - /** AudioMessage fileLength */ - fileLength?: (number|Long|null); - - /** AudioMessage seconds */ - seconds?: (number|null); - - /** AudioMessage ptt */ - ptt?: (boolean|null); - - /** AudioMessage mediaKey */ - mediaKey?: (Uint8Array|null); - - /** AudioMessage fileEncSha256 */ - fileEncSha256?: (Uint8Array|null); - - /** AudioMessage directPath */ - directPath?: (string|null); - - /** AudioMessage mediaKeyTimestamp */ - mediaKeyTimestamp?: (number|Long|null); - - /** AudioMessage contextInfo */ - contextInfo?: (proto.IContextInfo|null); - - /** AudioMessage streamingSidecar */ - streamingSidecar?: (Uint8Array|null); - - /** AudioMessage waveform */ - waveform?: (Uint8Array|null); - } - - /** Represents an AudioMessage. */ - class AudioMessage implements IAudioMessage { - - /** - * Constructs a new AudioMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IAudioMessage); - - /** AudioMessage url. */ - public url: string; - - /** AudioMessage mimetype. */ - public mimetype: string; - - /** AudioMessage fileSha256. */ - public fileSha256: Uint8Array; - - /** AudioMessage fileLength. */ - public fileLength: (number|Long); - - /** AudioMessage seconds. */ - public seconds: number; - - /** AudioMessage ptt. */ - public ptt: boolean; - - /** AudioMessage mediaKey. */ - public mediaKey: Uint8Array; - - /** AudioMessage fileEncSha256. */ - public fileEncSha256: Uint8Array; - - /** AudioMessage directPath. */ - public directPath: string; - - /** AudioMessage mediaKeyTimestamp. */ - public mediaKeyTimestamp: (number|Long); - - /** AudioMessage contextInfo. */ - public contextInfo?: (proto.IContextInfo|null); - - /** AudioMessage streamingSidecar. */ - public streamingSidecar: Uint8Array; - - /** AudioMessage waveform. */ - public waveform: Uint8Array; - - /** - * Creates a new AudioMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns AudioMessage instance - */ - public static create(properties?: proto.IAudioMessage): proto.AudioMessage; - - /** - * Encodes the specified AudioMessage message. Does not implicitly {@link proto.AudioMessage.verify|verify} messages. - * @param message AudioMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IAudioMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AudioMessage message, length delimited. Does not implicitly {@link proto.AudioMessage.verify|verify} messages. - * @param message AudioMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IAudioMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AudioMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AudioMessage - * @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.AudioMessage; - - /** - * Decodes an AudioMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AudioMessage - * @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.AudioMessage; - - /** - * Verifies an AudioMessage 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 AudioMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AudioMessage - */ - public static fromObject(object: { [k: string]: any }): proto.AudioMessage; - - /** - * Creates a plain object from an AudioMessage message. Also converts values to other types if specified. - * @param message AudioMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.AudioMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AudioMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - /** Properties of an AutoDownloadSettings. */ interface IAutoDownloadSettings { @@ -2077,10 +729,10 @@ export namespace proto { issueTime?: (number|Long|null); /** BizAccountLinkInfo hostStorage */ - hostStorage?: (proto.BizAccountLinkInfo.BizAccountLinkInfoHostStorageType|null); + hostStorage?: (proto.BizAccountLinkInfo.HostStorageType|null); /** BizAccountLinkInfo accountType */ - accountType?: (proto.BizAccountLinkInfo.BizAccountLinkInfoAccountType|null); + accountType?: (proto.BizAccountLinkInfo.AccountType|null); } /** Represents a BizAccountLinkInfo. */ @@ -2102,10 +754,10 @@ export namespace proto { public issueTime: (number|Long); /** BizAccountLinkInfo hostStorage. */ - public hostStorage: proto.BizAccountLinkInfo.BizAccountLinkInfoHostStorageType; + public hostStorage: proto.BizAccountLinkInfo.HostStorageType; /** BizAccountLinkInfo accountType. */ - public accountType: proto.BizAccountLinkInfo.BizAccountLinkInfoAccountType; + public accountType: proto.BizAccountLinkInfo.AccountType; /** * Creates a new BizAccountLinkInfo instance using the specified properties. @@ -2180,15 +832,15 @@ export namespace proto { namespace BizAccountLinkInfo { - /** BizAccountLinkInfoHostStorageType enum. */ - enum BizAccountLinkInfoHostStorageType { - ON_PREMISE = 0, - FACEBOOK = 1 + /** AccountType enum. */ + enum AccountType { + ENTERPRISE = 0 } - /** BizAccountLinkInfoAccountType enum. */ - enum BizAccountLinkInfoAccountType { - ENTERPRISE = 0 + /** HostStorageType enum. */ + enum HostStorageType { + ON_PREMISE = 0, + FACEBOOK = 1 } } @@ -2292,7 +944,7 @@ export namespace proto { interface IBizIdentityInfo { /** BizIdentityInfo vlevel */ - vlevel?: (proto.BizIdentityInfo.BizIdentityInfoVerifiedLevelValue|null); + vlevel?: (proto.BizIdentityInfo.VerifiedLevelValue|null); /** BizIdentityInfo vnameCert */ vnameCert?: (proto.IVerifiedNameCertificate|null); @@ -2304,10 +956,10 @@ export namespace proto { revoked?: (boolean|null); /** BizIdentityInfo hostStorage */ - hostStorage?: (proto.BizIdentityInfo.BizIdentityInfoHostStorageType|null); + hostStorage?: (proto.BizIdentityInfo.HostStorageType|null); /** BizIdentityInfo actualActors */ - actualActors?: (proto.BizIdentityInfo.BizIdentityInfoActualActorsType|null); + actualActors?: (proto.BizIdentityInfo.ActualActorsType|null); /** BizIdentityInfo privacyModeTs */ privacyModeTs?: (number|Long|null); @@ -2326,7 +978,7 @@ export namespace proto { constructor(properties?: proto.IBizIdentityInfo); /** BizIdentityInfo vlevel. */ - public vlevel: proto.BizIdentityInfo.BizIdentityInfoVerifiedLevelValue; + public vlevel: proto.BizIdentityInfo.VerifiedLevelValue; /** BizIdentityInfo vnameCert. */ public vnameCert?: (proto.IVerifiedNameCertificate|null); @@ -2338,10 +990,10 @@ export namespace proto { public revoked: boolean; /** BizIdentityInfo hostStorage. */ - public hostStorage: proto.BizIdentityInfo.BizIdentityInfoHostStorageType; + public hostStorage: proto.BizIdentityInfo.HostStorageType; /** BizIdentityInfo actualActors. */ - public actualActors: proto.BizIdentityInfo.BizIdentityInfoActualActorsType; + public actualActors: proto.BizIdentityInfo.ActualActorsType; /** BizIdentityInfo privacyModeTs. */ public privacyModeTs: (number|Long); @@ -2422,919 +1074,34 @@ export namespace proto { namespace BizIdentityInfo { - /** BizIdentityInfoVerifiedLevelValue enum. */ - enum BizIdentityInfoVerifiedLevelValue { - UNKNOWN = 0, - LOW = 1, - HIGH = 2 + /** ActualActorsType enum. */ + enum ActualActorsType { + SELF = 0, + BSP = 1 } - /** BizIdentityInfoHostStorageType enum. */ - enum BizIdentityInfoHostStorageType { + /** HostStorageType enum. */ + enum HostStorageType { ON_PREMISE = 0, FACEBOOK = 1 } - /** BizIdentityInfoActualActorsType enum. */ - enum BizIdentityInfoActualActorsType { - SELF = 0, - BSP = 1 - } - } - - /** Properties of a Button. */ - interface IButton { - - /** Button buttonId */ - buttonId?: (string|null); - - /** Button buttonText */ - buttonText?: (proto.IButtonText|null); - - /** Button type */ - type?: (proto.Button.ButtonType|null); - - /** Button nativeFlowInfo */ - nativeFlowInfo?: (proto.INativeFlowInfo|null); - } - - /** Represents a Button. */ - class Button implements IButton { - - /** - * Constructs a new Button. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IButton); - - /** Button buttonId. */ - public buttonId: string; - - /** Button buttonText. */ - public buttonText?: (proto.IButtonText|null); - - /** Button type. */ - public type: proto.Button.ButtonType; - - /** Button nativeFlowInfo. */ - public nativeFlowInfo?: (proto.INativeFlowInfo|null); - - /** - * Creates a new Button instance using the specified properties. - * @param [properties] Properties to set - * @returns Button instance - */ - public static create(properties?: proto.IButton): proto.Button; - - /** - * Encodes the specified Button message. Does not implicitly {@link proto.Button.verify|verify} messages. - * @param message Button message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IButton, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Button message, length delimited. Does not implicitly {@link proto.Button.verify|verify} messages. - * @param message Button message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IButton, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Button message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Button - * @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.Button; - - /** - * Decodes a Button message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Button - * @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.Button; - - /** - * Verifies a Button 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 Button message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Button - */ - public static fromObject(object: { [k: string]: any }): proto.Button; - - /** - * Creates a plain object from a Button message. Also converts values to other types if specified. - * @param message Button - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.Button, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Button to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace Button { - - /** ButtonType enum. */ - enum ButtonType { + /** VerifiedLevelValue enum. */ + enum VerifiedLevelValue { UNKNOWN = 0, - RESPONSE = 1, - NATIVE_FLOW = 2 + LOW = 1, + HIGH = 2 } } - /** 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 { - - /** ButtonsMessage contentText */ - contentText?: (string|null); - - /** ButtonsMessage footerText */ - footerText?: (string|null); - - /** ButtonsMessage contextInfo */ - contextInfo?: (proto.IContextInfo|null); - - /** ButtonsMessage buttons */ - buttons?: (proto.IButton[]|null); - - /** ButtonsMessage headerType */ - headerType?: (proto.ButtonsMessage.ButtonsMessageHeaderType|null); - - /** ButtonsMessage text */ - text?: (string|null); - - /** ButtonsMessage documentMessage */ - documentMessage?: (proto.IDocumentMessage|null); - - /** ButtonsMessage imageMessage */ - imageMessage?: (proto.IImageMessage|null); - - /** ButtonsMessage videoMessage */ - videoMessage?: (proto.IVideoMessage|null); - - /** ButtonsMessage locationMessage */ - locationMessage?: (proto.ILocationMessage|null); - } - - /** Represents a ButtonsMessage. */ - class ButtonsMessage implements IButtonsMessage { - - /** - * Constructs a new ButtonsMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IButtonsMessage); - - /** ButtonsMessage contentText. */ - public contentText: string; - - /** ButtonsMessage footerText. */ - public footerText: string; - - /** ButtonsMessage contextInfo. */ - public contextInfo?: (proto.IContextInfo|null); - - /** ButtonsMessage buttons. */ - public buttons: proto.IButton[]; - - /** ButtonsMessage headerType. */ - public headerType: proto.ButtonsMessage.ButtonsMessageHeaderType; - - /** ButtonsMessage text. */ - public text?: (string|null); - - /** ButtonsMessage documentMessage. */ - public documentMessage?: (proto.IDocumentMessage|null); - - /** ButtonsMessage imageMessage. */ - public imageMessage?: (proto.IImageMessage|null); - - /** ButtonsMessage videoMessage. */ - public videoMessage?: (proto.IVideoMessage|null); - - /** ButtonsMessage locationMessage. */ - public locationMessage?: (proto.ILocationMessage|null); - - /** ButtonsMessage header. */ - public header?: ("text"|"documentMessage"|"imageMessage"|"videoMessage"|"locationMessage"); - - /** - * Creates a new ButtonsMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns ButtonsMessage instance - */ - public static create(properties?: proto.IButtonsMessage): proto.ButtonsMessage; - - /** - * Encodes the specified ButtonsMessage message. Does not implicitly {@link proto.ButtonsMessage.verify|verify} messages. - * @param message ButtonsMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IButtonsMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ButtonsMessage message, length delimited. Does not implicitly {@link proto.ButtonsMessage.verify|verify} messages. - * @param message ButtonsMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IButtonsMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ButtonsMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ButtonsMessage - * @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.ButtonsMessage; - - /** - * Decodes a ButtonsMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ButtonsMessage - * @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.ButtonsMessage; - - /** - * Verifies a ButtonsMessage 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 ButtonsMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ButtonsMessage - */ - public static fromObject(object: { [k: string]: any }): proto.ButtonsMessage; - - /** - * Creates a plain object from a ButtonsMessage message. Also converts values to other types if specified. - * @param message ButtonsMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.ButtonsMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ButtonsMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace ButtonsMessage { - - /** ButtonsMessageHeaderType enum. */ - enum ButtonsMessageHeaderType { - UNKNOWN = 0, - EMPTY = 1, - TEXT = 2, - DOCUMENT = 3, - IMAGE = 4, - VIDEO = 5, - LOCATION = 6 - } - } - - /** Properties of a ButtonsResponseMessage. */ - interface IButtonsResponseMessage { - - /** ButtonsResponseMessage selectedButtonId */ - selectedButtonId?: (string|null); - - /** ButtonsResponseMessage contextInfo */ - contextInfo?: (proto.IContextInfo|null); - - /** ButtonsResponseMessage type */ - type?: (proto.ButtonsResponseMessage.ButtonsResponseMessageType|null); - - /** ButtonsResponseMessage selectedDisplayText */ - selectedDisplayText?: (string|null); - } - - /** Represents a ButtonsResponseMessage. */ - class ButtonsResponseMessage implements IButtonsResponseMessage { - - /** - * Constructs a new ButtonsResponseMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IButtonsResponseMessage); - - /** ButtonsResponseMessage selectedButtonId. */ - public selectedButtonId: string; - - /** ButtonsResponseMessage contextInfo. */ - public contextInfo?: (proto.IContextInfo|null); - - /** ButtonsResponseMessage type. */ - public type: proto.ButtonsResponseMessage.ButtonsResponseMessageType; - - /** ButtonsResponseMessage selectedDisplayText. */ - public selectedDisplayText?: (string|null); - - /** ButtonsResponseMessage response. */ - public response?: "selectedDisplayText"; - - /** - * Creates a new ButtonsResponseMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns ButtonsResponseMessage instance - */ - public static create(properties?: proto.IButtonsResponseMessage): proto.ButtonsResponseMessage; - - /** - * Encodes the specified ButtonsResponseMessage message. Does not implicitly {@link proto.ButtonsResponseMessage.verify|verify} messages. - * @param message ButtonsResponseMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IButtonsResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ButtonsResponseMessage message, length delimited. Does not implicitly {@link proto.ButtonsResponseMessage.verify|verify} messages. - * @param message ButtonsResponseMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IButtonsResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ButtonsResponseMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ButtonsResponseMessage - * @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.ButtonsResponseMessage; - - /** - * Decodes a ButtonsResponseMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ButtonsResponseMessage - * @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.ButtonsResponseMessage; - - /** - * Verifies a ButtonsResponseMessage 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 ButtonsResponseMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ButtonsResponseMessage - */ - public static fromObject(object: { [k: string]: any }): proto.ButtonsResponseMessage; - - /** - * Creates a plain object from a ButtonsResponseMessage message. Also converts values to other types if specified. - * @param message ButtonsResponseMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.ButtonsResponseMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ButtonsResponseMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace ButtonsResponseMessage { - - /** ButtonsResponseMessageType enum. */ - enum ButtonsResponseMessageType { - UNKNOWN = 0, - DISPLAY_TEXT = 1 - } - } - - /** Properties of a Call. */ - interface ICall { - - /** Call callKey */ - callKey?: (Uint8Array|null); - - /** Call conversionSource */ - conversionSource?: (string|null); - - /** Call conversionData */ - conversionData?: (Uint8Array|null); - - /** Call conversionDelaySeconds */ - conversionDelaySeconds?: (number|null); - } - - /** Represents a Call. */ - class Call implements ICall { - - /** - * Constructs a new Call. - * @param [properties] Properties to set - */ - constructor(properties?: proto.ICall); - - /** Call callKey. */ - public callKey: Uint8Array; - - /** Call conversionSource. */ - public conversionSource: string; - - /** Call conversionData. */ - public conversionData: Uint8Array; - - /** Call conversionDelaySeconds. */ - public conversionDelaySeconds: number; - - /** - * Creates a new Call instance using the specified properties. - * @param [properties] Properties to set - * @returns Call instance - */ - public static create(properties?: proto.ICall): proto.Call; - - /** - * Encodes the specified Call message. Does not implicitly {@link proto.Call.verify|verify} messages. - * @param message Call message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.ICall, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Call message, length delimited. Does not implicitly {@link proto.Call.verify|verify} messages. - * @param message Call message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.ICall, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Call message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Call - * @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.Call; - - /** - * Decodes a Call message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Call - * @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.Call; - - /** - * Verifies a Call 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 Call message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Call - */ - public static fromObject(object: { [k: string]: any }): proto.Call; - - /** - * Creates a plain object from a Call message. Also converts values to other types if specified. - * @param message Call - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.Call, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Call to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a CallButton. */ - interface ICallButton { - - /** CallButton displayText */ - displayText?: (proto.IHighlyStructuredMessage|null); - - /** CallButton phoneNumber */ - phoneNumber?: (proto.IHighlyStructuredMessage|null); - } - - /** Represents a CallButton. */ - class CallButton implements ICallButton { - - /** - * Constructs a new CallButton. - * @param [properties] Properties to set - */ - constructor(properties?: proto.ICallButton); - - /** CallButton displayText. */ - public displayText?: (proto.IHighlyStructuredMessage|null); - - /** CallButton phoneNumber. */ - public phoneNumber?: (proto.IHighlyStructuredMessage|null); - - /** - * Creates a new CallButton instance using the specified properties. - * @param [properties] Properties to set - * @returns CallButton instance - */ - public static create(properties?: proto.ICallButton): proto.CallButton; - - /** - * Encodes the specified CallButton message. Does not implicitly {@link proto.CallButton.verify|verify} messages. - * @param message CallButton message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.ICallButton, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CallButton message, length delimited. Does not implicitly {@link proto.CallButton.verify|verify} messages. - * @param message CallButton message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.ICallButton, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CallButton message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CallButton - * @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.CallButton; - - /** - * Decodes a CallButton message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CallButton - * @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.CallButton; - - /** - * Verifies a CallButton 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 CallButton message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CallButton - */ - public static fromObject(object: { [k: string]: any }): proto.CallButton; - - /** - * Creates a plain object from a CallButton message. Also converts values to other types if specified. - * @param message CallButton - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.CallButton, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CallButton to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a CancelPaymentRequestMessage. */ - interface ICancelPaymentRequestMessage { - - /** CancelPaymentRequestMessage key */ - key?: (proto.IMessageKey|null); - } - - /** Represents a CancelPaymentRequestMessage. */ - class CancelPaymentRequestMessage implements ICancelPaymentRequestMessage { - - /** - * Constructs a new CancelPaymentRequestMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.ICancelPaymentRequestMessage); - - /** CancelPaymentRequestMessage key. */ - public key?: (proto.IMessageKey|null); - - /** - * Creates a new CancelPaymentRequestMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns CancelPaymentRequestMessage instance - */ - public static create(properties?: proto.ICancelPaymentRequestMessage): proto.CancelPaymentRequestMessage; - - /** - * Encodes the specified CancelPaymentRequestMessage message. Does not implicitly {@link proto.CancelPaymentRequestMessage.verify|verify} messages. - * @param message CancelPaymentRequestMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.ICancelPaymentRequestMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CancelPaymentRequestMessage message, length delimited. Does not implicitly {@link proto.CancelPaymentRequestMessage.verify|verify} messages. - * @param message CancelPaymentRequestMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.ICancelPaymentRequestMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CancelPaymentRequestMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CancelPaymentRequestMessage - * @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.CancelPaymentRequestMessage; - - /** - * Decodes a CancelPaymentRequestMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CancelPaymentRequestMessage - * @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.CancelPaymentRequestMessage; - - /** - * Verifies a CancelPaymentRequestMessage 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 CancelPaymentRequestMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CancelPaymentRequestMessage - */ - public static fromObject(object: { [k: string]: any }): proto.CancelPaymentRequestMessage; - - /** - * Creates a plain object from a CancelPaymentRequestMessage message. Also converts values to other types if specified. - * @param message CancelPaymentRequestMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.CancelPaymentRequestMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CancelPaymentRequestMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a CatalogSnapshot. */ - interface ICatalogSnapshot { - - /** CatalogSnapshot catalogImage */ - catalogImage?: (proto.IImageMessage|null); - - /** CatalogSnapshot title */ - title?: (string|null); - - /** CatalogSnapshot description */ - description?: (string|null); - } - - /** Represents a CatalogSnapshot. */ - class CatalogSnapshot implements ICatalogSnapshot { - - /** - * Constructs a new CatalogSnapshot. - * @param [properties] Properties to set - */ - constructor(properties?: proto.ICatalogSnapshot); - - /** CatalogSnapshot catalogImage. */ - public catalogImage?: (proto.IImageMessage|null); - - /** CatalogSnapshot title. */ - public title: string; - - /** CatalogSnapshot description. */ - public description: string; - - /** - * Creates a new CatalogSnapshot instance using the specified properties. - * @param [properties] Properties to set - * @returns CatalogSnapshot instance - */ - public static create(properties?: proto.ICatalogSnapshot): proto.CatalogSnapshot; - - /** - * Encodes the specified CatalogSnapshot message. Does not implicitly {@link proto.CatalogSnapshot.verify|verify} messages. - * @param message CatalogSnapshot message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.ICatalogSnapshot, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CatalogSnapshot message, length delimited. Does not implicitly {@link proto.CatalogSnapshot.verify|verify} messages. - * @param message CatalogSnapshot message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.ICatalogSnapshot, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CatalogSnapshot message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CatalogSnapshot - * @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.CatalogSnapshot; - - /** - * Decodes a CatalogSnapshot message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CatalogSnapshot - * @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.CatalogSnapshot; - - /** - * Verifies a CatalogSnapshot 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 CatalogSnapshot message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CatalogSnapshot - */ - public static fromObject(object: { [k: string]: any }): proto.CatalogSnapshot; - - /** - * Creates a plain object from a CatalogSnapshot message. Also converts values to other types if specified. - * @param message CatalogSnapshot - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.CatalogSnapshot, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CatalogSnapshot to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - /** Properties of a CertChain. */ interface ICertChain { /** CertChain leaf */ - leaf?: (proto.ICertChainNoiseCertificate|null); + leaf?: (proto.CertChain.INoiseCertificate|null); /** CertChain intermediate */ - intermediate?: (proto.ICertChainNoiseCertificate|null); + intermediate?: (proto.CertChain.INoiseCertificate|null); } /** Represents a CertChain. */ @@ -3347,10 +1114,10 @@ export namespace proto { constructor(properties?: proto.ICertChain); /** CertChain leaf. */ - public leaf?: (proto.ICertChainNoiseCertificate|null); + public leaf?: (proto.CertChain.INoiseCertificate|null); /** CertChain intermediate. */ - public intermediate?: (proto.ICertChainNoiseCertificate|null); + public intermediate?: (proto.CertChain.INoiseCertificate|null); /** * Creates a new CertChain instance using the specified properties. @@ -3423,214 +1190,220 @@ export namespace proto { public toJSON(): { [k: string]: any }; } - /** Properties of a CertChainNoiseCertificate. */ - interface ICertChainNoiseCertificate { + namespace CertChain { - /** CertChainNoiseCertificate details */ - details?: (Uint8Array|null); + /** Properties of a NoiseCertificate. */ + interface INoiseCertificate { - /** CertChainNoiseCertificate signature */ - signature?: (Uint8Array|null); - } + /** NoiseCertificate details */ + details?: (Uint8Array|null); - /** Represents a CertChainNoiseCertificate. */ - class CertChainNoiseCertificate implements ICertChainNoiseCertificate { + /** NoiseCertificate signature */ + signature?: (Uint8Array|null); + } - /** - * Constructs a new CertChainNoiseCertificate. - * @param [properties] Properties to set - */ - constructor(properties?: proto.ICertChainNoiseCertificate); + /** Represents a NoiseCertificate. */ + class NoiseCertificate implements INoiseCertificate { - /** CertChainNoiseCertificate details. */ - public details: Uint8Array; + /** + * Constructs a new NoiseCertificate. + * @param [properties] Properties to set + */ + constructor(properties?: proto.CertChain.INoiseCertificate); - /** CertChainNoiseCertificate signature. */ - public signature: Uint8Array; + /** NoiseCertificate details. */ + public details: 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; + /** NoiseCertificate signature. */ + public signature: Uint8Array; - /** - * 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; + /** + * Creates a new NoiseCertificate instance using the specified properties. + * @param [properties] Properties to set + * @returns NoiseCertificate instance + */ + public static create(properties?: proto.CertChain.INoiseCertificate): proto.CertChain.NoiseCertificate; - /** - * 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; + /** + * Encodes the specified NoiseCertificate message. Does not implicitly {@link proto.CertChain.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.CertChain.INoiseCertificate, 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; + /** + * Encodes the specified NoiseCertificate message, length delimited. Does not implicitly {@link proto.CertChain.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.CertChain.INoiseCertificate, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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; + /** + * 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.CertChain.NoiseCertificate; - /** - * 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); + /** + * 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.CertChain.NoiseCertificate; - /** - * 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; + /** + * 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 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 }; + /** + * 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.CertChain.NoiseCertificate; - /** - * Converts this CertChainNoiseCertificate to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * 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.CertChain.NoiseCertificate, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of a CertChainNoiseCertificateDetails. */ - interface ICertChainNoiseCertificateDetails { + /** + * Converts this NoiseCertificate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** CertChainNoiseCertificateDetails serial */ - serial?: (number|null); + namespace NoiseCertificate { - /** CertChainNoiseCertificateDetails issuerSerial */ - issuerSerial?: (number|null); + /** Properties of a Details. */ + interface IDetails { - /** CertChainNoiseCertificateDetails key */ - key?: (Uint8Array|null); + /** Details serial */ + serial?: (number|null); - /** CertChainNoiseCertificateDetails notBefore */ - notBefore?: (number|Long|null); + /** Details issuerSerial */ + issuerSerial?: (number|null); - /** CertChainNoiseCertificateDetails notAfter */ - notAfter?: (number|Long|null); - } + /** Details key */ + key?: (Uint8Array|null); - /** Represents a CertChainNoiseCertificateDetails. */ - class CertChainNoiseCertificateDetails implements ICertChainNoiseCertificateDetails { + /** Details notBefore */ + notBefore?: (number|Long|null); - /** - * Constructs a new CertChainNoiseCertificateDetails. - * @param [properties] Properties to set - */ - constructor(properties?: proto.ICertChainNoiseCertificateDetails); + /** Details notAfter */ + notAfter?: (number|Long|null); + } - /** CertChainNoiseCertificateDetails serial. */ - public serial: number; + /** Represents a Details. */ + class Details implements IDetails { - /** CertChainNoiseCertificateDetails issuerSerial. */ - public issuerSerial: number; + /** + * Constructs a new Details. + * @param [properties] Properties to set + */ + constructor(properties?: proto.CertChain.NoiseCertificate.IDetails); - /** CertChainNoiseCertificateDetails key. */ - public key: Uint8Array; + /** Details serial. */ + public serial: number; - /** CertChainNoiseCertificateDetails notBefore. */ - public notBefore: (number|Long); + /** Details issuerSerial. */ + public issuerSerial: number; - /** CertChainNoiseCertificateDetails notAfter. */ - public notAfter: (number|Long); + /** Details key. */ + public key: Uint8Array; - /** - * 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; + /** Details notBefore. */ + public notBefore: (number|Long); - /** - * 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; + /** Details notAfter. */ + public notAfter: (number|Long); - /** - * 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; + /** + * Creates a new Details instance using the specified properties. + * @param [properties] Properties to set + * @returns Details instance + */ + public static create(properties?: proto.CertChain.NoiseCertificate.IDetails): proto.CertChain.NoiseCertificate.Details; - /** - * 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; + /** + * Encodes the specified Details message. Does not implicitly {@link proto.CertChain.NoiseCertificate.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.CertChain.NoiseCertificate.IDetails, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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; + /** + * Encodes the specified Details message, length delimited. Does not implicitly {@link proto.CertChain.NoiseCertificate.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.CertChain.NoiseCertificate.IDetails, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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); + /** + * 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.CertChain.NoiseCertificate.Details; - /** - * 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; + /** + * 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.CertChain.NoiseCertificate.Details; - /** - * 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 }; + /** + * 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); - /** - * Converts this CertChainNoiseCertificateDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * 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.CertChain.NoiseCertificate.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.CertChain.NoiseCertificate.Details, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Details to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } } /** Properties of a Chain. */ @@ -3837,390 +1610,6 @@ export namespace proto { public toJSON(): { [k: string]: any }; } - /** Properties of a Chat. */ - interface IChat { - - /** Chat displayName */ - displayName?: (string|null); - - /** Chat id */ - id?: (string|null); - } - - /** Represents a Chat. */ - class Chat implements IChat { - - /** - * Constructs a new Chat. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IChat); - - /** Chat displayName. */ - public displayName: string; - - /** Chat id. */ - public id: string; - - /** - * Creates a new Chat instance using the specified properties. - * @param [properties] Properties to set - * @returns Chat instance - */ - public static create(properties?: proto.IChat): proto.Chat; - - /** - * Encodes the specified Chat message. Does not implicitly {@link proto.Chat.verify|verify} messages. - * @param message Chat message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IChat, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Chat message, length delimited. Does not implicitly {@link proto.Chat.verify|verify} messages. - * @param message Chat message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IChat, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Chat message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Chat - * @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.Chat; - - /** - * Decodes a Chat message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Chat - * @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.Chat; - - /** - * Verifies a Chat 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 Chat message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Chat - */ - public static fromObject(object: { [k: string]: any }): proto.Chat; - - /** - * Creates a plain object from a Chat message. Also converts values to other types if specified. - * @param message Chat - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.Chat, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Chat 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 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 { @@ -4231,10 +1620,10 @@ export namespace proto { passive?: (boolean|null); /** ClientPayload userAgent */ - userAgent?: (proto.IUserAgent|null); + userAgent?: (proto.ClientPayload.IUserAgent|null); /** ClientPayload webInfo */ - webInfo?: (proto.IWebInfo|null); + webInfo?: (proto.ClientPayload.IWebInfo|null); /** ClientPayload pushName */ pushName?: (string|null); @@ -4246,16 +1635,16 @@ export namespace proto { shortConnect?: (boolean|null); /** ClientPayload connectType */ - connectType?: (proto.ClientPayload.ClientPayloadConnectType|null); + connectType?: (proto.ClientPayload.ConnectType|null); /** ClientPayload connectReason */ - connectReason?: (proto.ClientPayload.ClientPayloadConnectReason|null); + connectReason?: (proto.ClientPayload.ConnectReason|null); /** ClientPayload shards */ shards?: (number[]|null); /** ClientPayload dnsSource */ - dnsSource?: (proto.IDNSSource|null); + dnsSource?: (proto.ClientPayload.IDNSSource|null); /** ClientPayload connectAttemptCount */ connectAttemptCount?: (number|null); @@ -4264,10 +1653,10 @@ export namespace proto { device?: (number|null); /** ClientPayload devicePairingData */ - devicePairingData?: (proto.IDevicePairingRegistrationData|null); + devicePairingData?: (proto.ClientPayload.IDevicePairingRegistrationData|null); /** ClientPayload product */ - product?: (proto.ClientPayload.ClientPayloadProduct|null); + product?: (proto.ClientPayload.Product|null); /** ClientPayload fbCat */ fbCat?: (Uint8Array|null); @@ -4282,7 +1671,7 @@ export namespace proto { lc?: (number|null); /** ClientPayload iosAppExtension */ - iosAppExtension?: (proto.ClientPayload.ClientPayloadIOSAppExtension|null); + iosAppExtension?: (proto.ClientPayload.IOSAppExtension|null); /** ClientPayload fbAppId */ fbAppId?: (number|Long|null); @@ -4313,10 +1702,10 @@ export namespace proto { public passive: boolean; /** ClientPayload userAgent. */ - public userAgent?: (proto.IUserAgent|null); + public userAgent?: (proto.ClientPayload.IUserAgent|null); /** ClientPayload webInfo. */ - public webInfo?: (proto.IWebInfo|null); + public webInfo?: (proto.ClientPayload.IWebInfo|null); /** ClientPayload pushName. */ public pushName: string; @@ -4328,16 +1717,16 @@ export namespace proto { public shortConnect: boolean; /** ClientPayload connectType. */ - public connectType: proto.ClientPayload.ClientPayloadConnectType; + public connectType: proto.ClientPayload.ConnectType; /** ClientPayload connectReason. */ - public connectReason: proto.ClientPayload.ClientPayloadConnectReason; + public connectReason: proto.ClientPayload.ConnectReason; /** ClientPayload shards. */ public shards: number[]; /** ClientPayload dnsSource. */ - public dnsSource?: (proto.IDNSSource|null); + public dnsSource?: (proto.ClientPayload.IDNSSource|null); /** ClientPayload connectAttemptCount. */ public connectAttemptCount: number; @@ -4346,10 +1735,10 @@ export namespace proto { public device: number; /** ClientPayload devicePairingData. */ - public devicePairingData?: (proto.IDevicePairingRegistrationData|null); + public devicePairingData?: (proto.ClientPayload.IDevicePairingRegistrationData|null); /** ClientPayload product. */ - public product: proto.ClientPayload.ClientPayloadProduct; + public product: proto.ClientPayload.Product; /** ClientPayload fbCat. */ public fbCat: Uint8Array; @@ -4364,7 +1753,7 @@ export namespace proto { public lc: number; /** ClientPayload iosAppExtension. */ - public iosAppExtension: proto.ClientPayload.ClientPayloadIOSAppExtension; + public iosAppExtension: proto.ClientPayload.IOSAppExtension; /** ClientPayload fbAppId. */ public fbAppId: (number|Long); @@ -4451,8 +1840,18 @@ export namespace proto { namespace ClientPayload { - /** ClientPayloadConnectType enum. */ - enum ClientPayloadConnectType { + /** ConnectReason enum. */ + enum ConnectReason { + PUSH = 0, + USER_ACTIVATED = 1, + SCHEDULED = 2, + ERROR_RECONNECT = 3, + NETWORK_SWITCH = 4, + PING_RECONNECT = 5 + } + + /** ConnectType enum. */ + enum ConnectType { CELLULAR_UNKNOWN = 0, WIFI_UNKNOWN = 1, CELLULAR_EDGE = 100, @@ -4470,430 +1869,848 @@ export namespace proto { CELLULAR_HSPAP = 112 } - /** ClientPayloadConnectReason enum. */ - enum ClientPayloadConnectReason { - PUSH = 0, - USER_ACTIVATED = 1, - SCHEDULED = 2, - ERROR_RECONNECT = 3, - NETWORK_SWITCH = 4, - PING_RECONNECT = 5 + /** Properties of a DNSSource. */ + interface IDNSSource { + + /** DNSSource dnsMethod */ + dnsMethod?: (proto.ClientPayload.DNSSource.DNSResolutionMethod|null); + + /** DNSSource appCached */ + appCached?: (boolean|null); } - /** ClientPayloadProduct enum. */ - enum ClientPayloadProduct { - WHATSAPP = 0, - MESSENGER = 1 + /** Represents a DNSSource. */ + class DNSSource implements IDNSSource { + + /** + * Constructs a new DNSSource. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ClientPayload.IDNSSource); + + /** DNSSource dnsMethod. */ + public dnsMethod: proto.ClientPayload.DNSSource.DNSResolutionMethod; + + /** 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.ClientPayload.IDNSSource): proto.ClientPayload.DNSSource; + + /** + * Encodes the specified DNSSource message. Does not implicitly {@link proto.ClientPayload.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.ClientPayload.IDNSSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DNSSource message, length delimited. Does not implicitly {@link proto.ClientPayload.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.ClientPayload.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.ClientPayload.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.ClientPayload.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.ClientPayload.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.ClientPayload.DNSSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DNSSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } - /** ClientPayloadIOSAppExtension enum. */ - enum ClientPayloadIOSAppExtension { + namespace DNSSource { + + /** DNSResolutionMethod enum. */ + enum DNSResolutionMethod { + SYSTEM = 0, + GOOGLE = 1, + HARDCODED = 2, + OVERRIDE = 3, + FALLBACK = 4 + } + } + + /** 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.ClientPayload.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.ClientPayload.IDevicePairingRegistrationData): proto.ClientPayload.DevicePairingRegistrationData; + + /** + * Encodes the specified DevicePairingRegistrationData message. Does not implicitly {@link proto.ClientPayload.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.ClientPayload.IDevicePairingRegistrationData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DevicePairingRegistrationData message, length delimited. Does not implicitly {@link proto.ClientPayload.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.ClientPayload.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.ClientPayload.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.ClientPayload.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.ClientPayload.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.ClientPayload.DevicePairingRegistrationData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DevicePairingRegistrationData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** IOSAppExtension enum. */ + enum IOSAppExtension { SHARE_EXTENSION = 0, SERVICE_EXTENSION = 1, INTENTS_EXTENSION = 2 } - } - - /** Properties of a CollectionMessage. */ - interface ICollectionMessage { - - /** CollectionMessage bizJid */ - bizJid?: (string|null); - - /** CollectionMessage id */ - id?: (string|null); - - /** CollectionMessage messageVersion */ - messageVersion?: (number|null); - } - - /** Represents a CollectionMessage. */ - class CollectionMessage implements ICollectionMessage { - - /** - * Constructs a new CollectionMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.ICollectionMessage); - - /** CollectionMessage bizJid. */ - public bizJid: string; - - /** CollectionMessage id. */ - public id: string; - - /** CollectionMessage messageVersion. */ - public messageVersion: number; - - /** - * Creates a new CollectionMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns CollectionMessage instance - */ - public static create(properties?: proto.ICollectionMessage): proto.CollectionMessage; - - /** - * Encodes the specified CollectionMessage message. Does not implicitly {@link proto.CollectionMessage.verify|verify} messages. - * @param message CollectionMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.ICollectionMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CollectionMessage message, length delimited. Does not implicitly {@link proto.CollectionMessage.verify|verify} messages. - * @param message CollectionMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.ICollectionMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CollectionMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CollectionMessage - * @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.CollectionMessage; - - /** - * Decodes a CollectionMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CollectionMessage - * @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.CollectionMessage; - - /** - * Verifies a CollectionMessage 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 CollectionMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CollectionMessage - */ - public static fromObject(object: { [k: string]: any }): proto.CollectionMessage; - - /** - * Creates a plain object from a CollectionMessage message. Also converts values to other types if specified. - * @param message CollectionMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.CollectionMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CollectionMessage 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 ContactMessage. */ - interface IContactMessage { - - /** ContactMessage displayName */ - displayName?: (string|null); - - /** ContactMessage vcard */ - vcard?: (string|null); - - /** ContactMessage contextInfo */ - contextInfo?: (proto.IContextInfo|null); - } - - /** Represents a ContactMessage. */ - class ContactMessage implements IContactMessage { - - /** - * Constructs a new ContactMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IContactMessage); - - /** ContactMessage displayName. */ - public displayName: string; - - /** ContactMessage vcard. */ - public vcard: string; - - /** ContactMessage contextInfo. */ - public contextInfo?: (proto.IContextInfo|null); - - /** - * Creates a new ContactMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns ContactMessage instance - */ - public static create(properties?: proto.IContactMessage): proto.ContactMessage; - - /** - * Encodes the specified ContactMessage message. Does not implicitly {@link proto.ContactMessage.verify|verify} messages. - * @param message ContactMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IContactMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ContactMessage message, length delimited. Does not implicitly {@link proto.ContactMessage.verify|verify} messages. - * @param message ContactMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IContactMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ContactMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ContactMessage - * @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.ContactMessage; - - /** - * Decodes a ContactMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ContactMessage - * @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.ContactMessage; - - /** - * Verifies a ContactMessage 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 ContactMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ContactMessage - */ - public static fromObject(object: { [k: string]: any }): proto.ContactMessage; - - /** - * Creates a plain object from a ContactMessage message. Also converts values to other types if specified. - * @param message ContactMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.ContactMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ContactMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ContactsArrayMessage. */ - interface IContactsArrayMessage { - - /** ContactsArrayMessage displayName */ - displayName?: (string|null); - - /** ContactsArrayMessage contacts */ - contacts?: (proto.IContactMessage[]|null); - - /** ContactsArrayMessage contextInfo */ - contextInfo?: (proto.IContextInfo|null); - } - - /** Represents a ContactsArrayMessage. */ - class ContactsArrayMessage implements IContactsArrayMessage { - - /** - * Constructs a new ContactsArrayMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IContactsArrayMessage); - - /** ContactsArrayMessage displayName. */ - public displayName: string; - - /** ContactsArrayMessage contacts. */ - public contacts: proto.IContactMessage[]; - - /** ContactsArrayMessage contextInfo. */ - public contextInfo?: (proto.IContextInfo|null); - - /** - * Creates a new ContactsArrayMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns ContactsArrayMessage instance - */ - public static create(properties?: proto.IContactsArrayMessage): proto.ContactsArrayMessage; - - /** - * Encodes the specified ContactsArrayMessage message. Does not implicitly {@link proto.ContactsArrayMessage.verify|verify} messages. - * @param message ContactsArrayMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IContactsArrayMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ContactsArrayMessage message, length delimited. Does not implicitly {@link proto.ContactsArrayMessage.verify|verify} messages. - * @param message ContactsArrayMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IContactsArrayMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ContactsArrayMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ContactsArrayMessage - * @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.ContactsArrayMessage; - - /** - * Decodes a ContactsArrayMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ContactsArrayMessage - * @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.ContactsArrayMessage; - - /** - * Verifies a ContactsArrayMessage 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 ContactsArrayMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ContactsArrayMessage - */ - public static fromObject(object: { [k: string]: any }): proto.ContactsArrayMessage; - - /** - * Creates a plain object from a ContactsArrayMessage message. Also converts values to other types if specified. - * @param message ContactsArrayMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.ContactsArrayMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ContactsArrayMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + + /** Product enum. */ + enum Product { + WHATSAPP = 0, + MESSENGER = 1 + } + + /** Properties of a UserAgent. */ + interface IUserAgent { + + /** UserAgent platform */ + platform?: (proto.ClientPayload.UserAgent.Platform|null); + + /** UserAgent appVersion */ + appVersion?: (proto.ClientPayload.UserAgent.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.ClientPayload.UserAgent.ReleaseChannel|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.ClientPayload.IUserAgent); + + /** UserAgent platform. */ + public platform: proto.ClientPayload.UserAgent.Platform; + + /** UserAgent appVersion. */ + public appVersion?: (proto.ClientPayload.UserAgent.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.ClientPayload.UserAgent.ReleaseChannel; + + /** 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.ClientPayload.IUserAgent): proto.ClientPayload.UserAgent; + + /** + * Encodes the specified UserAgent message. Does not implicitly {@link proto.ClientPayload.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.ClientPayload.IUserAgent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserAgent message, length delimited. Does not implicitly {@link proto.ClientPayload.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.ClientPayload.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.ClientPayload.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.ClientPayload.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.ClientPayload.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.ClientPayload.UserAgent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserAgent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace UserAgent { + + /** 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.ClientPayload.UserAgent.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.ClientPayload.UserAgent.IAppVersion): proto.ClientPayload.UserAgent.AppVersion; + + /** + * Encodes the specified AppVersion message. Does not implicitly {@link proto.ClientPayload.UserAgent.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.ClientPayload.UserAgent.IAppVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AppVersion message, length delimited. Does not implicitly {@link proto.ClientPayload.UserAgent.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.ClientPayload.UserAgent.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.ClientPayload.UserAgent.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.ClientPayload.UserAgent.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.ClientPayload.UserAgent.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.ClientPayload.UserAgent.AppVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AppVersion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Platform enum. */ + enum Platform { + 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 + } + + /** ReleaseChannel enum. */ + enum ReleaseChannel { + RELEASE = 0, + BETA = 1, + ALPHA = 2, + DEBUG = 3 + } + } + + /** Properties of a WebInfo. */ + interface IWebInfo { + + /** WebInfo refToken */ + refToken?: (string|null); + + /** WebInfo version */ + version?: (string|null); + + /** WebInfo webdPayload */ + webdPayload?: (proto.ClientPayload.WebInfo.IWebdPayload|null); + + /** WebInfo webSubPlatform */ + webSubPlatform?: (proto.ClientPayload.WebInfo.WebSubPlatform|null); + } + + /** Represents a WebInfo. */ + class WebInfo implements IWebInfo { + + /** + * Constructs a new WebInfo. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ClientPayload.IWebInfo); + + /** WebInfo refToken. */ + public refToken: string; + + /** WebInfo version. */ + public version: string; + + /** WebInfo webdPayload. */ + public webdPayload?: (proto.ClientPayload.WebInfo.IWebdPayload|null); + + /** WebInfo webSubPlatform. */ + public webSubPlatform: proto.ClientPayload.WebInfo.WebSubPlatform; + + /** + * Creates a new WebInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns WebInfo instance + */ + public static create(properties?: proto.ClientPayload.IWebInfo): proto.ClientPayload.WebInfo; + + /** + * Encodes the specified WebInfo message. Does not implicitly {@link proto.ClientPayload.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.ClientPayload.IWebInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WebInfo message, length delimited. Does not implicitly {@link proto.ClientPayload.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.ClientPayload.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.ClientPayload.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.ClientPayload.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.ClientPayload.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.ClientPayload.WebInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WebInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace WebInfo { + + /** WebSubPlatform enum. */ + enum WebSubPlatform { + WEB_BROWSER = 0, + APP_STORE = 1, + WIN_STORE = 2, + DARWIN = 3, + WIN32 = 4 + } + + /** 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.ClientPayload.WebInfo.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.ClientPayload.WebInfo.IWebdPayload): proto.ClientPayload.WebInfo.WebdPayload; + + /** + * Encodes the specified WebdPayload message. Does not implicitly {@link proto.ClientPayload.WebInfo.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.ClientPayload.WebInfo.IWebdPayload, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WebdPayload message, length delimited. Does not implicitly {@link proto.ClientPayload.WebInfo.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.ClientPayload.WebInfo.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.ClientPayload.WebInfo.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.ClientPayload.WebInfo.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.ClientPayload.WebInfo.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.ClientPayload.WebInfo.WebdPayload, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WebdPayload to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } } /** Properties of a ContextInfo. */ @@ -4930,7 +2747,7 @@ export namespace proto { isForwarded?: (boolean|null); /** ContextInfo quotedAd */ - quotedAd?: (proto.IAdReplyInfo|null); + quotedAd?: (proto.ContextInfo.IAdReplyInfo|null); /** ContextInfo placeholderKey */ placeholderKey?: (proto.IMessageKey|null); @@ -4945,7 +2762,7 @@ export namespace proto { ephemeralSharedSecret?: (Uint8Array|null); /** ContextInfo externalAdReply */ - externalAdReply?: (proto.IExternalAdReplyInfo|null); + externalAdReply?: (proto.ContextInfo.IExternalAdReplyInfo|null); /** ContextInfo entryPointConversionSource */ entryPointConversionSource?: (string|null); @@ -5009,7 +2826,7 @@ export namespace proto { public isForwarded: boolean; /** ContextInfo quotedAd. */ - public quotedAd?: (proto.IAdReplyInfo|null); + public quotedAd?: (proto.ContextInfo.IAdReplyInfo|null); /** ContextInfo placeholderKey. */ public placeholderKey?: (proto.IMessageKey|null); @@ -5024,7 +2841,7 @@ export namespace proto { public ephemeralSharedSecret: Uint8Array; /** ContextInfo externalAdReply. */ - public externalAdReply?: (proto.IExternalAdReplyInfo|null); + public externalAdReply?: (proto.ContextInfo.IExternalAdReplyInfo|null); /** ContextInfo entryPointConversionSource. */ public entryPointConversionSource: string; @@ -5118,6 +2935,293 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + namespace ContextInfo { + + /** Properties of an AdReplyInfo. */ + interface IAdReplyInfo { + + /** AdReplyInfo advertiserName */ + advertiserName?: (string|null); + + /** AdReplyInfo mediaType */ + mediaType?: (proto.ContextInfo.AdReplyInfo.MediaType|null); + + /** AdReplyInfo jpegThumbnail */ + jpegThumbnail?: (Uint8Array|null); + + /** AdReplyInfo caption */ + caption?: (string|null); + } + + /** Represents an AdReplyInfo. */ + class AdReplyInfo implements IAdReplyInfo { + + /** + * Constructs a new AdReplyInfo. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ContextInfo.IAdReplyInfo); + + /** AdReplyInfo advertiserName. */ + public advertiserName: string; + + /** AdReplyInfo mediaType. */ + public mediaType: proto.ContextInfo.AdReplyInfo.MediaType; + + /** AdReplyInfo jpegThumbnail. */ + public jpegThumbnail: Uint8Array; + + /** AdReplyInfo caption. */ + public caption: string; + + /** + * Creates a new AdReplyInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns AdReplyInfo instance + */ + public static create(properties?: proto.ContextInfo.IAdReplyInfo): proto.ContextInfo.AdReplyInfo; + + /** + * Encodes the specified AdReplyInfo message. Does not implicitly {@link proto.ContextInfo.AdReplyInfo.verify|verify} messages. + * @param message AdReplyInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ContextInfo.IAdReplyInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AdReplyInfo message, length delimited. Does not implicitly {@link proto.ContextInfo.AdReplyInfo.verify|verify} messages. + * @param message AdReplyInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ContextInfo.IAdReplyInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AdReplyInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AdReplyInfo + * @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.ContextInfo.AdReplyInfo; + + /** + * Decodes an AdReplyInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AdReplyInfo + * @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.ContextInfo.AdReplyInfo; + + /** + * Verifies an AdReplyInfo 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 AdReplyInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AdReplyInfo + */ + public static fromObject(object: { [k: string]: any }): proto.ContextInfo.AdReplyInfo; + + /** + * Creates a plain object from an AdReplyInfo message. Also converts values to other types if specified. + * @param message AdReplyInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ContextInfo.AdReplyInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AdReplyInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace AdReplyInfo { + + /** MediaType enum. */ + enum MediaType { + NONE = 0, + IMAGE = 1, + VIDEO = 2 + } + } + + /** Properties of an ExternalAdReplyInfo. */ + interface IExternalAdReplyInfo { + + /** ExternalAdReplyInfo title */ + title?: (string|null); + + /** ExternalAdReplyInfo body */ + body?: (string|null); + + /** ExternalAdReplyInfo mediaType */ + mediaType?: (proto.ContextInfo.ExternalAdReplyInfo.MediaType|null); + + /** ExternalAdReplyInfo thumbnailUrl */ + thumbnailUrl?: (string|null); + + /** ExternalAdReplyInfo mediaUrl */ + mediaUrl?: (string|null); + + /** ExternalAdReplyInfo thumbnail */ + thumbnail?: (Uint8Array|null); + + /** ExternalAdReplyInfo sourceType */ + sourceType?: (string|null); + + /** ExternalAdReplyInfo sourceId */ + sourceId?: (string|null); + + /** ExternalAdReplyInfo sourceUrl */ + sourceUrl?: (string|null); + + /** ExternalAdReplyInfo containsAutoReply */ + containsAutoReply?: (boolean|null); + + /** ExternalAdReplyInfo renderLargerThumbnail */ + renderLargerThumbnail?: (boolean|null); + + /** ExternalAdReplyInfo showAdAttribution */ + showAdAttribution?: (boolean|null); + } + + /** Represents an ExternalAdReplyInfo. */ + class ExternalAdReplyInfo implements IExternalAdReplyInfo { + + /** + * Constructs a new ExternalAdReplyInfo. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ContextInfo.IExternalAdReplyInfo); + + /** ExternalAdReplyInfo title. */ + public title: string; + + /** ExternalAdReplyInfo body. */ + public body: string; + + /** ExternalAdReplyInfo mediaType. */ + public mediaType: proto.ContextInfo.ExternalAdReplyInfo.MediaType; + + /** ExternalAdReplyInfo thumbnailUrl. */ + public thumbnailUrl: string; + + /** ExternalAdReplyInfo mediaUrl. */ + public mediaUrl: string; + + /** ExternalAdReplyInfo thumbnail. */ + public thumbnail: Uint8Array; + + /** ExternalAdReplyInfo sourceType. */ + public sourceType: string; + + /** ExternalAdReplyInfo sourceId. */ + public sourceId: string; + + /** ExternalAdReplyInfo sourceUrl. */ + public sourceUrl: string; + + /** ExternalAdReplyInfo containsAutoReply. */ + public containsAutoReply: boolean; + + /** ExternalAdReplyInfo renderLargerThumbnail. */ + public renderLargerThumbnail: boolean; + + /** ExternalAdReplyInfo showAdAttribution. */ + public showAdAttribution: boolean; + + /** + * Creates a new ExternalAdReplyInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ExternalAdReplyInfo instance + */ + public static create(properties?: proto.ContextInfo.IExternalAdReplyInfo): proto.ContextInfo.ExternalAdReplyInfo; + + /** + * Encodes the specified ExternalAdReplyInfo message. Does not implicitly {@link proto.ContextInfo.ExternalAdReplyInfo.verify|verify} messages. + * @param message ExternalAdReplyInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ContextInfo.IExternalAdReplyInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExternalAdReplyInfo message, length delimited. Does not implicitly {@link proto.ContextInfo.ExternalAdReplyInfo.verify|verify} messages. + * @param message ExternalAdReplyInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ContextInfo.IExternalAdReplyInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExternalAdReplyInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExternalAdReplyInfo + * @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.ContextInfo.ExternalAdReplyInfo; + + /** + * Decodes an ExternalAdReplyInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExternalAdReplyInfo + * @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.ContextInfo.ExternalAdReplyInfo; + + /** + * Verifies an ExternalAdReplyInfo 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 ExternalAdReplyInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExternalAdReplyInfo + */ + public static fromObject(object: { [k: string]: any }): proto.ContextInfo.ExternalAdReplyInfo; + + /** + * Creates a plain object from an ExternalAdReplyInfo message. Also converts values to other types if specified. + * @param message ExternalAdReplyInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ContextInfo.ExternalAdReplyInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExternalAdReplyInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ExternalAdReplyInfo { + + /** MediaType enum. */ + enum MediaType { + NONE = 0, + IMAGE = 1, + VIDEO = 2 + } + } + } + /** Properties of a Conversation. */ interface IConversation { @@ -5152,7 +3256,7 @@ export namespace proto { ephemeralSettingTimestamp?: (number|Long|null); /** Conversation endOfHistoryTransferType */ - endOfHistoryTransferType?: (proto.Conversation.ConversationEndOfHistoryTransferType|null); + endOfHistoryTransferType?: (proto.Conversation.EndOfHistoryTransferType|null); /** Conversation conversationTimestamp */ conversationTimestamp?: (number|Long|null); @@ -5238,8 +3342,8 @@ export namespace proto { /** Conversation pnJid */ pnJid?: (string|null); - /** Conversation selfMasked */ - selfMasked?: (boolean|null); + /** Conversation selfPnExposed */ + selfPnExposed?: (boolean|null); } /** Represents a Conversation. */ @@ -5282,7 +3386,7 @@ export namespace proto { public ephemeralSettingTimestamp: (number|Long); /** Conversation endOfHistoryTransferType. */ - public endOfHistoryTransferType: proto.Conversation.ConversationEndOfHistoryTransferType; + public endOfHistoryTransferType: proto.Conversation.EndOfHistoryTransferType; /** Conversation conversationTimestamp. */ public conversationTimestamp: (number|Long); @@ -5368,8 +3472,8 @@ export namespace proto { /** Conversation pnJid. */ public pnJid: string; - /** Conversation selfMasked. */ - public selfMasked: boolean; + /** Conversation selfPnExposed. */ + public selfPnExposed: boolean; /** * Creates a new Conversation instance using the specified properties. @@ -5444,397 +3548,13 @@ export namespace proto { namespace Conversation { - /** ConversationEndOfHistoryTransferType enum. */ - enum ConversationEndOfHistoryTransferType { + /** EndOfHistoryTransferType enum. */ + enum EndOfHistoryTransferType { 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 { - - /** DeclinePaymentRequestMessage key */ - key?: (proto.IMessageKey|null); - } - - /** Represents a DeclinePaymentRequestMessage. */ - class DeclinePaymentRequestMessage implements IDeclinePaymentRequestMessage { - - /** - * Constructs a new DeclinePaymentRequestMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IDeclinePaymentRequestMessage); - - /** DeclinePaymentRequestMessage key. */ - public key?: (proto.IMessageKey|null); - - /** - * Creates a new DeclinePaymentRequestMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns DeclinePaymentRequestMessage instance - */ - public static create(properties?: proto.IDeclinePaymentRequestMessage): proto.DeclinePaymentRequestMessage; - - /** - * Encodes the specified DeclinePaymentRequestMessage message. Does not implicitly {@link proto.DeclinePaymentRequestMessage.verify|verify} messages. - * @param message DeclinePaymentRequestMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IDeclinePaymentRequestMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeclinePaymentRequestMessage message, length delimited. Does not implicitly {@link proto.DeclinePaymentRequestMessage.verify|verify} messages. - * @param message DeclinePaymentRequestMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IDeclinePaymentRequestMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeclinePaymentRequestMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeclinePaymentRequestMessage - * @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.DeclinePaymentRequestMessage; - - /** - * Decodes a DeclinePaymentRequestMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeclinePaymentRequestMessage - * @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.DeclinePaymentRequestMessage; - - /** - * Verifies a DeclinePaymentRequestMessage 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 DeclinePaymentRequestMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeclinePaymentRequestMessage - */ - public static fromObject(object: { [k: string]: any }): proto.DeclinePaymentRequestMessage; - - /** - * Creates a plain object from a DeclinePaymentRequestMessage message. Also converts values to other types if specified. - * @param message DeclinePaymentRequestMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.DeclinePaymentRequestMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeclinePaymentRequestMessage 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 DeviceListMetadata. */ interface IDeviceListMetadata { @@ -5955,138 +3675,6 @@ 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 { @@ -6094,10 +3682,10 @@ export namespace proto { os?: (string|null); /** DeviceProps version */ - version?: (proto.IAppVersion|null); + version?: (proto.DeviceProps.IAppVersion|null); /** DeviceProps platformType */ - platformType?: (proto.DeviceProps.DevicePropsPlatformType|null); + platformType?: (proto.DeviceProps.PlatformType|null); /** DeviceProps requireFullSync */ requireFullSync?: (boolean|null); @@ -6116,10 +3704,10 @@ export namespace proto { public os: string; /** DeviceProps version. */ - public version?: (proto.IAppVersion|null); + public version?: (proto.DeviceProps.IAppVersion|null); /** DeviceProps platformType. */ - public platformType: proto.DeviceProps.DevicePropsPlatformType; + public platformType: proto.DeviceProps.PlatformType; /** DeviceProps requireFullSync. */ public requireFullSync: boolean; @@ -6197,8 +3785,122 @@ export namespace proto { namespace DeviceProps { - /** DevicePropsPlatformType enum. */ - enum DevicePropsPlatformType { + /** 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.DeviceProps.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.DeviceProps.IAppVersion): proto.DeviceProps.AppVersion; + + /** + * Encodes the specified AppVersion message. Does not implicitly {@link proto.DeviceProps.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.DeviceProps.IAppVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AppVersion message, length delimited. Does not implicitly {@link proto.DeviceProps.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.DeviceProps.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.DeviceProps.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.DeviceProps.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.DeviceProps.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.DeviceProps.AppVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AppVersion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** PlatformType enum. */ + enum PlatformType { UNKNOWN = 0, CHROME = 1, FIREFOX = 2, @@ -6216,113 +3918,11 @@ export namespace proto { } } - /** Properties of a DeviceSentMessage. */ - interface IDeviceSentMessage { - - /** DeviceSentMessage destinationJid */ - destinationJid?: (string|null); - - /** DeviceSentMessage message */ - message?: (proto.IMessage|null); - - /** DeviceSentMessage phash */ - phash?: (string|null); - } - - /** Represents a DeviceSentMessage. */ - class DeviceSentMessage implements IDeviceSentMessage { - - /** - * Constructs a new DeviceSentMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IDeviceSentMessage); - - /** DeviceSentMessage destinationJid. */ - public destinationJid: string; - - /** DeviceSentMessage message. */ - public message?: (proto.IMessage|null); - - /** DeviceSentMessage phash. */ - public phash: string; - - /** - * Creates a new DeviceSentMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns DeviceSentMessage instance - */ - public static create(properties?: proto.IDeviceSentMessage): proto.DeviceSentMessage; - - /** - * Encodes the specified DeviceSentMessage message. Does not implicitly {@link proto.DeviceSentMessage.verify|verify} messages. - * @param message DeviceSentMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IDeviceSentMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeviceSentMessage message, length delimited. Does not implicitly {@link proto.DeviceSentMessage.verify|verify} messages. - * @param message DeviceSentMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IDeviceSentMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeviceSentMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeviceSentMessage - * @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.DeviceSentMessage; - - /** - * Decodes a DeviceSentMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeviceSentMessage - * @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.DeviceSentMessage; - - /** - * Verifies a DeviceSentMessage 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 DeviceSentMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeviceSentMessage - */ - public static fromObject(object: { [k: string]: any }): proto.DeviceSentMessage; - - /** - * Creates a plain object from a DeviceSentMessage message. Also converts values to other types if specified. - * @param message DeviceSentMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.DeviceSentMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeviceSentMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - /** Properties of a DisappearingMode. */ interface IDisappearingMode { /** DisappearingMode initiator */ - initiator?: (proto.DisappearingMode.DisappearingModeInitiator|null); + initiator?: (proto.DisappearingMode.Initiator|null); } /** Represents a DisappearingMode. */ @@ -6335,7 +3935,7 @@ export namespace proto { constructor(properties?: proto.IDisappearingMode); /** DisappearingMode initiator. */ - public initiator: proto.DisappearingMode.DisappearingModeInitiator; + public initiator: proto.DisappearingMode.Initiator; /** * Creates a new DisappearingMode instance using the specified properties. @@ -6410,218 +4010,14 @@ export namespace proto { namespace DisappearingMode { - /** DisappearingModeInitiator enum. */ - enum DisappearingModeInitiator { + /** Initiator enum. */ + enum Initiator { CHANGED_IN_CHAT = 0, INITIATED_BY_ME = 1, INITIATED_BY_OTHER = 2 } } - /** Properties of a DocumentMessage. */ - interface IDocumentMessage { - - /** DocumentMessage url */ - url?: (string|null); - - /** DocumentMessage mimetype */ - mimetype?: (string|null); - - /** DocumentMessage title */ - title?: (string|null); - - /** DocumentMessage fileSha256 */ - fileSha256?: (Uint8Array|null); - - /** DocumentMessage fileLength */ - fileLength?: (number|Long|null); - - /** DocumentMessage pageCount */ - pageCount?: (number|null); - - /** DocumentMessage mediaKey */ - mediaKey?: (Uint8Array|null); - - /** DocumentMessage fileName */ - fileName?: (string|null); - - /** DocumentMessage fileEncSha256 */ - fileEncSha256?: (Uint8Array|null); - - /** DocumentMessage directPath */ - directPath?: (string|null); - - /** DocumentMessage mediaKeyTimestamp */ - mediaKeyTimestamp?: (number|Long|null); - - /** DocumentMessage contactVcard */ - contactVcard?: (boolean|null); - - /** DocumentMessage thumbnailDirectPath */ - thumbnailDirectPath?: (string|null); - - /** DocumentMessage thumbnailSha256 */ - thumbnailSha256?: (Uint8Array|null); - - /** DocumentMessage thumbnailEncSha256 */ - thumbnailEncSha256?: (Uint8Array|null); - - /** DocumentMessage jpegThumbnail */ - jpegThumbnail?: (Uint8Array|null); - - /** DocumentMessage contextInfo */ - contextInfo?: (proto.IContextInfo|null); - - /** DocumentMessage thumbnailHeight */ - thumbnailHeight?: (number|null); - - /** DocumentMessage thumbnailWidth */ - thumbnailWidth?: (number|null); - - /** DocumentMessage caption */ - caption?: (string|null); - } - - /** Represents a DocumentMessage. */ - class DocumentMessage implements IDocumentMessage { - - /** - * Constructs a new DocumentMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IDocumentMessage); - - /** DocumentMessage url. */ - public url: string; - - /** DocumentMessage mimetype. */ - public mimetype: string; - - /** DocumentMessage title. */ - public title: string; - - /** DocumentMessage fileSha256. */ - public fileSha256: Uint8Array; - - /** DocumentMessage fileLength. */ - public fileLength: (number|Long); - - /** DocumentMessage pageCount. */ - public pageCount: number; - - /** DocumentMessage mediaKey. */ - public mediaKey: Uint8Array; - - /** DocumentMessage fileName. */ - public fileName: string; - - /** DocumentMessage fileEncSha256. */ - public fileEncSha256: Uint8Array; - - /** DocumentMessage directPath. */ - public directPath: string; - - /** DocumentMessage mediaKeyTimestamp. */ - public mediaKeyTimestamp: (number|Long); - - /** DocumentMessage contactVcard. */ - public contactVcard: boolean; - - /** DocumentMessage thumbnailDirectPath. */ - public thumbnailDirectPath: string; - - /** DocumentMessage thumbnailSha256. */ - public thumbnailSha256: Uint8Array; - - /** DocumentMessage thumbnailEncSha256. */ - public thumbnailEncSha256: Uint8Array; - - /** DocumentMessage jpegThumbnail. */ - public jpegThumbnail: Uint8Array; - - /** DocumentMessage contextInfo. */ - public contextInfo?: (proto.IContextInfo|null); - - /** DocumentMessage thumbnailHeight. */ - public thumbnailHeight: number; - - /** DocumentMessage thumbnailWidth. */ - public thumbnailWidth: number; - - /** DocumentMessage caption. */ - public caption: string; - - /** - * Creates a new DocumentMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns DocumentMessage instance - */ - public static create(properties?: proto.IDocumentMessage): proto.DocumentMessage; - - /** - * Encodes the specified DocumentMessage message. Does not implicitly {@link proto.DocumentMessage.verify|verify} messages. - * @param message DocumentMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IDocumentMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DocumentMessage message, length delimited. Does not implicitly {@link proto.DocumentMessage.verify|verify} messages. - * @param message DocumentMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IDocumentMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DocumentMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DocumentMessage - * @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.DocumentMessage; - - /** - * Decodes a DocumentMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DocumentMessage - * @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.DocumentMessage; - - /** - * Verifies a DocumentMessage 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 DocumentMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DocumentMessage - */ - public static fromObject(object: { [k: string]: any }): proto.DocumentMessage; - - /** - * Creates a plain object from a DocumentMessage message. Also converts values to other types if specified. - * @param message DocumentMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.DocumentMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DocumentMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - /** Properties of an EphemeralSetting. */ interface IEphemeralSetting { @@ -6814,419 +4210,6 @@ export namespace proto { public toJSON(): { [k: string]: any }; } - /** Properties of an ExtendedTextMessage. */ - interface IExtendedTextMessage { - - /** ExtendedTextMessage text */ - text?: (string|null); - - /** ExtendedTextMessage matchedText */ - matchedText?: (string|null); - - /** ExtendedTextMessage canonicalUrl */ - canonicalUrl?: (string|null); - - /** ExtendedTextMessage description */ - description?: (string|null); - - /** ExtendedTextMessage title */ - title?: (string|null); - - /** ExtendedTextMessage textArgb */ - textArgb?: (number|null); - - /** ExtendedTextMessage backgroundArgb */ - backgroundArgb?: (number|null); - - /** ExtendedTextMessage font */ - font?: (proto.ExtendedTextMessage.ExtendedTextMessageFontType|null); - - /** ExtendedTextMessage previewType */ - previewType?: (proto.ExtendedTextMessage.ExtendedTextMessagePreviewType|null); - - /** ExtendedTextMessage jpegThumbnail */ - jpegThumbnail?: (Uint8Array|null); - - /** ExtendedTextMessage contextInfo */ - contextInfo?: (proto.IContextInfo|null); - - /** ExtendedTextMessage doNotPlayInline */ - doNotPlayInline?: (boolean|null); - - /** ExtendedTextMessage thumbnailDirectPath */ - thumbnailDirectPath?: (string|null); - - /** ExtendedTextMessage thumbnailSha256 */ - thumbnailSha256?: (Uint8Array|null); - - /** ExtendedTextMessage thumbnailEncSha256 */ - thumbnailEncSha256?: (Uint8Array|null); - - /** ExtendedTextMessage mediaKey */ - mediaKey?: (Uint8Array|null); - - /** ExtendedTextMessage mediaKeyTimestamp */ - mediaKeyTimestamp?: (number|Long|null); - - /** ExtendedTextMessage thumbnailHeight */ - thumbnailHeight?: (number|null); - - /** ExtendedTextMessage thumbnailWidth */ - thumbnailWidth?: (number|null); - - /** ExtendedTextMessage inviteLinkGroupType */ - inviteLinkGroupType?: (proto.ExtendedTextMessage.ExtendedTextMessageInviteLinkGroupType|null); - - /** ExtendedTextMessage inviteLinkParentGroupSubjectV2 */ - inviteLinkParentGroupSubjectV2?: (string|null); - - /** ExtendedTextMessage inviteLinkParentGroupThumbnailV2 */ - inviteLinkParentGroupThumbnailV2?: (Uint8Array|null); - - /** ExtendedTextMessage inviteLinkGroupTypeV2 */ - inviteLinkGroupTypeV2?: (proto.ExtendedTextMessage.ExtendedTextMessageInviteLinkGroupType|null); - } - - /** Represents an ExtendedTextMessage. */ - class ExtendedTextMessage implements IExtendedTextMessage { - - /** - * Constructs a new ExtendedTextMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IExtendedTextMessage); - - /** ExtendedTextMessage text. */ - public text: string; - - /** ExtendedTextMessage matchedText. */ - public matchedText: string; - - /** ExtendedTextMessage canonicalUrl. */ - public canonicalUrl: string; - - /** ExtendedTextMessage description. */ - public description: string; - - /** ExtendedTextMessage title. */ - public title: string; - - /** ExtendedTextMessage textArgb. */ - public textArgb: number; - - /** ExtendedTextMessage backgroundArgb. */ - public backgroundArgb: number; - - /** ExtendedTextMessage font. */ - public font: proto.ExtendedTextMessage.ExtendedTextMessageFontType; - - /** ExtendedTextMessage previewType. */ - public previewType: proto.ExtendedTextMessage.ExtendedTextMessagePreviewType; - - /** ExtendedTextMessage jpegThumbnail. */ - public jpegThumbnail: Uint8Array; - - /** ExtendedTextMessage contextInfo. */ - public contextInfo?: (proto.IContextInfo|null); - - /** ExtendedTextMessage doNotPlayInline. */ - public doNotPlayInline: boolean; - - /** ExtendedTextMessage thumbnailDirectPath. */ - public thumbnailDirectPath: string; - - /** ExtendedTextMessage thumbnailSha256. */ - public thumbnailSha256: Uint8Array; - - /** ExtendedTextMessage thumbnailEncSha256. */ - public thumbnailEncSha256: Uint8Array; - - /** ExtendedTextMessage mediaKey. */ - public mediaKey: Uint8Array; - - /** ExtendedTextMessage mediaKeyTimestamp. */ - public mediaKeyTimestamp: (number|Long); - - /** ExtendedTextMessage thumbnailHeight. */ - public thumbnailHeight: number; - - /** ExtendedTextMessage thumbnailWidth. */ - public thumbnailWidth: number; - - /** ExtendedTextMessage inviteLinkGroupType. */ - public inviteLinkGroupType: proto.ExtendedTextMessage.ExtendedTextMessageInviteLinkGroupType; - - /** ExtendedTextMessage inviteLinkParentGroupSubjectV2. */ - public inviteLinkParentGroupSubjectV2: string; - - /** ExtendedTextMessage inviteLinkParentGroupThumbnailV2. */ - public inviteLinkParentGroupThumbnailV2: Uint8Array; - - /** ExtendedTextMessage inviteLinkGroupTypeV2. */ - public inviteLinkGroupTypeV2: proto.ExtendedTextMessage.ExtendedTextMessageInviteLinkGroupType; - - /** - * Creates a new ExtendedTextMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtendedTextMessage instance - */ - public static create(properties?: proto.IExtendedTextMessage): proto.ExtendedTextMessage; - - /** - * Encodes the specified ExtendedTextMessage message. Does not implicitly {@link proto.ExtendedTextMessage.verify|verify} messages. - * @param message ExtendedTextMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IExtendedTextMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtendedTextMessage message, length delimited. Does not implicitly {@link proto.ExtendedTextMessage.verify|verify} messages. - * @param message ExtendedTextMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IExtendedTextMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtendedTextMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtendedTextMessage - * @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.ExtendedTextMessage; - - /** - * Decodes an ExtendedTextMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtendedTextMessage - * @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.ExtendedTextMessage; - - /** - * Verifies an ExtendedTextMessage 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 ExtendedTextMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtendedTextMessage - */ - public static fromObject(object: { [k: string]: any }): proto.ExtendedTextMessage; - - /** - * Creates a plain object from an ExtendedTextMessage message. Also converts values to other types if specified. - * @param message ExtendedTextMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.ExtendedTextMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtendedTextMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace ExtendedTextMessage { - - /** ExtendedTextMessageFontType enum. */ - enum ExtendedTextMessageFontType { - SANS_SERIF = 0, - SERIF = 1, - NORICAN_REGULAR = 2, - BRYNDAN_WRITE = 3, - BEBASNEUE_REGULAR = 4, - OSWALD_HEAVY = 5 - } - - /** ExtendedTextMessagePreviewType enum. */ - enum ExtendedTextMessagePreviewType { - NONE = 0, - VIDEO = 1 - } - - /** ExtendedTextMessageInviteLinkGroupType enum. */ - enum ExtendedTextMessageInviteLinkGroupType { - DEFAULT = 0, - PARENT = 1 - } - } - - /** Properties of an ExternalAdReplyInfo. */ - interface IExternalAdReplyInfo { - - /** ExternalAdReplyInfo title */ - title?: (string|null); - - /** ExternalAdReplyInfo body */ - body?: (string|null); - - /** ExternalAdReplyInfo mediaType */ - mediaType?: (proto.ExternalAdReplyInfo.ExternalAdReplyInfoMediaType|null); - - /** ExternalAdReplyInfo thumbnailUrl */ - thumbnailUrl?: (string|null); - - /** ExternalAdReplyInfo mediaUrl */ - mediaUrl?: (string|null); - - /** ExternalAdReplyInfo thumbnail */ - thumbnail?: (Uint8Array|null); - - /** ExternalAdReplyInfo sourceType */ - sourceType?: (string|null); - - /** ExternalAdReplyInfo sourceId */ - sourceId?: (string|null); - - /** ExternalAdReplyInfo sourceUrl */ - sourceUrl?: (string|null); - - /** ExternalAdReplyInfo containsAutoReply */ - containsAutoReply?: (boolean|null); - - /** ExternalAdReplyInfo renderLargerThumbnail */ - renderLargerThumbnail?: (boolean|null); - - /** ExternalAdReplyInfo showAdAttribution */ - showAdAttribution?: (boolean|null); - } - - /** Represents an ExternalAdReplyInfo. */ - class ExternalAdReplyInfo implements IExternalAdReplyInfo { - - /** - * Constructs a new ExternalAdReplyInfo. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IExternalAdReplyInfo); - - /** ExternalAdReplyInfo title. */ - public title: string; - - /** ExternalAdReplyInfo body. */ - public body: string; - - /** ExternalAdReplyInfo mediaType. */ - public mediaType: proto.ExternalAdReplyInfo.ExternalAdReplyInfoMediaType; - - /** ExternalAdReplyInfo thumbnailUrl. */ - public thumbnailUrl: string; - - /** ExternalAdReplyInfo mediaUrl. */ - public mediaUrl: string; - - /** ExternalAdReplyInfo thumbnail. */ - public thumbnail: Uint8Array; - - /** ExternalAdReplyInfo sourceType. */ - public sourceType: string; - - /** ExternalAdReplyInfo sourceId. */ - public sourceId: string; - - /** ExternalAdReplyInfo sourceUrl. */ - public sourceUrl: string; - - /** ExternalAdReplyInfo containsAutoReply. */ - public containsAutoReply: boolean; - - /** ExternalAdReplyInfo renderLargerThumbnail. */ - public renderLargerThumbnail: boolean; - - /** ExternalAdReplyInfo showAdAttribution. */ - public showAdAttribution: boolean; - - /** - * Creates a new ExternalAdReplyInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ExternalAdReplyInfo instance - */ - public static create(properties?: proto.IExternalAdReplyInfo): proto.ExternalAdReplyInfo; - - /** - * Encodes the specified ExternalAdReplyInfo message. Does not implicitly {@link proto.ExternalAdReplyInfo.verify|verify} messages. - * @param message ExternalAdReplyInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IExternalAdReplyInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExternalAdReplyInfo message, length delimited. Does not implicitly {@link proto.ExternalAdReplyInfo.verify|verify} messages. - * @param message ExternalAdReplyInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IExternalAdReplyInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExternalAdReplyInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExternalAdReplyInfo - * @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.ExternalAdReplyInfo; - - /** - * Decodes an ExternalAdReplyInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExternalAdReplyInfo - * @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.ExternalAdReplyInfo; - - /** - * Verifies an ExternalAdReplyInfo 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 ExternalAdReplyInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExternalAdReplyInfo - */ - public static fromObject(object: { [k: string]: any }): proto.ExternalAdReplyInfo; - - /** - * Creates a plain object from an ExternalAdReplyInfo message. Also converts values to other types if specified. - * @param message ExternalAdReplyInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.ExternalAdReplyInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExternalAdReplyInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace ExternalAdReplyInfo { - - /** ExternalAdReplyInfoMediaType enum. */ - enum ExternalAdReplyInfoMediaType { - NONE = 0, - IMAGE = 1, - VIDEO = 2 - } - } - /** Properties of an ExternalBlobReference. */ interface IExternalBlobReference { @@ -7347,453 +4330,6 @@ export namespace proto { 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 { - - /** Footer text */ - text?: (string|null); - } - - /** Represents a Footer. */ - class Footer implements IFooter { - - /** - * Constructs a new Footer. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IFooter); - - /** Footer text. */ - public text: string; - - /** - * Creates a new Footer instance using the specified properties. - * @param [properties] Properties to set - * @returns Footer instance - */ - public static create(properties?: proto.IFooter): proto.Footer; - - /** - * Encodes the specified Footer message. Does not implicitly {@link proto.Footer.verify|verify} messages. - * @param message Footer message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IFooter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Footer message, length delimited. Does not implicitly {@link proto.Footer.verify|verify} messages. - * @param message Footer message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IFooter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Footer message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Footer - * @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.Footer; - - /** - * Decodes a Footer message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Footer - * @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.Footer; - - /** - * Verifies a Footer 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 Footer message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Footer - */ - public static fromObject(object: { [k: string]: any }): proto.Footer; - - /** - * Creates a plain object from a Footer message. Also converts values to other types if specified. - * @param message Footer - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.Footer, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Footer to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a FourRowTemplate. */ - interface IFourRowTemplate { - - /** FourRowTemplate content */ - content?: (proto.IHighlyStructuredMessage|null); - - /** FourRowTemplate footer */ - footer?: (proto.IHighlyStructuredMessage|null); - - /** FourRowTemplate buttons */ - buttons?: (proto.ITemplateButton[]|null); - - /** FourRowTemplate documentMessage */ - documentMessage?: (proto.IDocumentMessage|null); - - /** FourRowTemplate highlyStructuredMessage */ - highlyStructuredMessage?: (proto.IHighlyStructuredMessage|null); - - /** FourRowTemplate imageMessage */ - imageMessage?: (proto.IImageMessage|null); - - /** FourRowTemplate videoMessage */ - videoMessage?: (proto.IVideoMessage|null); - - /** FourRowTemplate locationMessage */ - locationMessage?: (proto.ILocationMessage|null); - } - - /** Represents a FourRowTemplate. */ - class FourRowTemplate implements IFourRowTemplate { - - /** - * Constructs a new FourRowTemplate. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IFourRowTemplate); - - /** FourRowTemplate content. */ - public content?: (proto.IHighlyStructuredMessage|null); - - /** FourRowTemplate footer. */ - public footer?: (proto.IHighlyStructuredMessage|null); - - /** FourRowTemplate buttons. */ - public buttons: proto.ITemplateButton[]; - - /** FourRowTemplate documentMessage. */ - public documentMessage?: (proto.IDocumentMessage|null); - - /** FourRowTemplate highlyStructuredMessage. */ - public highlyStructuredMessage?: (proto.IHighlyStructuredMessage|null); - - /** FourRowTemplate imageMessage. */ - public imageMessage?: (proto.IImageMessage|null); - - /** FourRowTemplate videoMessage. */ - public videoMessage?: (proto.IVideoMessage|null); - - /** FourRowTemplate locationMessage. */ - public locationMessage?: (proto.ILocationMessage|null); - - /** FourRowTemplate title. */ - public title?: ("documentMessage"|"highlyStructuredMessage"|"imageMessage"|"videoMessage"|"locationMessage"); - - /** - * Creates a new FourRowTemplate instance using the specified properties. - * @param [properties] Properties to set - * @returns FourRowTemplate instance - */ - public static create(properties?: proto.IFourRowTemplate): proto.FourRowTemplate; - - /** - * Encodes the specified FourRowTemplate message. Does not implicitly {@link proto.FourRowTemplate.verify|verify} messages. - * @param message FourRowTemplate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IFourRowTemplate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FourRowTemplate message, length delimited. Does not implicitly {@link proto.FourRowTemplate.verify|verify} messages. - * @param message FourRowTemplate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IFourRowTemplate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FourRowTemplate message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FourRowTemplate - * @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.FourRowTemplate; - - /** - * Decodes a FourRowTemplate message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FourRowTemplate - * @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.FourRowTemplate; - - /** - * Verifies a FourRowTemplate 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 FourRowTemplate message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FourRowTemplate - */ - public static fromObject(object: { [k: string]: any }): proto.FourRowTemplate; - - /** - * Creates a plain object from a FourRowTemplate message. Also converts values to other types if specified. - * @param message FourRowTemplate - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.FourRowTemplate, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FourRowTemplate to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a FutureProofMessage. */ - interface IFutureProofMessage { - - /** FutureProofMessage message */ - message?: (proto.IMessage|null); - } - - /** Represents a FutureProofMessage. */ - class FutureProofMessage implements IFutureProofMessage { - - /** - * Constructs a new FutureProofMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IFutureProofMessage); - - /** FutureProofMessage message. */ - public message?: (proto.IMessage|null); - - /** - * Creates a new FutureProofMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns FutureProofMessage instance - */ - public static create(properties?: proto.IFutureProofMessage): proto.FutureProofMessage; - - /** - * Encodes the specified FutureProofMessage message. Does not implicitly {@link proto.FutureProofMessage.verify|verify} messages. - * @param message FutureProofMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IFutureProofMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FutureProofMessage message, length delimited. Does not implicitly {@link proto.FutureProofMessage.verify|verify} messages. - * @param message FutureProofMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IFutureProofMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FutureProofMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FutureProofMessage - * @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.FutureProofMessage; - - /** - * Decodes a FutureProofMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FutureProofMessage - * @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.FutureProofMessage; - - /** - * Verifies a FutureProofMessage 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 FutureProofMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FutureProofMessage - */ - public static fromObject(object: { [k: string]: any }): proto.FutureProofMessage; - - /** - * Creates a plain object from a FutureProofMessage message. Also converts values to other types if specified. - * @param message FutureProofMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.FutureProofMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FutureProofMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - /** Properties of a GlobalSettings. */ interface IGlobalSettings { @@ -7938,147 +4474,6 @@ export namespace proto { public toJSON(): { [k: string]: any }; } - /** Properties of a GroupInviteMessage. */ - interface IGroupInviteMessage { - - /** GroupInviteMessage groupJid */ - groupJid?: (string|null); - - /** GroupInviteMessage inviteCode */ - inviteCode?: (string|null); - - /** GroupInviteMessage inviteExpiration */ - inviteExpiration?: (number|Long|null); - - /** GroupInviteMessage groupName */ - groupName?: (string|null); - - /** GroupInviteMessage jpegThumbnail */ - jpegThumbnail?: (Uint8Array|null); - - /** GroupInviteMessage caption */ - caption?: (string|null); - - /** GroupInviteMessage contextInfo */ - contextInfo?: (proto.IContextInfo|null); - - /** GroupInviteMessage groupType */ - groupType?: (proto.GroupInviteMessage.GroupInviteMessageGroupType|null); - } - - /** Represents a GroupInviteMessage. */ - class GroupInviteMessage implements IGroupInviteMessage { - - /** - * Constructs a new GroupInviteMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IGroupInviteMessage); - - /** GroupInviteMessage groupJid. */ - public groupJid: string; - - /** GroupInviteMessage inviteCode. */ - public inviteCode: string; - - /** GroupInviteMessage inviteExpiration. */ - public inviteExpiration: (number|Long); - - /** GroupInviteMessage groupName. */ - public groupName: string; - - /** GroupInviteMessage jpegThumbnail. */ - public jpegThumbnail: Uint8Array; - - /** GroupInviteMessage caption. */ - public caption: string; - - /** GroupInviteMessage contextInfo. */ - public contextInfo?: (proto.IContextInfo|null); - - /** GroupInviteMessage groupType. */ - public groupType: proto.GroupInviteMessage.GroupInviteMessageGroupType; - - /** - * Creates a new GroupInviteMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns GroupInviteMessage instance - */ - public static create(properties?: proto.IGroupInviteMessage): proto.GroupInviteMessage; - - /** - * Encodes the specified GroupInviteMessage message. Does not implicitly {@link proto.GroupInviteMessage.verify|verify} messages. - * @param message GroupInviteMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IGroupInviteMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GroupInviteMessage message, length delimited. Does not implicitly {@link proto.GroupInviteMessage.verify|verify} messages. - * @param message GroupInviteMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IGroupInviteMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GroupInviteMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GroupInviteMessage - * @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.GroupInviteMessage; - - /** - * Decodes a GroupInviteMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GroupInviteMessage - * @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.GroupInviteMessage; - - /** - * Verifies a GroupInviteMessage 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 GroupInviteMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GroupInviteMessage - */ - public static fromObject(object: { [k: string]: any }): proto.GroupInviteMessage; - - /** - * Creates a plain object from a GroupInviteMessage message. Also converts values to other types if specified. - * @param message GroupInviteMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.GroupInviteMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GroupInviteMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace GroupInviteMessage { - - /** GroupInviteMessageGroupType enum. */ - enum GroupInviteMessageGroupType { - DEFAULT = 0, - PARENT = 1 - } - } - /** Properties of a GroupParticipant. */ interface IGroupParticipant { @@ -8086,7 +4481,7 @@ export namespace proto { userJid: string; /** GroupParticipant rank */ - rank?: (proto.GroupParticipant.GroupParticipantRank|null); + rank?: (proto.GroupParticipant.Rank|null); } /** Represents a GroupParticipant. */ @@ -8102,7 +4497,7 @@ export namespace proto { public userJid: string; /** GroupParticipant rank. */ - public rank: proto.GroupParticipant.GroupParticipantRank; + public rank: proto.GroupParticipant.Rank; /** * Creates a new GroupParticipant instance using the specified properties. @@ -8177,561 +4572,25 @@ export namespace proto { namespace GroupParticipant { - /** GroupParticipantRank enum. */ - enum GroupParticipantRank { + /** Rank enum. */ + enum Rank { REGULAR = 0, ADMIN = 1, SUPERADMIN = 2 } } - /** Properties of a HSMCurrency. */ - interface IHSMCurrency { - - /** HSMCurrency currencyCode */ - currencyCode?: (string|null); - - /** HSMCurrency amount1000 */ - amount1000?: (number|Long|null); - } - - /** Represents a HSMCurrency. */ - class HSMCurrency implements IHSMCurrency { - - /** - * Constructs a new HSMCurrency. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IHSMCurrency); - - /** HSMCurrency currencyCode. */ - public currencyCode: string; - - /** HSMCurrency amount1000. */ - public amount1000: (number|Long); - - /** - * Creates a new HSMCurrency instance using the specified properties. - * @param [properties] Properties to set - * @returns HSMCurrency instance - */ - public static create(properties?: proto.IHSMCurrency): proto.HSMCurrency; - - /** - * Encodes the specified HSMCurrency message. Does not implicitly {@link proto.HSMCurrency.verify|verify} messages. - * @param message HSMCurrency message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IHSMCurrency, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HSMCurrency message, length delimited. Does not implicitly {@link proto.HSMCurrency.verify|verify} messages. - * @param message HSMCurrency message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IHSMCurrency, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HSMCurrency message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HSMCurrency - * @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.HSMCurrency; - - /** - * Decodes a HSMCurrency message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HSMCurrency - * @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.HSMCurrency; - - /** - * Verifies a HSMCurrency 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 HSMCurrency message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HSMCurrency - */ - public static fromObject(object: { [k: string]: any }): proto.HSMCurrency; - - /** - * Creates a plain object from a HSMCurrency message. Also converts values to other types if specified. - * @param message HSMCurrency - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.HSMCurrency, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HSMCurrency to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a HSMDateTime. */ - interface IHSMDateTime { - - /** HSMDateTime component */ - component?: (proto.IHSMDateTimeComponent|null); - - /** HSMDateTime unixEpoch */ - unixEpoch?: (proto.IHSMDateTimeUnixEpoch|null); - } - - /** Represents a HSMDateTime. */ - class HSMDateTime implements IHSMDateTime { - - /** - * Constructs a new HSMDateTime. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IHSMDateTime); - - /** HSMDateTime component. */ - public component?: (proto.IHSMDateTimeComponent|null); - - /** HSMDateTime unixEpoch. */ - public unixEpoch?: (proto.IHSMDateTimeUnixEpoch|null); - - /** HSMDateTime datetimeOneof. */ - public datetimeOneof?: ("component"|"unixEpoch"); - - /** - * Creates a new HSMDateTime instance using the specified properties. - * @param [properties] Properties to set - * @returns HSMDateTime instance - */ - public static create(properties?: proto.IHSMDateTime): proto.HSMDateTime; - - /** - * Encodes the specified HSMDateTime message. Does not implicitly {@link proto.HSMDateTime.verify|verify} messages. - * @param message HSMDateTime message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IHSMDateTime, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HSMDateTime message, length delimited. Does not implicitly {@link proto.HSMDateTime.verify|verify} messages. - * @param message HSMDateTime message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IHSMDateTime, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HSMDateTime message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HSMDateTime - * @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.HSMDateTime; - - /** - * Decodes a HSMDateTime message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HSMDateTime - * @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.HSMDateTime; - - /** - * Verifies a HSMDateTime 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 HSMDateTime message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HSMDateTime - */ - public static fromObject(object: { [k: string]: any }): proto.HSMDateTime; - - /** - * Creates a plain object from a HSMDateTime message. Also converts values to other types if specified. - * @param message HSMDateTime - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.HSMDateTime, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HSMDateTime to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a HSMDateTimeComponent. */ - interface IHSMDateTimeComponent { - - /** HSMDateTimeComponent dayOfWeek */ - dayOfWeek?: (proto.HSMDateTimeComponent.HSMDateTimeComponentDayOfWeekType|null); - - /** HSMDateTimeComponent year */ - year?: (number|null); - - /** HSMDateTimeComponent month */ - month?: (number|null); - - /** HSMDateTimeComponent dayOfMonth */ - dayOfMonth?: (number|null); - - /** HSMDateTimeComponent hour */ - hour?: (number|null); - - /** HSMDateTimeComponent minute */ - minute?: (number|null); - - /** HSMDateTimeComponent calendar */ - calendar?: (proto.HSMDateTimeComponent.HSMDateTimeComponentCalendarType|null); - } - - /** Represents a HSMDateTimeComponent. */ - class HSMDateTimeComponent implements IHSMDateTimeComponent { - - /** - * Constructs a new HSMDateTimeComponent. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IHSMDateTimeComponent); - - /** HSMDateTimeComponent dayOfWeek. */ - public dayOfWeek: proto.HSMDateTimeComponent.HSMDateTimeComponentDayOfWeekType; - - /** HSMDateTimeComponent year. */ - public year: number; - - /** HSMDateTimeComponent month. */ - public month: number; - - /** HSMDateTimeComponent dayOfMonth. */ - public dayOfMonth: number; - - /** HSMDateTimeComponent hour. */ - public hour: number; - - /** HSMDateTimeComponent minute. */ - public minute: number; - - /** HSMDateTimeComponent calendar. */ - public calendar: proto.HSMDateTimeComponent.HSMDateTimeComponentCalendarType; - - /** - * Creates a new HSMDateTimeComponent instance using the specified properties. - * @param [properties] Properties to set - * @returns HSMDateTimeComponent instance - */ - public static create(properties?: proto.IHSMDateTimeComponent): proto.HSMDateTimeComponent; - - /** - * Encodes the specified HSMDateTimeComponent message. Does not implicitly {@link proto.HSMDateTimeComponent.verify|verify} messages. - * @param message HSMDateTimeComponent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IHSMDateTimeComponent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HSMDateTimeComponent message, length delimited. Does not implicitly {@link proto.HSMDateTimeComponent.verify|verify} messages. - * @param message HSMDateTimeComponent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IHSMDateTimeComponent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HSMDateTimeComponent message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HSMDateTimeComponent - * @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.HSMDateTimeComponent; - - /** - * Decodes a HSMDateTimeComponent message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HSMDateTimeComponent - * @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.HSMDateTimeComponent; - - /** - * Verifies a HSMDateTimeComponent 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 HSMDateTimeComponent message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HSMDateTimeComponent - */ - public static fromObject(object: { [k: string]: any }): proto.HSMDateTimeComponent; - - /** - * Creates a plain object from a HSMDateTimeComponent message. Also converts values to other types if specified. - * @param message HSMDateTimeComponent - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.HSMDateTimeComponent, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HSMDateTimeComponent to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace HSMDateTimeComponent { - - /** HSMDateTimeComponentDayOfWeekType enum. */ - enum HSMDateTimeComponentDayOfWeekType { - MONDAY = 1, - TUESDAY = 2, - WEDNESDAY = 3, - THURSDAY = 4, - FRIDAY = 5, - SATURDAY = 6, - SUNDAY = 7 - } - - /** HSMDateTimeComponentCalendarType enum. */ - enum HSMDateTimeComponentCalendarType { - GREGORIAN = 1, - SOLAR_HIJRI = 2 - } - } - - /** Properties of a HSMDateTimeUnixEpoch. */ - interface IHSMDateTimeUnixEpoch { - - /** HSMDateTimeUnixEpoch timestamp */ - timestamp?: (number|Long|null); - } - - /** Represents a HSMDateTimeUnixEpoch. */ - class HSMDateTimeUnixEpoch implements IHSMDateTimeUnixEpoch { - - /** - * Constructs a new HSMDateTimeUnixEpoch. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IHSMDateTimeUnixEpoch); - - /** HSMDateTimeUnixEpoch timestamp. */ - public timestamp: (number|Long); - - /** - * Creates a new HSMDateTimeUnixEpoch instance using the specified properties. - * @param [properties] Properties to set - * @returns HSMDateTimeUnixEpoch instance - */ - public static create(properties?: proto.IHSMDateTimeUnixEpoch): proto.HSMDateTimeUnixEpoch; - - /** - * Encodes the specified HSMDateTimeUnixEpoch message. Does not implicitly {@link proto.HSMDateTimeUnixEpoch.verify|verify} messages. - * @param message HSMDateTimeUnixEpoch message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IHSMDateTimeUnixEpoch, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HSMDateTimeUnixEpoch message, length delimited. Does not implicitly {@link proto.HSMDateTimeUnixEpoch.verify|verify} messages. - * @param message HSMDateTimeUnixEpoch message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IHSMDateTimeUnixEpoch, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HSMDateTimeUnixEpoch message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HSMDateTimeUnixEpoch - * @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.HSMDateTimeUnixEpoch; - - /** - * Decodes a HSMDateTimeUnixEpoch message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HSMDateTimeUnixEpoch - * @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.HSMDateTimeUnixEpoch; - - /** - * Verifies a HSMDateTimeUnixEpoch 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 HSMDateTimeUnixEpoch message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HSMDateTimeUnixEpoch - */ - public static fromObject(object: { [k: string]: any }): proto.HSMDateTimeUnixEpoch; - - /** - * Creates a plain object from a HSMDateTimeUnixEpoch message. Also converts values to other types if specified. - * @param message HSMDateTimeUnixEpoch - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.HSMDateTimeUnixEpoch, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HSMDateTimeUnixEpoch to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a HSMLocalizableParameter. */ - interface IHSMLocalizableParameter { - - /** HSMLocalizableParameter default */ - "default"?: (string|null); - - /** HSMLocalizableParameter currency */ - currency?: (proto.IHSMCurrency|null); - - /** HSMLocalizableParameter dateTime */ - dateTime?: (proto.IHSMDateTime|null); - } - - /** Represents a HSMLocalizableParameter. */ - class HSMLocalizableParameter implements IHSMLocalizableParameter { - - /** - * Constructs a new HSMLocalizableParameter. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IHSMLocalizableParameter); - - /** HSMLocalizableParameter default. */ - public default: string; - - /** HSMLocalizableParameter currency. */ - public currency?: (proto.IHSMCurrency|null); - - /** HSMLocalizableParameter dateTime. */ - public dateTime?: (proto.IHSMDateTime|null); - - /** HSMLocalizableParameter paramOneof. */ - public paramOneof?: ("currency"|"dateTime"); - - /** - * Creates a new HSMLocalizableParameter instance using the specified properties. - * @param [properties] Properties to set - * @returns HSMLocalizableParameter instance - */ - public static create(properties?: proto.IHSMLocalizableParameter): proto.HSMLocalizableParameter; - - /** - * Encodes the specified HSMLocalizableParameter message. Does not implicitly {@link proto.HSMLocalizableParameter.verify|verify} messages. - * @param message HSMLocalizableParameter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IHSMLocalizableParameter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HSMLocalizableParameter message, length delimited. Does not implicitly {@link proto.HSMLocalizableParameter.verify|verify} messages. - * @param message HSMLocalizableParameter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IHSMLocalizableParameter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HSMLocalizableParameter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HSMLocalizableParameter - * @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.HSMLocalizableParameter; - - /** - * Decodes a HSMLocalizableParameter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HSMLocalizableParameter - * @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.HSMLocalizableParameter; - - /** - * Verifies a HSMLocalizableParameter 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 HSMLocalizableParameter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HSMLocalizableParameter - */ - public static fromObject(object: { [k: string]: any }): proto.HSMLocalizableParameter; - - /** - * Creates a plain object from a HSMLocalizableParameter message. Also converts values to other types if specified. - * @param message HSMLocalizableParameter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.HSMLocalizableParameter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HSMLocalizableParameter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - /** Properties of a HandshakeMessage. */ interface IHandshakeMessage { /** HandshakeMessage clientHello */ - clientHello?: (proto.IClientHello|null); + clientHello?: (proto.HandshakeMessage.IClientHello|null); /** HandshakeMessage serverHello */ - serverHello?: (proto.IServerHello|null); + serverHello?: (proto.HandshakeMessage.IServerHello|null); /** HandshakeMessage clientFinish */ - clientFinish?: (proto.IClientFinish|null); + clientFinish?: (proto.HandshakeMessage.IClientFinish|null); } /** Represents a HandshakeMessage. */ @@ -8744,13 +4603,13 @@ export namespace proto { constructor(properties?: proto.IHandshakeMessage); /** HandshakeMessage clientHello. */ - public clientHello?: (proto.IClientHello|null); + public clientHello?: (proto.HandshakeMessage.IClientHello|null); /** HandshakeMessage serverHello. */ - public serverHello?: (proto.IServerHello|null); + public serverHello?: (proto.HandshakeMessage.IServerHello|null); /** HandshakeMessage clientFinish. */ - public clientFinish?: (proto.IClientFinish|null); + public clientFinish?: (proto.HandshakeMessage.IClientFinish|null); /** * Creates a new HandshakeMessage instance using the specified properties. @@ -8823,278 +4682,314 @@ export namespace proto { public toJSON(): { [k: string]: any }; } - /** Properties of a Header. */ - interface IHeader { + namespace HandshakeMessage { - /** Header title */ - title?: (string|null); + /** Properties of a ClientFinish. */ + interface IClientFinish { - /** Header subtitle */ - subtitle?: (string|null); + /** ClientFinish static */ + "static"?: (Uint8Array|null); - /** Header hasMediaAttachment */ - hasMediaAttachment?: (boolean|null); + /** ClientFinish payload */ + payload?: (Uint8Array|null); + } - /** Header documentMessage */ - documentMessage?: (proto.IDocumentMessage|null); + /** Represents a ClientFinish. */ + class ClientFinish implements IClientFinish { - /** Header imageMessage */ - imageMessage?: (proto.IImageMessage|null); + /** + * Constructs a new ClientFinish. + * @param [properties] Properties to set + */ + constructor(properties?: proto.HandshakeMessage.IClientFinish); - /** Header jpegThumbnail */ - jpegThumbnail?: (Uint8Array|null); + /** ClientFinish static. */ + public static: Uint8Array; - /** Header videoMessage */ - videoMessage?: (proto.IVideoMessage|null); - } + /** ClientFinish payload. */ + public payload: Uint8Array; - /** Represents a Header. */ - class Header implements IHeader { + /** + * Creates a new ClientFinish instance using the specified properties. + * @param [properties] Properties to set + * @returns ClientFinish instance + */ + public static create(properties?: proto.HandshakeMessage.IClientFinish): proto.HandshakeMessage.ClientFinish; - /** - * Constructs a new Header. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IHeader); + /** + * Encodes the specified ClientFinish message. Does not implicitly {@link proto.HandshakeMessage.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.HandshakeMessage.IClientFinish, writer?: $protobuf.Writer): $protobuf.Writer; - /** Header title. */ - public title: string; + /** + * Encodes the specified ClientFinish message, length delimited. Does not implicitly {@link proto.HandshakeMessage.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.HandshakeMessage.IClientFinish, writer?: $protobuf.Writer): $protobuf.Writer; - /** Header subtitle. */ - public subtitle: string; + /** + * 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.HandshakeMessage.ClientFinish; - /** Header hasMediaAttachment. */ - public hasMediaAttachment: boolean; + /** + * 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.HandshakeMessage.ClientFinish; - /** Header documentMessage. */ - public documentMessage?: (proto.IDocumentMessage|null); + /** + * 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); - /** Header imageMessage. */ - public imageMessage?: (proto.IImageMessage|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.HandshakeMessage.ClientFinish; - /** Header jpegThumbnail. */ - public jpegThumbnail?: (Uint8Array|null); + /** + * 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.HandshakeMessage.ClientFinish, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Header videoMessage. */ - public videoMessage?: (proto.IVideoMessage|null); + /** + * Converts this ClientFinish to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Header media. */ - public media?: ("documentMessage"|"imageMessage"|"jpegThumbnail"|"videoMessage"); + /** Properties of a ClientHello. */ + interface IClientHello { - /** - * 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; + /** ClientHello ephemeral */ + ephemeral?: (Uint8Array|null); - /** - * 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; + /** ClientHello static */ + "static"?: (Uint8Array|null); - /** - * 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; + /** ClientHello payload */ + payload?: (Uint8Array|null); + } - /** - * 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; + /** Represents a ClientHello. */ + class ClientHello implements IClientHello { - /** - * 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; + /** + * Constructs a new ClientHello. + * @param [properties] Properties to set + */ + constructor(properties?: proto.HandshakeMessage.IClientHello); - /** - * 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); + /** ClientHello ephemeral. */ + public ephemeral: Uint8Array; - /** - * 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; + /** ClientHello static. */ + public static: Uint8Array; - /** - * 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 }; + /** ClientHello payload. */ + public payload: Uint8Array; - /** - * Converts this Header to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a new ClientHello instance using the specified properties. + * @param [properties] Properties to set + * @returns ClientHello instance + */ + public static create(properties?: proto.HandshakeMessage.IClientHello): proto.HandshakeMessage.ClientHello; - /** Properties of a HighlyStructuredMessage. */ - interface IHighlyStructuredMessage { + /** + * Encodes the specified ClientHello message. Does not implicitly {@link proto.HandshakeMessage.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.HandshakeMessage.IClientHello, writer?: $protobuf.Writer): $protobuf.Writer; - /** HighlyStructuredMessage namespace */ - namespace?: (string|null); + /** + * Encodes the specified ClientHello message, length delimited. Does not implicitly {@link proto.HandshakeMessage.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.HandshakeMessage.IClientHello, writer?: $protobuf.Writer): $protobuf.Writer; - /** HighlyStructuredMessage elementName */ - elementName?: (string|null); + /** + * 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.HandshakeMessage.ClientHello; - /** HighlyStructuredMessage params */ - params?: (string[]|null); + /** + * 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.HandshakeMessage.ClientHello; - /** HighlyStructuredMessage fallbackLg */ - fallbackLg?: (string|null); + /** + * 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); - /** HighlyStructuredMessage fallbackLc */ - fallbackLc?: (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.HandshakeMessage.ClientHello; - /** HighlyStructuredMessage localizableParams */ - localizableParams?: (proto.IHSMLocalizableParameter[]|null); + /** + * 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.HandshakeMessage.ClientHello, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** HighlyStructuredMessage deterministicLg */ - deterministicLg?: (string|null); + /** + * Converts this ClientHello to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** HighlyStructuredMessage deterministicLc */ - deterministicLc?: (string|null); + /** Properties of a ServerHello. */ + interface IServerHello { - /** HighlyStructuredMessage hydratedHsm */ - hydratedHsm?: (proto.ITemplateMessage|null); - } + /** ServerHello ephemeral */ + ephemeral?: (Uint8Array|null); - /** Represents a HighlyStructuredMessage. */ - class HighlyStructuredMessage implements IHighlyStructuredMessage { + /** ServerHello static */ + "static"?: (Uint8Array|null); - /** - * Constructs a new HighlyStructuredMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IHighlyStructuredMessage); + /** ServerHello payload */ + payload?: (Uint8Array|null); + } - /** HighlyStructuredMessage namespace. */ - public namespace: string; + /** Represents a ServerHello. */ + class ServerHello implements IServerHello { - /** HighlyStructuredMessage elementName. */ - public elementName: string; + /** + * Constructs a new ServerHello. + * @param [properties] Properties to set + */ + constructor(properties?: proto.HandshakeMessage.IServerHello); - /** HighlyStructuredMessage params. */ - public params: string[]; + /** ServerHello ephemeral. */ + public ephemeral: Uint8Array; - /** HighlyStructuredMessage fallbackLg. */ - public fallbackLg: string; + /** ServerHello static. */ + public static: Uint8Array; - /** HighlyStructuredMessage fallbackLc. */ - public fallbackLc: string; + /** ServerHello payload. */ + public payload: Uint8Array; - /** HighlyStructuredMessage localizableParams. */ - public localizableParams: proto.IHSMLocalizableParameter[]; + /** + * Creates a new ServerHello instance using the specified properties. + * @param [properties] Properties to set + * @returns ServerHello instance + */ + public static create(properties?: proto.HandshakeMessage.IServerHello): proto.HandshakeMessage.ServerHello; - /** HighlyStructuredMessage deterministicLg. */ - public deterministicLg: string; + /** + * Encodes the specified ServerHello message. Does not implicitly {@link proto.HandshakeMessage.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.HandshakeMessage.IServerHello, writer?: $protobuf.Writer): $protobuf.Writer; - /** HighlyStructuredMessage deterministicLc. */ - public deterministicLc: string; + /** + * Encodes the specified ServerHello message, length delimited. Does not implicitly {@link proto.HandshakeMessage.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.HandshakeMessage.IServerHello, writer?: $protobuf.Writer): $protobuf.Writer; - /** HighlyStructuredMessage hydratedHsm. */ - public hydratedHsm?: (proto.ITemplateMessage|null); + /** + * 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.HandshakeMessage.ServerHello; - /** - * 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; + /** + * 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.HandshakeMessage.ServerHello; - /** - * 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; + /** + * 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); - /** - * 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; + /** + * 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.HandshakeMessage.ServerHello; - /** - * 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; + /** + * 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.HandshakeMessage.ServerHello, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * 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 }; + /** + * Converts this ServerHello to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } /** Properties of a HistorySync. */ interface IHistorySync { /** HistorySync syncType */ - syncType: proto.HistorySync.HistorySyncHistorySyncType; + syncType: proto.HistorySync.HistorySyncType; /** HistorySync conversations */ conversations?: (proto.IConversation[]|null); @@ -9119,6 +5014,12 @@ export namespace proto { /** HistorySync threadDsTimeframeOffset */ threadDsTimeframeOffset?: (number|null); + + /** HistorySync recentStickers */ + recentStickers?: (proto.IStickerMetadata[]|null); + + /** HistorySync pastParticipants */ + pastParticipants?: (proto.IPastParticipants[]|null); } /** Represents a HistorySync. */ @@ -9131,7 +5032,7 @@ export namespace proto { constructor(properties?: proto.IHistorySync); /** HistorySync syncType. */ - public syncType: proto.HistorySync.HistorySyncHistorySyncType; + public syncType: proto.HistorySync.HistorySyncType; /** HistorySync conversations. */ public conversations: proto.IConversation[]; @@ -9157,6 +5058,12 @@ export namespace proto { /** HistorySync threadDsTimeframeOffset. */ public threadDsTimeframeOffset: number; + /** HistorySync recentStickers. */ + public recentStickers: proto.IStickerMetadata[]; + + /** HistorySync pastParticipants. */ + public pastParticipants: proto.IPastParticipants[]; + /** * Creates a new HistorySync instance using the specified properties. * @param [properties] Properties to set @@ -9230,13 +5137,14 @@ export namespace proto { namespace HistorySync { - /** HistorySyncHistorySyncType enum. */ - enum HistorySyncHistorySyncType { + /** HistorySyncType enum. */ + enum HistorySyncType { INITIAL_BOOTSTRAP = 0, INITIAL_STATUS_V3 = 1, FULL = 2, RECENT = 3, - PUSH_NAME = 4 + PUSH_NAME = 4, + UNBLOCKING_DATA = 5 } } @@ -9336,483 +5244,6 @@ export namespace proto { 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 { - - /** HydratedCallButton displayText */ - displayText?: (string|null); - - /** HydratedCallButton phoneNumber */ - phoneNumber?: (string|null); - } - - /** Represents a HydratedCallButton. */ - class HydratedCallButton implements IHydratedCallButton { - - /** - * Constructs a new HydratedCallButton. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IHydratedCallButton); - - /** HydratedCallButton displayText. */ - public displayText: string; - - /** HydratedCallButton phoneNumber. */ - public phoneNumber: string; - - /** - * Creates a new HydratedCallButton instance using the specified properties. - * @param [properties] Properties to set - * @returns HydratedCallButton instance - */ - public static create(properties?: proto.IHydratedCallButton): proto.HydratedCallButton; - - /** - * Encodes the specified HydratedCallButton message. Does not implicitly {@link proto.HydratedCallButton.verify|verify} messages. - * @param message HydratedCallButton message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IHydratedCallButton, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HydratedCallButton message, length delimited. Does not implicitly {@link proto.HydratedCallButton.verify|verify} messages. - * @param message HydratedCallButton message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IHydratedCallButton, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HydratedCallButton message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HydratedCallButton - * @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.HydratedCallButton; - - /** - * Decodes a HydratedCallButton message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HydratedCallButton - * @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.HydratedCallButton; - - /** - * Verifies a HydratedCallButton 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 HydratedCallButton message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HydratedCallButton - */ - public static fromObject(object: { [k: string]: any }): proto.HydratedCallButton; - - /** - * Creates a plain object from a HydratedCallButton message. Also converts values to other types if specified. - * @param message HydratedCallButton - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.HydratedCallButton, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HydratedCallButton to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a HydratedFourRowTemplate. */ - interface IHydratedFourRowTemplate { - - /** HydratedFourRowTemplate hydratedContentText */ - hydratedContentText?: (string|null); - - /** HydratedFourRowTemplate hydratedFooterText */ - hydratedFooterText?: (string|null); - - /** HydratedFourRowTemplate hydratedButtons */ - hydratedButtons?: (proto.IHydratedTemplateButton[]|null); - - /** HydratedFourRowTemplate templateId */ - templateId?: (string|null); - - /** HydratedFourRowTemplate documentMessage */ - documentMessage?: (proto.IDocumentMessage|null); - - /** HydratedFourRowTemplate hydratedTitleText */ - hydratedTitleText?: (string|null); - - /** HydratedFourRowTemplate imageMessage */ - imageMessage?: (proto.IImageMessage|null); - - /** HydratedFourRowTemplate videoMessage */ - videoMessage?: (proto.IVideoMessage|null); - - /** HydratedFourRowTemplate locationMessage */ - locationMessage?: (proto.ILocationMessage|null); - } - - /** Represents a HydratedFourRowTemplate. */ - class HydratedFourRowTemplate implements IHydratedFourRowTemplate { - - /** - * Constructs a new HydratedFourRowTemplate. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IHydratedFourRowTemplate); - - /** HydratedFourRowTemplate hydratedContentText. */ - public hydratedContentText: string; - - /** HydratedFourRowTemplate hydratedFooterText. */ - public hydratedFooterText: string; - - /** HydratedFourRowTemplate hydratedButtons. */ - public hydratedButtons: proto.IHydratedTemplateButton[]; - - /** HydratedFourRowTemplate templateId. */ - public templateId: string; - - /** HydratedFourRowTemplate documentMessage. */ - public documentMessage?: (proto.IDocumentMessage|null); - - /** HydratedFourRowTemplate hydratedTitleText. */ - public hydratedTitleText?: (string|null); - - /** HydratedFourRowTemplate imageMessage. */ - public imageMessage?: (proto.IImageMessage|null); - - /** HydratedFourRowTemplate videoMessage. */ - public videoMessage?: (proto.IVideoMessage|null); - - /** HydratedFourRowTemplate locationMessage. */ - public locationMessage?: (proto.ILocationMessage|null); - - /** HydratedFourRowTemplate title. */ - public title?: ("documentMessage"|"hydratedTitleText"|"imageMessage"|"videoMessage"|"locationMessage"); - - /** - * Creates a new HydratedFourRowTemplate instance using the specified properties. - * @param [properties] Properties to set - * @returns HydratedFourRowTemplate instance - */ - public static create(properties?: proto.IHydratedFourRowTemplate): proto.HydratedFourRowTemplate; - - /** - * Encodes the specified HydratedFourRowTemplate message. Does not implicitly {@link proto.HydratedFourRowTemplate.verify|verify} messages. - * @param message HydratedFourRowTemplate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IHydratedFourRowTemplate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HydratedFourRowTemplate message, length delimited. Does not implicitly {@link proto.HydratedFourRowTemplate.verify|verify} messages. - * @param message HydratedFourRowTemplate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IHydratedFourRowTemplate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HydratedFourRowTemplate message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HydratedFourRowTemplate - * @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.HydratedFourRowTemplate; - - /** - * Decodes a HydratedFourRowTemplate message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HydratedFourRowTemplate - * @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.HydratedFourRowTemplate; - - /** - * Verifies a HydratedFourRowTemplate 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 HydratedFourRowTemplate message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HydratedFourRowTemplate - */ - public static fromObject(object: { [k: string]: any }): proto.HydratedFourRowTemplate; - - /** - * Creates a plain object from a HydratedFourRowTemplate message. Also converts values to other types if specified. - * @param message HydratedFourRowTemplate - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.HydratedFourRowTemplate, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HydratedFourRowTemplate to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a HydratedQuickReplyButton. */ - interface IHydratedQuickReplyButton { - - /** HydratedQuickReplyButton displayText */ - displayText?: (string|null); - - /** HydratedQuickReplyButton id */ - id?: (string|null); - } - - /** Represents a HydratedQuickReplyButton. */ - class HydratedQuickReplyButton implements IHydratedQuickReplyButton { - - /** - * Constructs a new HydratedQuickReplyButton. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IHydratedQuickReplyButton); - - /** HydratedQuickReplyButton displayText. */ - public displayText: string; - - /** HydratedQuickReplyButton id. */ - public id: string; - - /** - * Creates a new HydratedQuickReplyButton instance using the specified properties. - * @param [properties] Properties to set - * @returns HydratedQuickReplyButton instance - */ - public static create(properties?: proto.IHydratedQuickReplyButton): proto.HydratedQuickReplyButton; - - /** - * Encodes the specified HydratedQuickReplyButton message. Does not implicitly {@link proto.HydratedQuickReplyButton.verify|verify} messages. - * @param message HydratedQuickReplyButton message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IHydratedQuickReplyButton, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HydratedQuickReplyButton message, length delimited. Does not implicitly {@link proto.HydratedQuickReplyButton.verify|verify} messages. - * @param message HydratedQuickReplyButton message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IHydratedQuickReplyButton, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HydratedQuickReplyButton message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HydratedQuickReplyButton - * @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.HydratedQuickReplyButton; - - /** - * Decodes a HydratedQuickReplyButton message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HydratedQuickReplyButton - * @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.HydratedQuickReplyButton; - - /** - * Verifies a HydratedQuickReplyButton 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 HydratedQuickReplyButton message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HydratedQuickReplyButton - */ - public static fromObject(object: { [k: string]: any }): proto.HydratedQuickReplyButton; - - /** - * Creates a plain object from a HydratedQuickReplyButton message. Also converts values to other types if specified. - * @param message HydratedQuickReplyButton - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.HydratedQuickReplyButton, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HydratedQuickReplyButton to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - /** Properties of a HydratedTemplateButton. */ interface IHydratedTemplateButton { @@ -9820,13 +5251,13 @@ export namespace proto { index?: (number|null); /** HydratedTemplateButton quickReplyButton */ - quickReplyButton?: (proto.IHydratedQuickReplyButton|null); + quickReplyButton?: (proto.HydratedTemplateButton.IHydratedQuickReplyButton|null); /** HydratedTemplateButton urlButton */ - urlButton?: (proto.IHydratedURLButton|null); + urlButton?: (proto.HydratedTemplateButton.IHydratedURLButton|null); /** HydratedTemplateButton callButton */ - callButton?: (proto.IHydratedCallButton|null); + callButton?: (proto.HydratedTemplateButton.IHydratedCallButton|null); } /** Represents a HydratedTemplateButton. */ @@ -9842,13 +5273,13 @@ export namespace proto { public index: number; /** HydratedTemplateButton quickReplyButton. */ - public quickReplyButton?: (proto.IHydratedQuickReplyButton|null); + public quickReplyButton?: (proto.HydratedTemplateButton.IHydratedQuickReplyButton|null); /** HydratedTemplateButton urlButton. */ - public urlButton?: (proto.IHydratedURLButton|null); + public urlButton?: (proto.HydratedTemplateButton.IHydratedURLButton|null); /** HydratedTemplateButton callButton. */ - public callButton?: (proto.IHydratedCallButton|null); + public callButton?: (proto.HydratedTemplateButton.IHydratedCallButton|null); /** HydratedTemplateButton hydratedButton. */ public hydratedButton?: ("quickReplyButton"|"urlButton"|"callButton"); @@ -9924,100 +5355,295 @@ export namespace proto { public toJSON(): { [k: string]: any }; } - /** Properties of a HydratedURLButton. */ - interface IHydratedURLButton { + namespace HydratedTemplateButton { - /** HydratedURLButton displayText */ - displayText?: (string|null); + /** Properties of a HydratedCallButton. */ + interface IHydratedCallButton { - /** HydratedURLButton url */ - url?: (string|null); - } + /** HydratedCallButton displayText */ + displayText?: (string|null); - /** Represents a HydratedURLButton. */ - class HydratedURLButton implements IHydratedURLButton { + /** HydratedCallButton phoneNumber */ + phoneNumber?: (string|null); + } - /** - * Constructs a new HydratedURLButton. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IHydratedURLButton); + /** Represents a HydratedCallButton. */ + class HydratedCallButton implements IHydratedCallButton { - /** HydratedURLButton displayText. */ - public displayText: string; + /** + * Constructs a new HydratedCallButton. + * @param [properties] Properties to set + */ + constructor(properties?: proto.HydratedTemplateButton.IHydratedCallButton); - /** HydratedURLButton url. */ - public url: string; + /** HydratedCallButton displayText. */ + public displayText: string; - /** - * Creates a new HydratedURLButton instance using the specified properties. - * @param [properties] Properties to set - * @returns HydratedURLButton instance - */ - public static create(properties?: proto.IHydratedURLButton): proto.HydratedURLButton; + /** HydratedCallButton phoneNumber. */ + public phoneNumber: string; - /** - * Encodes the specified HydratedURLButton message. Does not implicitly {@link proto.HydratedURLButton.verify|verify} messages. - * @param message HydratedURLButton message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IHydratedURLButton, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new HydratedCallButton instance using the specified properties. + * @param [properties] Properties to set + * @returns HydratedCallButton instance + */ + public static create(properties?: proto.HydratedTemplateButton.IHydratedCallButton): proto.HydratedTemplateButton.HydratedCallButton; - /** - * Encodes the specified HydratedURLButton message, length delimited. Does not implicitly {@link proto.HydratedURLButton.verify|verify} messages. - * @param message HydratedURLButton message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IHydratedURLButton, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified HydratedCallButton message. Does not implicitly {@link proto.HydratedTemplateButton.HydratedCallButton.verify|verify} messages. + * @param message HydratedCallButton message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.HydratedTemplateButton.IHydratedCallButton, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a HydratedURLButton message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HydratedURLButton - * @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.HydratedURLButton; + /** + * Encodes the specified HydratedCallButton message, length delimited. Does not implicitly {@link proto.HydratedTemplateButton.HydratedCallButton.verify|verify} messages. + * @param message HydratedCallButton message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.HydratedTemplateButton.IHydratedCallButton, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a HydratedURLButton message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HydratedURLButton - * @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.HydratedURLButton; + /** + * Decodes a HydratedCallButton message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HydratedCallButton + * @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.HydratedTemplateButton.HydratedCallButton; - /** - * Verifies a HydratedURLButton 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); + /** + * Decodes a HydratedCallButton message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HydratedCallButton + * @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.HydratedTemplateButton.HydratedCallButton; - /** - * Creates a HydratedURLButton message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HydratedURLButton - */ - public static fromObject(object: { [k: string]: any }): proto.HydratedURLButton; + /** + * Verifies a HydratedCallButton 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 plain object from a HydratedURLButton message. Also converts values to other types if specified. - * @param message HydratedURLButton - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.HydratedURLButton, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a HydratedCallButton message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HydratedCallButton + */ + public static fromObject(object: { [k: string]: any }): proto.HydratedTemplateButton.HydratedCallButton; - /** - * Converts this HydratedURLButton to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a plain object from a HydratedCallButton message. Also converts values to other types if specified. + * @param message HydratedCallButton + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.HydratedTemplateButton.HydratedCallButton, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HydratedCallButton to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HydratedQuickReplyButton. */ + interface IHydratedQuickReplyButton { + + /** HydratedQuickReplyButton displayText */ + displayText?: (string|null); + + /** HydratedQuickReplyButton id */ + id?: (string|null); + } + + /** Represents a HydratedQuickReplyButton. */ + class HydratedQuickReplyButton implements IHydratedQuickReplyButton { + + /** + * Constructs a new HydratedQuickReplyButton. + * @param [properties] Properties to set + */ + constructor(properties?: proto.HydratedTemplateButton.IHydratedQuickReplyButton); + + /** HydratedQuickReplyButton displayText. */ + public displayText: string; + + /** HydratedQuickReplyButton id. */ + public id: string; + + /** + * Creates a new HydratedQuickReplyButton instance using the specified properties. + * @param [properties] Properties to set + * @returns HydratedQuickReplyButton instance + */ + public static create(properties?: proto.HydratedTemplateButton.IHydratedQuickReplyButton): proto.HydratedTemplateButton.HydratedQuickReplyButton; + + /** + * Encodes the specified HydratedQuickReplyButton message. Does not implicitly {@link proto.HydratedTemplateButton.HydratedQuickReplyButton.verify|verify} messages. + * @param message HydratedQuickReplyButton message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.HydratedTemplateButton.IHydratedQuickReplyButton, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HydratedQuickReplyButton message, length delimited. Does not implicitly {@link proto.HydratedTemplateButton.HydratedQuickReplyButton.verify|verify} messages. + * @param message HydratedQuickReplyButton message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.HydratedTemplateButton.IHydratedQuickReplyButton, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HydratedQuickReplyButton message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HydratedQuickReplyButton + * @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.HydratedTemplateButton.HydratedQuickReplyButton; + + /** + * Decodes a HydratedQuickReplyButton message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HydratedQuickReplyButton + * @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.HydratedTemplateButton.HydratedQuickReplyButton; + + /** + * Verifies a HydratedQuickReplyButton 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 HydratedQuickReplyButton message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HydratedQuickReplyButton + */ + public static fromObject(object: { [k: string]: any }): proto.HydratedTemplateButton.HydratedQuickReplyButton; + + /** + * Creates a plain object from a HydratedQuickReplyButton message. Also converts values to other types if specified. + * @param message HydratedQuickReplyButton + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.HydratedTemplateButton.HydratedQuickReplyButton, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HydratedQuickReplyButton to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HydratedURLButton. */ + interface IHydratedURLButton { + + /** HydratedURLButton displayText */ + displayText?: (string|null); + + /** HydratedURLButton url */ + url?: (string|null); + } + + /** Represents a HydratedURLButton. */ + class HydratedURLButton implements IHydratedURLButton { + + /** + * Constructs a new HydratedURLButton. + * @param [properties] Properties to set + */ + constructor(properties?: proto.HydratedTemplateButton.IHydratedURLButton); + + /** HydratedURLButton displayText. */ + public displayText: string; + + /** HydratedURLButton url. */ + public url: string; + + /** + * Creates a new HydratedURLButton instance using the specified properties. + * @param [properties] Properties to set + * @returns HydratedURLButton instance + */ + public static create(properties?: proto.HydratedTemplateButton.IHydratedURLButton): proto.HydratedTemplateButton.HydratedURLButton; + + /** + * Encodes the specified HydratedURLButton message. Does not implicitly {@link proto.HydratedTemplateButton.HydratedURLButton.verify|verify} messages. + * @param message HydratedURLButton message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.HydratedTemplateButton.IHydratedURLButton, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HydratedURLButton message, length delimited. Does not implicitly {@link proto.HydratedTemplateButton.HydratedURLButton.verify|verify} messages. + * @param message HydratedURLButton message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.HydratedTemplateButton.IHydratedURLButton, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HydratedURLButton message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HydratedURLButton + * @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.HydratedTemplateButton.HydratedURLButton; + + /** + * Decodes a HydratedURLButton message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HydratedURLButton + * @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.HydratedTemplateButton.HydratedURLButton; + + /** + * Verifies a HydratedURLButton 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 HydratedURLButton message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HydratedURLButton + */ + public static fromObject(object: { [k: string]: any }): proto.HydratedTemplateButton.HydratedURLButton; + + /** + * Creates a plain object from a HydratedURLButton message. Also converts values to other types if specified. + * @param message HydratedURLButton + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.HydratedTemplateButton.HydratedURLButton, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HydratedURLButton to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } /** Properties of an IdentityKeyPairStructure. */ @@ -10116,336 +5742,6 @@ export namespace proto { public toJSON(): { [k: string]: any }; } - /** Properties of an ImageMessage. */ - interface IImageMessage { - - /** ImageMessage url */ - url?: (string|null); - - /** ImageMessage mimetype */ - mimetype?: (string|null); - - /** ImageMessage caption */ - caption?: (string|null); - - /** ImageMessage fileSha256 */ - fileSha256?: (Uint8Array|null); - - /** ImageMessage fileLength */ - fileLength?: (number|Long|null); - - /** ImageMessage height */ - height?: (number|null); - - /** ImageMessage width */ - width?: (number|null); - - /** ImageMessage mediaKey */ - mediaKey?: (Uint8Array|null); - - /** ImageMessage fileEncSha256 */ - fileEncSha256?: (Uint8Array|null); - - /** ImageMessage interactiveAnnotations */ - interactiveAnnotations?: (proto.IInteractiveAnnotation[]|null); - - /** ImageMessage directPath */ - directPath?: (string|null); - - /** ImageMessage mediaKeyTimestamp */ - mediaKeyTimestamp?: (number|Long|null); - - /** ImageMessage jpegThumbnail */ - jpegThumbnail?: (Uint8Array|null); - - /** ImageMessage contextInfo */ - contextInfo?: (proto.IContextInfo|null); - - /** ImageMessage firstScanSidecar */ - firstScanSidecar?: (Uint8Array|null); - - /** ImageMessage firstScanLength */ - firstScanLength?: (number|null); - - /** ImageMessage experimentGroupId */ - experimentGroupId?: (number|null); - - /** ImageMessage scansSidecar */ - scansSidecar?: (Uint8Array|null); - - /** ImageMessage scanLengths */ - scanLengths?: (number[]|null); - - /** ImageMessage midQualityFileSha256 */ - midQualityFileSha256?: (Uint8Array|null); - - /** ImageMessage midQualityFileEncSha256 */ - midQualityFileEncSha256?: (Uint8Array|null); - - /** ImageMessage viewOnce */ - viewOnce?: (boolean|null); - - /** ImageMessage thumbnailDirectPath */ - thumbnailDirectPath?: (string|null); - - /** ImageMessage thumbnailSha256 */ - thumbnailSha256?: (Uint8Array|null); - - /** ImageMessage thumbnailEncSha256 */ - thumbnailEncSha256?: (Uint8Array|null); - - /** ImageMessage staticUrl */ - staticUrl?: (string|null); - } - - /** Represents an ImageMessage. */ - class ImageMessage implements IImageMessage { - - /** - * Constructs a new ImageMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IImageMessage); - - /** ImageMessage url. */ - public url: string; - - /** ImageMessage mimetype. */ - public mimetype: string; - - /** ImageMessage caption. */ - public caption: string; - - /** ImageMessage fileSha256. */ - public fileSha256: Uint8Array; - - /** ImageMessage fileLength. */ - public fileLength: (number|Long); - - /** ImageMessage height. */ - public height: number; - - /** ImageMessage width. */ - public width: number; - - /** ImageMessage mediaKey. */ - public mediaKey: Uint8Array; - - /** ImageMessage fileEncSha256. */ - public fileEncSha256: Uint8Array; - - /** ImageMessage interactiveAnnotations. */ - public interactiveAnnotations: proto.IInteractiveAnnotation[]; - - /** ImageMessage directPath. */ - public directPath: string; - - /** ImageMessage mediaKeyTimestamp. */ - public mediaKeyTimestamp: (number|Long); - - /** ImageMessage jpegThumbnail. */ - public jpegThumbnail: Uint8Array; - - /** ImageMessage contextInfo. */ - public contextInfo?: (proto.IContextInfo|null); - - /** ImageMessage firstScanSidecar. */ - public firstScanSidecar: Uint8Array; - - /** ImageMessage firstScanLength. */ - public firstScanLength: number; - - /** ImageMessage experimentGroupId. */ - public experimentGroupId: number; - - /** ImageMessage scansSidecar. */ - public scansSidecar: Uint8Array; - - /** ImageMessage scanLengths. */ - public scanLengths: number[]; - - /** ImageMessage midQualityFileSha256. */ - public midQualityFileSha256: Uint8Array; - - /** ImageMessage midQualityFileEncSha256. */ - public midQualityFileEncSha256: Uint8Array; - - /** ImageMessage viewOnce. */ - public viewOnce: boolean; - - /** ImageMessage thumbnailDirectPath. */ - public thumbnailDirectPath: string; - - /** ImageMessage thumbnailSha256. */ - public thumbnailSha256: Uint8Array; - - /** ImageMessage thumbnailEncSha256. */ - public thumbnailEncSha256: Uint8Array; - - /** ImageMessage staticUrl. */ - public staticUrl: string; - - /** - * Creates a new ImageMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns ImageMessage instance - */ - public static create(properties?: proto.IImageMessage): proto.ImageMessage; - - /** - * Encodes the specified ImageMessage message. Does not implicitly {@link proto.ImageMessage.verify|verify} messages. - * @param message ImageMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IImageMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ImageMessage message, length delimited. Does not implicitly {@link proto.ImageMessage.verify|verify} messages. - * @param message ImageMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IImageMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ImageMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ImageMessage - * @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.ImageMessage; - - /** - * Decodes an ImageMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ImageMessage - * @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.ImageMessage; - - /** - * Verifies an ImageMessage 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 ImageMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImageMessage - */ - public static fromObject(object: { [k: string]: any }): proto.ImageMessage; - - /** - * Creates a plain object from an ImageMessage message. Also converts values to other types if specified. - * @param message ImageMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.ImageMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ImageMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an InitialSecurityNotificationSettingSync. */ - interface IInitialSecurityNotificationSettingSync { - - /** InitialSecurityNotificationSettingSync securityNotificationEnabled */ - securityNotificationEnabled?: (boolean|null); - } - - /** Represents an InitialSecurityNotificationSettingSync. */ - class InitialSecurityNotificationSettingSync implements IInitialSecurityNotificationSettingSync { - - /** - * Constructs a new InitialSecurityNotificationSettingSync. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IInitialSecurityNotificationSettingSync); - - /** InitialSecurityNotificationSettingSync securityNotificationEnabled. */ - public securityNotificationEnabled: boolean; - - /** - * Creates a new InitialSecurityNotificationSettingSync instance using the specified properties. - * @param [properties] Properties to set - * @returns InitialSecurityNotificationSettingSync instance - */ - public static create(properties?: proto.IInitialSecurityNotificationSettingSync): proto.InitialSecurityNotificationSettingSync; - - /** - * Encodes the specified InitialSecurityNotificationSettingSync message. Does not implicitly {@link proto.InitialSecurityNotificationSettingSync.verify|verify} messages. - * @param message InitialSecurityNotificationSettingSync message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IInitialSecurityNotificationSettingSync, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InitialSecurityNotificationSettingSync message, length delimited. Does not implicitly {@link proto.InitialSecurityNotificationSettingSync.verify|verify} messages. - * @param message InitialSecurityNotificationSettingSync message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IInitialSecurityNotificationSettingSync, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InitialSecurityNotificationSettingSync message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InitialSecurityNotificationSettingSync - * @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.InitialSecurityNotificationSettingSync; - - /** - * Decodes an InitialSecurityNotificationSettingSync message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InitialSecurityNotificationSettingSync - * @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.InitialSecurityNotificationSettingSync; - - /** - * Verifies an InitialSecurityNotificationSettingSync 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 InitialSecurityNotificationSettingSync message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InitialSecurityNotificationSettingSync - */ - public static fromObject(object: { [k: string]: any }): proto.InitialSecurityNotificationSettingSync; - - /** - * Creates a plain object from an InitialSecurityNotificationSettingSync message. Also converts values to other types if specified. - * @param message InitialSecurityNotificationSettingSync - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.InitialSecurityNotificationSettingSync, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InitialSecurityNotificationSettingSync to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - /** Properties of an InteractiveAnnotation. */ interface IInteractiveAnnotation { @@ -10545,573 +5841,6 @@ export namespace proto { public toJSON(): { [k: string]: any }; } - /** Properties of an InteractiveMessage. */ - interface IInteractiveMessage { - - /** InteractiveMessage header */ - header?: (proto.IHeader|null); - - /** InteractiveMessage body */ - body?: (proto.IInteractiveMessageBody|null); - - /** InteractiveMessage footer */ - footer?: (proto.IFooter|null); - - /** InteractiveMessage contextInfo */ - contextInfo?: (proto.IContextInfo|null); - - /** InteractiveMessage shopStorefrontMessage */ - shopStorefrontMessage?: (proto.IShopMessage|null); - - /** InteractiveMessage collectionMessage */ - collectionMessage?: (proto.ICollectionMessage|null); - - /** InteractiveMessage nativeFlowMessage */ - nativeFlowMessage?: (proto.INativeFlowMessage|null); - } - - /** Represents an InteractiveMessage. */ - class InteractiveMessage implements IInteractiveMessage { - - /** - * Constructs a new InteractiveMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IInteractiveMessage); - - /** InteractiveMessage header. */ - public header?: (proto.IHeader|null); - - /** InteractiveMessage body. */ - public body?: (proto.IInteractiveMessageBody|null); - - /** InteractiveMessage footer. */ - public footer?: (proto.IFooter|null); - - /** InteractiveMessage contextInfo. */ - public contextInfo?: (proto.IContextInfo|null); - - /** InteractiveMessage shopStorefrontMessage. */ - public shopStorefrontMessage?: (proto.IShopMessage|null); - - /** InteractiveMessage collectionMessage. */ - public collectionMessage?: (proto.ICollectionMessage|null); - - /** InteractiveMessage nativeFlowMessage. */ - public nativeFlowMessage?: (proto.INativeFlowMessage|null); - - /** InteractiveMessage interactiveMessage. */ - public interactiveMessage?: ("shopStorefrontMessage"|"collectionMessage"|"nativeFlowMessage"); - - /** - * Creates a new InteractiveMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns InteractiveMessage instance - */ - public static create(properties?: proto.IInteractiveMessage): proto.InteractiveMessage; - - /** - * Encodes the specified InteractiveMessage message. Does not implicitly {@link proto.InteractiveMessage.verify|verify} messages. - * @param message InteractiveMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IInteractiveMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InteractiveMessage message, length delimited. Does not implicitly {@link proto.InteractiveMessage.verify|verify} messages. - * @param message InteractiveMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IInteractiveMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InteractiveMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InteractiveMessage - * @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.InteractiveMessage; - - /** - * Decodes an InteractiveMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InteractiveMessage - * @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.InteractiveMessage; - - /** - * Verifies an InteractiveMessage 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 InteractiveMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InteractiveMessage - */ - public static fromObject(object: { [k: string]: any }): proto.InteractiveMessage; - - /** - * Creates a plain object from an InteractiveMessage message. Also converts values to other types if specified. - * @param message InteractiveMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.InteractiveMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InteractiveMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an InteractiveMessageBody. */ - interface IInteractiveMessageBody { - - /** InteractiveMessageBody text */ - text?: (string|null); - } - - /** Represents an InteractiveMessageBody. */ - class InteractiveMessageBody implements IInteractiveMessageBody { - - /** - * Constructs a new InteractiveMessageBody. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IInteractiveMessageBody); - - /** InteractiveMessageBody text. */ - public text: string; - - /** - * Creates a new InteractiveMessageBody instance using the specified properties. - * @param [properties] Properties to set - * @returns InteractiveMessageBody instance - */ - public static create(properties?: proto.IInteractiveMessageBody): proto.InteractiveMessageBody; - - /** - * Encodes the specified InteractiveMessageBody message. Does not implicitly {@link proto.InteractiveMessageBody.verify|verify} messages. - * @param message InteractiveMessageBody message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IInteractiveMessageBody, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InteractiveMessageBody message, length delimited. Does not implicitly {@link proto.InteractiveMessageBody.verify|verify} messages. - * @param message InteractiveMessageBody message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IInteractiveMessageBody, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InteractiveMessageBody message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InteractiveMessageBody - * @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.InteractiveMessageBody; - - /** - * Decodes an InteractiveMessageBody message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InteractiveMessageBody - * @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.InteractiveMessageBody; - - /** - * Verifies an InteractiveMessageBody 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 InteractiveMessageBody message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InteractiveMessageBody - */ - public static fromObject(object: { [k: string]: any }): proto.InteractiveMessageBody; - - /** - * Creates a plain object from an InteractiveMessageBody message. Also converts values to other types if specified. - * @param message InteractiveMessageBody - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.InteractiveMessageBody, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InteractiveMessageBody to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an InteractiveResponseMessage. */ - interface IInteractiveResponseMessage { - - /** InteractiveResponseMessage body */ - body?: (proto.IInteractiveResponseMessageBody|null); - - /** InteractiveResponseMessage contextInfo */ - contextInfo?: (proto.IContextInfo|null); - - /** InteractiveResponseMessage nativeFlowResponseMessage */ - nativeFlowResponseMessage?: (proto.INativeFlowResponseMessage|null); - } - - /** Represents an InteractiveResponseMessage. */ - class InteractiveResponseMessage implements IInteractiveResponseMessage { - - /** - * Constructs a new InteractiveResponseMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IInteractiveResponseMessage); - - /** InteractiveResponseMessage body. */ - public body?: (proto.IInteractiveResponseMessageBody|null); - - /** InteractiveResponseMessage contextInfo. */ - public contextInfo?: (proto.IContextInfo|null); - - /** InteractiveResponseMessage nativeFlowResponseMessage. */ - public nativeFlowResponseMessage?: (proto.INativeFlowResponseMessage|null); - - /** InteractiveResponseMessage interactiveResponseMessage. */ - public interactiveResponseMessage?: "nativeFlowResponseMessage"; - - /** - * Creates a new InteractiveResponseMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns InteractiveResponseMessage instance - */ - public static create(properties?: proto.IInteractiveResponseMessage): proto.InteractiveResponseMessage; - - /** - * Encodes the specified InteractiveResponseMessage message. Does not implicitly {@link proto.InteractiveResponseMessage.verify|verify} messages. - * @param message InteractiveResponseMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IInteractiveResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InteractiveResponseMessage message, length delimited. Does not implicitly {@link proto.InteractiveResponseMessage.verify|verify} messages. - * @param message InteractiveResponseMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IInteractiveResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InteractiveResponseMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InteractiveResponseMessage - * @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.InteractiveResponseMessage; - - /** - * Decodes an InteractiveResponseMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InteractiveResponseMessage - * @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.InteractiveResponseMessage; - - /** - * Verifies an InteractiveResponseMessage 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 InteractiveResponseMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InteractiveResponseMessage - */ - public static fromObject(object: { [k: string]: any }): proto.InteractiveResponseMessage; - - /** - * Creates a plain object from an InteractiveResponseMessage message. Also converts values to other types if specified. - * @param message InteractiveResponseMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.InteractiveResponseMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InteractiveResponseMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an InteractiveResponseMessageBody. */ - interface IInteractiveResponseMessageBody { - - /** InteractiveResponseMessageBody text */ - text?: (string|null); - } - - /** Represents an InteractiveResponseMessageBody. */ - class InteractiveResponseMessageBody implements IInteractiveResponseMessageBody { - - /** - * Constructs a new InteractiveResponseMessageBody. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IInteractiveResponseMessageBody); - - /** InteractiveResponseMessageBody text. */ - public text: string; - - /** - * Creates a new InteractiveResponseMessageBody instance using the specified properties. - * @param [properties] Properties to set - * @returns InteractiveResponseMessageBody instance - */ - public static create(properties?: proto.IInteractiveResponseMessageBody): proto.InteractiveResponseMessageBody; - - /** - * Encodes the specified InteractiveResponseMessageBody message. Does not implicitly {@link proto.InteractiveResponseMessageBody.verify|verify} messages. - * @param message InteractiveResponseMessageBody message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IInteractiveResponseMessageBody, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InteractiveResponseMessageBody message, length delimited. Does not implicitly {@link proto.InteractiveResponseMessageBody.verify|verify} messages. - * @param message InteractiveResponseMessageBody message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IInteractiveResponseMessageBody, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InteractiveResponseMessageBody message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InteractiveResponseMessageBody - * @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.InteractiveResponseMessageBody; - - /** - * Decodes an InteractiveResponseMessageBody message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InteractiveResponseMessageBody - * @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.InteractiveResponseMessageBody; - - /** - * Verifies an InteractiveResponseMessageBody 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 InteractiveResponseMessageBody message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InteractiveResponseMessageBody - */ - public static fromObject(object: { [k: string]: any }): proto.InteractiveResponseMessageBody; - - /** - * Creates a plain object from an InteractiveResponseMessageBody message. Also converts values to other types if specified. - * @param message InteractiveResponseMessageBody - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.InteractiveResponseMessageBody, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InteractiveResponseMessageBody to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an InvoiceMessage. */ - interface IInvoiceMessage { - - /** InvoiceMessage note */ - note?: (string|null); - - /** InvoiceMessage token */ - token?: (string|null); - - /** InvoiceMessage attachmentType */ - attachmentType?: (proto.InvoiceMessage.InvoiceMessageAttachmentType|null); - - /** InvoiceMessage attachmentMimetype */ - attachmentMimetype?: (string|null); - - /** InvoiceMessage attachmentMediaKey */ - attachmentMediaKey?: (Uint8Array|null); - - /** InvoiceMessage attachmentMediaKeyTimestamp */ - attachmentMediaKeyTimestamp?: (number|Long|null); - - /** InvoiceMessage attachmentFileSha256 */ - attachmentFileSha256?: (Uint8Array|null); - - /** InvoiceMessage attachmentFileEncSha256 */ - attachmentFileEncSha256?: (Uint8Array|null); - - /** InvoiceMessage attachmentDirectPath */ - attachmentDirectPath?: (string|null); - - /** InvoiceMessage attachmentJpegThumbnail */ - attachmentJpegThumbnail?: (Uint8Array|null); - } - - /** Represents an InvoiceMessage. */ - class InvoiceMessage implements IInvoiceMessage { - - /** - * Constructs a new InvoiceMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IInvoiceMessage); - - /** InvoiceMessage note. */ - public note: string; - - /** InvoiceMessage token. */ - public token: string; - - /** InvoiceMessage attachmentType. */ - public attachmentType: proto.InvoiceMessage.InvoiceMessageAttachmentType; - - /** InvoiceMessage attachmentMimetype. */ - public attachmentMimetype: string; - - /** InvoiceMessage attachmentMediaKey. */ - public attachmentMediaKey: Uint8Array; - - /** InvoiceMessage attachmentMediaKeyTimestamp. */ - public attachmentMediaKeyTimestamp: (number|Long); - - /** InvoiceMessage attachmentFileSha256. */ - public attachmentFileSha256: Uint8Array; - - /** InvoiceMessage attachmentFileEncSha256. */ - public attachmentFileEncSha256: Uint8Array; - - /** InvoiceMessage attachmentDirectPath. */ - public attachmentDirectPath: string; - - /** InvoiceMessage attachmentJpegThumbnail. */ - public attachmentJpegThumbnail: Uint8Array; - - /** - * Creates a new InvoiceMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns InvoiceMessage instance - */ - public static create(properties?: proto.IInvoiceMessage): proto.InvoiceMessage; - - /** - * Encodes the specified InvoiceMessage message. Does not implicitly {@link proto.InvoiceMessage.verify|verify} messages. - * @param message InvoiceMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IInvoiceMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InvoiceMessage message, length delimited. Does not implicitly {@link proto.InvoiceMessage.verify|verify} messages. - * @param message InvoiceMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IInvoiceMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InvoiceMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InvoiceMessage - * @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.InvoiceMessage; - - /** - * Decodes an InvoiceMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InvoiceMessage - * @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.InvoiceMessage; - - /** - * Verifies an InvoiceMessage 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 InvoiceMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InvoiceMessage - */ - public static fromObject(object: { [k: string]: any }): proto.InvoiceMessage; - - /** - * Creates a plain object from an InvoiceMessage message. Also converts values to other types if specified. - * @param message InvoiceMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.InvoiceMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InvoiceMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace InvoiceMessage { - - /** InvoiceMessageAttachmentType enum. */ - enum InvoiceMessageAttachmentType { - IMAGE = 0, - PDF = 1 - } - } - /** Properties of a KeepInChat. */ interface IKeepInChat { @@ -11121,6 +5850,9 @@ export namespace proto { /** KeepInChat serverTimestamp */ serverTimestamp?: (number|Long|null); + /** KeepInChat key */ + key?: (proto.IMessageKey|null); + /** KeepInChat deviceJid */ deviceJid?: (string|null); } @@ -11140,6 +5872,9 @@ export namespace proto { /** KeepInChat serverTimestamp. */ public serverTimestamp: (number|Long); + /** KeepInChat key. */ + public key?: (proto.IMessageKey|null); + /** KeepInChat deviceJid. */ public deviceJid: string; @@ -11214,108 +5949,6 @@ export namespace proto { 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, @@ -11323,96 +5956,6 @@ export namespace proto { 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 { @@ -11503,703 +6046,6 @@ export namespace proto { 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 { - - /** ListMessage title */ - title?: (string|null); - - /** ListMessage description */ - description?: (string|null); - - /** ListMessage buttonText */ - buttonText?: (string|null); - - /** ListMessage listType */ - listType?: (proto.ListMessage.ListMessageListType|null); - - /** ListMessage sections */ - sections?: (proto.ISection[]|null); - - /** ListMessage productListInfo */ - productListInfo?: (proto.IProductListInfo|null); - - /** ListMessage footerText */ - footerText?: (string|null); - - /** ListMessage contextInfo */ - contextInfo?: (proto.IContextInfo|null); - } - - /** Represents a ListMessage. */ - class ListMessage implements IListMessage { - - /** - * Constructs a new ListMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IListMessage); - - /** ListMessage title. */ - public title: string; - - /** ListMessage description. */ - public description: string; - - /** ListMessage buttonText. */ - public buttonText: string; - - /** ListMessage listType. */ - public listType: proto.ListMessage.ListMessageListType; - - /** ListMessage sections. */ - public sections: proto.ISection[]; - - /** ListMessage productListInfo. */ - public productListInfo?: (proto.IProductListInfo|null); - - /** ListMessage footerText. */ - public footerText: string; - - /** ListMessage contextInfo. */ - public contextInfo?: (proto.IContextInfo|null); - - /** - * Creates a new ListMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns ListMessage instance - */ - public static create(properties?: proto.IListMessage): proto.ListMessage; - - /** - * Encodes the specified ListMessage message. Does not implicitly {@link proto.ListMessage.verify|verify} messages. - * @param message ListMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IListMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListMessage message, length delimited. Does not implicitly {@link proto.ListMessage.verify|verify} messages. - * @param message ListMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IListMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListMessage - * @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.ListMessage; - - /** - * Decodes a ListMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListMessage - * @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.ListMessage; - - /** - * Verifies a ListMessage 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 ListMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListMessage - */ - public static fromObject(object: { [k: string]: any }): proto.ListMessage; - - /** - * Creates a plain object from a ListMessage message. Also converts values to other types if specified. - * @param message ListMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.ListMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace ListMessage { - - /** ListMessageListType enum. */ - enum ListMessageListType { - UNKNOWN = 0, - SINGLE_SELECT = 1, - PRODUCT_LIST = 2 - } - } - - /** Properties of a ListResponseMessage. */ - interface IListResponseMessage { - - /** ListResponseMessage title */ - title?: (string|null); - - /** ListResponseMessage listType */ - listType?: (proto.ListResponseMessage.ListResponseMessageListType|null); - - /** ListResponseMessage singleSelectReply */ - singleSelectReply?: (proto.ISingleSelectReply|null); - - /** ListResponseMessage contextInfo */ - contextInfo?: (proto.IContextInfo|null); - - /** ListResponseMessage description */ - description?: (string|null); - } - - /** Represents a ListResponseMessage. */ - class ListResponseMessage implements IListResponseMessage { - - /** - * Constructs a new ListResponseMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IListResponseMessage); - - /** ListResponseMessage title. */ - public title: string; - - /** ListResponseMessage listType. */ - public listType: proto.ListResponseMessage.ListResponseMessageListType; - - /** ListResponseMessage singleSelectReply. */ - public singleSelectReply?: (proto.ISingleSelectReply|null); - - /** ListResponseMessage contextInfo. */ - public contextInfo?: (proto.IContextInfo|null); - - /** ListResponseMessage description. */ - public description: string; - - /** - * Creates a new ListResponseMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns ListResponseMessage instance - */ - public static create(properties?: proto.IListResponseMessage): proto.ListResponseMessage; - - /** - * Encodes the specified ListResponseMessage message. Does not implicitly {@link proto.ListResponseMessage.verify|verify} messages. - * @param message ListResponseMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IListResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListResponseMessage message, length delimited. Does not implicitly {@link proto.ListResponseMessage.verify|verify} messages. - * @param message ListResponseMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IListResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListResponseMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListResponseMessage - * @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.ListResponseMessage; - - /** - * Decodes a ListResponseMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListResponseMessage - * @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.ListResponseMessage; - - /** - * Verifies a ListResponseMessage 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 ListResponseMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListResponseMessage - */ - public static fromObject(object: { [k: string]: any }): proto.ListResponseMessage; - - /** - * Creates a plain object from a ListResponseMessage message. Also converts values to other types if specified. - * @param message ListResponseMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.ListResponseMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListResponseMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace ListResponseMessage { - - /** ListResponseMessageListType enum. */ - enum ListResponseMessageListType { - UNKNOWN = 0, - SINGLE_SELECT = 1 - } - } - - /** Properties of a LiveLocationMessage. */ - interface ILiveLocationMessage { - - /** LiveLocationMessage degreesLatitude */ - degreesLatitude?: (number|null); - - /** LiveLocationMessage degreesLongitude */ - degreesLongitude?: (number|null); - - /** LiveLocationMessage accuracyInMeters */ - accuracyInMeters?: (number|null); - - /** LiveLocationMessage speedInMps */ - speedInMps?: (number|null); - - /** LiveLocationMessage degreesClockwiseFromMagneticNorth */ - degreesClockwiseFromMagneticNorth?: (number|null); - - /** LiveLocationMessage caption */ - caption?: (string|null); - - /** LiveLocationMessage sequenceNumber */ - sequenceNumber?: (number|Long|null); - - /** LiveLocationMessage timeOffset */ - timeOffset?: (number|null); - - /** LiveLocationMessage jpegThumbnail */ - jpegThumbnail?: (Uint8Array|null); - - /** LiveLocationMessage contextInfo */ - contextInfo?: (proto.IContextInfo|null); - } - - /** Represents a LiveLocationMessage. */ - class LiveLocationMessage implements ILiveLocationMessage { - - /** - * Constructs a new LiveLocationMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.ILiveLocationMessage); - - /** LiveLocationMessage degreesLatitude. */ - public degreesLatitude: number; - - /** LiveLocationMessage degreesLongitude. */ - public degreesLongitude: number; - - /** LiveLocationMessage accuracyInMeters. */ - public accuracyInMeters: number; - - /** LiveLocationMessage speedInMps. */ - public speedInMps: number; - - /** LiveLocationMessage degreesClockwiseFromMagneticNorth. */ - public degreesClockwiseFromMagneticNorth: number; - - /** LiveLocationMessage caption. */ - public caption: string; - - /** LiveLocationMessage sequenceNumber. */ - public sequenceNumber: (number|Long); - - /** LiveLocationMessage timeOffset. */ - public timeOffset: number; - - /** LiveLocationMessage jpegThumbnail. */ - public jpegThumbnail: Uint8Array; - - /** LiveLocationMessage contextInfo. */ - public contextInfo?: (proto.IContextInfo|null); - - /** - * Creates a new LiveLocationMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns LiveLocationMessage instance - */ - public static create(properties?: proto.ILiveLocationMessage): proto.LiveLocationMessage; - - /** - * Encodes the specified LiveLocationMessage message. Does not implicitly {@link proto.LiveLocationMessage.verify|verify} messages. - * @param message LiveLocationMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.ILiveLocationMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LiveLocationMessage message, length delimited. Does not implicitly {@link proto.LiveLocationMessage.verify|verify} messages. - * @param message LiveLocationMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.ILiveLocationMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LiveLocationMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LiveLocationMessage - * @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.LiveLocationMessage; - - /** - * Decodes a LiveLocationMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LiveLocationMessage - * @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.LiveLocationMessage; - - /** - * Verifies a LiveLocationMessage 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 LiveLocationMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LiveLocationMessage - */ - public static fromObject(object: { [k: string]: any }): proto.LiveLocationMessage; - - /** - * Creates a plain object from a LiveLocationMessage message. Also converts values to other types if specified. - * @param message LiveLocationMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.LiveLocationMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LiveLocationMessage 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 LocalizedName. */ interface ILocalizedName { @@ -12404,258 +6250,6 @@ export namespace proto { public toJSON(): { [k: string]: any }; } - /** Properties of a LocationMessage. */ - interface ILocationMessage { - - /** LocationMessage degreesLatitude */ - degreesLatitude?: (number|null); - - /** LocationMessage degreesLongitude */ - degreesLongitude?: (number|null); - - /** LocationMessage name */ - name?: (string|null); - - /** LocationMessage address */ - address?: (string|null); - - /** LocationMessage url */ - url?: (string|null); - - /** LocationMessage isLive */ - isLive?: (boolean|null); - - /** LocationMessage accuracyInMeters */ - accuracyInMeters?: (number|null); - - /** LocationMessage speedInMps */ - speedInMps?: (number|null); - - /** LocationMessage degreesClockwiseFromMagneticNorth */ - degreesClockwiseFromMagneticNorth?: (number|null); - - /** LocationMessage comment */ - comment?: (string|null); - - /** LocationMessage jpegThumbnail */ - jpegThumbnail?: (Uint8Array|null); - - /** LocationMessage contextInfo */ - contextInfo?: (proto.IContextInfo|null); - } - - /** Represents a LocationMessage. */ - class LocationMessage implements ILocationMessage { - - /** - * Constructs a new LocationMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.ILocationMessage); - - /** LocationMessage degreesLatitude. */ - public degreesLatitude: number; - - /** LocationMessage degreesLongitude. */ - public degreesLongitude: number; - - /** LocationMessage name. */ - public name: string; - - /** LocationMessage address. */ - public address: string; - - /** LocationMessage url. */ - public url: string; - - /** LocationMessage isLive. */ - public isLive: boolean; - - /** LocationMessage accuracyInMeters. */ - public accuracyInMeters: number; - - /** LocationMessage speedInMps. */ - public speedInMps: number; - - /** LocationMessage degreesClockwiseFromMagneticNorth. */ - public degreesClockwiseFromMagneticNorth: number; - - /** LocationMessage comment. */ - public comment: string; - - /** LocationMessage jpegThumbnail. */ - public jpegThumbnail: Uint8Array; - - /** LocationMessage contextInfo. */ - public contextInfo?: (proto.IContextInfo|null); - - /** - * Creates a new LocationMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns LocationMessage instance - */ - public static create(properties?: proto.ILocationMessage): proto.LocationMessage; - - /** - * Encodes the specified LocationMessage message. Does not implicitly {@link proto.LocationMessage.verify|verify} messages. - * @param message LocationMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.ILocationMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LocationMessage message, length delimited. Does not implicitly {@link proto.LocationMessage.verify|verify} messages. - * @param message LocationMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.ILocationMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LocationMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LocationMessage - * @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.LocationMessage; - - /** - * Decodes a LocationMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LocationMessage - * @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.LocationMessage; - - /** - * Verifies a LocationMessage 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 LocationMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LocationMessage - */ - public static fromObject(object: { [k: string]: any }): proto.LocationMessage; - - /** - * Creates a plain object from a LocationMessage message. Also converts values to other types if specified. - * @param message LocationMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.LocationMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LocationMessage 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 MediaData. */ interface IMediaData { @@ -12756,7 +6350,7 @@ export namespace proto { directPath?: (string|null); /** MediaRetryNotification result */ - result?: (proto.MediaRetryNotification.MediaRetryNotificationResultType|null); + result?: (proto.MediaRetryNotification.ResultType|null); } /** Represents a MediaRetryNotification. */ @@ -12775,7 +6369,7 @@ export namespace proto { public directPath: string; /** MediaRetryNotification result. */ - public result: proto.MediaRetryNotification.MediaRetryNotificationResultType; + public result: proto.MediaRetryNotification.ResultType; /** * Creates a new MediaRetryNotification instance using the specified properties. @@ -12850,8 +6444,8 @@ export namespace proto { namespace MediaRetryNotification { - /** MediaRetryNotificationResultType enum. */ - enum MediaRetryNotificationResultType { + /** ResultType enum. */ + enum ResultType { GENERAL_ERROR = 0, SUCCESS = 1, NOT_FOUND = 2, @@ -12873,133 +6467,139 @@ export namespace proto { conversation?: (string|null); /** Message senderKeyDistributionMessage */ - senderKeyDistributionMessage?: (proto.ISenderKeyDistributionMessage|null); + senderKeyDistributionMessage?: (proto.Message.ISenderKeyDistributionMessage|null); /** Message imageMessage */ - imageMessage?: (proto.IImageMessage|null); + imageMessage?: (proto.Message.IImageMessage|null); /** Message contactMessage */ - contactMessage?: (proto.IContactMessage|null); + contactMessage?: (proto.Message.IContactMessage|null); /** Message locationMessage */ - locationMessage?: (proto.ILocationMessage|null); + locationMessage?: (proto.Message.ILocationMessage|null); /** Message extendedTextMessage */ - extendedTextMessage?: (proto.IExtendedTextMessage|null); + extendedTextMessage?: (proto.Message.IExtendedTextMessage|null); /** Message documentMessage */ - documentMessage?: (proto.IDocumentMessage|null); + documentMessage?: (proto.Message.IDocumentMessage|null); /** Message audioMessage */ - audioMessage?: (proto.IAudioMessage|null); + audioMessage?: (proto.Message.IAudioMessage|null); /** Message videoMessage */ - videoMessage?: (proto.IVideoMessage|null); + videoMessage?: (proto.Message.IVideoMessage|null); /** Message call */ - call?: (proto.ICall|null); + call?: (proto.Message.ICall|null); /** Message chat */ - chat?: (proto.IChat|null); + chat?: (proto.Message.IChat|null); /** Message protocolMessage */ - protocolMessage?: (proto.IProtocolMessage|null); + protocolMessage?: (proto.Message.IProtocolMessage|null); /** Message contactsArrayMessage */ - contactsArrayMessage?: (proto.IContactsArrayMessage|null); + contactsArrayMessage?: (proto.Message.IContactsArrayMessage|null); /** Message highlyStructuredMessage */ - highlyStructuredMessage?: (proto.IHighlyStructuredMessage|null); + highlyStructuredMessage?: (proto.Message.IHighlyStructuredMessage|null); /** Message fastRatchetKeySenderKeyDistributionMessage */ - fastRatchetKeySenderKeyDistributionMessage?: (proto.ISenderKeyDistributionMessage|null); + fastRatchetKeySenderKeyDistributionMessage?: (proto.Message.ISenderKeyDistributionMessage|null); /** Message sendPaymentMessage */ - sendPaymentMessage?: (proto.ISendPaymentMessage|null); + sendPaymentMessage?: (proto.Message.ISendPaymentMessage|null); /** Message liveLocationMessage */ - liveLocationMessage?: (proto.ILiveLocationMessage|null); + liveLocationMessage?: (proto.Message.ILiveLocationMessage|null); /** Message requestPaymentMessage */ - requestPaymentMessage?: (proto.IRequestPaymentMessage|null); + requestPaymentMessage?: (proto.Message.IRequestPaymentMessage|null); /** Message declinePaymentRequestMessage */ - declinePaymentRequestMessage?: (proto.IDeclinePaymentRequestMessage|null); + declinePaymentRequestMessage?: (proto.Message.IDeclinePaymentRequestMessage|null); /** Message cancelPaymentRequestMessage */ - cancelPaymentRequestMessage?: (proto.ICancelPaymentRequestMessage|null); + cancelPaymentRequestMessage?: (proto.Message.ICancelPaymentRequestMessage|null); /** Message templateMessage */ - templateMessage?: (proto.ITemplateMessage|null); + templateMessage?: (proto.Message.ITemplateMessage|null); /** Message stickerMessage */ - stickerMessage?: (proto.IStickerMessage|null); + stickerMessage?: (proto.Message.IStickerMessage|null); /** Message groupInviteMessage */ - groupInviteMessage?: (proto.IGroupInviteMessage|null); + groupInviteMessage?: (proto.Message.IGroupInviteMessage|null); /** Message templateButtonReplyMessage */ - templateButtonReplyMessage?: (proto.ITemplateButtonReplyMessage|null); + templateButtonReplyMessage?: (proto.Message.ITemplateButtonReplyMessage|null); /** Message productMessage */ - productMessage?: (proto.IProductMessage|null); + productMessage?: (proto.Message.IProductMessage|null); /** Message deviceSentMessage */ - deviceSentMessage?: (proto.IDeviceSentMessage|null); + deviceSentMessage?: (proto.Message.IDeviceSentMessage|null); /** Message messageContextInfo */ messageContextInfo?: (proto.IMessageContextInfo|null); /** Message listMessage */ - listMessage?: (proto.IListMessage|null); + listMessage?: (proto.Message.IListMessage|null); /** Message viewOnceMessage */ - viewOnceMessage?: (proto.IFutureProofMessage|null); + viewOnceMessage?: (proto.Message.IFutureProofMessage|null); /** Message orderMessage */ - orderMessage?: (proto.IOrderMessage|null); + orderMessage?: (proto.Message.IOrderMessage|null); /** Message listResponseMessage */ - listResponseMessage?: (proto.IListResponseMessage|null); + listResponseMessage?: (proto.Message.IListResponseMessage|null); /** Message ephemeralMessage */ - ephemeralMessage?: (proto.IFutureProofMessage|null); + ephemeralMessage?: (proto.Message.IFutureProofMessage|null); /** Message invoiceMessage */ - invoiceMessage?: (proto.IInvoiceMessage|null); + invoiceMessage?: (proto.Message.IInvoiceMessage|null); /** Message buttonsMessage */ - buttonsMessage?: (proto.IButtonsMessage|null); + buttonsMessage?: (proto.Message.IButtonsMessage|null); /** Message buttonsResponseMessage */ - buttonsResponseMessage?: (proto.IButtonsResponseMessage|null); + buttonsResponseMessage?: (proto.Message.IButtonsResponseMessage|null); /** Message paymentInviteMessage */ - paymentInviteMessage?: (proto.IPaymentInviteMessage|null); + paymentInviteMessage?: (proto.Message.IPaymentInviteMessage|null); /** Message interactiveMessage */ - interactiveMessage?: (proto.IInteractiveMessage|null); + interactiveMessage?: (proto.Message.IInteractiveMessage|null); /** Message reactionMessage */ - reactionMessage?: (proto.IReactionMessage|null); + reactionMessage?: (proto.Message.IReactionMessage|null); /** Message stickerSyncRmrMessage */ - stickerSyncRmrMessage?: (proto.IStickerSyncRMRMessage|null); + stickerSyncRmrMessage?: (proto.Message.IStickerSyncRMRMessage|null); /** Message interactiveResponseMessage */ - interactiveResponseMessage?: (proto.IInteractiveResponseMessage|null); + interactiveResponseMessage?: (proto.Message.IInteractiveResponseMessage|null); /** Message pollCreationMessage */ - pollCreationMessage?: (proto.IPollCreationMessage|null); + pollCreationMessage?: (proto.Message.IPollCreationMessage|null); /** Message pollUpdateMessage */ - pollUpdateMessage?: (proto.IPollUpdateMessage|null); + pollUpdateMessage?: (proto.Message.IPollUpdateMessage|null); /** Message keepInChatMessage */ - keepInChatMessage?: (proto.IKeepInChatMessage|null); + keepInChatMessage?: (proto.Message.IKeepInChatMessage|null); /** Message documentWithCaptionMessage */ - documentWithCaptionMessage?: (proto.IFutureProofMessage|null); + documentWithCaptionMessage?: (proto.Message.IFutureProofMessage|null); + + /** Message requestPhoneNumberMessage */ + requestPhoneNumberMessage?: (proto.Message.IRequestPhoneNumberMessage|null); + + /** Message viewOnceMessageV2 */ + viewOnceMessageV2?: (proto.Message.IFutureProofMessage|null); } /** Represents a Message. */ @@ -13015,133 +6615,139 @@ export namespace proto { public conversation: string; /** Message senderKeyDistributionMessage. */ - public senderKeyDistributionMessage?: (proto.ISenderKeyDistributionMessage|null); + public senderKeyDistributionMessage?: (proto.Message.ISenderKeyDistributionMessage|null); /** Message imageMessage. */ - public imageMessage?: (proto.IImageMessage|null); + public imageMessage?: (proto.Message.IImageMessage|null); /** Message contactMessage. */ - public contactMessage?: (proto.IContactMessage|null); + public contactMessage?: (proto.Message.IContactMessage|null); /** Message locationMessage. */ - public locationMessage?: (proto.ILocationMessage|null); + public locationMessage?: (proto.Message.ILocationMessage|null); /** Message extendedTextMessage. */ - public extendedTextMessage?: (proto.IExtendedTextMessage|null); + public extendedTextMessage?: (proto.Message.IExtendedTextMessage|null); /** Message documentMessage. */ - public documentMessage?: (proto.IDocumentMessage|null); + public documentMessage?: (proto.Message.IDocumentMessage|null); /** Message audioMessage. */ - public audioMessage?: (proto.IAudioMessage|null); + public audioMessage?: (proto.Message.IAudioMessage|null); /** Message videoMessage. */ - public videoMessage?: (proto.IVideoMessage|null); + public videoMessage?: (proto.Message.IVideoMessage|null); /** Message call. */ - public call?: (proto.ICall|null); + public call?: (proto.Message.ICall|null); /** Message chat. */ - public chat?: (proto.IChat|null); + public chat?: (proto.Message.IChat|null); /** Message protocolMessage. */ - public protocolMessage?: (proto.IProtocolMessage|null); + public protocolMessage?: (proto.Message.IProtocolMessage|null); /** Message contactsArrayMessage. */ - public contactsArrayMessage?: (proto.IContactsArrayMessage|null); + public contactsArrayMessage?: (proto.Message.IContactsArrayMessage|null); /** Message highlyStructuredMessage. */ - public highlyStructuredMessage?: (proto.IHighlyStructuredMessage|null); + public highlyStructuredMessage?: (proto.Message.IHighlyStructuredMessage|null); /** Message fastRatchetKeySenderKeyDistributionMessage. */ - public fastRatchetKeySenderKeyDistributionMessage?: (proto.ISenderKeyDistributionMessage|null); + public fastRatchetKeySenderKeyDistributionMessage?: (proto.Message.ISenderKeyDistributionMessage|null); /** Message sendPaymentMessage. */ - public sendPaymentMessage?: (proto.ISendPaymentMessage|null); + public sendPaymentMessage?: (proto.Message.ISendPaymentMessage|null); /** Message liveLocationMessage. */ - public liveLocationMessage?: (proto.ILiveLocationMessage|null); + public liveLocationMessage?: (proto.Message.ILiveLocationMessage|null); /** Message requestPaymentMessage. */ - public requestPaymentMessage?: (proto.IRequestPaymentMessage|null); + public requestPaymentMessage?: (proto.Message.IRequestPaymentMessage|null); /** Message declinePaymentRequestMessage. */ - public declinePaymentRequestMessage?: (proto.IDeclinePaymentRequestMessage|null); + public declinePaymentRequestMessage?: (proto.Message.IDeclinePaymentRequestMessage|null); /** Message cancelPaymentRequestMessage. */ - public cancelPaymentRequestMessage?: (proto.ICancelPaymentRequestMessage|null); + public cancelPaymentRequestMessage?: (proto.Message.ICancelPaymentRequestMessage|null); /** Message templateMessage. */ - public templateMessage?: (proto.ITemplateMessage|null); + public templateMessage?: (proto.Message.ITemplateMessage|null); /** Message stickerMessage. */ - public stickerMessage?: (proto.IStickerMessage|null); + public stickerMessage?: (proto.Message.IStickerMessage|null); /** Message groupInviteMessage. */ - public groupInviteMessage?: (proto.IGroupInviteMessage|null); + public groupInviteMessage?: (proto.Message.IGroupInviteMessage|null); /** Message templateButtonReplyMessage. */ - public templateButtonReplyMessage?: (proto.ITemplateButtonReplyMessage|null); + public templateButtonReplyMessage?: (proto.Message.ITemplateButtonReplyMessage|null); /** Message productMessage. */ - public productMessage?: (proto.IProductMessage|null); + public productMessage?: (proto.Message.IProductMessage|null); /** Message deviceSentMessage. */ - public deviceSentMessage?: (proto.IDeviceSentMessage|null); + public deviceSentMessage?: (proto.Message.IDeviceSentMessage|null); /** Message messageContextInfo. */ public messageContextInfo?: (proto.IMessageContextInfo|null); /** Message listMessage. */ - public listMessage?: (proto.IListMessage|null); + public listMessage?: (proto.Message.IListMessage|null); /** Message viewOnceMessage. */ - public viewOnceMessage?: (proto.IFutureProofMessage|null); + public viewOnceMessage?: (proto.Message.IFutureProofMessage|null); /** Message orderMessage. */ - public orderMessage?: (proto.IOrderMessage|null); + public orderMessage?: (proto.Message.IOrderMessage|null); /** Message listResponseMessage. */ - public listResponseMessage?: (proto.IListResponseMessage|null); + public listResponseMessage?: (proto.Message.IListResponseMessage|null); /** Message ephemeralMessage. */ - public ephemeralMessage?: (proto.IFutureProofMessage|null); + public ephemeralMessage?: (proto.Message.IFutureProofMessage|null); /** Message invoiceMessage. */ - public invoiceMessage?: (proto.IInvoiceMessage|null); + public invoiceMessage?: (proto.Message.IInvoiceMessage|null); /** Message buttonsMessage. */ - public buttonsMessage?: (proto.IButtonsMessage|null); + public buttonsMessage?: (proto.Message.IButtonsMessage|null); /** Message buttonsResponseMessage. */ - public buttonsResponseMessage?: (proto.IButtonsResponseMessage|null); + public buttonsResponseMessage?: (proto.Message.IButtonsResponseMessage|null); /** Message paymentInviteMessage. */ - public paymentInviteMessage?: (proto.IPaymentInviteMessage|null); + public paymentInviteMessage?: (proto.Message.IPaymentInviteMessage|null); /** Message interactiveMessage. */ - public interactiveMessage?: (proto.IInteractiveMessage|null); + public interactiveMessage?: (proto.Message.IInteractiveMessage|null); /** Message reactionMessage. */ - public reactionMessage?: (proto.IReactionMessage|null); + public reactionMessage?: (proto.Message.IReactionMessage|null); /** Message stickerSyncRmrMessage. */ - public stickerSyncRmrMessage?: (proto.IStickerSyncRMRMessage|null); + public stickerSyncRmrMessage?: (proto.Message.IStickerSyncRMRMessage|null); /** Message interactiveResponseMessage. */ - public interactiveResponseMessage?: (proto.IInteractiveResponseMessage|null); + public interactiveResponseMessage?: (proto.Message.IInteractiveResponseMessage|null); /** Message pollCreationMessage. */ - public pollCreationMessage?: (proto.IPollCreationMessage|null); + public pollCreationMessage?: (proto.Message.IPollCreationMessage|null); /** Message pollUpdateMessage. */ - public pollUpdateMessage?: (proto.IPollUpdateMessage|null); + public pollUpdateMessage?: (proto.Message.IPollUpdateMessage|null); /** Message keepInChatMessage. */ - public keepInChatMessage?: (proto.IKeepInChatMessage|null); + public keepInChatMessage?: (proto.Message.IKeepInChatMessage|null); /** Message documentWithCaptionMessage. */ - public documentWithCaptionMessage?: (proto.IFutureProofMessage|null); + public documentWithCaptionMessage?: (proto.Message.IFutureProofMessage|null); + + /** Message requestPhoneNumberMessage. */ + public requestPhoneNumberMessage?: (proto.Message.IRequestPhoneNumberMessage|null); + + /** Message viewOnceMessageV2. */ + public viewOnceMessageV2?: (proto.Message.IFutureProofMessage|null); /** * Creates a new Message instance using the specified properties. @@ -13214,6 +6820,9856 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + namespace Message { + + /** Properties of an AppStateFatalExceptionNotification. */ + interface IAppStateFatalExceptionNotification { + + /** AppStateFatalExceptionNotification collectionNames */ + collectionNames?: (string[]|null); + + /** AppStateFatalExceptionNotification timestamp */ + timestamp?: (number|Long|null); + } + + /** Represents an AppStateFatalExceptionNotification. */ + class AppStateFatalExceptionNotification implements IAppStateFatalExceptionNotification { + + /** + * Constructs a new AppStateFatalExceptionNotification. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IAppStateFatalExceptionNotification); + + /** AppStateFatalExceptionNotification collectionNames. */ + public collectionNames: string[]; + + /** AppStateFatalExceptionNotification timestamp. */ + public timestamp: (number|Long); + + /** + * Creates a new AppStateFatalExceptionNotification instance using the specified properties. + * @param [properties] Properties to set + * @returns AppStateFatalExceptionNotification instance + */ + public static create(properties?: proto.Message.IAppStateFatalExceptionNotification): proto.Message.AppStateFatalExceptionNotification; + + /** + * Encodes the specified AppStateFatalExceptionNotification message. Does not implicitly {@link proto.Message.AppStateFatalExceptionNotification.verify|verify} messages. + * @param message AppStateFatalExceptionNotification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IAppStateFatalExceptionNotification, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AppStateFatalExceptionNotification message, length delimited. Does not implicitly {@link proto.Message.AppStateFatalExceptionNotification.verify|verify} messages. + * @param message AppStateFatalExceptionNotification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IAppStateFatalExceptionNotification, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AppStateFatalExceptionNotification message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AppStateFatalExceptionNotification + * @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.Message.AppStateFatalExceptionNotification; + + /** + * Decodes an AppStateFatalExceptionNotification message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AppStateFatalExceptionNotification + * @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.Message.AppStateFatalExceptionNotification; + + /** + * Verifies an AppStateFatalExceptionNotification 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 AppStateFatalExceptionNotification message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AppStateFatalExceptionNotification + */ + public static fromObject(object: { [k: string]: any }): proto.Message.AppStateFatalExceptionNotification; + + /** + * Creates a plain object from an AppStateFatalExceptionNotification message. Also converts values to other types if specified. + * @param message AppStateFatalExceptionNotification + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.AppStateFatalExceptionNotification, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AppStateFatalExceptionNotification to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AppStateSyncKeyData. */ + interface IAppStateSyncKeyData { + + /** AppStateSyncKeyData keyData */ + keyData?: (Uint8Array|null); + + /** AppStateSyncKeyData fingerprint */ + fingerprint?: (proto.Message.IAppStateSyncKeyFingerprint|null); + + /** AppStateSyncKeyData timestamp */ + timestamp?: (number|Long|null); + } + + /** Represents an AppStateSyncKeyData. */ + class AppStateSyncKeyData implements IAppStateSyncKeyData { + + /** + * Constructs a new AppStateSyncKeyData. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IAppStateSyncKeyData); + + /** AppStateSyncKeyData keyData. */ + public keyData: Uint8Array; + + /** AppStateSyncKeyData fingerprint. */ + public fingerprint?: (proto.Message.IAppStateSyncKeyFingerprint|null); + + /** AppStateSyncKeyData timestamp. */ + public timestamp: (number|Long); + + /** + * Creates a new AppStateSyncKeyData instance using the specified properties. + * @param [properties] Properties to set + * @returns AppStateSyncKeyData instance + */ + public static create(properties?: proto.Message.IAppStateSyncKeyData): proto.Message.AppStateSyncKeyData; + + /** + * Encodes the specified AppStateSyncKeyData message. Does not implicitly {@link proto.Message.AppStateSyncKeyData.verify|verify} messages. + * @param message AppStateSyncKeyData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IAppStateSyncKeyData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AppStateSyncKeyData message, length delimited. Does not implicitly {@link proto.Message.AppStateSyncKeyData.verify|verify} messages. + * @param message AppStateSyncKeyData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IAppStateSyncKeyData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AppStateSyncKeyData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AppStateSyncKeyData + * @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.Message.AppStateSyncKeyData; + + /** + * Decodes an AppStateSyncKeyData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AppStateSyncKeyData + * @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.Message.AppStateSyncKeyData; + + /** + * Verifies an AppStateSyncKeyData 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 AppStateSyncKeyData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AppStateSyncKeyData + */ + public static fromObject(object: { [k: string]: any }): proto.Message.AppStateSyncKeyData; + + /** + * Creates a plain object from an AppStateSyncKeyData message. Also converts values to other types if specified. + * @param message AppStateSyncKeyData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.AppStateSyncKeyData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AppStateSyncKeyData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AppStateSyncKeyFingerprint. */ + interface IAppStateSyncKeyFingerprint { + + /** AppStateSyncKeyFingerprint rawId */ + rawId?: (number|null); + + /** AppStateSyncKeyFingerprint currentIndex */ + currentIndex?: (number|null); + + /** AppStateSyncKeyFingerprint deviceIndexes */ + deviceIndexes?: (number[]|null); + } + + /** Represents an AppStateSyncKeyFingerprint. */ + class AppStateSyncKeyFingerprint implements IAppStateSyncKeyFingerprint { + + /** + * Constructs a new AppStateSyncKeyFingerprint. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IAppStateSyncKeyFingerprint); + + /** AppStateSyncKeyFingerprint rawId. */ + public rawId: number; + + /** AppStateSyncKeyFingerprint currentIndex. */ + public currentIndex: number; + + /** AppStateSyncKeyFingerprint deviceIndexes. */ + public deviceIndexes: number[]; + + /** + * Creates a new AppStateSyncKeyFingerprint instance using the specified properties. + * @param [properties] Properties to set + * @returns AppStateSyncKeyFingerprint instance + */ + public static create(properties?: proto.Message.IAppStateSyncKeyFingerprint): proto.Message.AppStateSyncKeyFingerprint; + + /** + * Encodes the specified AppStateSyncKeyFingerprint message. Does not implicitly {@link proto.Message.AppStateSyncKeyFingerprint.verify|verify} messages. + * @param message AppStateSyncKeyFingerprint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IAppStateSyncKeyFingerprint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AppStateSyncKeyFingerprint message, length delimited. Does not implicitly {@link proto.Message.AppStateSyncKeyFingerprint.verify|verify} messages. + * @param message AppStateSyncKeyFingerprint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IAppStateSyncKeyFingerprint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AppStateSyncKeyFingerprint message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AppStateSyncKeyFingerprint + * @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.Message.AppStateSyncKeyFingerprint; + + /** + * Decodes an AppStateSyncKeyFingerprint message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AppStateSyncKeyFingerprint + * @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.Message.AppStateSyncKeyFingerprint; + + /** + * Verifies an AppStateSyncKeyFingerprint 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 AppStateSyncKeyFingerprint message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AppStateSyncKeyFingerprint + */ + public static fromObject(object: { [k: string]: any }): proto.Message.AppStateSyncKeyFingerprint; + + /** + * Creates a plain object from an AppStateSyncKeyFingerprint message. Also converts values to other types if specified. + * @param message AppStateSyncKeyFingerprint + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.AppStateSyncKeyFingerprint, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AppStateSyncKeyFingerprint to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AppStateSyncKeyId. */ + interface IAppStateSyncKeyId { + + /** AppStateSyncKeyId keyId */ + keyId?: (Uint8Array|null); + } + + /** Represents an AppStateSyncKeyId. */ + class AppStateSyncKeyId implements IAppStateSyncKeyId { + + /** + * Constructs a new AppStateSyncKeyId. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IAppStateSyncKeyId); + + /** AppStateSyncKeyId keyId. */ + public keyId: Uint8Array; + + /** + * Creates a new AppStateSyncKeyId instance using the specified properties. + * @param [properties] Properties to set + * @returns AppStateSyncKeyId instance + */ + public static create(properties?: proto.Message.IAppStateSyncKeyId): proto.Message.AppStateSyncKeyId; + + /** + * Encodes the specified AppStateSyncKeyId message. Does not implicitly {@link proto.Message.AppStateSyncKeyId.verify|verify} messages. + * @param message AppStateSyncKeyId message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IAppStateSyncKeyId, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AppStateSyncKeyId message, length delimited. Does not implicitly {@link proto.Message.AppStateSyncKeyId.verify|verify} messages. + * @param message AppStateSyncKeyId message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IAppStateSyncKeyId, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AppStateSyncKeyId message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AppStateSyncKeyId + * @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.Message.AppStateSyncKeyId; + + /** + * Decodes an AppStateSyncKeyId message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AppStateSyncKeyId + * @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.Message.AppStateSyncKeyId; + + /** + * Verifies an AppStateSyncKeyId 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 AppStateSyncKeyId message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AppStateSyncKeyId + */ + public static fromObject(object: { [k: string]: any }): proto.Message.AppStateSyncKeyId; + + /** + * Creates a plain object from an AppStateSyncKeyId message. Also converts values to other types if specified. + * @param message AppStateSyncKeyId + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.AppStateSyncKeyId, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AppStateSyncKeyId to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AppStateSyncKeyRequest. */ + interface IAppStateSyncKeyRequest { + + /** AppStateSyncKeyRequest keyIds */ + keyIds?: (proto.Message.IAppStateSyncKeyId[]|null); + } + + /** Represents an AppStateSyncKeyRequest. */ + class AppStateSyncKeyRequest implements IAppStateSyncKeyRequest { + + /** + * Constructs a new AppStateSyncKeyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IAppStateSyncKeyRequest); + + /** AppStateSyncKeyRequest keyIds. */ + public keyIds: proto.Message.IAppStateSyncKeyId[]; + + /** + * Creates a new AppStateSyncKeyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns AppStateSyncKeyRequest instance + */ + public static create(properties?: proto.Message.IAppStateSyncKeyRequest): proto.Message.AppStateSyncKeyRequest; + + /** + * Encodes the specified AppStateSyncKeyRequest message. Does not implicitly {@link proto.Message.AppStateSyncKeyRequest.verify|verify} messages. + * @param message AppStateSyncKeyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IAppStateSyncKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AppStateSyncKeyRequest message, length delimited. Does not implicitly {@link proto.Message.AppStateSyncKeyRequest.verify|verify} messages. + * @param message AppStateSyncKeyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IAppStateSyncKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AppStateSyncKeyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AppStateSyncKeyRequest + * @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.Message.AppStateSyncKeyRequest; + + /** + * Decodes an AppStateSyncKeyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AppStateSyncKeyRequest + * @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.Message.AppStateSyncKeyRequest; + + /** + * Verifies an AppStateSyncKeyRequest 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 AppStateSyncKeyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AppStateSyncKeyRequest + */ + public static fromObject(object: { [k: string]: any }): proto.Message.AppStateSyncKeyRequest; + + /** + * Creates a plain object from an AppStateSyncKeyRequest message. Also converts values to other types if specified. + * @param message AppStateSyncKeyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.AppStateSyncKeyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AppStateSyncKeyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AppStateSyncKeyShare. */ + interface IAppStateSyncKeyShare { + + /** AppStateSyncKeyShare keys */ + keys?: (proto.Message.IAppStateSyncKey[]|null); + } + + /** Represents an AppStateSyncKeyShare. */ + class AppStateSyncKeyShare implements IAppStateSyncKeyShare { + + /** + * Constructs a new AppStateSyncKeyShare. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IAppStateSyncKeyShare); + + /** AppStateSyncKeyShare keys. */ + public keys: proto.Message.IAppStateSyncKey[]; + + /** + * Creates a new AppStateSyncKeyShare instance using the specified properties. + * @param [properties] Properties to set + * @returns AppStateSyncKeyShare instance + */ + public static create(properties?: proto.Message.IAppStateSyncKeyShare): proto.Message.AppStateSyncKeyShare; + + /** + * Encodes the specified AppStateSyncKeyShare message. Does not implicitly {@link proto.Message.AppStateSyncKeyShare.verify|verify} messages. + * @param message AppStateSyncKeyShare message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IAppStateSyncKeyShare, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AppStateSyncKeyShare message, length delimited. Does not implicitly {@link proto.Message.AppStateSyncKeyShare.verify|verify} messages. + * @param message AppStateSyncKeyShare message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IAppStateSyncKeyShare, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AppStateSyncKeyShare message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AppStateSyncKeyShare + * @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.Message.AppStateSyncKeyShare; + + /** + * Decodes an AppStateSyncKeyShare message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AppStateSyncKeyShare + * @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.Message.AppStateSyncKeyShare; + + /** + * Verifies an AppStateSyncKeyShare 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 AppStateSyncKeyShare message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AppStateSyncKeyShare + */ + public static fromObject(object: { [k: string]: any }): proto.Message.AppStateSyncKeyShare; + + /** + * Creates a plain object from an AppStateSyncKeyShare message. Also converts values to other types if specified. + * @param message AppStateSyncKeyShare + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.AppStateSyncKeyShare, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AppStateSyncKeyShare to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AppStateSyncKey. */ + interface IAppStateSyncKey { + + /** AppStateSyncKey keyId */ + keyId?: (proto.Message.IAppStateSyncKeyId|null); + + /** AppStateSyncKey keyData */ + keyData?: (proto.Message.IAppStateSyncKeyData|null); + } + + /** Represents an AppStateSyncKey. */ + class AppStateSyncKey implements IAppStateSyncKey { + + /** + * Constructs a new AppStateSyncKey. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IAppStateSyncKey); + + /** AppStateSyncKey keyId. */ + public keyId?: (proto.Message.IAppStateSyncKeyId|null); + + /** AppStateSyncKey keyData. */ + public keyData?: (proto.Message.IAppStateSyncKeyData|null); + + /** + * Creates a new AppStateSyncKey instance using the specified properties. + * @param [properties] Properties to set + * @returns AppStateSyncKey instance + */ + public static create(properties?: proto.Message.IAppStateSyncKey): proto.Message.AppStateSyncKey; + + /** + * Encodes the specified AppStateSyncKey message. Does not implicitly {@link proto.Message.AppStateSyncKey.verify|verify} messages. + * @param message AppStateSyncKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IAppStateSyncKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AppStateSyncKey message, length delimited. Does not implicitly {@link proto.Message.AppStateSyncKey.verify|verify} messages. + * @param message AppStateSyncKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IAppStateSyncKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AppStateSyncKey message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AppStateSyncKey + * @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.Message.AppStateSyncKey; + + /** + * Decodes an AppStateSyncKey message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AppStateSyncKey + * @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.Message.AppStateSyncKey; + + /** + * Verifies an AppStateSyncKey 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 AppStateSyncKey message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AppStateSyncKey + */ + public static fromObject(object: { [k: string]: any }): proto.Message.AppStateSyncKey; + + /** + * Creates a plain object from an AppStateSyncKey message. Also converts values to other types if specified. + * @param message AppStateSyncKey + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.AppStateSyncKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AppStateSyncKey to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AudioMessage. */ + interface IAudioMessage { + + /** AudioMessage url */ + url?: (string|null); + + /** AudioMessage mimetype */ + mimetype?: (string|null); + + /** AudioMessage fileSha256 */ + fileSha256?: (Uint8Array|null); + + /** AudioMessage fileLength */ + fileLength?: (number|Long|null); + + /** AudioMessage seconds */ + seconds?: (number|null); + + /** AudioMessage ptt */ + ptt?: (boolean|null); + + /** AudioMessage mediaKey */ + mediaKey?: (Uint8Array|null); + + /** AudioMessage fileEncSha256 */ + fileEncSha256?: (Uint8Array|null); + + /** AudioMessage directPath */ + directPath?: (string|null); + + /** AudioMessage mediaKeyTimestamp */ + mediaKeyTimestamp?: (number|Long|null); + + /** AudioMessage contextInfo */ + contextInfo?: (proto.IContextInfo|null); + + /** AudioMessage streamingSidecar */ + streamingSidecar?: (Uint8Array|null); + + /** AudioMessage waveform */ + waveform?: (Uint8Array|null); + } + + /** Represents an AudioMessage. */ + class AudioMessage implements IAudioMessage { + + /** + * Constructs a new AudioMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IAudioMessage); + + /** AudioMessage url. */ + public url: string; + + /** AudioMessage mimetype. */ + public mimetype: string; + + /** AudioMessage fileSha256. */ + public fileSha256: Uint8Array; + + /** AudioMessage fileLength. */ + public fileLength: (number|Long); + + /** AudioMessage seconds. */ + public seconds: number; + + /** AudioMessage ptt. */ + public ptt: boolean; + + /** AudioMessage mediaKey. */ + public mediaKey: Uint8Array; + + /** AudioMessage fileEncSha256. */ + public fileEncSha256: Uint8Array; + + /** AudioMessage directPath. */ + public directPath: string; + + /** AudioMessage mediaKeyTimestamp. */ + public mediaKeyTimestamp: (number|Long); + + /** AudioMessage contextInfo. */ + public contextInfo?: (proto.IContextInfo|null); + + /** AudioMessage streamingSidecar. */ + public streamingSidecar: Uint8Array; + + /** AudioMessage waveform. */ + public waveform: Uint8Array; + + /** + * Creates a new AudioMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns AudioMessage instance + */ + public static create(properties?: proto.Message.IAudioMessage): proto.Message.AudioMessage; + + /** + * Encodes the specified AudioMessage message. Does not implicitly {@link proto.Message.AudioMessage.verify|verify} messages. + * @param message AudioMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IAudioMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudioMessage message, length delimited. Does not implicitly {@link proto.Message.AudioMessage.verify|verify} messages. + * @param message AudioMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IAudioMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudioMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudioMessage + * @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.Message.AudioMessage; + + /** + * Decodes an AudioMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudioMessage + * @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.Message.AudioMessage; + + /** + * Verifies an AudioMessage 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 AudioMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudioMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.AudioMessage; + + /** + * Creates a plain object from an AudioMessage message. Also converts values to other types if specified. + * @param message AudioMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.AudioMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudioMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ButtonsMessage. */ + interface IButtonsMessage { + + /** ButtonsMessage contentText */ + contentText?: (string|null); + + /** ButtonsMessage footerText */ + footerText?: (string|null); + + /** ButtonsMessage contextInfo */ + contextInfo?: (proto.IContextInfo|null); + + /** ButtonsMessage buttons */ + buttons?: (proto.Message.ButtonsMessage.IButton[]|null); + + /** ButtonsMessage headerType */ + headerType?: (proto.Message.ButtonsMessage.HeaderType|null); + + /** ButtonsMessage text */ + text?: (string|null); + + /** ButtonsMessage documentMessage */ + documentMessage?: (proto.Message.IDocumentMessage|null); + + /** ButtonsMessage imageMessage */ + imageMessage?: (proto.Message.IImageMessage|null); + + /** ButtonsMessage videoMessage */ + videoMessage?: (proto.Message.IVideoMessage|null); + + /** ButtonsMessage locationMessage */ + locationMessage?: (proto.Message.ILocationMessage|null); + } + + /** Represents a ButtonsMessage. */ + class ButtonsMessage implements IButtonsMessage { + + /** + * Constructs a new ButtonsMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IButtonsMessage); + + /** ButtonsMessage contentText. */ + public contentText: string; + + /** ButtonsMessage footerText. */ + public footerText: string; + + /** ButtonsMessage contextInfo. */ + public contextInfo?: (proto.IContextInfo|null); + + /** ButtonsMessage buttons. */ + public buttons: proto.Message.ButtonsMessage.IButton[]; + + /** ButtonsMessage headerType. */ + public headerType: proto.Message.ButtonsMessage.HeaderType; + + /** ButtonsMessage text. */ + public text?: (string|null); + + /** ButtonsMessage documentMessage. */ + public documentMessage?: (proto.Message.IDocumentMessage|null); + + /** ButtonsMessage imageMessage. */ + public imageMessage?: (proto.Message.IImageMessage|null); + + /** ButtonsMessage videoMessage. */ + public videoMessage?: (proto.Message.IVideoMessage|null); + + /** ButtonsMessage locationMessage. */ + public locationMessage?: (proto.Message.ILocationMessage|null); + + /** ButtonsMessage header. */ + public header?: ("text"|"documentMessage"|"imageMessage"|"videoMessage"|"locationMessage"); + + /** + * Creates a new ButtonsMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns ButtonsMessage instance + */ + public static create(properties?: proto.Message.IButtonsMessage): proto.Message.ButtonsMessage; + + /** + * Encodes the specified ButtonsMessage message. Does not implicitly {@link proto.Message.ButtonsMessage.verify|verify} messages. + * @param message ButtonsMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IButtonsMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ButtonsMessage message, length delimited. Does not implicitly {@link proto.Message.ButtonsMessage.verify|verify} messages. + * @param message ButtonsMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IButtonsMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ButtonsMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ButtonsMessage + * @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.Message.ButtonsMessage; + + /** + * Decodes a ButtonsMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ButtonsMessage + * @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.Message.ButtonsMessage; + + /** + * Verifies a ButtonsMessage 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 ButtonsMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ButtonsMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.ButtonsMessage; + + /** + * Creates a plain object from a ButtonsMessage message. Also converts values to other types if specified. + * @param message ButtonsMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.ButtonsMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ButtonsMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ButtonsMessage { + + /** Properties of a Button. */ + interface IButton { + + /** Button buttonId */ + buttonId?: (string|null); + + /** Button buttonText */ + buttonText?: (proto.Message.ButtonsMessage.Button.IButtonText|null); + + /** Button type */ + type?: (proto.Message.ButtonsMessage.Button.Type|null); + + /** Button nativeFlowInfo */ + nativeFlowInfo?: (proto.Message.ButtonsMessage.Button.INativeFlowInfo|null); + } + + /** Represents a Button. */ + class Button implements IButton { + + /** + * Constructs a new Button. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.ButtonsMessage.IButton); + + /** Button buttonId. */ + public buttonId: string; + + /** Button buttonText. */ + public buttonText?: (proto.Message.ButtonsMessage.Button.IButtonText|null); + + /** Button type. */ + public type: proto.Message.ButtonsMessage.Button.Type; + + /** Button nativeFlowInfo. */ + public nativeFlowInfo?: (proto.Message.ButtonsMessage.Button.INativeFlowInfo|null); + + /** + * Creates a new Button instance using the specified properties. + * @param [properties] Properties to set + * @returns Button instance + */ + public static create(properties?: proto.Message.ButtonsMessage.IButton): proto.Message.ButtonsMessage.Button; + + /** + * Encodes the specified Button message. Does not implicitly {@link proto.Message.ButtonsMessage.Button.verify|verify} messages. + * @param message Button message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.ButtonsMessage.IButton, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Button message, length delimited. Does not implicitly {@link proto.Message.ButtonsMessage.Button.verify|verify} messages. + * @param message Button message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.ButtonsMessage.IButton, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Button message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Button + * @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.Message.ButtonsMessage.Button; + + /** + * Decodes a Button message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Button + * @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.Message.ButtonsMessage.Button; + + /** + * Verifies a Button 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 Button message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Button + */ + public static fromObject(object: { [k: string]: any }): proto.Message.ButtonsMessage.Button; + + /** + * Creates a plain object from a Button message. Also converts values to other types if specified. + * @param message Button + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.ButtonsMessage.Button, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Button to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Button { + + /** 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.Message.ButtonsMessage.Button.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.Message.ButtonsMessage.Button.IButtonText): proto.Message.ButtonsMessage.Button.ButtonText; + + /** + * Encodes the specified ButtonText message. Does not implicitly {@link proto.Message.ButtonsMessage.Button.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.Message.ButtonsMessage.Button.IButtonText, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ButtonText message, length delimited. Does not implicitly {@link proto.Message.ButtonsMessage.Button.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.Message.ButtonsMessage.Button.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.Message.ButtonsMessage.Button.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.Message.ButtonsMessage.Button.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.Message.ButtonsMessage.Button.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.Message.ButtonsMessage.Button.ButtonText, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ButtonText to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a NativeFlowInfo. */ + interface INativeFlowInfo { + + /** NativeFlowInfo name */ + name?: (string|null); + + /** NativeFlowInfo paramsJson */ + paramsJson?: (string|null); + } + + /** Represents a NativeFlowInfo. */ + class NativeFlowInfo implements INativeFlowInfo { + + /** + * Constructs a new NativeFlowInfo. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.ButtonsMessage.Button.INativeFlowInfo); + + /** NativeFlowInfo name. */ + public name: string; + + /** NativeFlowInfo paramsJson. */ + public paramsJson: string; + + /** + * Creates a new NativeFlowInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns NativeFlowInfo instance + */ + public static create(properties?: proto.Message.ButtonsMessage.Button.INativeFlowInfo): proto.Message.ButtonsMessage.Button.NativeFlowInfo; + + /** + * Encodes the specified NativeFlowInfo message. Does not implicitly {@link proto.Message.ButtonsMessage.Button.NativeFlowInfo.verify|verify} messages. + * @param message NativeFlowInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.ButtonsMessage.Button.INativeFlowInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NativeFlowInfo message, length delimited. Does not implicitly {@link proto.Message.ButtonsMessage.Button.NativeFlowInfo.verify|verify} messages. + * @param message NativeFlowInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.ButtonsMessage.Button.INativeFlowInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NativeFlowInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NativeFlowInfo + * @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.Message.ButtonsMessage.Button.NativeFlowInfo; + + /** + * Decodes a NativeFlowInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NativeFlowInfo + * @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.Message.ButtonsMessage.Button.NativeFlowInfo; + + /** + * Verifies a NativeFlowInfo 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 NativeFlowInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NativeFlowInfo + */ + public static fromObject(object: { [k: string]: any }): proto.Message.ButtonsMessage.Button.NativeFlowInfo; + + /** + * Creates a plain object from a NativeFlowInfo message. Also converts values to other types if specified. + * @param message NativeFlowInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.ButtonsMessage.Button.NativeFlowInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NativeFlowInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Type enum. */ + enum Type { + UNKNOWN = 0, + RESPONSE = 1, + NATIVE_FLOW = 2 + } + } + + /** HeaderType enum. */ + enum HeaderType { + UNKNOWN = 0, + EMPTY = 1, + TEXT = 2, + DOCUMENT = 3, + IMAGE = 4, + VIDEO = 5, + LOCATION = 6 + } + } + + /** Properties of a ButtonsResponseMessage. */ + interface IButtonsResponseMessage { + + /** ButtonsResponseMessage selectedButtonId */ + selectedButtonId?: (string|null); + + /** ButtonsResponseMessage contextInfo */ + contextInfo?: (proto.IContextInfo|null); + + /** ButtonsResponseMessage type */ + type?: (proto.Message.ButtonsResponseMessage.Type|null); + + /** ButtonsResponseMessage selectedDisplayText */ + selectedDisplayText?: (string|null); + } + + /** Represents a ButtonsResponseMessage. */ + class ButtonsResponseMessage implements IButtonsResponseMessage { + + /** + * Constructs a new ButtonsResponseMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IButtonsResponseMessage); + + /** ButtonsResponseMessage selectedButtonId. */ + public selectedButtonId: string; + + /** ButtonsResponseMessage contextInfo. */ + public contextInfo?: (proto.IContextInfo|null); + + /** ButtonsResponseMessage type. */ + public type: proto.Message.ButtonsResponseMessage.Type; + + /** ButtonsResponseMessage selectedDisplayText. */ + public selectedDisplayText?: (string|null); + + /** ButtonsResponseMessage response. */ + public response?: "selectedDisplayText"; + + /** + * Creates a new ButtonsResponseMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns ButtonsResponseMessage instance + */ + public static create(properties?: proto.Message.IButtonsResponseMessage): proto.Message.ButtonsResponseMessage; + + /** + * Encodes the specified ButtonsResponseMessage message. Does not implicitly {@link proto.Message.ButtonsResponseMessage.verify|verify} messages. + * @param message ButtonsResponseMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IButtonsResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ButtonsResponseMessage message, length delimited. Does not implicitly {@link proto.Message.ButtonsResponseMessage.verify|verify} messages. + * @param message ButtonsResponseMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IButtonsResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ButtonsResponseMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ButtonsResponseMessage + * @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.Message.ButtonsResponseMessage; + + /** + * Decodes a ButtonsResponseMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ButtonsResponseMessage + * @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.Message.ButtonsResponseMessage; + + /** + * Verifies a ButtonsResponseMessage 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 ButtonsResponseMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ButtonsResponseMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.ButtonsResponseMessage; + + /** + * Creates a plain object from a ButtonsResponseMessage message. Also converts values to other types if specified. + * @param message ButtonsResponseMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.ButtonsResponseMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ButtonsResponseMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ButtonsResponseMessage { + + /** Type enum. */ + enum Type { + UNKNOWN = 0, + DISPLAY_TEXT = 1 + } + } + + /** Properties of a Call. */ + interface ICall { + + /** Call callKey */ + callKey?: (Uint8Array|null); + + /** Call conversionSource */ + conversionSource?: (string|null); + + /** Call conversionData */ + conversionData?: (Uint8Array|null); + + /** Call conversionDelaySeconds */ + conversionDelaySeconds?: (number|null); + } + + /** Represents a Call. */ + class Call implements ICall { + + /** + * Constructs a new Call. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.ICall); + + /** Call callKey. */ + public callKey: Uint8Array; + + /** Call conversionSource. */ + public conversionSource: string; + + /** Call conversionData. */ + public conversionData: Uint8Array; + + /** Call conversionDelaySeconds. */ + public conversionDelaySeconds: number; + + /** + * Creates a new Call instance using the specified properties. + * @param [properties] Properties to set + * @returns Call instance + */ + public static create(properties?: proto.Message.ICall): proto.Message.Call; + + /** + * Encodes the specified Call message. Does not implicitly {@link proto.Message.Call.verify|verify} messages. + * @param message Call message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.ICall, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Call message, length delimited. Does not implicitly {@link proto.Message.Call.verify|verify} messages. + * @param message Call message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.ICall, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Call message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Call + * @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.Message.Call; + + /** + * Decodes a Call message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Call + * @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.Message.Call; + + /** + * Verifies a Call 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 Call message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Call + */ + public static fromObject(object: { [k: string]: any }): proto.Message.Call; + + /** + * Creates a plain object from a Call message. Also converts values to other types if specified. + * @param message Call + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.Call, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Call to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CancelPaymentRequestMessage. */ + interface ICancelPaymentRequestMessage { + + /** CancelPaymentRequestMessage key */ + key?: (proto.IMessageKey|null); + } + + /** Represents a CancelPaymentRequestMessage. */ + class CancelPaymentRequestMessage implements ICancelPaymentRequestMessage { + + /** + * Constructs a new CancelPaymentRequestMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.ICancelPaymentRequestMessage); + + /** CancelPaymentRequestMessage key. */ + public key?: (proto.IMessageKey|null); + + /** + * Creates a new CancelPaymentRequestMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelPaymentRequestMessage instance + */ + public static create(properties?: proto.Message.ICancelPaymentRequestMessage): proto.Message.CancelPaymentRequestMessage; + + /** + * Encodes the specified CancelPaymentRequestMessage message. Does not implicitly {@link proto.Message.CancelPaymentRequestMessage.verify|verify} messages. + * @param message CancelPaymentRequestMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.ICancelPaymentRequestMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CancelPaymentRequestMessage message, length delimited. Does not implicitly {@link proto.Message.CancelPaymentRequestMessage.verify|verify} messages. + * @param message CancelPaymentRequestMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.ICancelPaymentRequestMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CancelPaymentRequestMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelPaymentRequestMessage + * @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.Message.CancelPaymentRequestMessage; + + /** + * Decodes a CancelPaymentRequestMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelPaymentRequestMessage + * @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.Message.CancelPaymentRequestMessage; + + /** + * Verifies a CancelPaymentRequestMessage 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 CancelPaymentRequestMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelPaymentRequestMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.CancelPaymentRequestMessage; + + /** + * Creates a plain object from a CancelPaymentRequestMessage message. Also converts values to other types if specified. + * @param message CancelPaymentRequestMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.CancelPaymentRequestMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelPaymentRequestMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Chat. */ + interface IChat { + + /** Chat displayName */ + displayName?: (string|null); + + /** Chat id */ + id?: (string|null); + } + + /** Represents a Chat. */ + class Chat implements IChat { + + /** + * Constructs a new Chat. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IChat); + + /** Chat displayName. */ + public displayName: string; + + /** Chat id. */ + public id: string; + + /** + * Creates a new Chat instance using the specified properties. + * @param [properties] Properties to set + * @returns Chat instance + */ + public static create(properties?: proto.Message.IChat): proto.Message.Chat; + + /** + * Encodes the specified Chat message. Does not implicitly {@link proto.Message.Chat.verify|verify} messages. + * @param message Chat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IChat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Chat message, length delimited. Does not implicitly {@link proto.Message.Chat.verify|verify} messages. + * @param message Chat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IChat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Chat message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Chat + * @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.Message.Chat; + + /** + * Decodes a Chat message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Chat + * @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.Message.Chat; + + /** + * Verifies a Chat 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 Chat message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Chat + */ + public static fromObject(object: { [k: string]: any }): proto.Message.Chat; + + /** + * Creates a plain object from a Chat message. Also converts values to other types if specified. + * @param message Chat + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.Chat, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Chat to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ContactMessage. */ + interface IContactMessage { + + /** ContactMessage displayName */ + displayName?: (string|null); + + /** ContactMessage vcard */ + vcard?: (string|null); + + /** ContactMessage contextInfo */ + contextInfo?: (proto.IContextInfo|null); + } + + /** Represents a ContactMessage. */ + class ContactMessage implements IContactMessage { + + /** + * Constructs a new ContactMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IContactMessage); + + /** ContactMessage displayName. */ + public displayName: string; + + /** ContactMessage vcard. */ + public vcard: string; + + /** ContactMessage contextInfo. */ + public contextInfo?: (proto.IContextInfo|null); + + /** + * Creates a new ContactMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns ContactMessage instance + */ + public static create(properties?: proto.Message.IContactMessage): proto.Message.ContactMessage; + + /** + * Encodes the specified ContactMessage message. Does not implicitly {@link proto.Message.ContactMessage.verify|verify} messages. + * @param message ContactMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IContactMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ContactMessage message, length delimited. Does not implicitly {@link proto.Message.ContactMessage.verify|verify} messages. + * @param message ContactMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IContactMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ContactMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ContactMessage + * @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.Message.ContactMessage; + + /** + * Decodes a ContactMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ContactMessage + * @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.Message.ContactMessage; + + /** + * Verifies a ContactMessage 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 ContactMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ContactMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.ContactMessage; + + /** + * Creates a plain object from a ContactMessage message. Also converts values to other types if specified. + * @param message ContactMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.ContactMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ContactMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ContactsArrayMessage. */ + interface IContactsArrayMessage { + + /** ContactsArrayMessage displayName */ + displayName?: (string|null); + + /** ContactsArrayMessage contacts */ + contacts?: (proto.Message.IContactMessage[]|null); + + /** ContactsArrayMessage contextInfo */ + contextInfo?: (proto.IContextInfo|null); + } + + /** Represents a ContactsArrayMessage. */ + class ContactsArrayMessage implements IContactsArrayMessage { + + /** + * Constructs a new ContactsArrayMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IContactsArrayMessage); + + /** ContactsArrayMessage displayName. */ + public displayName: string; + + /** ContactsArrayMessage contacts. */ + public contacts: proto.Message.IContactMessage[]; + + /** ContactsArrayMessage contextInfo. */ + public contextInfo?: (proto.IContextInfo|null); + + /** + * Creates a new ContactsArrayMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns ContactsArrayMessage instance + */ + public static create(properties?: proto.Message.IContactsArrayMessage): proto.Message.ContactsArrayMessage; + + /** + * Encodes the specified ContactsArrayMessage message. Does not implicitly {@link proto.Message.ContactsArrayMessage.verify|verify} messages. + * @param message ContactsArrayMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IContactsArrayMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ContactsArrayMessage message, length delimited. Does not implicitly {@link proto.Message.ContactsArrayMessage.verify|verify} messages. + * @param message ContactsArrayMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IContactsArrayMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ContactsArrayMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ContactsArrayMessage + * @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.Message.ContactsArrayMessage; + + /** + * Decodes a ContactsArrayMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ContactsArrayMessage + * @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.Message.ContactsArrayMessage; + + /** + * Verifies a ContactsArrayMessage 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 ContactsArrayMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ContactsArrayMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.ContactsArrayMessage; + + /** + * Creates a plain object from a ContactsArrayMessage message. Also converts values to other types if specified. + * @param message ContactsArrayMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.ContactsArrayMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ContactsArrayMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeclinePaymentRequestMessage. */ + interface IDeclinePaymentRequestMessage { + + /** DeclinePaymentRequestMessage key */ + key?: (proto.IMessageKey|null); + } + + /** Represents a DeclinePaymentRequestMessage. */ + class DeclinePaymentRequestMessage implements IDeclinePaymentRequestMessage { + + /** + * Constructs a new DeclinePaymentRequestMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IDeclinePaymentRequestMessage); + + /** DeclinePaymentRequestMessage key. */ + public key?: (proto.IMessageKey|null); + + /** + * Creates a new DeclinePaymentRequestMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns DeclinePaymentRequestMessage instance + */ + public static create(properties?: proto.Message.IDeclinePaymentRequestMessage): proto.Message.DeclinePaymentRequestMessage; + + /** + * Encodes the specified DeclinePaymentRequestMessage message. Does not implicitly {@link proto.Message.DeclinePaymentRequestMessage.verify|verify} messages. + * @param message DeclinePaymentRequestMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IDeclinePaymentRequestMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeclinePaymentRequestMessage message, length delimited. Does not implicitly {@link proto.Message.DeclinePaymentRequestMessage.verify|verify} messages. + * @param message DeclinePaymentRequestMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IDeclinePaymentRequestMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeclinePaymentRequestMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeclinePaymentRequestMessage + * @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.Message.DeclinePaymentRequestMessage; + + /** + * Decodes a DeclinePaymentRequestMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeclinePaymentRequestMessage + * @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.Message.DeclinePaymentRequestMessage; + + /** + * Verifies a DeclinePaymentRequestMessage 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 DeclinePaymentRequestMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeclinePaymentRequestMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.DeclinePaymentRequestMessage; + + /** + * Creates a plain object from a DeclinePaymentRequestMessage message. Also converts values to other types if specified. + * @param message DeclinePaymentRequestMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.DeclinePaymentRequestMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeclinePaymentRequestMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeviceSentMessage. */ + interface IDeviceSentMessage { + + /** DeviceSentMessage destinationJid */ + destinationJid?: (string|null); + + /** DeviceSentMessage message */ + message?: (proto.IMessage|null); + + /** DeviceSentMessage phash */ + phash?: (string|null); + } + + /** Represents a DeviceSentMessage. */ + class DeviceSentMessage implements IDeviceSentMessage { + + /** + * Constructs a new DeviceSentMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IDeviceSentMessage); + + /** DeviceSentMessage destinationJid. */ + public destinationJid: string; + + /** DeviceSentMessage message. */ + public message?: (proto.IMessage|null); + + /** DeviceSentMessage phash. */ + public phash: string; + + /** + * Creates a new DeviceSentMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns DeviceSentMessage instance + */ + public static create(properties?: proto.Message.IDeviceSentMessage): proto.Message.DeviceSentMessage; + + /** + * Encodes the specified DeviceSentMessage message. Does not implicitly {@link proto.Message.DeviceSentMessage.verify|verify} messages. + * @param message DeviceSentMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IDeviceSentMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeviceSentMessage message, length delimited. Does not implicitly {@link proto.Message.DeviceSentMessage.verify|verify} messages. + * @param message DeviceSentMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IDeviceSentMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeviceSentMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeviceSentMessage + * @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.Message.DeviceSentMessage; + + /** + * Decodes a DeviceSentMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeviceSentMessage + * @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.Message.DeviceSentMessage; + + /** + * Verifies a DeviceSentMessage 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 DeviceSentMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeviceSentMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.DeviceSentMessage; + + /** + * Creates a plain object from a DeviceSentMessage message. Also converts values to other types if specified. + * @param message DeviceSentMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.DeviceSentMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeviceSentMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DocumentMessage. */ + interface IDocumentMessage { + + /** DocumentMessage url */ + url?: (string|null); + + /** DocumentMessage mimetype */ + mimetype?: (string|null); + + /** DocumentMessage title */ + title?: (string|null); + + /** DocumentMessage fileSha256 */ + fileSha256?: (Uint8Array|null); + + /** DocumentMessage fileLength */ + fileLength?: (number|Long|null); + + /** DocumentMessage pageCount */ + pageCount?: (number|null); + + /** DocumentMessage mediaKey */ + mediaKey?: (Uint8Array|null); + + /** DocumentMessage fileName */ + fileName?: (string|null); + + /** DocumentMessage fileEncSha256 */ + fileEncSha256?: (Uint8Array|null); + + /** DocumentMessage directPath */ + directPath?: (string|null); + + /** DocumentMessage mediaKeyTimestamp */ + mediaKeyTimestamp?: (number|Long|null); + + /** DocumentMessage contactVcard */ + contactVcard?: (boolean|null); + + /** DocumentMessage thumbnailDirectPath */ + thumbnailDirectPath?: (string|null); + + /** DocumentMessage thumbnailSha256 */ + thumbnailSha256?: (Uint8Array|null); + + /** DocumentMessage thumbnailEncSha256 */ + thumbnailEncSha256?: (Uint8Array|null); + + /** DocumentMessage jpegThumbnail */ + jpegThumbnail?: (Uint8Array|null); + + /** DocumentMessage contextInfo */ + contextInfo?: (proto.IContextInfo|null); + + /** DocumentMessage thumbnailHeight */ + thumbnailHeight?: (number|null); + + /** DocumentMessage thumbnailWidth */ + thumbnailWidth?: (number|null); + + /** DocumentMessage caption */ + caption?: (string|null); + } + + /** Represents a DocumentMessage. */ + class DocumentMessage implements IDocumentMessage { + + /** + * Constructs a new DocumentMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IDocumentMessage); + + /** DocumentMessage url. */ + public url: string; + + /** DocumentMessage mimetype. */ + public mimetype: string; + + /** DocumentMessage title. */ + public title: string; + + /** DocumentMessage fileSha256. */ + public fileSha256: Uint8Array; + + /** DocumentMessage fileLength. */ + public fileLength: (number|Long); + + /** DocumentMessage pageCount. */ + public pageCount: number; + + /** DocumentMessage mediaKey. */ + public mediaKey: Uint8Array; + + /** DocumentMessage fileName. */ + public fileName: string; + + /** DocumentMessage fileEncSha256. */ + public fileEncSha256: Uint8Array; + + /** DocumentMessage directPath. */ + public directPath: string; + + /** DocumentMessage mediaKeyTimestamp. */ + public mediaKeyTimestamp: (number|Long); + + /** DocumentMessage contactVcard. */ + public contactVcard: boolean; + + /** DocumentMessage thumbnailDirectPath. */ + public thumbnailDirectPath: string; + + /** DocumentMessage thumbnailSha256. */ + public thumbnailSha256: Uint8Array; + + /** DocumentMessage thumbnailEncSha256. */ + public thumbnailEncSha256: Uint8Array; + + /** DocumentMessage jpegThumbnail. */ + public jpegThumbnail: Uint8Array; + + /** DocumentMessage contextInfo. */ + public contextInfo?: (proto.IContextInfo|null); + + /** DocumentMessage thumbnailHeight. */ + public thumbnailHeight: number; + + /** DocumentMessage thumbnailWidth. */ + public thumbnailWidth: number; + + /** DocumentMessage caption. */ + public caption: string; + + /** + * Creates a new DocumentMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns DocumentMessage instance + */ + public static create(properties?: proto.Message.IDocumentMessage): proto.Message.DocumentMessage; + + /** + * Encodes the specified DocumentMessage message. Does not implicitly {@link proto.Message.DocumentMessage.verify|verify} messages. + * @param message DocumentMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IDocumentMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DocumentMessage message, length delimited. Does not implicitly {@link proto.Message.DocumentMessage.verify|verify} messages. + * @param message DocumentMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IDocumentMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DocumentMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DocumentMessage + * @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.Message.DocumentMessage; + + /** + * Decodes a DocumentMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DocumentMessage + * @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.Message.DocumentMessage; + + /** + * Verifies a DocumentMessage 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 DocumentMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DocumentMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.DocumentMessage; + + /** + * Creates a plain object from a DocumentMessage message. Also converts values to other types if specified. + * @param message DocumentMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.DocumentMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DocumentMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an ExtendedTextMessage. */ + interface IExtendedTextMessage { + + /** ExtendedTextMessage text */ + text?: (string|null); + + /** ExtendedTextMessage matchedText */ + matchedText?: (string|null); + + /** ExtendedTextMessage canonicalUrl */ + canonicalUrl?: (string|null); + + /** ExtendedTextMessage description */ + description?: (string|null); + + /** ExtendedTextMessage title */ + title?: (string|null); + + /** ExtendedTextMessage textArgb */ + textArgb?: (number|null); + + /** ExtendedTextMessage backgroundArgb */ + backgroundArgb?: (number|null); + + /** ExtendedTextMessage font */ + font?: (proto.Message.ExtendedTextMessage.FontType|null); + + /** ExtendedTextMessage previewType */ + previewType?: (proto.Message.ExtendedTextMessage.PreviewType|null); + + /** ExtendedTextMessage jpegThumbnail */ + jpegThumbnail?: (Uint8Array|null); + + /** ExtendedTextMessage contextInfo */ + contextInfo?: (proto.IContextInfo|null); + + /** ExtendedTextMessage doNotPlayInline */ + doNotPlayInline?: (boolean|null); + + /** ExtendedTextMessage thumbnailDirectPath */ + thumbnailDirectPath?: (string|null); + + /** ExtendedTextMessage thumbnailSha256 */ + thumbnailSha256?: (Uint8Array|null); + + /** ExtendedTextMessage thumbnailEncSha256 */ + thumbnailEncSha256?: (Uint8Array|null); + + /** ExtendedTextMessage mediaKey */ + mediaKey?: (Uint8Array|null); + + /** ExtendedTextMessage mediaKeyTimestamp */ + mediaKeyTimestamp?: (number|Long|null); + + /** ExtendedTextMessage thumbnailHeight */ + thumbnailHeight?: (number|null); + + /** ExtendedTextMessage thumbnailWidth */ + thumbnailWidth?: (number|null); + + /** ExtendedTextMessage inviteLinkGroupType */ + inviteLinkGroupType?: (proto.Message.ExtendedTextMessage.InviteLinkGroupType|null); + + /** ExtendedTextMessage inviteLinkParentGroupSubjectV2 */ + inviteLinkParentGroupSubjectV2?: (string|null); + + /** ExtendedTextMessage inviteLinkParentGroupThumbnailV2 */ + inviteLinkParentGroupThumbnailV2?: (Uint8Array|null); + + /** ExtendedTextMessage inviteLinkGroupTypeV2 */ + inviteLinkGroupTypeV2?: (proto.Message.ExtendedTextMessage.InviteLinkGroupType|null); + } + + /** Represents an ExtendedTextMessage. */ + class ExtendedTextMessage implements IExtendedTextMessage { + + /** + * Constructs a new ExtendedTextMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IExtendedTextMessage); + + /** ExtendedTextMessage text. */ + public text: string; + + /** ExtendedTextMessage matchedText. */ + public matchedText: string; + + /** ExtendedTextMessage canonicalUrl. */ + public canonicalUrl: string; + + /** ExtendedTextMessage description. */ + public description: string; + + /** ExtendedTextMessage title. */ + public title: string; + + /** ExtendedTextMessage textArgb. */ + public textArgb: number; + + /** ExtendedTextMessage backgroundArgb. */ + public backgroundArgb: number; + + /** ExtendedTextMessage font. */ + public font: proto.Message.ExtendedTextMessage.FontType; + + /** ExtendedTextMessage previewType. */ + public previewType: proto.Message.ExtendedTextMessage.PreviewType; + + /** ExtendedTextMessage jpegThumbnail. */ + public jpegThumbnail: Uint8Array; + + /** ExtendedTextMessage contextInfo. */ + public contextInfo?: (proto.IContextInfo|null); + + /** ExtendedTextMessage doNotPlayInline. */ + public doNotPlayInline: boolean; + + /** ExtendedTextMessage thumbnailDirectPath. */ + public thumbnailDirectPath: string; + + /** ExtendedTextMessage thumbnailSha256. */ + public thumbnailSha256: Uint8Array; + + /** ExtendedTextMessage thumbnailEncSha256. */ + public thumbnailEncSha256: Uint8Array; + + /** ExtendedTextMessage mediaKey. */ + public mediaKey: Uint8Array; + + /** ExtendedTextMessage mediaKeyTimestamp. */ + public mediaKeyTimestamp: (number|Long); + + /** ExtendedTextMessage thumbnailHeight. */ + public thumbnailHeight: number; + + /** ExtendedTextMessage thumbnailWidth. */ + public thumbnailWidth: number; + + /** ExtendedTextMessage inviteLinkGroupType. */ + public inviteLinkGroupType: proto.Message.ExtendedTextMessage.InviteLinkGroupType; + + /** ExtendedTextMessage inviteLinkParentGroupSubjectV2. */ + public inviteLinkParentGroupSubjectV2: string; + + /** ExtendedTextMessage inviteLinkParentGroupThumbnailV2. */ + public inviteLinkParentGroupThumbnailV2: Uint8Array; + + /** ExtendedTextMessage inviteLinkGroupTypeV2. */ + public inviteLinkGroupTypeV2: proto.Message.ExtendedTextMessage.InviteLinkGroupType; + + /** + * Creates a new ExtendedTextMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtendedTextMessage instance + */ + public static create(properties?: proto.Message.IExtendedTextMessage): proto.Message.ExtendedTextMessage; + + /** + * Encodes the specified ExtendedTextMessage message. Does not implicitly {@link proto.Message.ExtendedTextMessage.verify|verify} messages. + * @param message ExtendedTextMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IExtendedTextMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtendedTextMessage message, length delimited. Does not implicitly {@link proto.Message.ExtendedTextMessage.verify|verify} messages. + * @param message ExtendedTextMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IExtendedTextMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtendedTextMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtendedTextMessage + * @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.Message.ExtendedTextMessage; + + /** + * Decodes an ExtendedTextMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtendedTextMessage + * @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.Message.ExtendedTextMessage; + + /** + * Verifies an ExtendedTextMessage 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 ExtendedTextMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtendedTextMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.ExtendedTextMessage; + + /** + * Creates a plain object from an ExtendedTextMessage message. Also converts values to other types if specified. + * @param message ExtendedTextMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.ExtendedTextMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtendedTextMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ExtendedTextMessage { + + /** FontType enum. */ + enum FontType { + SANS_SERIF = 0, + SERIF = 1, + NORICAN_REGULAR = 2, + BRYNDAN_WRITE = 3, + BEBASNEUE_REGULAR = 4, + OSWALD_HEAVY = 5 + } + + /** InviteLinkGroupType enum. */ + enum InviteLinkGroupType { + DEFAULT = 0, + PARENT = 1, + SUB = 2, + DEFAULT_SUB = 3 + } + + /** PreviewType enum. */ + enum PreviewType { + NONE = 0, + VIDEO = 1 + } + } + + /** Properties of a FutureProofMessage. */ + interface IFutureProofMessage { + + /** FutureProofMessage message */ + message?: (proto.IMessage|null); + } + + /** Represents a FutureProofMessage. */ + class FutureProofMessage implements IFutureProofMessage { + + /** + * Constructs a new FutureProofMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IFutureProofMessage); + + /** FutureProofMessage message. */ + public message?: (proto.IMessage|null); + + /** + * Creates a new FutureProofMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns FutureProofMessage instance + */ + public static create(properties?: proto.Message.IFutureProofMessage): proto.Message.FutureProofMessage; + + /** + * Encodes the specified FutureProofMessage message. Does not implicitly {@link proto.Message.FutureProofMessage.verify|verify} messages. + * @param message FutureProofMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IFutureProofMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FutureProofMessage message, length delimited. Does not implicitly {@link proto.Message.FutureProofMessage.verify|verify} messages. + * @param message FutureProofMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IFutureProofMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FutureProofMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FutureProofMessage + * @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.Message.FutureProofMessage; + + /** + * Decodes a FutureProofMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FutureProofMessage + * @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.Message.FutureProofMessage; + + /** + * Verifies a FutureProofMessage 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 FutureProofMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FutureProofMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.FutureProofMessage; + + /** + * Creates a plain object from a FutureProofMessage message. Also converts values to other types if specified. + * @param message FutureProofMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.FutureProofMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FutureProofMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GroupInviteMessage. */ + interface IGroupInviteMessage { + + /** GroupInviteMessage groupJid */ + groupJid?: (string|null); + + /** GroupInviteMessage inviteCode */ + inviteCode?: (string|null); + + /** GroupInviteMessage inviteExpiration */ + inviteExpiration?: (number|Long|null); + + /** GroupInviteMessage groupName */ + groupName?: (string|null); + + /** GroupInviteMessage jpegThumbnail */ + jpegThumbnail?: (Uint8Array|null); + + /** GroupInviteMessage caption */ + caption?: (string|null); + + /** GroupInviteMessage contextInfo */ + contextInfo?: (proto.IContextInfo|null); + + /** GroupInviteMessage groupType */ + groupType?: (proto.Message.GroupInviteMessage.GroupType|null); + } + + /** Represents a GroupInviteMessage. */ + class GroupInviteMessage implements IGroupInviteMessage { + + /** + * Constructs a new GroupInviteMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IGroupInviteMessage); + + /** GroupInviteMessage groupJid. */ + public groupJid: string; + + /** GroupInviteMessage inviteCode. */ + public inviteCode: string; + + /** GroupInviteMessage inviteExpiration. */ + public inviteExpiration: (number|Long); + + /** GroupInviteMessage groupName. */ + public groupName: string; + + /** GroupInviteMessage jpegThumbnail. */ + public jpegThumbnail: Uint8Array; + + /** GroupInviteMessage caption. */ + public caption: string; + + /** GroupInviteMessage contextInfo. */ + public contextInfo?: (proto.IContextInfo|null); + + /** GroupInviteMessage groupType. */ + public groupType: proto.Message.GroupInviteMessage.GroupType; + + /** + * Creates a new GroupInviteMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns GroupInviteMessage instance + */ + public static create(properties?: proto.Message.IGroupInviteMessage): proto.Message.GroupInviteMessage; + + /** + * Encodes the specified GroupInviteMessage message. Does not implicitly {@link proto.Message.GroupInviteMessage.verify|verify} messages. + * @param message GroupInviteMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IGroupInviteMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GroupInviteMessage message, length delimited. Does not implicitly {@link proto.Message.GroupInviteMessage.verify|verify} messages. + * @param message GroupInviteMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IGroupInviteMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GroupInviteMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GroupInviteMessage + * @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.Message.GroupInviteMessage; + + /** + * Decodes a GroupInviteMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GroupInviteMessage + * @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.Message.GroupInviteMessage; + + /** + * Verifies a GroupInviteMessage 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 GroupInviteMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GroupInviteMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.GroupInviteMessage; + + /** + * Creates a plain object from a GroupInviteMessage message. Also converts values to other types if specified. + * @param message GroupInviteMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.GroupInviteMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GroupInviteMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace GroupInviteMessage { + + /** GroupType enum. */ + enum GroupType { + DEFAULT = 0, + PARENT = 1 + } + } + + /** 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.Message.HighlyStructuredMessage.IHSMLocalizableParameter[]|null); + + /** HighlyStructuredMessage deterministicLg */ + deterministicLg?: (string|null); + + /** HighlyStructuredMessage deterministicLc */ + deterministicLc?: (string|null); + + /** HighlyStructuredMessage hydratedHsm */ + hydratedHsm?: (proto.Message.ITemplateMessage|null); + } + + /** Represents a HighlyStructuredMessage. */ + class HighlyStructuredMessage implements IHighlyStructuredMessage { + + /** + * Constructs a new HighlyStructuredMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.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.Message.HighlyStructuredMessage.IHSMLocalizableParameter[]; + + /** HighlyStructuredMessage deterministicLg. */ + public deterministicLg: string; + + /** HighlyStructuredMessage deterministicLc. */ + public deterministicLc: string; + + /** HighlyStructuredMessage hydratedHsm. */ + public hydratedHsm?: (proto.Message.ITemplateMessage|null); + + /** + * Creates a new HighlyStructuredMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns HighlyStructuredMessage instance + */ + public static create(properties?: proto.Message.IHighlyStructuredMessage): proto.Message.HighlyStructuredMessage; + + /** + * Encodes the specified HighlyStructuredMessage message. Does not implicitly {@link proto.Message.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.Message.IHighlyStructuredMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HighlyStructuredMessage message, length delimited. Does not implicitly {@link proto.Message.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.Message.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.Message.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.Message.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.Message.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.Message.HighlyStructuredMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HighlyStructuredMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace HighlyStructuredMessage { + + /** Properties of a HSMLocalizableParameter. */ + interface IHSMLocalizableParameter { + + /** HSMLocalizableParameter default */ + "default"?: (string|null); + + /** HSMLocalizableParameter currency */ + currency?: (proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMCurrency|null); + + /** HSMLocalizableParameter dateTime */ + dateTime?: (proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMDateTime|null); + } + + /** Represents a HSMLocalizableParameter. */ + class HSMLocalizableParameter implements IHSMLocalizableParameter { + + /** + * Constructs a new HSMLocalizableParameter. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.HighlyStructuredMessage.IHSMLocalizableParameter); + + /** HSMLocalizableParameter default. */ + public default: string; + + /** HSMLocalizableParameter currency. */ + public currency?: (proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMCurrency|null); + + /** HSMLocalizableParameter dateTime. */ + public dateTime?: (proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMDateTime|null); + + /** HSMLocalizableParameter paramOneof. */ + public paramOneof?: ("currency"|"dateTime"); + + /** + * Creates a new HSMLocalizableParameter instance using the specified properties. + * @param [properties] Properties to set + * @returns HSMLocalizableParameter instance + */ + public static create(properties?: proto.Message.HighlyStructuredMessage.IHSMLocalizableParameter): proto.Message.HighlyStructuredMessage.HSMLocalizableParameter; + + /** + * Encodes the specified HSMLocalizableParameter message. Does not implicitly {@link proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.verify|verify} messages. + * @param message HSMLocalizableParameter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.HighlyStructuredMessage.IHSMLocalizableParameter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HSMLocalizableParameter message, length delimited. Does not implicitly {@link proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.verify|verify} messages. + * @param message HSMLocalizableParameter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.HighlyStructuredMessage.IHSMLocalizableParameter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HSMLocalizableParameter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HSMLocalizableParameter + * @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.Message.HighlyStructuredMessage.HSMLocalizableParameter; + + /** + * Decodes a HSMLocalizableParameter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HSMLocalizableParameter + * @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.Message.HighlyStructuredMessage.HSMLocalizableParameter; + + /** + * Verifies a HSMLocalizableParameter 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 HSMLocalizableParameter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HSMLocalizableParameter + */ + public static fromObject(object: { [k: string]: any }): proto.Message.HighlyStructuredMessage.HSMLocalizableParameter; + + /** + * Creates a plain object from a HSMLocalizableParameter message. Also converts values to other types if specified. + * @param message HSMLocalizableParameter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.HighlyStructuredMessage.HSMLocalizableParameter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HSMLocalizableParameter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace HSMLocalizableParameter { + + /** Properties of a HSMCurrency. */ + interface IHSMCurrency { + + /** HSMCurrency currencyCode */ + currencyCode?: (string|null); + + /** HSMCurrency amount1000 */ + amount1000?: (number|Long|null); + } + + /** Represents a HSMCurrency. */ + class HSMCurrency implements IHSMCurrency { + + /** + * Constructs a new HSMCurrency. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMCurrency); + + /** HSMCurrency currencyCode. */ + public currencyCode: string; + + /** HSMCurrency amount1000. */ + public amount1000: (number|Long); + + /** + * Creates a new HSMCurrency instance using the specified properties. + * @param [properties] Properties to set + * @returns HSMCurrency instance + */ + public static create(properties?: proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMCurrency): proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency; + + /** + * Encodes the specified HSMCurrency message. Does not implicitly {@link proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency.verify|verify} messages. + * @param message HSMCurrency message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMCurrency, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HSMCurrency message, length delimited. Does not implicitly {@link proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency.verify|verify} messages. + * @param message HSMCurrency message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMCurrency, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HSMCurrency message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HSMCurrency + * @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.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency; + + /** + * Decodes a HSMCurrency message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HSMCurrency + * @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.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency; + + /** + * Verifies a HSMCurrency 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 HSMCurrency message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HSMCurrency + */ + public static fromObject(object: { [k: string]: any }): proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency; + + /** + * Creates a plain object from a HSMCurrency message. Also converts values to other types if specified. + * @param message HSMCurrency + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HSMCurrency to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HSMDateTime. */ + interface IHSMDateTime { + + /** HSMDateTime component */ + component?: (proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeComponent|null); + + /** HSMDateTime unixEpoch */ + unixEpoch?: (proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeUnixEpoch|null); + } + + /** Represents a HSMDateTime. */ + class HSMDateTime implements IHSMDateTime { + + /** + * Constructs a new HSMDateTime. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMDateTime); + + /** HSMDateTime component. */ + public component?: (proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeComponent|null); + + /** HSMDateTime unixEpoch. */ + public unixEpoch?: (proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeUnixEpoch|null); + + /** HSMDateTime datetimeOneof. */ + public datetimeOneof?: ("component"|"unixEpoch"); + + /** + * Creates a new HSMDateTime instance using the specified properties. + * @param [properties] Properties to set + * @returns HSMDateTime instance + */ + public static create(properties?: proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMDateTime): proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime; + + /** + * Encodes the specified HSMDateTime message. Does not implicitly {@link proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.verify|verify} messages. + * @param message HSMDateTime message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMDateTime, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HSMDateTime message, length delimited. Does not implicitly {@link proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.verify|verify} messages. + * @param message HSMDateTime message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMDateTime, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HSMDateTime message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HSMDateTime + * @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.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime; + + /** + * Decodes a HSMDateTime message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HSMDateTime + * @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.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime; + + /** + * Verifies a HSMDateTime 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 HSMDateTime message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HSMDateTime + */ + public static fromObject(object: { [k: string]: any }): proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime; + + /** + * Creates a plain object from a HSMDateTime message. Also converts values to other types if specified. + * @param message HSMDateTime + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HSMDateTime to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace HSMDateTime { + + /** Properties of a HSMDateTimeComponent. */ + interface IHSMDateTimeComponent { + + /** HSMDateTimeComponent dayOfWeek */ + dayOfWeek?: (proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.DayOfWeekType|null); + + /** HSMDateTimeComponent year */ + year?: (number|null); + + /** HSMDateTimeComponent month */ + month?: (number|null); + + /** HSMDateTimeComponent dayOfMonth */ + dayOfMonth?: (number|null); + + /** HSMDateTimeComponent hour */ + hour?: (number|null); + + /** HSMDateTimeComponent minute */ + minute?: (number|null); + + /** HSMDateTimeComponent calendar */ + calendar?: (proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.CalendarType|null); + } + + /** Represents a HSMDateTimeComponent. */ + class HSMDateTimeComponent implements IHSMDateTimeComponent { + + /** + * Constructs a new HSMDateTimeComponent. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeComponent); + + /** HSMDateTimeComponent dayOfWeek. */ + public dayOfWeek: proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.DayOfWeekType; + + /** HSMDateTimeComponent year. */ + public year: number; + + /** HSMDateTimeComponent month. */ + public month: number; + + /** HSMDateTimeComponent dayOfMonth. */ + public dayOfMonth: number; + + /** HSMDateTimeComponent hour. */ + public hour: number; + + /** HSMDateTimeComponent minute. */ + public minute: number; + + /** HSMDateTimeComponent calendar. */ + public calendar: proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.CalendarType; + + /** + * Creates a new HSMDateTimeComponent instance using the specified properties. + * @param [properties] Properties to set + * @returns HSMDateTimeComponent instance + */ + public static create(properties?: proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeComponent): proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent; + + /** + * Encodes the specified HSMDateTimeComponent message. Does not implicitly {@link proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.verify|verify} messages. + * @param message HSMDateTimeComponent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeComponent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HSMDateTimeComponent message, length delimited. Does not implicitly {@link proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.verify|verify} messages. + * @param message HSMDateTimeComponent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeComponent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HSMDateTimeComponent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HSMDateTimeComponent + * @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.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent; + + /** + * Decodes a HSMDateTimeComponent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HSMDateTimeComponent + * @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.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent; + + /** + * Verifies a HSMDateTimeComponent 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 HSMDateTimeComponent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HSMDateTimeComponent + */ + public static fromObject(object: { [k: string]: any }): proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent; + + /** + * Creates a plain object from a HSMDateTimeComponent message. Also converts values to other types if specified. + * @param message HSMDateTimeComponent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HSMDateTimeComponent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace HSMDateTimeComponent { + + /** CalendarType enum. */ + enum CalendarType { + GREGORIAN = 1, + SOLAR_HIJRI = 2 + } + + /** DayOfWeekType enum. */ + enum DayOfWeekType { + MONDAY = 1, + TUESDAY = 2, + WEDNESDAY = 3, + THURSDAY = 4, + FRIDAY = 5, + SATURDAY = 6, + SUNDAY = 7 + } + } + + /** Properties of a HSMDateTimeUnixEpoch. */ + interface IHSMDateTimeUnixEpoch { + + /** HSMDateTimeUnixEpoch timestamp */ + timestamp?: (number|Long|null); + } + + /** Represents a HSMDateTimeUnixEpoch. */ + class HSMDateTimeUnixEpoch implements IHSMDateTimeUnixEpoch { + + /** + * Constructs a new HSMDateTimeUnixEpoch. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeUnixEpoch); + + /** HSMDateTimeUnixEpoch timestamp. */ + public timestamp: (number|Long); + + /** + * Creates a new HSMDateTimeUnixEpoch instance using the specified properties. + * @param [properties] Properties to set + * @returns HSMDateTimeUnixEpoch instance + */ + public static create(properties?: proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeUnixEpoch): proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch; + + /** + * Encodes the specified HSMDateTimeUnixEpoch message. Does not implicitly {@link proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch.verify|verify} messages. + * @param message HSMDateTimeUnixEpoch message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeUnixEpoch, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HSMDateTimeUnixEpoch message, length delimited. Does not implicitly {@link proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch.verify|verify} messages. + * @param message HSMDateTimeUnixEpoch message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeUnixEpoch, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HSMDateTimeUnixEpoch message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HSMDateTimeUnixEpoch + * @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.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch; + + /** + * Decodes a HSMDateTimeUnixEpoch message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HSMDateTimeUnixEpoch + * @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.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch; + + /** + * Verifies a HSMDateTimeUnixEpoch 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 HSMDateTimeUnixEpoch message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HSMDateTimeUnixEpoch + */ + public static fromObject(object: { [k: string]: any }): proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch; + + /** + * Creates a plain object from a HSMDateTimeUnixEpoch message. Also converts values to other types if specified. + * @param message HSMDateTimeUnixEpoch + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HSMDateTimeUnixEpoch 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.Message.HistorySyncNotification.HistorySyncType|null); + + /** HistorySyncNotification chunkOrder */ + chunkOrder?: (number|null); + + /** HistorySyncNotification originalMessageId */ + originalMessageId?: (string|null); + + /** HistorySyncNotification progress */ + progress?: (number|null); + } + + /** Represents a HistorySyncNotification. */ + class HistorySyncNotification implements IHistorySyncNotification { + + /** + * Constructs a new HistorySyncNotification. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.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.Message.HistorySyncNotification.HistorySyncType; + + /** HistorySyncNotification chunkOrder. */ + public chunkOrder: number; + + /** HistorySyncNotification originalMessageId. */ + public originalMessageId: string; + + /** HistorySyncNotification progress. */ + public progress: number; + + /** + * Creates a new HistorySyncNotification instance using the specified properties. + * @param [properties] Properties to set + * @returns HistorySyncNotification instance + */ + public static create(properties?: proto.Message.IHistorySyncNotification): proto.Message.HistorySyncNotification; + + /** + * Encodes the specified HistorySyncNotification message. Does not implicitly {@link proto.Message.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.Message.IHistorySyncNotification, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HistorySyncNotification message, length delimited. Does not implicitly {@link proto.Message.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.Message.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.Message.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.Message.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.Message.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.Message.HistorySyncNotification, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HistorySyncNotification to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace HistorySyncNotification { + + /** HistorySyncType enum. */ + enum HistorySyncType { + INITIAL_BOOTSTRAP = 0, + INITIAL_STATUS_V3 = 1, + FULL = 2, + RECENT = 3, + PUSH_NAME = 4 + } + } + + /** Properties of an ImageMessage. */ + interface IImageMessage { + + /** ImageMessage url */ + url?: (string|null); + + /** ImageMessage mimetype */ + mimetype?: (string|null); + + /** ImageMessage caption */ + caption?: (string|null); + + /** ImageMessage fileSha256 */ + fileSha256?: (Uint8Array|null); + + /** ImageMessage fileLength */ + fileLength?: (number|Long|null); + + /** ImageMessage height */ + height?: (number|null); + + /** ImageMessage width */ + width?: (number|null); + + /** ImageMessage mediaKey */ + mediaKey?: (Uint8Array|null); + + /** ImageMessage fileEncSha256 */ + fileEncSha256?: (Uint8Array|null); + + /** ImageMessage interactiveAnnotations */ + interactiveAnnotations?: (proto.IInteractiveAnnotation[]|null); + + /** ImageMessage directPath */ + directPath?: (string|null); + + /** ImageMessage mediaKeyTimestamp */ + mediaKeyTimestamp?: (number|Long|null); + + /** ImageMessage jpegThumbnail */ + jpegThumbnail?: (Uint8Array|null); + + /** ImageMessage contextInfo */ + contextInfo?: (proto.IContextInfo|null); + + /** ImageMessage firstScanSidecar */ + firstScanSidecar?: (Uint8Array|null); + + /** ImageMessage firstScanLength */ + firstScanLength?: (number|null); + + /** ImageMessage experimentGroupId */ + experimentGroupId?: (number|null); + + /** ImageMessage scansSidecar */ + scansSidecar?: (Uint8Array|null); + + /** ImageMessage scanLengths */ + scanLengths?: (number[]|null); + + /** ImageMessage midQualityFileSha256 */ + midQualityFileSha256?: (Uint8Array|null); + + /** ImageMessage midQualityFileEncSha256 */ + midQualityFileEncSha256?: (Uint8Array|null); + + /** ImageMessage viewOnce */ + viewOnce?: (boolean|null); + + /** ImageMessage thumbnailDirectPath */ + thumbnailDirectPath?: (string|null); + + /** ImageMessage thumbnailSha256 */ + thumbnailSha256?: (Uint8Array|null); + + /** ImageMessage thumbnailEncSha256 */ + thumbnailEncSha256?: (Uint8Array|null); + + /** ImageMessage staticUrl */ + staticUrl?: (string|null); + } + + /** Represents an ImageMessage. */ + class ImageMessage implements IImageMessage { + + /** + * Constructs a new ImageMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IImageMessage); + + /** ImageMessage url. */ + public url: string; + + /** ImageMessage mimetype. */ + public mimetype: string; + + /** ImageMessage caption. */ + public caption: string; + + /** ImageMessage fileSha256. */ + public fileSha256: Uint8Array; + + /** ImageMessage fileLength. */ + public fileLength: (number|Long); + + /** ImageMessage height. */ + public height: number; + + /** ImageMessage width. */ + public width: number; + + /** ImageMessage mediaKey. */ + public mediaKey: Uint8Array; + + /** ImageMessage fileEncSha256. */ + public fileEncSha256: Uint8Array; + + /** ImageMessage interactiveAnnotations. */ + public interactiveAnnotations: proto.IInteractiveAnnotation[]; + + /** ImageMessage directPath. */ + public directPath: string; + + /** ImageMessage mediaKeyTimestamp. */ + public mediaKeyTimestamp: (number|Long); + + /** ImageMessage jpegThumbnail. */ + public jpegThumbnail: Uint8Array; + + /** ImageMessage contextInfo. */ + public contextInfo?: (proto.IContextInfo|null); + + /** ImageMessage firstScanSidecar. */ + public firstScanSidecar: Uint8Array; + + /** ImageMessage firstScanLength. */ + public firstScanLength: number; + + /** ImageMessage experimentGroupId. */ + public experimentGroupId: number; + + /** ImageMessage scansSidecar. */ + public scansSidecar: Uint8Array; + + /** ImageMessage scanLengths. */ + public scanLengths: number[]; + + /** ImageMessage midQualityFileSha256. */ + public midQualityFileSha256: Uint8Array; + + /** ImageMessage midQualityFileEncSha256. */ + public midQualityFileEncSha256: Uint8Array; + + /** ImageMessage viewOnce. */ + public viewOnce: boolean; + + /** ImageMessage thumbnailDirectPath. */ + public thumbnailDirectPath: string; + + /** ImageMessage thumbnailSha256. */ + public thumbnailSha256: Uint8Array; + + /** ImageMessage thumbnailEncSha256. */ + public thumbnailEncSha256: Uint8Array; + + /** ImageMessage staticUrl. */ + public staticUrl: string; + + /** + * Creates a new ImageMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns ImageMessage instance + */ + public static create(properties?: proto.Message.IImageMessage): proto.Message.ImageMessage; + + /** + * Encodes the specified ImageMessage message. Does not implicitly {@link proto.Message.ImageMessage.verify|verify} messages. + * @param message ImageMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IImageMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImageMessage message, length delimited. Does not implicitly {@link proto.Message.ImageMessage.verify|verify} messages. + * @param message ImageMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IImageMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImageMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImageMessage + * @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.Message.ImageMessage; + + /** + * Decodes an ImageMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImageMessage + * @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.Message.ImageMessage; + + /** + * Verifies an ImageMessage 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 ImageMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImageMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.ImageMessage; + + /** + * Creates a plain object from an ImageMessage message. Also converts values to other types if specified. + * @param message ImageMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.ImageMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImageMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an InitialSecurityNotificationSettingSync. */ + interface IInitialSecurityNotificationSettingSync { + + /** InitialSecurityNotificationSettingSync securityNotificationEnabled */ + securityNotificationEnabled?: (boolean|null); + } + + /** Represents an InitialSecurityNotificationSettingSync. */ + class InitialSecurityNotificationSettingSync implements IInitialSecurityNotificationSettingSync { + + /** + * Constructs a new InitialSecurityNotificationSettingSync. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IInitialSecurityNotificationSettingSync); + + /** InitialSecurityNotificationSettingSync securityNotificationEnabled. */ + public securityNotificationEnabled: boolean; + + /** + * Creates a new InitialSecurityNotificationSettingSync instance using the specified properties. + * @param [properties] Properties to set + * @returns InitialSecurityNotificationSettingSync instance + */ + public static create(properties?: proto.Message.IInitialSecurityNotificationSettingSync): proto.Message.InitialSecurityNotificationSettingSync; + + /** + * Encodes the specified InitialSecurityNotificationSettingSync message. Does not implicitly {@link proto.Message.InitialSecurityNotificationSettingSync.verify|verify} messages. + * @param message InitialSecurityNotificationSettingSync message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IInitialSecurityNotificationSettingSync, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InitialSecurityNotificationSettingSync message, length delimited. Does not implicitly {@link proto.Message.InitialSecurityNotificationSettingSync.verify|verify} messages. + * @param message InitialSecurityNotificationSettingSync message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IInitialSecurityNotificationSettingSync, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InitialSecurityNotificationSettingSync message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InitialSecurityNotificationSettingSync + * @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.Message.InitialSecurityNotificationSettingSync; + + /** + * Decodes an InitialSecurityNotificationSettingSync message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InitialSecurityNotificationSettingSync + * @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.Message.InitialSecurityNotificationSettingSync; + + /** + * Verifies an InitialSecurityNotificationSettingSync 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 InitialSecurityNotificationSettingSync message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InitialSecurityNotificationSettingSync + */ + public static fromObject(object: { [k: string]: any }): proto.Message.InitialSecurityNotificationSettingSync; + + /** + * Creates a plain object from an InitialSecurityNotificationSettingSync message. Also converts values to other types if specified. + * @param message InitialSecurityNotificationSettingSync + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.InitialSecurityNotificationSettingSync, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InitialSecurityNotificationSettingSync to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an InteractiveMessage. */ + interface IInteractiveMessage { + + /** InteractiveMessage header */ + header?: (proto.Message.InteractiveMessage.IHeader|null); + + /** InteractiveMessage body */ + body?: (proto.Message.InteractiveMessage.IBody|null); + + /** InteractiveMessage footer */ + footer?: (proto.Message.InteractiveMessage.IFooter|null); + + /** InteractiveMessage contextInfo */ + contextInfo?: (proto.IContextInfo|null); + + /** InteractiveMessage shopStorefrontMessage */ + shopStorefrontMessage?: (proto.Message.InteractiveMessage.IShopMessage|null); + + /** InteractiveMessage collectionMessage */ + collectionMessage?: (proto.Message.InteractiveMessage.ICollectionMessage|null); + + /** InteractiveMessage nativeFlowMessage */ + nativeFlowMessage?: (proto.Message.InteractiveMessage.INativeFlowMessage|null); + } + + /** Represents an InteractiveMessage. */ + class InteractiveMessage implements IInteractiveMessage { + + /** + * Constructs a new InteractiveMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IInteractiveMessage); + + /** InteractiveMessage header. */ + public header?: (proto.Message.InteractiveMessage.IHeader|null); + + /** InteractiveMessage body. */ + public body?: (proto.Message.InteractiveMessage.IBody|null); + + /** InteractiveMessage footer. */ + public footer?: (proto.Message.InteractiveMessage.IFooter|null); + + /** InteractiveMessage contextInfo. */ + public contextInfo?: (proto.IContextInfo|null); + + /** InteractiveMessage shopStorefrontMessage. */ + public shopStorefrontMessage?: (proto.Message.InteractiveMessage.IShopMessage|null); + + /** InteractiveMessage collectionMessage. */ + public collectionMessage?: (proto.Message.InteractiveMessage.ICollectionMessage|null); + + /** InteractiveMessage nativeFlowMessage. */ + public nativeFlowMessage?: (proto.Message.InteractiveMessage.INativeFlowMessage|null); + + /** InteractiveMessage interactiveMessage. */ + public interactiveMessage?: ("shopStorefrontMessage"|"collectionMessage"|"nativeFlowMessage"); + + /** + * Creates a new InteractiveMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns InteractiveMessage instance + */ + public static create(properties?: proto.Message.IInteractiveMessage): proto.Message.InteractiveMessage; + + /** + * Encodes the specified InteractiveMessage message. Does not implicitly {@link proto.Message.InteractiveMessage.verify|verify} messages. + * @param message InteractiveMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IInteractiveMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InteractiveMessage message, length delimited. Does not implicitly {@link proto.Message.InteractiveMessage.verify|verify} messages. + * @param message InteractiveMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IInteractiveMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InteractiveMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InteractiveMessage + * @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.Message.InteractiveMessage; + + /** + * Decodes an InteractiveMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InteractiveMessage + * @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.Message.InteractiveMessage; + + /** + * Verifies an InteractiveMessage 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 InteractiveMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InteractiveMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.InteractiveMessage; + + /** + * Creates a plain object from an InteractiveMessage message. Also converts values to other types if specified. + * @param message InteractiveMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.InteractiveMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InteractiveMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace InteractiveMessage { + + /** Properties of a Body. */ + interface IBody { + + /** Body text */ + text?: (string|null); + } + + /** Represents a Body. */ + class Body implements IBody { + + /** + * Constructs a new Body. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.InteractiveMessage.IBody); + + /** Body text. */ + public text: string; + + /** + * Creates a new Body instance using the specified properties. + * @param [properties] Properties to set + * @returns Body instance + */ + public static create(properties?: proto.Message.InteractiveMessage.IBody): proto.Message.InteractiveMessage.Body; + + /** + * Encodes the specified Body message. Does not implicitly {@link proto.Message.InteractiveMessage.Body.verify|verify} messages. + * @param message Body message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.InteractiveMessage.IBody, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Body message, length delimited. Does not implicitly {@link proto.Message.InteractiveMessage.Body.verify|verify} messages. + * @param message Body message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.InteractiveMessage.IBody, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Body message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Body + * @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.Message.InteractiveMessage.Body; + + /** + * Decodes a Body message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Body + * @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.Message.InteractiveMessage.Body; + + /** + * Verifies a Body 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 Body message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Body + */ + public static fromObject(object: { [k: string]: any }): proto.Message.InteractiveMessage.Body; + + /** + * Creates a plain object from a Body message. Also converts values to other types if specified. + * @param message Body + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.InteractiveMessage.Body, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Body to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CollectionMessage. */ + interface ICollectionMessage { + + /** CollectionMessage bizJid */ + bizJid?: (string|null); + + /** CollectionMessage id */ + id?: (string|null); + + /** CollectionMessage messageVersion */ + messageVersion?: (number|null); + } + + /** Represents a CollectionMessage. */ + class CollectionMessage implements ICollectionMessage { + + /** + * Constructs a new CollectionMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.InteractiveMessage.ICollectionMessage); + + /** CollectionMessage bizJid. */ + public bizJid: string; + + /** CollectionMessage id. */ + public id: string; + + /** CollectionMessage messageVersion. */ + public messageVersion: number; + + /** + * Creates a new CollectionMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns CollectionMessage instance + */ + public static create(properties?: proto.Message.InteractiveMessage.ICollectionMessage): proto.Message.InteractiveMessage.CollectionMessage; + + /** + * Encodes the specified CollectionMessage message. Does not implicitly {@link proto.Message.InteractiveMessage.CollectionMessage.verify|verify} messages. + * @param message CollectionMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.InteractiveMessage.ICollectionMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CollectionMessage message, length delimited. Does not implicitly {@link proto.Message.InteractiveMessage.CollectionMessage.verify|verify} messages. + * @param message CollectionMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.InteractiveMessage.ICollectionMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CollectionMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CollectionMessage + * @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.Message.InteractiveMessage.CollectionMessage; + + /** + * Decodes a CollectionMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CollectionMessage + * @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.Message.InteractiveMessage.CollectionMessage; + + /** + * Verifies a CollectionMessage 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 CollectionMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CollectionMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.InteractiveMessage.CollectionMessage; + + /** + * Creates a plain object from a CollectionMessage message. Also converts values to other types if specified. + * @param message CollectionMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.InteractiveMessage.CollectionMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CollectionMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Footer. */ + interface IFooter { + + /** Footer text */ + text?: (string|null); + } + + /** Represents a Footer. */ + class Footer implements IFooter { + + /** + * Constructs a new Footer. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.InteractiveMessage.IFooter); + + /** Footer text. */ + public text: string; + + /** + * Creates a new Footer instance using the specified properties. + * @param [properties] Properties to set + * @returns Footer instance + */ + public static create(properties?: proto.Message.InteractiveMessage.IFooter): proto.Message.InteractiveMessage.Footer; + + /** + * Encodes the specified Footer message. Does not implicitly {@link proto.Message.InteractiveMessage.Footer.verify|verify} messages. + * @param message Footer message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.InteractiveMessage.IFooter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Footer message, length delimited. Does not implicitly {@link proto.Message.InteractiveMessage.Footer.verify|verify} messages. + * @param message Footer message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.InteractiveMessage.IFooter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Footer message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Footer + * @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.Message.InteractiveMessage.Footer; + + /** + * Decodes a Footer message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Footer + * @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.Message.InteractiveMessage.Footer; + + /** + * Verifies a Footer 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 Footer message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Footer + */ + public static fromObject(object: { [k: string]: any }): proto.Message.InteractiveMessage.Footer; + + /** + * Creates a plain object from a Footer message. Also converts values to other types if specified. + * @param message Footer + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.InteractiveMessage.Footer, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Footer 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.Message.IDocumentMessage|null); + + /** Header imageMessage */ + imageMessage?: (proto.Message.IImageMessage|null); + + /** Header jpegThumbnail */ + jpegThumbnail?: (Uint8Array|null); + + /** Header videoMessage */ + videoMessage?: (proto.Message.IVideoMessage|null); + } + + /** Represents a Header. */ + class Header implements IHeader { + + /** + * Constructs a new Header. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.InteractiveMessage.IHeader); + + /** Header title. */ + public title: string; + + /** Header subtitle. */ + public subtitle: string; + + /** Header hasMediaAttachment. */ + public hasMediaAttachment: boolean; + + /** Header documentMessage. */ + public documentMessage?: (proto.Message.IDocumentMessage|null); + + /** Header imageMessage. */ + public imageMessage?: (proto.Message.IImageMessage|null); + + /** Header jpegThumbnail. */ + public jpegThumbnail?: (Uint8Array|null); + + /** Header videoMessage. */ + public videoMessage?: (proto.Message.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.Message.InteractiveMessage.IHeader): proto.Message.InteractiveMessage.Header; + + /** + * Encodes the specified Header message. Does not implicitly {@link proto.Message.InteractiveMessage.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.Message.InteractiveMessage.IHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Header message, length delimited. Does not implicitly {@link proto.Message.InteractiveMessage.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.Message.InteractiveMessage.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.Message.InteractiveMessage.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.Message.InteractiveMessage.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.Message.InteractiveMessage.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.Message.InteractiveMessage.Header, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Header to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a NativeFlowMessage. */ + interface INativeFlowMessage { + + /** NativeFlowMessage buttons */ + buttons?: (proto.Message.InteractiveMessage.NativeFlowMessage.INativeFlowButton[]|null); + + /** NativeFlowMessage messageParamsJson */ + messageParamsJson?: (string|null); + + /** NativeFlowMessage messageVersion */ + messageVersion?: (number|null); + } + + /** Represents a NativeFlowMessage. */ + class NativeFlowMessage implements INativeFlowMessage { + + /** + * Constructs a new NativeFlowMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.InteractiveMessage.INativeFlowMessage); + + /** NativeFlowMessage buttons. */ + public buttons: proto.Message.InteractiveMessage.NativeFlowMessage.INativeFlowButton[]; + + /** NativeFlowMessage messageParamsJson. */ + public messageParamsJson: string; + + /** NativeFlowMessage messageVersion. */ + public messageVersion: number; + + /** + * Creates a new NativeFlowMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns NativeFlowMessage instance + */ + public static create(properties?: proto.Message.InteractiveMessage.INativeFlowMessage): proto.Message.InteractiveMessage.NativeFlowMessage; + + /** + * Encodes the specified NativeFlowMessage message. Does not implicitly {@link proto.Message.InteractiveMessage.NativeFlowMessage.verify|verify} messages. + * @param message NativeFlowMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.InteractiveMessage.INativeFlowMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NativeFlowMessage message, length delimited. Does not implicitly {@link proto.Message.InteractiveMessage.NativeFlowMessage.verify|verify} messages. + * @param message NativeFlowMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.InteractiveMessage.INativeFlowMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NativeFlowMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NativeFlowMessage + * @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.Message.InteractiveMessage.NativeFlowMessage; + + /** + * Decodes a NativeFlowMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NativeFlowMessage + * @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.Message.InteractiveMessage.NativeFlowMessage; + + /** + * Verifies a NativeFlowMessage 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 NativeFlowMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NativeFlowMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.InteractiveMessage.NativeFlowMessage; + + /** + * Creates a plain object from a NativeFlowMessage message. Also converts values to other types if specified. + * @param message NativeFlowMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.InteractiveMessage.NativeFlowMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NativeFlowMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace NativeFlowMessage { + + /** Properties of a NativeFlowButton. */ + interface INativeFlowButton { + + /** NativeFlowButton name */ + name?: (string|null); + + /** NativeFlowButton buttonParamsJson */ + buttonParamsJson?: (string|null); + } + + /** Represents a NativeFlowButton. */ + class NativeFlowButton implements INativeFlowButton { + + /** + * Constructs a new NativeFlowButton. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.InteractiveMessage.NativeFlowMessage.INativeFlowButton); + + /** NativeFlowButton name. */ + public name: string; + + /** NativeFlowButton buttonParamsJson. */ + public buttonParamsJson: string; + + /** + * Creates a new NativeFlowButton instance using the specified properties. + * @param [properties] Properties to set + * @returns NativeFlowButton instance + */ + public static create(properties?: proto.Message.InteractiveMessage.NativeFlowMessage.INativeFlowButton): proto.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton; + + /** + * Encodes the specified NativeFlowButton message. Does not implicitly {@link proto.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton.verify|verify} messages. + * @param message NativeFlowButton message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.InteractiveMessage.NativeFlowMessage.INativeFlowButton, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NativeFlowButton message, length delimited. Does not implicitly {@link proto.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton.verify|verify} messages. + * @param message NativeFlowButton message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.InteractiveMessage.NativeFlowMessage.INativeFlowButton, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NativeFlowButton message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NativeFlowButton + * @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.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton; + + /** + * Decodes a NativeFlowButton message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NativeFlowButton + * @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.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton; + + /** + * Verifies a NativeFlowButton 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 NativeFlowButton message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NativeFlowButton + */ + public static fromObject(object: { [k: string]: any }): proto.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton; + + /** + * Creates a plain object from a NativeFlowButton message. Also converts values to other types if specified. + * @param message NativeFlowButton + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NativeFlowButton to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a ShopMessage. */ + interface IShopMessage { + + /** ShopMessage id */ + id?: (string|null); + + /** ShopMessage surface */ + surface?: (proto.Message.InteractiveMessage.ShopMessage.Surface|null); + + /** ShopMessage messageVersion */ + messageVersion?: (number|null); + } + + /** Represents a ShopMessage. */ + class ShopMessage implements IShopMessage { + + /** + * Constructs a new ShopMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.InteractiveMessage.IShopMessage); + + /** ShopMessage id. */ + public id: string; + + /** ShopMessage surface. */ + public surface: proto.Message.InteractiveMessage.ShopMessage.Surface; + + /** ShopMessage messageVersion. */ + public messageVersion: number; + + /** + * Creates a new ShopMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns ShopMessage instance + */ + public static create(properties?: proto.Message.InteractiveMessage.IShopMessage): proto.Message.InteractiveMessage.ShopMessage; + + /** + * Encodes the specified ShopMessage message. Does not implicitly {@link proto.Message.InteractiveMessage.ShopMessage.verify|verify} messages. + * @param message ShopMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.InteractiveMessage.IShopMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ShopMessage message, length delimited. Does not implicitly {@link proto.Message.InteractiveMessage.ShopMessage.verify|verify} messages. + * @param message ShopMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.InteractiveMessage.IShopMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ShopMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ShopMessage + * @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.Message.InteractiveMessage.ShopMessage; + + /** + * Decodes a ShopMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ShopMessage + * @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.Message.InteractiveMessage.ShopMessage; + + /** + * Verifies a ShopMessage 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 ShopMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ShopMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.InteractiveMessage.ShopMessage; + + /** + * Creates a plain object from a ShopMessage message. Also converts values to other types if specified. + * @param message ShopMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.InteractiveMessage.ShopMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ShopMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ShopMessage { + + /** Surface enum. */ + enum Surface { + UNKNOWN_SURFACE = 0, + FB = 1, + IG = 2, + WA = 3 + } + } + } + + /** Properties of an InteractiveResponseMessage. */ + interface IInteractiveResponseMessage { + + /** InteractiveResponseMessage body */ + body?: (proto.Message.InteractiveResponseMessage.IBody|null); + + /** InteractiveResponseMessage contextInfo */ + contextInfo?: (proto.IContextInfo|null); + + /** InteractiveResponseMessage nativeFlowResponseMessage */ + nativeFlowResponseMessage?: (proto.Message.InteractiveResponseMessage.INativeFlowResponseMessage|null); + } + + /** Represents an InteractiveResponseMessage. */ + class InteractiveResponseMessage implements IInteractiveResponseMessage { + + /** + * Constructs a new InteractiveResponseMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IInteractiveResponseMessage); + + /** InteractiveResponseMessage body. */ + public body?: (proto.Message.InteractiveResponseMessage.IBody|null); + + /** InteractiveResponseMessage contextInfo. */ + public contextInfo?: (proto.IContextInfo|null); + + /** InteractiveResponseMessage nativeFlowResponseMessage. */ + public nativeFlowResponseMessage?: (proto.Message.InteractiveResponseMessage.INativeFlowResponseMessage|null); + + /** InteractiveResponseMessage interactiveResponseMessage. */ + public interactiveResponseMessage?: "nativeFlowResponseMessage"; + + /** + * Creates a new InteractiveResponseMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns InteractiveResponseMessage instance + */ + public static create(properties?: proto.Message.IInteractiveResponseMessage): proto.Message.InteractiveResponseMessage; + + /** + * Encodes the specified InteractiveResponseMessage message. Does not implicitly {@link proto.Message.InteractiveResponseMessage.verify|verify} messages. + * @param message InteractiveResponseMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IInteractiveResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InteractiveResponseMessage message, length delimited. Does not implicitly {@link proto.Message.InteractiveResponseMessage.verify|verify} messages. + * @param message InteractiveResponseMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IInteractiveResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InteractiveResponseMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InteractiveResponseMessage + * @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.Message.InteractiveResponseMessage; + + /** + * Decodes an InteractiveResponseMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InteractiveResponseMessage + * @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.Message.InteractiveResponseMessage; + + /** + * Verifies an InteractiveResponseMessage 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 InteractiveResponseMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InteractiveResponseMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.InteractiveResponseMessage; + + /** + * Creates a plain object from an InteractiveResponseMessage message. Also converts values to other types if specified. + * @param message InteractiveResponseMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.InteractiveResponseMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InteractiveResponseMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace InteractiveResponseMessage { + + /** Properties of a Body. */ + interface IBody { + + /** Body text */ + text?: (string|null); + } + + /** Represents a Body. */ + class Body implements IBody { + + /** + * Constructs a new Body. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.InteractiveResponseMessage.IBody); + + /** Body text. */ + public text: string; + + /** + * Creates a new Body instance using the specified properties. + * @param [properties] Properties to set + * @returns Body instance + */ + public static create(properties?: proto.Message.InteractiveResponseMessage.IBody): proto.Message.InteractiveResponseMessage.Body; + + /** + * Encodes the specified Body message. Does not implicitly {@link proto.Message.InteractiveResponseMessage.Body.verify|verify} messages. + * @param message Body message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.InteractiveResponseMessage.IBody, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Body message, length delimited. Does not implicitly {@link proto.Message.InteractiveResponseMessage.Body.verify|verify} messages. + * @param message Body message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.InteractiveResponseMessage.IBody, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Body message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Body + * @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.Message.InteractiveResponseMessage.Body; + + /** + * Decodes a Body message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Body + * @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.Message.InteractiveResponseMessage.Body; + + /** + * Verifies a Body 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 Body message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Body + */ + public static fromObject(object: { [k: string]: any }): proto.Message.InteractiveResponseMessage.Body; + + /** + * Creates a plain object from a Body message. Also converts values to other types if specified. + * @param message Body + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.InteractiveResponseMessage.Body, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Body to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a NativeFlowResponseMessage. */ + interface INativeFlowResponseMessage { + + /** NativeFlowResponseMessage name */ + name?: (string|null); + + /** NativeFlowResponseMessage paramsJson */ + paramsJson?: (string|null); + + /** NativeFlowResponseMessage version */ + version?: (number|null); + } + + /** Represents a NativeFlowResponseMessage. */ + class NativeFlowResponseMessage implements INativeFlowResponseMessage { + + /** + * Constructs a new NativeFlowResponseMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.InteractiveResponseMessage.INativeFlowResponseMessage); + + /** NativeFlowResponseMessage name. */ + public name: string; + + /** NativeFlowResponseMessage paramsJson. */ + public paramsJson: string; + + /** NativeFlowResponseMessage version. */ + public version: number; + + /** + * Creates a new NativeFlowResponseMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns NativeFlowResponseMessage instance + */ + public static create(properties?: proto.Message.InteractiveResponseMessage.INativeFlowResponseMessage): proto.Message.InteractiveResponseMessage.NativeFlowResponseMessage; + + /** + * Encodes the specified NativeFlowResponseMessage message. Does not implicitly {@link proto.Message.InteractiveResponseMessage.NativeFlowResponseMessage.verify|verify} messages. + * @param message NativeFlowResponseMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.InteractiveResponseMessage.INativeFlowResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NativeFlowResponseMessage message, length delimited. Does not implicitly {@link proto.Message.InteractiveResponseMessage.NativeFlowResponseMessage.verify|verify} messages. + * @param message NativeFlowResponseMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.InteractiveResponseMessage.INativeFlowResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NativeFlowResponseMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NativeFlowResponseMessage + * @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.Message.InteractiveResponseMessage.NativeFlowResponseMessage; + + /** + * Decodes a NativeFlowResponseMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NativeFlowResponseMessage + * @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.Message.InteractiveResponseMessage.NativeFlowResponseMessage; + + /** + * Verifies a NativeFlowResponseMessage 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 NativeFlowResponseMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NativeFlowResponseMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.InteractiveResponseMessage.NativeFlowResponseMessage; + + /** + * Creates a plain object from a NativeFlowResponseMessage message. Also converts values to other types if specified. + * @param message NativeFlowResponseMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.InteractiveResponseMessage.NativeFlowResponseMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NativeFlowResponseMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an InvoiceMessage. */ + interface IInvoiceMessage { + + /** InvoiceMessage note */ + note?: (string|null); + + /** InvoiceMessage token */ + token?: (string|null); + + /** InvoiceMessage attachmentType */ + attachmentType?: (proto.Message.InvoiceMessage.AttachmentType|null); + + /** InvoiceMessage attachmentMimetype */ + attachmentMimetype?: (string|null); + + /** InvoiceMessage attachmentMediaKey */ + attachmentMediaKey?: (Uint8Array|null); + + /** InvoiceMessage attachmentMediaKeyTimestamp */ + attachmentMediaKeyTimestamp?: (number|Long|null); + + /** InvoiceMessage attachmentFileSha256 */ + attachmentFileSha256?: (Uint8Array|null); + + /** InvoiceMessage attachmentFileEncSha256 */ + attachmentFileEncSha256?: (Uint8Array|null); + + /** InvoiceMessage attachmentDirectPath */ + attachmentDirectPath?: (string|null); + + /** InvoiceMessage attachmentJpegThumbnail */ + attachmentJpegThumbnail?: (Uint8Array|null); + } + + /** Represents an InvoiceMessage. */ + class InvoiceMessage implements IInvoiceMessage { + + /** + * Constructs a new InvoiceMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IInvoiceMessage); + + /** InvoiceMessage note. */ + public note: string; + + /** InvoiceMessage token. */ + public token: string; + + /** InvoiceMessage attachmentType. */ + public attachmentType: proto.Message.InvoiceMessage.AttachmentType; + + /** InvoiceMessage attachmentMimetype. */ + public attachmentMimetype: string; + + /** InvoiceMessage attachmentMediaKey. */ + public attachmentMediaKey: Uint8Array; + + /** InvoiceMessage attachmentMediaKeyTimestamp. */ + public attachmentMediaKeyTimestamp: (number|Long); + + /** InvoiceMessage attachmentFileSha256. */ + public attachmentFileSha256: Uint8Array; + + /** InvoiceMessage attachmentFileEncSha256. */ + public attachmentFileEncSha256: Uint8Array; + + /** InvoiceMessage attachmentDirectPath. */ + public attachmentDirectPath: string; + + /** InvoiceMessage attachmentJpegThumbnail. */ + public attachmentJpegThumbnail: Uint8Array; + + /** + * Creates a new InvoiceMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns InvoiceMessage instance + */ + public static create(properties?: proto.Message.IInvoiceMessage): proto.Message.InvoiceMessage; + + /** + * Encodes the specified InvoiceMessage message. Does not implicitly {@link proto.Message.InvoiceMessage.verify|verify} messages. + * @param message InvoiceMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IInvoiceMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InvoiceMessage message, length delimited. Does not implicitly {@link proto.Message.InvoiceMessage.verify|verify} messages. + * @param message InvoiceMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IInvoiceMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InvoiceMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InvoiceMessage + * @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.Message.InvoiceMessage; + + /** + * Decodes an InvoiceMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InvoiceMessage + * @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.Message.InvoiceMessage; + + /** + * Verifies an InvoiceMessage 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 InvoiceMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InvoiceMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.InvoiceMessage; + + /** + * Creates a plain object from an InvoiceMessage message. Also converts values to other types if specified. + * @param message InvoiceMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.InvoiceMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InvoiceMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace InvoiceMessage { + + /** AttachmentType enum. */ + enum AttachmentType { + IMAGE = 0, + PDF = 1 + } + } + + /** 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.Message.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.Message.IKeepInChatMessage): proto.Message.KeepInChatMessage; + + /** + * Encodes the specified KeepInChatMessage message. Does not implicitly {@link proto.Message.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.Message.IKeepInChatMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KeepInChatMessage message, length delimited. Does not implicitly {@link proto.Message.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.Message.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.Message.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.Message.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.Message.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.Message.KeepInChatMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KeepInChatMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListMessage. */ + interface IListMessage { + + /** ListMessage title */ + title?: (string|null); + + /** ListMessage description */ + description?: (string|null); + + /** ListMessage buttonText */ + buttonText?: (string|null); + + /** ListMessage listType */ + listType?: (proto.Message.ListMessage.ListType|null); + + /** ListMessage sections */ + sections?: (proto.Message.ListMessage.ISection[]|null); + + /** ListMessage productListInfo */ + productListInfo?: (proto.Message.ListMessage.IProductListInfo|null); + + /** ListMessage footerText */ + footerText?: (string|null); + + /** ListMessage contextInfo */ + contextInfo?: (proto.IContextInfo|null); + } + + /** Represents a ListMessage. */ + class ListMessage implements IListMessage { + + /** + * Constructs a new ListMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IListMessage); + + /** ListMessage title. */ + public title: string; + + /** ListMessage description. */ + public description: string; + + /** ListMessage buttonText. */ + public buttonText: string; + + /** ListMessage listType. */ + public listType: proto.Message.ListMessage.ListType; + + /** ListMessage sections. */ + public sections: proto.Message.ListMessage.ISection[]; + + /** ListMessage productListInfo. */ + public productListInfo?: (proto.Message.ListMessage.IProductListInfo|null); + + /** ListMessage footerText. */ + public footerText: string; + + /** ListMessage contextInfo. */ + public contextInfo?: (proto.IContextInfo|null); + + /** + * Creates a new ListMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMessage instance + */ + public static create(properties?: proto.Message.IListMessage): proto.Message.ListMessage; + + /** + * Encodes the specified ListMessage message. Does not implicitly {@link proto.Message.ListMessage.verify|verify} messages. + * @param message ListMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IListMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMessage message, length delimited. Does not implicitly {@link proto.Message.ListMessage.verify|verify} messages. + * @param message ListMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IListMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMessage + * @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.Message.ListMessage; + + /** + * Decodes a ListMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMessage + * @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.Message.ListMessage; + + /** + * Verifies a ListMessage 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 ListMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.ListMessage; + + /** + * Creates a plain object from a ListMessage message. Also converts values to other types if specified. + * @param message ListMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.ListMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ListMessage { + + /** ListType enum. */ + enum ListType { + UNKNOWN = 0, + SINGLE_SELECT = 1, + PRODUCT_LIST = 2 + } + + /** Properties of a ProductListHeaderImage. */ + interface IProductListHeaderImage { + + /** ProductListHeaderImage productId */ + productId?: (string|null); + + /** ProductListHeaderImage jpegThumbnail */ + jpegThumbnail?: (Uint8Array|null); + } + + /** Represents a ProductListHeaderImage. */ + class ProductListHeaderImage implements IProductListHeaderImage { + + /** + * Constructs a new ProductListHeaderImage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.ListMessage.IProductListHeaderImage); + + /** ProductListHeaderImage productId. */ + public productId: string; + + /** ProductListHeaderImage jpegThumbnail. */ + public jpegThumbnail: Uint8Array; + + /** + * Creates a new ProductListHeaderImage instance using the specified properties. + * @param [properties] Properties to set + * @returns ProductListHeaderImage instance + */ + public static create(properties?: proto.Message.ListMessage.IProductListHeaderImage): proto.Message.ListMessage.ProductListHeaderImage; + + /** + * Encodes the specified ProductListHeaderImage message. Does not implicitly {@link proto.Message.ListMessage.ProductListHeaderImage.verify|verify} messages. + * @param message ProductListHeaderImage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.ListMessage.IProductListHeaderImage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProductListHeaderImage message, length delimited. Does not implicitly {@link proto.Message.ListMessage.ProductListHeaderImage.verify|verify} messages. + * @param message ProductListHeaderImage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.ListMessage.IProductListHeaderImage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProductListHeaderImage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProductListHeaderImage + * @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.Message.ListMessage.ProductListHeaderImage; + + /** + * Decodes a ProductListHeaderImage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProductListHeaderImage + * @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.Message.ListMessage.ProductListHeaderImage; + + /** + * Verifies a ProductListHeaderImage 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 ProductListHeaderImage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProductListHeaderImage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.ListMessage.ProductListHeaderImage; + + /** + * Creates a plain object from a ProductListHeaderImage message. Also converts values to other types if specified. + * @param message ProductListHeaderImage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.ListMessage.ProductListHeaderImage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProductListHeaderImage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ProductListInfo. */ + interface IProductListInfo { + + /** ProductListInfo productSections */ + productSections?: (proto.Message.ListMessage.IProductSection[]|null); + + /** ProductListInfo headerImage */ + headerImage?: (proto.Message.ListMessage.IProductListHeaderImage|null); + + /** ProductListInfo businessOwnerJid */ + businessOwnerJid?: (string|null); + } + + /** Represents a ProductListInfo. */ + class ProductListInfo implements IProductListInfo { + + /** + * Constructs a new ProductListInfo. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.ListMessage.IProductListInfo); + + /** ProductListInfo productSections. */ + public productSections: proto.Message.ListMessage.IProductSection[]; + + /** ProductListInfo headerImage. */ + public headerImage?: (proto.Message.ListMessage.IProductListHeaderImage|null); + + /** ProductListInfo businessOwnerJid. */ + public businessOwnerJid: string; + + /** + * Creates a new ProductListInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ProductListInfo instance + */ + public static create(properties?: proto.Message.ListMessage.IProductListInfo): proto.Message.ListMessage.ProductListInfo; + + /** + * Encodes the specified ProductListInfo message. Does not implicitly {@link proto.Message.ListMessage.ProductListInfo.verify|verify} messages. + * @param message ProductListInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.ListMessage.IProductListInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProductListInfo message, length delimited. Does not implicitly {@link proto.Message.ListMessage.ProductListInfo.verify|verify} messages. + * @param message ProductListInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.ListMessage.IProductListInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProductListInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProductListInfo + * @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.Message.ListMessage.ProductListInfo; + + /** + * Decodes a ProductListInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProductListInfo + * @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.Message.ListMessage.ProductListInfo; + + /** + * Verifies a ProductListInfo 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 ProductListInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProductListInfo + */ + public static fromObject(object: { [k: string]: any }): proto.Message.ListMessage.ProductListInfo; + + /** + * Creates a plain object from a ProductListInfo message. Also converts values to other types if specified. + * @param message ProductListInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.ListMessage.ProductListInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProductListInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ProductSection. */ + interface IProductSection { + + /** ProductSection title */ + title?: (string|null); + + /** ProductSection products */ + products?: (proto.Message.ListMessage.IProduct[]|null); + } + + /** Represents a ProductSection. */ + class ProductSection implements IProductSection { + + /** + * Constructs a new ProductSection. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.ListMessage.IProductSection); + + /** ProductSection title. */ + public title: string; + + /** ProductSection products. */ + public products: proto.Message.ListMessage.IProduct[]; + + /** + * Creates a new ProductSection instance using the specified properties. + * @param [properties] Properties to set + * @returns ProductSection instance + */ + public static create(properties?: proto.Message.ListMessage.IProductSection): proto.Message.ListMessage.ProductSection; + + /** + * Encodes the specified ProductSection message. Does not implicitly {@link proto.Message.ListMessage.ProductSection.verify|verify} messages. + * @param message ProductSection message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.ListMessage.IProductSection, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProductSection message, length delimited. Does not implicitly {@link proto.Message.ListMessage.ProductSection.verify|verify} messages. + * @param message ProductSection message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.ListMessage.IProductSection, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProductSection message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProductSection + * @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.Message.ListMessage.ProductSection; + + /** + * Decodes a ProductSection message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProductSection + * @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.Message.ListMessage.ProductSection; + + /** + * Verifies a ProductSection 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 ProductSection message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProductSection + */ + public static fromObject(object: { [k: string]: any }): proto.Message.ListMessage.ProductSection; + + /** + * Creates a plain object from a ProductSection message. Also converts values to other types if specified. + * @param message ProductSection + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.ListMessage.ProductSection, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProductSection to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Product. */ + interface IProduct { + + /** Product productId */ + productId?: (string|null); + } + + /** Represents a Product. */ + class Product implements IProduct { + + /** + * Constructs a new Product. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.ListMessage.IProduct); + + /** Product productId. */ + public productId: string; + + /** + * Creates a new Product instance using the specified properties. + * @param [properties] Properties to set + * @returns Product instance + */ + public static create(properties?: proto.Message.ListMessage.IProduct): proto.Message.ListMessage.Product; + + /** + * Encodes the specified Product message. Does not implicitly {@link proto.Message.ListMessage.Product.verify|verify} messages. + * @param message Product message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.ListMessage.IProduct, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Product message, length delimited. Does not implicitly {@link proto.Message.ListMessage.Product.verify|verify} messages. + * @param message Product message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.ListMessage.IProduct, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Product message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Product + * @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.Message.ListMessage.Product; + + /** + * Decodes a Product message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Product + * @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.Message.ListMessage.Product; + + /** + * Verifies a Product 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 Product message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Product + */ + public static fromObject(object: { [k: string]: any }): proto.Message.ListMessage.Product; + + /** + * Creates a plain object from a Product message. Also converts values to other types if specified. + * @param message Product + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.ListMessage.Product, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Product to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Row. */ + interface IRow { + + /** Row title */ + title?: (string|null); + + /** Row description */ + description?: (string|null); + + /** Row rowId */ + rowId?: (string|null); + } + + /** Represents a Row. */ + class Row implements IRow { + + /** + * Constructs a new Row. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.ListMessage.IRow); + + /** Row title. */ + public title: string; + + /** Row description. */ + public description: string; + + /** Row rowId. */ + public rowId: string; + + /** + * Creates a new Row instance using the specified properties. + * @param [properties] Properties to set + * @returns Row instance + */ + public static create(properties?: proto.Message.ListMessage.IRow): proto.Message.ListMessage.Row; + + /** + * Encodes the specified Row message. Does not implicitly {@link proto.Message.ListMessage.Row.verify|verify} messages. + * @param message Row message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.ListMessage.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Row message, length delimited. Does not implicitly {@link proto.Message.ListMessage.Row.verify|verify} messages. + * @param message Row message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.ListMessage.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Row message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Row + * @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.Message.ListMessage.Row; + + /** + * Decodes a Row message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Row + * @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.Message.ListMessage.Row; + + /** + * Verifies a Row 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 Row message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Row + */ + public static fromObject(object: { [k: string]: any }): proto.Message.ListMessage.Row; + + /** + * Creates a plain object from a Row message. Also converts values to other types if specified. + * @param message Row + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.ListMessage.Row, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Row to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Section. */ + interface ISection { + + /** Section title */ + title?: (string|null); + + /** Section rows */ + rows?: (proto.Message.ListMessage.IRow[]|null); + } + + /** Represents a Section. */ + class Section implements ISection { + + /** + * Constructs a new Section. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.ListMessage.ISection); + + /** Section title. */ + public title: string; + + /** Section rows. */ + public rows: proto.Message.ListMessage.IRow[]; + + /** + * Creates a new Section instance using the specified properties. + * @param [properties] Properties to set + * @returns Section instance + */ + public static create(properties?: proto.Message.ListMessage.ISection): proto.Message.ListMessage.Section; + + /** + * Encodes the specified Section message. Does not implicitly {@link proto.Message.ListMessage.Section.verify|verify} messages. + * @param message Section message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.ListMessage.ISection, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Section message, length delimited. Does not implicitly {@link proto.Message.ListMessage.Section.verify|verify} messages. + * @param message Section message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.ListMessage.ISection, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Section message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Section + * @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.Message.ListMessage.Section; + + /** + * Decodes a Section message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Section + * @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.Message.ListMessage.Section; + + /** + * Verifies a Section 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 Section message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Section + */ + public static fromObject(object: { [k: string]: any }): proto.Message.ListMessage.Section; + + /** + * Creates a plain object from a Section message. Also converts values to other types if specified. + * @param message Section + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.ListMessage.Section, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Section to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a ListResponseMessage. */ + interface IListResponseMessage { + + /** ListResponseMessage title */ + title?: (string|null); + + /** ListResponseMessage listType */ + listType?: (proto.Message.ListResponseMessage.ListType|null); + + /** ListResponseMessage singleSelectReply */ + singleSelectReply?: (proto.Message.ListResponseMessage.ISingleSelectReply|null); + + /** ListResponseMessage contextInfo */ + contextInfo?: (proto.IContextInfo|null); + + /** ListResponseMessage description */ + description?: (string|null); + } + + /** Represents a ListResponseMessage. */ + class ListResponseMessage implements IListResponseMessage { + + /** + * Constructs a new ListResponseMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IListResponseMessage); + + /** ListResponseMessage title. */ + public title: string; + + /** ListResponseMessage listType. */ + public listType: proto.Message.ListResponseMessage.ListType; + + /** ListResponseMessage singleSelectReply. */ + public singleSelectReply?: (proto.Message.ListResponseMessage.ISingleSelectReply|null); + + /** ListResponseMessage contextInfo. */ + public contextInfo?: (proto.IContextInfo|null); + + /** ListResponseMessage description. */ + public description: string; + + /** + * Creates a new ListResponseMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns ListResponseMessage instance + */ + public static create(properties?: proto.Message.IListResponseMessage): proto.Message.ListResponseMessage; + + /** + * Encodes the specified ListResponseMessage message. Does not implicitly {@link proto.Message.ListResponseMessage.verify|verify} messages. + * @param message ListResponseMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IListResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListResponseMessage message, length delimited. Does not implicitly {@link proto.Message.ListResponseMessage.verify|verify} messages. + * @param message ListResponseMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IListResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListResponseMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListResponseMessage + * @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.Message.ListResponseMessage; + + /** + * Decodes a ListResponseMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListResponseMessage + * @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.Message.ListResponseMessage; + + /** + * Verifies a ListResponseMessage 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 ListResponseMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListResponseMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.ListResponseMessage; + + /** + * Creates a plain object from a ListResponseMessage message. Also converts values to other types if specified. + * @param message ListResponseMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.ListResponseMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListResponseMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ListResponseMessage { + + /** ListType enum. */ + enum ListType { + UNKNOWN = 0, + SINGLE_SELECT = 1 + } + + /** Properties of a SingleSelectReply. */ + interface ISingleSelectReply { + + /** SingleSelectReply selectedRowId */ + selectedRowId?: (string|null); + } + + /** Represents a SingleSelectReply. */ + class SingleSelectReply implements ISingleSelectReply { + + /** + * Constructs a new SingleSelectReply. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.ListResponseMessage.ISingleSelectReply); + + /** SingleSelectReply selectedRowId. */ + public selectedRowId: string; + + /** + * Creates a new SingleSelectReply instance using the specified properties. + * @param [properties] Properties to set + * @returns SingleSelectReply instance + */ + public static create(properties?: proto.Message.ListResponseMessage.ISingleSelectReply): proto.Message.ListResponseMessage.SingleSelectReply; + + /** + * Encodes the specified SingleSelectReply message. Does not implicitly {@link proto.Message.ListResponseMessage.SingleSelectReply.verify|verify} messages. + * @param message SingleSelectReply message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.ListResponseMessage.ISingleSelectReply, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SingleSelectReply message, length delimited. Does not implicitly {@link proto.Message.ListResponseMessage.SingleSelectReply.verify|verify} messages. + * @param message SingleSelectReply message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.ListResponseMessage.ISingleSelectReply, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SingleSelectReply message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SingleSelectReply + * @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.Message.ListResponseMessage.SingleSelectReply; + + /** + * Decodes a SingleSelectReply message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SingleSelectReply + * @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.Message.ListResponseMessage.SingleSelectReply; + + /** + * Verifies a SingleSelectReply 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 SingleSelectReply message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SingleSelectReply + */ + public static fromObject(object: { [k: string]: any }): proto.Message.ListResponseMessage.SingleSelectReply; + + /** + * Creates a plain object from a SingleSelectReply message. Also converts values to other types if specified. + * @param message SingleSelectReply + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.ListResponseMessage.SingleSelectReply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SingleSelectReply to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a LiveLocationMessage. */ + interface ILiveLocationMessage { + + /** LiveLocationMessage degreesLatitude */ + degreesLatitude?: (number|null); + + /** LiveLocationMessage degreesLongitude */ + degreesLongitude?: (number|null); + + /** LiveLocationMessage accuracyInMeters */ + accuracyInMeters?: (number|null); + + /** LiveLocationMessage speedInMps */ + speedInMps?: (number|null); + + /** LiveLocationMessage degreesClockwiseFromMagneticNorth */ + degreesClockwiseFromMagneticNorth?: (number|null); + + /** LiveLocationMessage caption */ + caption?: (string|null); + + /** LiveLocationMessage sequenceNumber */ + sequenceNumber?: (number|Long|null); + + /** LiveLocationMessage timeOffset */ + timeOffset?: (number|null); + + /** LiveLocationMessage jpegThumbnail */ + jpegThumbnail?: (Uint8Array|null); + + /** LiveLocationMessage contextInfo */ + contextInfo?: (proto.IContextInfo|null); + } + + /** Represents a LiveLocationMessage. */ + class LiveLocationMessage implements ILiveLocationMessage { + + /** + * Constructs a new LiveLocationMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.ILiveLocationMessage); + + /** LiveLocationMessage degreesLatitude. */ + public degreesLatitude: number; + + /** LiveLocationMessage degreesLongitude. */ + public degreesLongitude: number; + + /** LiveLocationMessage accuracyInMeters. */ + public accuracyInMeters: number; + + /** LiveLocationMessage speedInMps. */ + public speedInMps: number; + + /** LiveLocationMessage degreesClockwiseFromMagneticNorth. */ + public degreesClockwiseFromMagneticNorth: number; + + /** LiveLocationMessage caption. */ + public caption: string; + + /** LiveLocationMessage sequenceNumber. */ + public sequenceNumber: (number|Long); + + /** LiveLocationMessage timeOffset. */ + public timeOffset: number; + + /** LiveLocationMessage jpegThumbnail. */ + public jpegThumbnail: Uint8Array; + + /** LiveLocationMessage contextInfo. */ + public contextInfo?: (proto.IContextInfo|null); + + /** + * Creates a new LiveLocationMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns LiveLocationMessage instance + */ + public static create(properties?: proto.Message.ILiveLocationMessage): proto.Message.LiveLocationMessage; + + /** + * Encodes the specified LiveLocationMessage message. Does not implicitly {@link proto.Message.LiveLocationMessage.verify|verify} messages. + * @param message LiveLocationMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.ILiveLocationMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LiveLocationMessage message, length delimited. Does not implicitly {@link proto.Message.LiveLocationMessage.verify|verify} messages. + * @param message LiveLocationMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.ILiveLocationMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LiveLocationMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LiveLocationMessage + * @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.Message.LiveLocationMessage; + + /** + * Decodes a LiveLocationMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LiveLocationMessage + * @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.Message.LiveLocationMessage; + + /** + * Verifies a LiveLocationMessage 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 LiveLocationMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LiveLocationMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.LiveLocationMessage; + + /** + * Creates a plain object from a LiveLocationMessage message. Also converts values to other types if specified. + * @param message LiveLocationMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.LiveLocationMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LiveLocationMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a LocationMessage. */ + interface ILocationMessage { + + /** LocationMessage degreesLatitude */ + degreesLatitude?: (number|null); + + /** LocationMessage degreesLongitude */ + degreesLongitude?: (number|null); + + /** LocationMessage name */ + name?: (string|null); + + /** LocationMessage address */ + address?: (string|null); + + /** LocationMessage url */ + url?: (string|null); + + /** LocationMessage isLive */ + isLive?: (boolean|null); + + /** LocationMessage accuracyInMeters */ + accuracyInMeters?: (number|null); + + /** LocationMessage speedInMps */ + speedInMps?: (number|null); + + /** LocationMessage degreesClockwiseFromMagneticNorth */ + degreesClockwiseFromMagneticNorth?: (number|null); + + /** LocationMessage comment */ + comment?: (string|null); + + /** LocationMessage jpegThumbnail */ + jpegThumbnail?: (Uint8Array|null); + + /** LocationMessage contextInfo */ + contextInfo?: (proto.IContextInfo|null); + } + + /** Represents a LocationMessage. */ + class LocationMessage implements ILocationMessage { + + /** + * Constructs a new LocationMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.ILocationMessage); + + /** LocationMessage degreesLatitude. */ + public degreesLatitude: number; + + /** LocationMessage degreesLongitude. */ + public degreesLongitude: number; + + /** LocationMessage name. */ + public name: string; + + /** LocationMessage address. */ + public address: string; + + /** LocationMessage url. */ + public url: string; + + /** LocationMessage isLive. */ + public isLive: boolean; + + /** LocationMessage accuracyInMeters. */ + public accuracyInMeters: number; + + /** LocationMessage speedInMps. */ + public speedInMps: number; + + /** LocationMessage degreesClockwiseFromMagneticNorth. */ + public degreesClockwiseFromMagneticNorth: number; + + /** LocationMessage comment. */ + public comment: string; + + /** LocationMessage jpegThumbnail. */ + public jpegThumbnail: Uint8Array; + + /** LocationMessage contextInfo. */ + public contextInfo?: (proto.IContextInfo|null); + + /** + * Creates a new LocationMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns LocationMessage instance + */ + public static create(properties?: proto.Message.ILocationMessage): proto.Message.LocationMessage; + + /** + * Encodes the specified LocationMessage message. Does not implicitly {@link proto.Message.LocationMessage.verify|verify} messages. + * @param message LocationMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.ILocationMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LocationMessage message, length delimited. Does not implicitly {@link proto.Message.LocationMessage.verify|verify} messages. + * @param message LocationMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.ILocationMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LocationMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LocationMessage + * @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.Message.LocationMessage; + + /** + * Decodes a LocationMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LocationMessage + * @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.Message.LocationMessage; + + /** + * Verifies a LocationMessage 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 LocationMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LocationMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.LocationMessage; + + /** + * Creates a plain object from a LocationMessage message. Also converts values to other types if specified. + * @param message LocationMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.LocationMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LocationMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an OrderMessage. */ + interface IOrderMessage { + + /** OrderMessage orderId */ + orderId?: (string|null); + + /** OrderMessage thumbnail */ + thumbnail?: (Uint8Array|null); + + /** OrderMessage itemCount */ + itemCount?: (number|null); + + /** OrderMessage status */ + status?: (proto.Message.OrderMessage.OrderStatus|null); + + /** OrderMessage surface */ + surface?: (proto.Message.OrderMessage.OrderSurface|null); + + /** OrderMessage message */ + message?: (string|null); + + /** OrderMessage orderTitle */ + orderTitle?: (string|null); + + /** OrderMessage sellerJid */ + sellerJid?: (string|null); + + /** OrderMessage token */ + token?: (string|null); + + /** OrderMessage totalAmount1000 */ + totalAmount1000?: (number|Long|null); + + /** OrderMessage totalCurrencyCode */ + totalCurrencyCode?: (string|null); + + /** OrderMessage contextInfo */ + contextInfo?: (proto.IContextInfo|null); + } + + /** Represents an OrderMessage. */ + class OrderMessage implements IOrderMessage { + + /** + * Constructs a new OrderMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IOrderMessage); + + /** OrderMessage orderId. */ + public orderId: string; + + /** OrderMessage thumbnail. */ + public thumbnail: Uint8Array; + + /** OrderMessage itemCount. */ + public itemCount: number; + + /** OrderMessage status. */ + public status: proto.Message.OrderMessage.OrderStatus; + + /** OrderMessage surface. */ + public surface: proto.Message.OrderMessage.OrderSurface; + + /** OrderMessage message. */ + public message: string; + + /** OrderMessage orderTitle. */ + public orderTitle: string; + + /** OrderMessage sellerJid. */ + public sellerJid: string; + + /** OrderMessage token. */ + public token: string; + + /** OrderMessage totalAmount1000. */ + public totalAmount1000: (number|Long); + + /** OrderMessage totalCurrencyCode. */ + public totalCurrencyCode: string; + + /** OrderMessage contextInfo. */ + public contextInfo?: (proto.IContextInfo|null); + + /** + * Creates a new OrderMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns OrderMessage instance + */ + public static create(properties?: proto.Message.IOrderMessage): proto.Message.OrderMessage; + + /** + * Encodes the specified OrderMessage message. Does not implicitly {@link proto.Message.OrderMessage.verify|verify} messages. + * @param message OrderMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IOrderMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OrderMessage message, length delimited. Does not implicitly {@link proto.Message.OrderMessage.verify|verify} messages. + * @param message OrderMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IOrderMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OrderMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OrderMessage + * @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.Message.OrderMessage; + + /** + * Decodes an OrderMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OrderMessage + * @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.Message.OrderMessage; + + /** + * Verifies an OrderMessage 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 OrderMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OrderMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.OrderMessage; + + /** + * Creates a plain object from an OrderMessage message. Also converts values to other types if specified. + * @param message OrderMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.OrderMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OrderMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace OrderMessage { + + /** OrderStatus enum. */ + enum OrderStatus { + INQUIRY = 1 + } + + /** OrderSurface enum. */ + enum OrderSurface { + CATALOG = 1 + } + } + + /** Properties of a PaymentInviteMessage. */ + interface IPaymentInviteMessage { + + /** PaymentInviteMessage serviceType */ + serviceType?: (proto.Message.PaymentInviteMessage.ServiceType|null); + + /** PaymentInviteMessage expiryTimestamp */ + expiryTimestamp?: (number|Long|null); + } + + /** Represents a PaymentInviteMessage. */ + class PaymentInviteMessage implements IPaymentInviteMessage { + + /** + * Constructs a new PaymentInviteMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IPaymentInviteMessage); + + /** PaymentInviteMessage serviceType. */ + public serviceType: proto.Message.PaymentInviteMessage.ServiceType; + + /** PaymentInviteMessage expiryTimestamp. */ + public expiryTimestamp: (number|Long); + + /** + * Creates a new PaymentInviteMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns PaymentInviteMessage instance + */ + public static create(properties?: proto.Message.IPaymentInviteMessage): proto.Message.PaymentInviteMessage; + + /** + * Encodes the specified PaymentInviteMessage message. Does not implicitly {@link proto.Message.PaymentInviteMessage.verify|verify} messages. + * @param message PaymentInviteMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IPaymentInviteMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PaymentInviteMessage message, length delimited. Does not implicitly {@link proto.Message.PaymentInviteMessage.verify|verify} messages. + * @param message PaymentInviteMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IPaymentInviteMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PaymentInviteMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PaymentInviteMessage + * @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.Message.PaymentInviteMessage; + + /** + * Decodes a PaymentInviteMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PaymentInviteMessage + * @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.Message.PaymentInviteMessage; + + /** + * Verifies a PaymentInviteMessage 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 PaymentInviteMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PaymentInviteMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.PaymentInviteMessage; + + /** + * Creates a plain object from a PaymentInviteMessage message. Also converts values to other types if specified. + * @param message PaymentInviteMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.PaymentInviteMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PaymentInviteMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace PaymentInviteMessage { + + /** ServiceType enum. */ + enum ServiceType { + UNKNOWN = 0, + FBPAY = 1, + NOVI = 2, + UPI = 3 + } + } + + /** Properties of a PollCreationMessage. */ + interface IPollCreationMessage { + + /** PollCreationMessage encKey */ + encKey?: (Uint8Array|null); + + /** PollCreationMessage name */ + name?: (string|null); + + /** PollCreationMessage options */ + options?: (proto.Message.PollCreationMessage.IOption[]|null); + + /** PollCreationMessage selectableOptionsCount */ + selectableOptionsCount?: (number|null); + + /** PollCreationMessage contextInfo */ + contextInfo?: (proto.IContextInfo|null); + } + + /** Represents a PollCreationMessage. */ + class PollCreationMessage implements IPollCreationMessage { + + /** + * Constructs a new PollCreationMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IPollCreationMessage); + + /** PollCreationMessage encKey. */ + public encKey: Uint8Array; + + /** PollCreationMessage name. */ + public name: string; + + /** PollCreationMessage options. */ + public options: proto.Message.PollCreationMessage.IOption[]; + + /** PollCreationMessage selectableOptionsCount. */ + public selectableOptionsCount: number; + + /** PollCreationMessage contextInfo. */ + public contextInfo?: (proto.IContextInfo|null); + + /** + * Creates a new PollCreationMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns PollCreationMessage instance + */ + public static create(properties?: proto.Message.IPollCreationMessage): proto.Message.PollCreationMessage; + + /** + * Encodes the specified PollCreationMessage message. Does not implicitly {@link proto.Message.PollCreationMessage.verify|verify} messages. + * @param message PollCreationMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IPollCreationMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PollCreationMessage message, length delimited. Does not implicitly {@link proto.Message.PollCreationMessage.verify|verify} messages. + * @param message PollCreationMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IPollCreationMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PollCreationMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PollCreationMessage + * @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.Message.PollCreationMessage; + + /** + * Decodes a PollCreationMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PollCreationMessage + * @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.Message.PollCreationMessage; + + /** + * Verifies a PollCreationMessage 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 PollCreationMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PollCreationMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.PollCreationMessage; + + /** + * Creates a plain object from a PollCreationMessage message. Also converts values to other types if specified. + * @param message PollCreationMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.PollCreationMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PollCreationMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace PollCreationMessage { + + /** Properties of an Option. */ + interface IOption { + + /** Option optionName */ + optionName?: (string|null); + } + + /** Represents an Option. */ + class Option implements IOption { + + /** + * Constructs a new Option. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.PollCreationMessage.IOption); + + /** Option optionName. */ + public optionName: string; + + /** + * Creates a new Option instance using the specified properties. + * @param [properties] Properties to set + * @returns Option instance + */ + public static create(properties?: proto.Message.PollCreationMessage.IOption): proto.Message.PollCreationMessage.Option; + + /** + * Encodes the specified Option message. Does not implicitly {@link proto.Message.PollCreationMessage.Option.verify|verify} messages. + * @param message Option message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.PollCreationMessage.IOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Option message, length delimited. Does not implicitly {@link proto.Message.PollCreationMessage.Option.verify|verify} messages. + * @param message Option message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.PollCreationMessage.IOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Option message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Option + * @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.Message.PollCreationMessage.Option; + + /** + * Decodes an Option message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Option + * @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.Message.PollCreationMessage.Option; + + /** + * Verifies an Option 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 Option message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Option + */ + public static fromObject(object: { [k: string]: any }): proto.Message.PollCreationMessage.Option; + + /** + * Creates a plain object from an Option message. Also converts values to other types if specified. + * @param message Option + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.PollCreationMessage.Option, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Option to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a PollEncValue. */ + interface IPollEncValue { + + /** PollEncValue encPayload */ + encPayload?: (Uint8Array|null); + + /** PollEncValue encIv */ + encIv?: (Uint8Array|null); + } + + /** Represents a PollEncValue. */ + class PollEncValue implements IPollEncValue { + + /** + * Constructs a new PollEncValue. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IPollEncValue); + + /** PollEncValue encPayload. */ + public encPayload: Uint8Array; + + /** PollEncValue encIv. */ + public encIv: Uint8Array; + + /** + * Creates a new PollEncValue instance using the specified properties. + * @param [properties] Properties to set + * @returns PollEncValue instance + */ + public static create(properties?: proto.Message.IPollEncValue): proto.Message.PollEncValue; + + /** + * Encodes the specified PollEncValue message. Does not implicitly {@link proto.Message.PollEncValue.verify|verify} messages. + * @param message PollEncValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IPollEncValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PollEncValue message, length delimited. Does not implicitly {@link proto.Message.PollEncValue.verify|verify} messages. + * @param message PollEncValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IPollEncValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PollEncValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PollEncValue + * @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.Message.PollEncValue; + + /** + * Decodes a PollEncValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PollEncValue + * @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.Message.PollEncValue; + + /** + * Verifies a PollEncValue 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 PollEncValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PollEncValue + */ + public static fromObject(object: { [k: string]: any }): proto.Message.PollEncValue; + + /** + * Creates a plain object from a PollEncValue message. Also converts values to other types if specified. + * @param message PollEncValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.PollEncValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PollEncValue to JSON. + * @returns JSON object + */ + 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.Message.IPollUpdateMessageMetadata); + + /** + * Creates a new PollUpdateMessageMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns PollUpdateMessageMetadata instance + */ + public static create(properties?: proto.Message.IPollUpdateMessageMetadata): proto.Message.PollUpdateMessageMetadata; + + /** + * Encodes the specified PollUpdateMessageMetadata message. Does not implicitly {@link proto.Message.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.Message.IPollUpdateMessageMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PollUpdateMessageMetadata message, length delimited. Does not implicitly {@link proto.Message.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.Message.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.Message.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.Message.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.Message.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.Message.PollUpdateMessageMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PollUpdateMessageMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PollUpdateMessage. */ + interface IPollUpdateMessage { + + /** PollUpdateMessage pollCreationMessageKey */ + pollCreationMessageKey?: (proto.IMessageKey|null); + + /** PollUpdateMessage vote */ + vote?: (proto.Message.IPollEncValue|null); + + /** PollUpdateMessage metadata */ + metadata?: (proto.Message.IPollUpdateMessageMetadata|null); + + /** PollUpdateMessage senderTimestampMs */ + senderTimestampMs?: (number|Long|null); + } + + /** Represents a PollUpdateMessage. */ + class PollUpdateMessage implements IPollUpdateMessage { + + /** + * Constructs a new PollUpdateMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IPollUpdateMessage); + + /** PollUpdateMessage pollCreationMessageKey. */ + public pollCreationMessageKey?: (proto.IMessageKey|null); + + /** PollUpdateMessage vote. */ + public vote?: (proto.Message.IPollEncValue|null); + + /** PollUpdateMessage metadata. */ + public metadata?: (proto.Message.IPollUpdateMessageMetadata|null); + + /** PollUpdateMessage senderTimestampMs. */ + public senderTimestampMs: (number|Long); + + /** + * Creates a new PollUpdateMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns PollUpdateMessage instance + */ + public static create(properties?: proto.Message.IPollUpdateMessage): proto.Message.PollUpdateMessage; + + /** + * Encodes the specified PollUpdateMessage message. Does not implicitly {@link proto.Message.PollUpdateMessage.verify|verify} messages. + * @param message PollUpdateMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IPollUpdateMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PollUpdateMessage message, length delimited. Does not implicitly {@link proto.Message.PollUpdateMessage.verify|verify} messages. + * @param message PollUpdateMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IPollUpdateMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PollUpdateMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PollUpdateMessage + * @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.Message.PollUpdateMessage; + + /** + * Decodes a PollUpdateMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PollUpdateMessage + * @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.Message.PollUpdateMessage; + + /** + * Verifies a PollUpdateMessage 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 PollUpdateMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PollUpdateMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.PollUpdateMessage; + + /** + * Creates a plain object from a PollUpdateMessage message. Also converts values to other types if specified. + * @param message PollUpdateMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.PollUpdateMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PollUpdateMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PollVoteMessage. */ + interface IPollVoteMessage { + + /** PollVoteMessage selectedOptions */ + selectedOptions?: (Uint8Array[]|null); + } + + /** Represents a PollVoteMessage. */ + class PollVoteMessage implements IPollVoteMessage { + + /** + * Constructs a new PollVoteMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IPollVoteMessage); + + /** PollVoteMessage selectedOptions. */ + public selectedOptions: Uint8Array[]; + + /** + * Creates a new PollVoteMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns PollVoteMessage instance + */ + public static create(properties?: proto.Message.IPollVoteMessage): proto.Message.PollVoteMessage; + + /** + * Encodes the specified PollVoteMessage message. Does not implicitly {@link proto.Message.PollVoteMessage.verify|verify} messages. + * @param message PollVoteMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IPollVoteMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PollVoteMessage message, length delimited. Does not implicitly {@link proto.Message.PollVoteMessage.verify|verify} messages. + * @param message PollVoteMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IPollVoteMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PollVoteMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PollVoteMessage + * @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.Message.PollVoteMessage; + + /** + * Decodes a PollVoteMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PollVoteMessage + * @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.Message.PollVoteMessage; + + /** + * Verifies a PollVoteMessage 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 PollVoteMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PollVoteMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.PollVoteMessage; + + /** + * Creates a plain object from a PollVoteMessage message. Also converts values to other types if specified. + * @param message PollVoteMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.PollVoteMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PollVoteMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ProductMessage. */ + interface IProductMessage { + + /** ProductMessage product */ + product?: (proto.Message.ProductMessage.IProductSnapshot|null); + + /** ProductMessage businessOwnerJid */ + businessOwnerJid?: (string|null); + + /** ProductMessage catalog */ + catalog?: (proto.Message.ProductMessage.ICatalogSnapshot|null); + + /** ProductMessage body */ + body?: (string|null); + + /** ProductMessage footer */ + footer?: (string|null); + + /** ProductMessage contextInfo */ + contextInfo?: (proto.IContextInfo|null); + } + + /** Represents a ProductMessage. */ + class ProductMessage implements IProductMessage { + + /** + * Constructs a new ProductMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IProductMessage); + + /** ProductMessage product. */ + public product?: (proto.Message.ProductMessage.IProductSnapshot|null); + + /** ProductMessage businessOwnerJid. */ + public businessOwnerJid: string; + + /** ProductMessage catalog. */ + public catalog?: (proto.Message.ProductMessage.ICatalogSnapshot|null); + + /** ProductMessage body. */ + public body: string; + + /** ProductMessage footer. */ + public footer: string; + + /** ProductMessage contextInfo. */ + public contextInfo?: (proto.IContextInfo|null); + + /** + * Creates a new ProductMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns ProductMessage instance + */ + public static create(properties?: proto.Message.IProductMessage): proto.Message.ProductMessage; + + /** + * Encodes the specified ProductMessage message. Does not implicitly {@link proto.Message.ProductMessage.verify|verify} messages. + * @param message ProductMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IProductMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProductMessage message, length delimited. Does not implicitly {@link proto.Message.ProductMessage.verify|verify} messages. + * @param message ProductMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IProductMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProductMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProductMessage + * @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.Message.ProductMessage; + + /** + * Decodes a ProductMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProductMessage + * @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.Message.ProductMessage; + + /** + * Verifies a ProductMessage 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 ProductMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProductMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.ProductMessage; + + /** + * Creates a plain object from a ProductMessage message. Also converts values to other types if specified. + * @param message ProductMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.ProductMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProductMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ProductMessage { + + /** Properties of a CatalogSnapshot. */ + interface ICatalogSnapshot { + + /** CatalogSnapshot catalogImage */ + catalogImage?: (proto.Message.IImageMessage|null); + + /** CatalogSnapshot title */ + title?: (string|null); + + /** CatalogSnapshot description */ + description?: (string|null); + } + + /** Represents a CatalogSnapshot. */ + class CatalogSnapshot implements ICatalogSnapshot { + + /** + * Constructs a new CatalogSnapshot. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.ProductMessage.ICatalogSnapshot); + + /** CatalogSnapshot catalogImage. */ + public catalogImage?: (proto.Message.IImageMessage|null); + + /** CatalogSnapshot title. */ + public title: string; + + /** CatalogSnapshot description. */ + public description: string; + + /** + * Creates a new CatalogSnapshot instance using the specified properties. + * @param [properties] Properties to set + * @returns CatalogSnapshot instance + */ + public static create(properties?: proto.Message.ProductMessage.ICatalogSnapshot): proto.Message.ProductMessage.CatalogSnapshot; + + /** + * Encodes the specified CatalogSnapshot message. Does not implicitly {@link proto.Message.ProductMessage.CatalogSnapshot.verify|verify} messages. + * @param message CatalogSnapshot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.ProductMessage.ICatalogSnapshot, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CatalogSnapshot message, length delimited. Does not implicitly {@link proto.Message.ProductMessage.CatalogSnapshot.verify|verify} messages. + * @param message CatalogSnapshot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.ProductMessage.ICatalogSnapshot, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CatalogSnapshot message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CatalogSnapshot + * @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.Message.ProductMessage.CatalogSnapshot; + + /** + * Decodes a CatalogSnapshot message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CatalogSnapshot + * @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.Message.ProductMessage.CatalogSnapshot; + + /** + * Verifies a CatalogSnapshot 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 CatalogSnapshot message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CatalogSnapshot + */ + public static fromObject(object: { [k: string]: any }): proto.Message.ProductMessage.CatalogSnapshot; + + /** + * Creates a plain object from a CatalogSnapshot message. Also converts values to other types if specified. + * @param message CatalogSnapshot + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.ProductMessage.CatalogSnapshot, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CatalogSnapshot to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ProductSnapshot. */ + interface IProductSnapshot { + + /** ProductSnapshot productImage */ + productImage?: (proto.Message.IImageMessage|null); + + /** ProductSnapshot productId */ + productId?: (string|null); + + /** ProductSnapshot title */ + title?: (string|null); + + /** ProductSnapshot description */ + description?: (string|null); + + /** ProductSnapshot currencyCode */ + currencyCode?: (string|null); + + /** ProductSnapshot priceAmount1000 */ + priceAmount1000?: (number|Long|null); + + /** ProductSnapshot retailerId */ + retailerId?: (string|null); + + /** ProductSnapshot url */ + url?: (string|null); + + /** ProductSnapshot productImageCount */ + productImageCount?: (number|null); + + /** ProductSnapshot firstImageId */ + firstImageId?: (string|null); + + /** ProductSnapshot salePriceAmount1000 */ + salePriceAmount1000?: (number|Long|null); + } + + /** Represents a ProductSnapshot. */ + class ProductSnapshot implements IProductSnapshot { + + /** + * Constructs a new ProductSnapshot. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.ProductMessage.IProductSnapshot); + + /** ProductSnapshot productImage. */ + public productImage?: (proto.Message.IImageMessage|null); + + /** ProductSnapshot productId. */ + public productId: string; + + /** ProductSnapshot title. */ + public title: string; + + /** ProductSnapshot description. */ + public description: string; + + /** ProductSnapshot currencyCode. */ + public currencyCode: string; + + /** ProductSnapshot priceAmount1000. */ + public priceAmount1000: (number|Long); + + /** ProductSnapshot retailerId. */ + public retailerId: string; + + /** ProductSnapshot url. */ + public url: string; + + /** ProductSnapshot productImageCount. */ + public productImageCount: number; + + /** ProductSnapshot firstImageId. */ + public firstImageId: string; + + /** ProductSnapshot salePriceAmount1000. */ + public salePriceAmount1000: (number|Long); + + /** + * Creates a new ProductSnapshot instance using the specified properties. + * @param [properties] Properties to set + * @returns ProductSnapshot instance + */ + public static create(properties?: proto.Message.ProductMessage.IProductSnapshot): proto.Message.ProductMessage.ProductSnapshot; + + /** + * Encodes the specified ProductSnapshot message. Does not implicitly {@link proto.Message.ProductMessage.ProductSnapshot.verify|verify} messages. + * @param message ProductSnapshot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.ProductMessage.IProductSnapshot, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProductSnapshot message, length delimited. Does not implicitly {@link proto.Message.ProductMessage.ProductSnapshot.verify|verify} messages. + * @param message ProductSnapshot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.ProductMessage.IProductSnapshot, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProductSnapshot message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProductSnapshot + * @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.Message.ProductMessage.ProductSnapshot; + + /** + * Decodes a ProductSnapshot message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProductSnapshot + * @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.Message.ProductMessage.ProductSnapshot; + + /** + * Verifies a ProductSnapshot 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 ProductSnapshot message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProductSnapshot + */ + public static fromObject(object: { [k: string]: any }): proto.Message.ProductMessage.ProductSnapshot; + + /** + * Creates a plain object from a ProductSnapshot message. Also converts values to other types if specified. + * @param message ProductSnapshot + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.ProductMessage.ProductSnapshot, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProductSnapshot to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a ProtocolMessage. */ + interface IProtocolMessage { + + /** ProtocolMessage key */ + key?: (proto.IMessageKey|null); + + /** ProtocolMessage type */ + type?: (proto.Message.ProtocolMessage.Type|null); + + /** ProtocolMessage ephemeralExpiration */ + ephemeralExpiration?: (number|null); + + /** ProtocolMessage ephemeralSettingTimestamp */ + ephemeralSettingTimestamp?: (number|Long|null); + + /** ProtocolMessage historySyncNotification */ + historySyncNotification?: (proto.Message.IHistorySyncNotification|null); + + /** ProtocolMessage appStateSyncKeyShare */ + appStateSyncKeyShare?: (proto.Message.IAppStateSyncKeyShare|null); + + /** ProtocolMessage appStateSyncKeyRequest */ + appStateSyncKeyRequest?: (proto.Message.IAppStateSyncKeyRequest|null); + + /** ProtocolMessage initialSecurityNotificationSettingSync */ + initialSecurityNotificationSettingSync?: (proto.Message.IInitialSecurityNotificationSettingSync|null); + + /** ProtocolMessage appStateFatalExceptionNotification */ + appStateFatalExceptionNotification?: (proto.Message.IAppStateFatalExceptionNotification|null); + + /** ProtocolMessage disappearingMode */ + disappearingMode?: (proto.IDisappearingMode|null); + + /** ProtocolMessage requestMediaUploadMessage */ + requestMediaUploadMessage?: (proto.Message.IRequestMediaUploadMessage|null); + + /** ProtocolMessage requestMediaUploadResponseMessage */ + requestMediaUploadResponseMessage?: (proto.Message.IRequestMediaUploadResponseMessage|null); + } + + /** Represents a ProtocolMessage. */ + class ProtocolMessage implements IProtocolMessage { + + /** + * Constructs a new ProtocolMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IProtocolMessage); + + /** ProtocolMessage key. */ + public key?: (proto.IMessageKey|null); + + /** ProtocolMessage type. */ + public type: proto.Message.ProtocolMessage.Type; + + /** ProtocolMessage ephemeralExpiration. */ + public ephemeralExpiration: number; + + /** ProtocolMessage ephemeralSettingTimestamp. */ + public ephemeralSettingTimestamp: (number|Long); + + /** ProtocolMessage historySyncNotification. */ + public historySyncNotification?: (proto.Message.IHistorySyncNotification|null); + + /** ProtocolMessage appStateSyncKeyShare. */ + public appStateSyncKeyShare?: (proto.Message.IAppStateSyncKeyShare|null); + + /** ProtocolMessage appStateSyncKeyRequest. */ + public appStateSyncKeyRequest?: (proto.Message.IAppStateSyncKeyRequest|null); + + /** ProtocolMessage initialSecurityNotificationSettingSync. */ + public initialSecurityNotificationSettingSync?: (proto.Message.IInitialSecurityNotificationSettingSync|null); + + /** ProtocolMessage appStateFatalExceptionNotification. */ + public appStateFatalExceptionNotification?: (proto.Message.IAppStateFatalExceptionNotification|null); + + /** ProtocolMessage disappearingMode. */ + public disappearingMode?: (proto.IDisappearingMode|null); + + /** ProtocolMessage requestMediaUploadMessage. */ + public requestMediaUploadMessage?: (proto.Message.IRequestMediaUploadMessage|null); + + /** ProtocolMessage requestMediaUploadResponseMessage. */ + public requestMediaUploadResponseMessage?: (proto.Message.IRequestMediaUploadResponseMessage|null); + + /** + * Creates a new ProtocolMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns ProtocolMessage instance + */ + public static create(properties?: proto.Message.IProtocolMessage): proto.Message.ProtocolMessage; + + /** + * Encodes the specified ProtocolMessage message. Does not implicitly {@link proto.Message.ProtocolMessage.verify|verify} messages. + * @param message ProtocolMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IProtocolMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProtocolMessage message, length delimited. Does not implicitly {@link proto.Message.ProtocolMessage.verify|verify} messages. + * @param message ProtocolMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IProtocolMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProtocolMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProtocolMessage + * @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.Message.ProtocolMessage; + + /** + * Decodes a ProtocolMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProtocolMessage + * @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.Message.ProtocolMessage; + + /** + * Verifies a ProtocolMessage 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 ProtocolMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProtocolMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.ProtocolMessage; + + /** + * Creates a plain object from a ProtocolMessage message. Also converts values to other types if specified. + * @param message ProtocolMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.ProtocolMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProtocolMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ProtocolMessage { + + /** Type enum. */ + enum Type { + 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, + SHARE_PHONE_NUMBER = 11, + REQUEST_MEDIA_UPLOAD_MESSAGE = 12, + REQUEST_MEDIA_UPLOAD_RESPONSE_MESSAGE = 13 + } + } + + /** Properties of a ReactionMessage. */ + interface IReactionMessage { + + /** ReactionMessage key */ + key?: (proto.IMessageKey|null); + + /** ReactionMessage text */ + text?: (string|null); + + /** ReactionMessage groupingKey */ + groupingKey?: (string|null); + + /** ReactionMessage senderTimestampMs */ + senderTimestampMs?: (number|Long|null); + } + + /** Represents a ReactionMessage. */ + class ReactionMessage implements IReactionMessage { + + /** + * Constructs a new ReactionMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IReactionMessage); + + /** ReactionMessage key. */ + public key?: (proto.IMessageKey|null); + + /** ReactionMessage text. */ + public text: string; + + /** ReactionMessage groupingKey. */ + public groupingKey: string; + + /** ReactionMessage senderTimestampMs. */ + public senderTimestampMs: (number|Long); + + /** + * Creates a new ReactionMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns ReactionMessage instance + */ + public static create(properties?: proto.Message.IReactionMessage): proto.Message.ReactionMessage; + + /** + * Encodes the specified ReactionMessage message. Does not implicitly {@link proto.Message.ReactionMessage.verify|verify} messages. + * @param message ReactionMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IReactionMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReactionMessage message, length delimited. Does not implicitly {@link proto.Message.ReactionMessage.verify|verify} messages. + * @param message ReactionMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IReactionMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReactionMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReactionMessage + * @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.Message.ReactionMessage; + + /** + * Decodes a ReactionMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReactionMessage + * @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.Message.ReactionMessage; + + /** + * Verifies a ReactionMessage 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 ReactionMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReactionMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.ReactionMessage; + + /** + * Creates a plain object from a ReactionMessage message. Also converts values to other types if specified. + * @param message ReactionMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.ReactionMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReactionMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RequestMediaUploadMessage. */ + interface IRequestMediaUploadMessage { + + /** RequestMediaUploadMessage fileSha256 */ + fileSha256?: (string[]|null); + + /** RequestMediaUploadMessage rmrSource */ + rmrSource?: (proto.Message.RmrSource|null); + } + + /** Represents a RequestMediaUploadMessage. */ + class RequestMediaUploadMessage implements IRequestMediaUploadMessage { + + /** + * Constructs a new RequestMediaUploadMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IRequestMediaUploadMessage); + + /** RequestMediaUploadMessage fileSha256. */ + public fileSha256: string[]; + + /** RequestMediaUploadMessage rmrSource. */ + public rmrSource: proto.Message.RmrSource; + + /** + * Creates a new RequestMediaUploadMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestMediaUploadMessage instance + */ + public static create(properties?: proto.Message.IRequestMediaUploadMessage): proto.Message.RequestMediaUploadMessage; + + /** + * Encodes the specified RequestMediaUploadMessage message. Does not implicitly {@link proto.Message.RequestMediaUploadMessage.verify|verify} messages. + * @param message RequestMediaUploadMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IRequestMediaUploadMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RequestMediaUploadMessage message, length delimited. Does not implicitly {@link proto.Message.RequestMediaUploadMessage.verify|verify} messages. + * @param message RequestMediaUploadMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IRequestMediaUploadMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RequestMediaUploadMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RequestMediaUploadMessage + * @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.Message.RequestMediaUploadMessage; + + /** + * Decodes a RequestMediaUploadMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RequestMediaUploadMessage + * @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.Message.RequestMediaUploadMessage; + + /** + * Verifies a RequestMediaUploadMessage 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 RequestMediaUploadMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestMediaUploadMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.RequestMediaUploadMessage; + + /** + * Creates a plain object from a RequestMediaUploadMessage message. Also converts values to other types if specified. + * @param message RequestMediaUploadMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.RequestMediaUploadMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RequestMediaUploadMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RequestMediaUploadResponseMessage. */ + interface IRequestMediaUploadResponseMessage { + + /** RequestMediaUploadResponseMessage rmrSource */ + rmrSource?: (proto.Message.RmrSource|null); + + /** RequestMediaUploadResponseMessage stanzaId */ + stanzaId?: (string|null); + + /** RequestMediaUploadResponseMessage reuploadResult */ + reuploadResult?: (proto.Message.RequestMediaUploadResponseMessage.IRequestMediaUploadResult[]|null); + } + + /** Represents a RequestMediaUploadResponseMessage. */ + class RequestMediaUploadResponseMessage implements IRequestMediaUploadResponseMessage { + + /** + * Constructs a new RequestMediaUploadResponseMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IRequestMediaUploadResponseMessage); + + /** RequestMediaUploadResponseMessage rmrSource. */ + public rmrSource: proto.Message.RmrSource; + + /** RequestMediaUploadResponseMessage stanzaId. */ + public stanzaId: string; + + /** RequestMediaUploadResponseMessage reuploadResult. */ + public reuploadResult: proto.Message.RequestMediaUploadResponseMessage.IRequestMediaUploadResult[]; + + /** + * Creates a new RequestMediaUploadResponseMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestMediaUploadResponseMessage instance + */ + public static create(properties?: proto.Message.IRequestMediaUploadResponseMessage): proto.Message.RequestMediaUploadResponseMessage; + + /** + * Encodes the specified RequestMediaUploadResponseMessage message. Does not implicitly {@link proto.Message.RequestMediaUploadResponseMessage.verify|verify} messages. + * @param message RequestMediaUploadResponseMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IRequestMediaUploadResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RequestMediaUploadResponseMessage message, length delimited. Does not implicitly {@link proto.Message.RequestMediaUploadResponseMessage.verify|verify} messages. + * @param message RequestMediaUploadResponseMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IRequestMediaUploadResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RequestMediaUploadResponseMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RequestMediaUploadResponseMessage + * @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.Message.RequestMediaUploadResponseMessage; + + /** + * Decodes a RequestMediaUploadResponseMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RequestMediaUploadResponseMessage + * @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.Message.RequestMediaUploadResponseMessage; + + /** + * Verifies a RequestMediaUploadResponseMessage 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 RequestMediaUploadResponseMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestMediaUploadResponseMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.RequestMediaUploadResponseMessage; + + /** + * Creates a plain object from a RequestMediaUploadResponseMessage message. Also converts values to other types if specified. + * @param message RequestMediaUploadResponseMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.RequestMediaUploadResponseMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RequestMediaUploadResponseMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace RequestMediaUploadResponseMessage { + + /** Properties of a RequestMediaUploadResult. */ + interface IRequestMediaUploadResult { + + /** RequestMediaUploadResult fileSha256 */ + fileSha256?: (string|null); + + /** RequestMediaUploadResult mediaUploadResult */ + mediaUploadResult?: (proto.MediaRetryNotification.ResultType|null); + + /** RequestMediaUploadResult stickerMessage */ + stickerMessage?: (proto.Message.IStickerMessage|null); + } + + /** Represents a RequestMediaUploadResult. */ + class RequestMediaUploadResult implements IRequestMediaUploadResult { + + /** + * Constructs a new RequestMediaUploadResult. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.RequestMediaUploadResponseMessage.IRequestMediaUploadResult); + + /** RequestMediaUploadResult fileSha256. */ + public fileSha256: string; + + /** RequestMediaUploadResult mediaUploadResult. */ + public mediaUploadResult: proto.MediaRetryNotification.ResultType; + + /** RequestMediaUploadResult stickerMessage. */ + public stickerMessage?: (proto.Message.IStickerMessage|null); + + /** + * Creates a new RequestMediaUploadResult instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestMediaUploadResult instance + */ + public static create(properties?: proto.Message.RequestMediaUploadResponseMessage.IRequestMediaUploadResult): proto.Message.RequestMediaUploadResponseMessage.RequestMediaUploadResult; + + /** + * Encodes the specified RequestMediaUploadResult message. Does not implicitly {@link proto.Message.RequestMediaUploadResponseMessage.RequestMediaUploadResult.verify|verify} messages. + * @param message RequestMediaUploadResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.RequestMediaUploadResponseMessage.IRequestMediaUploadResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RequestMediaUploadResult message, length delimited. Does not implicitly {@link proto.Message.RequestMediaUploadResponseMessage.RequestMediaUploadResult.verify|verify} messages. + * @param message RequestMediaUploadResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.RequestMediaUploadResponseMessage.IRequestMediaUploadResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RequestMediaUploadResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RequestMediaUploadResult + * @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.Message.RequestMediaUploadResponseMessage.RequestMediaUploadResult; + + /** + * Decodes a RequestMediaUploadResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RequestMediaUploadResult + * @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.Message.RequestMediaUploadResponseMessage.RequestMediaUploadResult; + + /** + * Verifies a RequestMediaUploadResult 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 RequestMediaUploadResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestMediaUploadResult + */ + public static fromObject(object: { [k: string]: any }): proto.Message.RequestMediaUploadResponseMessage.RequestMediaUploadResult; + + /** + * Creates a plain object from a RequestMediaUploadResult message. Also converts values to other types if specified. + * @param message RequestMediaUploadResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.RequestMediaUploadResponseMessage.RequestMediaUploadResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RequestMediaUploadResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a RequestPaymentMessage. */ + interface IRequestPaymentMessage { + + /** RequestPaymentMessage noteMessage */ + noteMessage?: (proto.IMessage|null); + + /** RequestPaymentMessage currencyCodeIso4217 */ + currencyCodeIso4217?: (string|null); + + /** RequestPaymentMessage amount1000 */ + amount1000?: (number|Long|null); + + /** RequestPaymentMessage requestFrom */ + requestFrom?: (string|null); + + /** RequestPaymentMessage expiryTimestamp */ + expiryTimestamp?: (number|Long|null); + + /** RequestPaymentMessage amount */ + amount?: (proto.IMoney|null); + + /** RequestPaymentMessage background */ + background?: (proto.IPaymentBackground|null); + } + + /** Represents a RequestPaymentMessage. */ + class RequestPaymentMessage implements IRequestPaymentMessage { + + /** + * Constructs a new RequestPaymentMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IRequestPaymentMessage); + + /** RequestPaymentMessage noteMessage. */ + public noteMessage?: (proto.IMessage|null); + + /** RequestPaymentMessage currencyCodeIso4217. */ + public currencyCodeIso4217: string; + + /** RequestPaymentMessage amount1000. */ + public amount1000: (number|Long); + + /** RequestPaymentMessage requestFrom. */ + public requestFrom: string; + + /** RequestPaymentMessage expiryTimestamp. */ + public expiryTimestamp: (number|Long); + + /** RequestPaymentMessage amount. */ + public amount?: (proto.IMoney|null); + + /** RequestPaymentMessage background. */ + public background?: (proto.IPaymentBackground|null); + + /** + * Creates a new RequestPaymentMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestPaymentMessage instance + */ + public static create(properties?: proto.Message.IRequestPaymentMessage): proto.Message.RequestPaymentMessage; + + /** + * Encodes the specified RequestPaymentMessage message. Does not implicitly {@link proto.Message.RequestPaymentMessage.verify|verify} messages. + * @param message RequestPaymentMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IRequestPaymentMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RequestPaymentMessage message, length delimited. Does not implicitly {@link proto.Message.RequestPaymentMessage.verify|verify} messages. + * @param message RequestPaymentMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IRequestPaymentMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RequestPaymentMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RequestPaymentMessage + * @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.Message.RequestPaymentMessage; + + /** + * Decodes a RequestPaymentMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RequestPaymentMessage + * @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.Message.RequestPaymentMessage; + + /** + * Verifies a RequestPaymentMessage 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 RequestPaymentMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestPaymentMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.RequestPaymentMessage; + + /** + * Creates a plain object from a RequestPaymentMessage message. Also converts values to other types if specified. + * @param message RequestPaymentMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.RequestPaymentMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RequestPaymentMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RequestPhoneNumberMessage. */ + interface IRequestPhoneNumberMessage { + + /** RequestPhoneNumberMessage contextInfo */ + contextInfo?: (proto.IContextInfo|null); + } + + /** Represents a RequestPhoneNumberMessage. */ + class RequestPhoneNumberMessage implements IRequestPhoneNumberMessage { + + /** + * Constructs a new RequestPhoneNumberMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IRequestPhoneNumberMessage); + + /** RequestPhoneNumberMessage contextInfo. */ + public contextInfo?: (proto.IContextInfo|null); + + /** + * Creates a new RequestPhoneNumberMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestPhoneNumberMessage instance + */ + public static create(properties?: proto.Message.IRequestPhoneNumberMessage): proto.Message.RequestPhoneNumberMessage; + + /** + * Encodes the specified RequestPhoneNumberMessage message. Does not implicitly {@link proto.Message.RequestPhoneNumberMessage.verify|verify} messages. + * @param message RequestPhoneNumberMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IRequestPhoneNumberMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RequestPhoneNumberMessage message, length delimited. Does not implicitly {@link proto.Message.RequestPhoneNumberMessage.verify|verify} messages. + * @param message RequestPhoneNumberMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IRequestPhoneNumberMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RequestPhoneNumberMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RequestPhoneNumberMessage + * @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.Message.RequestPhoneNumberMessage; + + /** + * Decodes a RequestPhoneNumberMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RequestPhoneNumberMessage + * @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.Message.RequestPhoneNumberMessage; + + /** + * Verifies a RequestPhoneNumberMessage 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 RequestPhoneNumberMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestPhoneNumberMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.RequestPhoneNumberMessage; + + /** + * Creates a plain object from a RequestPhoneNumberMessage message. Also converts values to other types if specified. + * @param message RequestPhoneNumberMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.RequestPhoneNumberMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RequestPhoneNumberMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** RmrSource enum. */ + enum RmrSource { + FAVORITE_STICKER = 0, + RECENT_STICKER = 1 + } + + /** Properties of a SendPaymentMessage. */ + interface ISendPaymentMessage { + + /** SendPaymentMessage noteMessage */ + noteMessage?: (proto.IMessage|null); + + /** SendPaymentMessage requestMessageKey */ + requestMessageKey?: (proto.IMessageKey|null); + + /** SendPaymentMessage background */ + background?: (proto.IPaymentBackground|null); + } + + /** Represents a SendPaymentMessage. */ + class SendPaymentMessage implements ISendPaymentMessage { + + /** + * Constructs a new SendPaymentMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.ISendPaymentMessage); + + /** SendPaymentMessage noteMessage. */ + public noteMessage?: (proto.IMessage|null); + + /** SendPaymentMessage requestMessageKey. */ + public requestMessageKey?: (proto.IMessageKey|null); + + /** SendPaymentMessage background. */ + public background?: (proto.IPaymentBackground|null); + + /** + * Creates a new SendPaymentMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns SendPaymentMessage instance + */ + public static create(properties?: proto.Message.ISendPaymentMessage): proto.Message.SendPaymentMessage; + + /** + * Encodes the specified SendPaymentMessage message. Does not implicitly {@link proto.Message.SendPaymentMessage.verify|verify} messages. + * @param message SendPaymentMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.ISendPaymentMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SendPaymentMessage message, length delimited. Does not implicitly {@link proto.Message.SendPaymentMessage.verify|verify} messages. + * @param message SendPaymentMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.ISendPaymentMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SendPaymentMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SendPaymentMessage + * @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.Message.SendPaymentMessage; + + /** + * Decodes a SendPaymentMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SendPaymentMessage + * @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.Message.SendPaymentMessage; + + /** + * Verifies a SendPaymentMessage 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 SendPaymentMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SendPaymentMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.SendPaymentMessage; + + /** + * Creates a plain object from a SendPaymentMessage message. Also converts values to other types if specified. + * @param message SendPaymentMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.SendPaymentMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SendPaymentMessage 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.Message.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.Message.ISenderKeyDistributionMessage): proto.Message.SenderKeyDistributionMessage; + + /** + * Encodes the specified SenderKeyDistributionMessage message. Does not implicitly {@link proto.Message.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.Message.ISenderKeyDistributionMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SenderKeyDistributionMessage message, length delimited. Does not implicitly {@link proto.Message.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.Message.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.Message.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.Message.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.Message.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.Message.SenderKeyDistributionMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SenderKeyDistributionMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a StickerMessage. */ + interface IStickerMessage { + + /** StickerMessage url */ + url?: (string|null); + + /** StickerMessage fileSha256 */ + fileSha256?: (Uint8Array|null); + + /** StickerMessage fileEncSha256 */ + fileEncSha256?: (Uint8Array|null); + + /** StickerMessage mediaKey */ + mediaKey?: (Uint8Array|null); + + /** StickerMessage mimetype */ + mimetype?: (string|null); + + /** StickerMessage height */ + height?: (number|null); + + /** StickerMessage width */ + width?: (number|null); + + /** StickerMessage directPath */ + directPath?: (string|null); + + /** StickerMessage fileLength */ + fileLength?: (number|Long|null); + + /** StickerMessage mediaKeyTimestamp */ + mediaKeyTimestamp?: (number|Long|null); + + /** StickerMessage firstFrameLength */ + firstFrameLength?: (number|null); + + /** StickerMessage firstFrameSidecar */ + firstFrameSidecar?: (Uint8Array|null); + + /** StickerMessage isAnimated */ + isAnimated?: (boolean|null); + + /** StickerMessage pngThumbnail */ + pngThumbnail?: (Uint8Array|null); + + /** StickerMessage contextInfo */ + contextInfo?: (proto.IContextInfo|null); + } + + /** Represents a StickerMessage. */ + class StickerMessage implements IStickerMessage { + + /** + * Constructs a new StickerMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IStickerMessage); + + /** StickerMessage url. */ + public url: string; + + /** StickerMessage fileSha256. */ + public fileSha256: Uint8Array; + + /** StickerMessage fileEncSha256. */ + public fileEncSha256: Uint8Array; + + /** StickerMessage mediaKey. */ + public mediaKey: Uint8Array; + + /** StickerMessage mimetype. */ + public mimetype: string; + + /** StickerMessage height. */ + public height: number; + + /** StickerMessage width. */ + public width: number; + + /** StickerMessage directPath. */ + public directPath: string; + + /** StickerMessage fileLength. */ + public fileLength: (number|Long); + + /** StickerMessage mediaKeyTimestamp. */ + public mediaKeyTimestamp: (number|Long); + + /** StickerMessage firstFrameLength. */ + public firstFrameLength: number; + + /** StickerMessage firstFrameSidecar. */ + public firstFrameSidecar: Uint8Array; + + /** StickerMessage isAnimated. */ + public isAnimated: boolean; + + /** StickerMessage pngThumbnail. */ + public pngThumbnail: Uint8Array; + + /** StickerMessage contextInfo. */ + public contextInfo?: (proto.IContextInfo|null); + + /** + * Creates a new StickerMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns StickerMessage instance + */ + public static create(properties?: proto.Message.IStickerMessage): proto.Message.StickerMessage; + + /** + * Encodes the specified StickerMessage message. Does not implicitly {@link proto.Message.StickerMessage.verify|verify} messages. + * @param message StickerMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IStickerMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StickerMessage message, length delimited. Does not implicitly {@link proto.Message.StickerMessage.verify|verify} messages. + * @param message StickerMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IStickerMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StickerMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StickerMessage + * @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.Message.StickerMessage; + + /** + * Decodes a StickerMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StickerMessage + * @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.Message.StickerMessage; + + /** + * Verifies a StickerMessage 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 StickerMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StickerMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.StickerMessage; + + /** + * Creates a plain object from a StickerMessage message. Also converts values to other types if specified. + * @param message StickerMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.StickerMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StickerMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a StickerSyncRMRMessage. */ + interface IStickerSyncRMRMessage { + + /** StickerSyncRMRMessage filehash */ + filehash?: (string[]|null); + + /** StickerSyncRMRMessage rmrSource */ + rmrSource?: (string|null); + + /** StickerSyncRMRMessage requestTimestamp */ + requestTimestamp?: (number|Long|null); + } + + /** Represents a StickerSyncRMRMessage. */ + class StickerSyncRMRMessage implements IStickerSyncRMRMessage { + + /** + * Constructs a new StickerSyncRMRMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IStickerSyncRMRMessage); + + /** StickerSyncRMRMessage filehash. */ + public filehash: string[]; + + /** StickerSyncRMRMessage rmrSource. */ + public rmrSource: string; + + /** StickerSyncRMRMessage requestTimestamp. */ + public requestTimestamp: (number|Long); + + /** + * Creates a new StickerSyncRMRMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns StickerSyncRMRMessage instance + */ + public static create(properties?: proto.Message.IStickerSyncRMRMessage): proto.Message.StickerSyncRMRMessage; + + /** + * Encodes the specified StickerSyncRMRMessage message. Does not implicitly {@link proto.Message.StickerSyncRMRMessage.verify|verify} messages. + * @param message StickerSyncRMRMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IStickerSyncRMRMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StickerSyncRMRMessage message, length delimited. Does not implicitly {@link proto.Message.StickerSyncRMRMessage.verify|verify} messages. + * @param message StickerSyncRMRMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IStickerSyncRMRMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StickerSyncRMRMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StickerSyncRMRMessage + * @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.Message.StickerSyncRMRMessage; + + /** + * Decodes a StickerSyncRMRMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StickerSyncRMRMessage + * @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.Message.StickerSyncRMRMessage; + + /** + * Verifies a StickerSyncRMRMessage 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 StickerSyncRMRMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StickerSyncRMRMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.StickerSyncRMRMessage; + + /** + * Creates a plain object from a StickerSyncRMRMessage message. Also converts values to other types if specified. + * @param message StickerSyncRMRMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.StickerSyncRMRMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StickerSyncRMRMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a TemplateButtonReplyMessage. */ + interface ITemplateButtonReplyMessage { + + /** TemplateButtonReplyMessage selectedId */ + selectedId?: (string|null); + + /** TemplateButtonReplyMessage selectedDisplayText */ + selectedDisplayText?: (string|null); + + /** TemplateButtonReplyMessage contextInfo */ + contextInfo?: (proto.IContextInfo|null); + + /** TemplateButtonReplyMessage selectedIndex */ + selectedIndex?: (number|null); + } + + /** Represents a TemplateButtonReplyMessage. */ + class TemplateButtonReplyMessage implements ITemplateButtonReplyMessage { + + /** + * Constructs a new TemplateButtonReplyMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.ITemplateButtonReplyMessage); + + /** 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 TemplateButtonReplyMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns TemplateButtonReplyMessage instance + */ + public static create(properties?: proto.Message.ITemplateButtonReplyMessage): proto.Message.TemplateButtonReplyMessage; + + /** + * Encodes the specified TemplateButtonReplyMessage message. Does not implicitly {@link proto.Message.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.Message.ITemplateButtonReplyMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TemplateButtonReplyMessage message, length delimited. Does not implicitly {@link proto.Message.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.Message.ITemplateButtonReplyMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.Message.TemplateButtonReplyMessage; + + /** + * Decodes a TemplateButtonReplyMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.Message.TemplateButtonReplyMessage; + + /** + * 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 a TemplateButtonReplyMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TemplateButtonReplyMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.TemplateButtonReplyMessage; + + /** + * 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.Message.TemplateButtonReplyMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TemplateButtonReplyMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a TemplateMessage. */ + interface ITemplateMessage { + + /** TemplateMessage contextInfo */ + contextInfo?: (proto.IContextInfo|null); + + /** TemplateMessage hydratedTemplate */ + hydratedTemplate?: (proto.Message.TemplateMessage.IHydratedFourRowTemplate|null); + + /** TemplateMessage fourRowTemplate */ + fourRowTemplate?: (proto.Message.TemplateMessage.IFourRowTemplate|null); + + /** TemplateMessage hydratedFourRowTemplate */ + hydratedFourRowTemplate?: (proto.Message.TemplateMessage.IHydratedFourRowTemplate|null); + } + + /** Represents a TemplateMessage. */ + class TemplateMessage implements ITemplateMessage { + + /** + * Constructs a new TemplateMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.ITemplateMessage); + + /** TemplateMessage contextInfo. */ + public contextInfo?: (proto.IContextInfo|null); + + /** TemplateMessage hydratedTemplate. */ + public hydratedTemplate?: (proto.Message.TemplateMessage.IHydratedFourRowTemplate|null); + + /** TemplateMessage fourRowTemplate. */ + public fourRowTemplate?: (proto.Message.TemplateMessage.IFourRowTemplate|null); + + /** TemplateMessage hydratedFourRowTemplate. */ + public hydratedFourRowTemplate?: (proto.Message.TemplateMessage.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.Message.ITemplateMessage): proto.Message.TemplateMessage; + + /** + * Encodes the specified TemplateMessage message. Does not implicitly {@link proto.Message.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.Message.ITemplateMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TemplateMessage message, length delimited. Does not implicitly {@link proto.Message.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.Message.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.Message.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.Message.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.Message.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.Message.TemplateMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TemplateMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace TemplateMessage { + + /** Properties of a FourRowTemplate. */ + interface IFourRowTemplate { + + /** FourRowTemplate content */ + content?: (proto.Message.IHighlyStructuredMessage|null); + + /** FourRowTemplate footer */ + footer?: (proto.Message.IHighlyStructuredMessage|null); + + /** FourRowTemplate buttons */ + buttons?: (proto.ITemplateButton[]|null); + + /** FourRowTemplate documentMessage */ + documentMessage?: (proto.Message.IDocumentMessage|null); + + /** FourRowTemplate highlyStructuredMessage */ + highlyStructuredMessage?: (proto.Message.IHighlyStructuredMessage|null); + + /** FourRowTemplate imageMessage */ + imageMessage?: (proto.Message.IImageMessage|null); + + /** FourRowTemplate videoMessage */ + videoMessage?: (proto.Message.IVideoMessage|null); + + /** FourRowTemplate locationMessage */ + locationMessage?: (proto.Message.ILocationMessage|null); + } + + /** Represents a FourRowTemplate. */ + class FourRowTemplate implements IFourRowTemplate { + + /** + * Constructs a new FourRowTemplate. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.TemplateMessage.IFourRowTemplate); + + /** FourRowTemplate content. */ + public content?: (proto.Message.IHighlyStructuredMessage|null); + + /** FourRowTemplate footer. */ + public footer?: (proto.Message.IHighlyStructuredMessage|null); + + /** FourRowTemplate buttons. */ + public buttons: proto.ITemplateButton[]; + + /** FourRowTemplate documentMessage. */ + public documentMessage?: (proto.Message.IDocumentMessage|null); + + /** FourRowTemplate highlyStructuredMessage. */ + public highlyStructuredMessage?: (proto.Message.IHighlyStructuredMessage|null); + + /** FourRowTemplate imageMessage. */ + public imageMessage?: (proto.Message.IImageMessage|null); + + /** FourRowTemplate videoMessage. */ + public videoMessage?: (proto.Message.IVideoMessage|null); + + /** FourRowTemplate locationMessage. */ + public locationMessage?: (proto.Message.ILocationMessage|null); + + /** FourRowTemplate title. */ + public title?: ("documentMessage"|"highlyStructuredMessage"|"imageMessage"|"videoMessage"|"locationMessage"); + + /** + * Creates a new FourRowTemplate instance using the specified properties. + * @param [properties] Properties to set + * @returns FourRowTemplate instance + */ + public static create(properties?: proto.Message.TemplateMessage.IFourRowTemplate): proto.Message.TemplateMessage.FourRowTemplate; + + /** + * Encodes the specified FourRowTemplate message. Does not implicitly {@link proto.Message.TemplateMessage.FourRowTemplate.verify|verify} messages. + * @param message FourRowTemplate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.TemplateMessage.IFourRowTemplate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FourRowTemplate message, length delimited. Does not implicitly {@link proto.Message.TemplateMessage.FourRowTemplate.verify|verify} messages. + * @param message FourRowTemplate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.TemplateMessage.IFourRowTemplate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FourRowTemplate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FourRowTemplate + * @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.Message.TemplateMessage.FourRowTemplate; + + /** + * Decodes a FourRowTemplate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FourRowTemplate + * @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.Message.TemplateMessage.FourRowTemplate; + + /** + * Verifies a FourRowTemplate 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 FourRowTemplate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FourRowTemplate + */ + public static fromObject(object: { [k: string]: any }): proto.Message.TemplateMessage.FourRowTemplate; + + /** + * Creates a plain object from a FourRowTemplate message. Also converts values to other types if specified. + * @param message FourRowTemplate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.TemplateMessage.FourRowTemplate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FourRowTemplate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HydratedFourRowTemplate. */ + interface IHydratedFourRowTemplate { + + /** HydratedFourRowTemplate hydratedContentText */ + hydratedContentText?: (string|null); + + /** HydratedFourRowTemplate hydratedFooterText */ + hydratedFooterText?: (string|null); + + /** HydratedFourRowTemplate hydratedButtons */ + hydratedButtons?: (proto.IHydratedTemplateButton[]|null); + + /** HydratedFourRowTemplate templateId */ + templateId?: (string|null); + + /** HydratedFourRowTemplate documentMessage */ + documentMessage?: (proto.Message.IDocumentMessage|null); + + /** HydratedFourRowTemplate hydratedTitleText */ + hydratedTitleText?: (string|null); + + /** HydratedFourRowTemplate imageMessage */ + imageMessage?: (proto.Message.IImageMessage|null); + + /** HydratedFourRowTemplate videoMessage */ + videoMessage?: (proto.Message.IVideoMessage|null); + + /** HydratedFourRowTemplate locationMessage */ + locationMessage?: (proto.Message.ILocationMessage|null); + } + + /** Represents a HydratedFourRowTemplate. */ + class HydratedFourRowTemplate implements IHydratedFourRowTemplate { + + /** + * Constructs a new HydratedFourRowTemplate. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.TemplateMessage.IHydratedFourRowTemplate); + + /** HydratedFourRowTemplate hydratedContentText. */ + public hydratedContentText: string; + + /** HydratedFourRowTemplate hydratedFooterText. */ + public hydratedFooterText: string; + + /** HydratedFourRowTemplate hydratedButtons. */ + public hydratedButtons: proto.IHydratedTemplateButton[]; + + /** HydratedFourRowTemplate templateId. */ + public templateId: string; + + /** HydratedFourRowTemplate documentMessage. */ + public documentMessage?: (proto.Message.IDocumentMessage|null); + + /** HydratedFourRowTemplate hydratedTitleText. */ + public hydratedTitleText?: (string|null); + + /** HydratedFourRowTemplate imageMessage. */ + public imageMessage?: (proto.Message.IImageMessage|null); + + /** HydratedFourRowTemplate videoMessage. */ + public videoMessage?: (proto.Message.IVideoMessage|null); + + /** HydratedFourRowTemplate locationMessage. */ + public locationMessage?: (proto.Message.ILocationMessage|null); + + /** HydratedFourRowTemplate title. */ + public title?: ("documentMessage"|"hydratedTitleText"|"imageMessage"|"videoMessage"|"locationMessage"); + + /** + * Creates a new HydratedFourRowTemplate instance using the specified properties. + * @param [properties] Properties to set + * @returns HydratedFourRowTemplate instance + */ + public static create(properties?: proto.Message.TemplateMessage.IHydratedFourRowTemplate): proto.Message.TemplateMessage.HydratedFourRowTemplate; + + /** + * Encodes the specified HydratedFourRowTemplate message. Does not implicitly {@link proto.Message.TemplateMessage.HydratedFourRowTemplate.verify|verify} messages. + * @param message HydratedFourRowTemplate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.TemplateMessage.IHydratedFourRowTemplate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HydratedFourRowTemplate message, length delimited. Does not implicitly {@link proto.Message.TemplateMessage.HydratedFourRowTemplate.verify|verify} messages. + * @param message HydratedFourRowTemplate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.TemplateMessage.IHydratedFourRowTemplate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HydratedFourRowTemplate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HydratedFourRowTemplate + * @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.Message.TemplateMessage.HydratedFourRowTemplate; + + /** + * Decodes a HydratedFourRowTemplate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HydratedFourRowTemplate + * @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.Message.TemplateMessage.HydratedFourRowTemplate; + + /** + * Verifies a HydratedFourRowTemplate 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 HydratedFourRowTemplate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HydratedFourRowTemplate + */ + public static fromObject(object: { [k: string]: any }): proto.Message.TemplateMessage.HydratedFourRowTemplate; + + /** + * Creates a plain object from a HydratedFourRowTemplate message. Also converts values to other types if specified. + * @param message HydratedFourRowTemplate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.TemplateMessage.HydratedFourRowTemplate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HydratedFourRowTemplate 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.Message.VideoMessage.Attribution|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.Message.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.Message.VideoMessage.Attribution; + + /** 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.Message.IVideoMessage): proto.Message.VideoMessage; + + /** + * Encodes the specified VideoMessage message. Does not implicitly {@link proto.Message.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.Message.IVideoMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VideoMessage message, length delimited. Does not implicitly {@link proto.Message.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.Message.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.Message.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.Message.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.Message.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.Message.VideoMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VideoMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace VideoMessage { + + /** Attribution enum. */ + enum Attribution { + NONE = 0, + GIPHY = 1, + TENOR = 2 + } + } + } + /** Properties of a MessageContextInfo. */ interface IMessageContextInfo { @@ -13581,13 +17037,22 @@ export namespace proto { pollName?: (string|null); /** MsgOpaqueData pollOptions */ - pollOptions?: (proto.IPollOption[]|null); + pollOptions?: (proto.MsgOpaqueData.IPollOption[]|null); /** MsgOpaqueData pollSelectableOptionsCount */ pollSelectableOptionsCount?: (number|null); /** MsgOpaqueData messageSecret */ messageSecret?: (Uint8Array|null); + + /** MsgOpaqueData senderTimestampMs */ + senderTimestampMs?: (number|Long|null); + + /** MsgOpaqueData pollUpdateParentKey */ + pollUpdateParentKey?: (string|null); + + /** MsgOpaqueData encPollVote */ + encPollVote?: (proto.IPollEncValue|null); } /** Represents a MsgOpaqueData. */ @@ -13645,7 +17110,7 @@ export namespace proto { public pollName: string; /** MsgOpaqueData pollOptions. */ - public pollOptions: proto.IPollOption[]; + public pollOptions: proto.MsgOpaqueData.IPollOption[]; /** MsgOpaqueData pollSelectableOptionsCount. */ public pollSelectableOptionsCount: number; @@ -13653,6 +17118,15 @@ export namespace proto { /** MsgOpaqueData messageSecret. */ public messageSecret: Uint8Array; + /** MsgOpaqueData senderTimestampMs. */ + public senderTimestampMs: (number|Long); + + /** MsgOpaqueData pollUpdateParentKey. */ + public pollUpdateParentKey: string; + + /** MsgOpaqueData encPollVote. */ + public encPollVote?: (proto.IPollEncValue|null); + /** * Creates a new MsgOpaqueData instance using the specified properties. * @param [properties] Properties to set @@ -13724,6 +17198,99 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + namespace MsgOpaqueData { + + /** 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.MsgOpaqueData.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.MsgOpaqueData.IPollOption): proto.MsgOpaqueData.PollOption; + + /** + * Encodes the specified PollOption message. Does not implicitly {@link proto.MsgOpaqueData.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.MsgOpaqueData.IPollOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PollOption message, length delimited. Does not implicitly {@link proto.MsgOpaqueData.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.MsgOpaqueData.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.MsgOpaqueData.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.MsgOpaqueData.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.MsgOpaqueData.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.MsgOpaqueData.PollOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PollOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + /** Properties of a MsgRowOpaqueData. */ interface IMsgRowOpaqueData { @@ -13820,498 +17387,6 @@ export namespace proto { 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 { - - /** NativeFlowButton name */ - name?: (string|null); - - /** NativeFlowButton buttonParamsJson */ - buttonParamsJson?: (string|null); - } - - /** Represents a NativeFlowButton. */ - class NativeFlowButton implements INativeFlowButton { - - /** - * Constructs a new NativeFlowButton. - * @param [properties] Properties to set - */ - constructor(properties?: proto.INativeFlowButton); - - /** NativeFlowButton name. */ - public name: string; - - /** NativeFlowButton buttonParamsJson. */ - public buttonParamsJson: string; - - /** - * Creates a new NativeFlowButton instance using the specified properties. - * @param [properties] Properties to set - * @returns NativeFlowButton instance - */ - public static create(properties?: proto.INativeFlowButton): proto.NativeFlowButton; - - /** - * Encodes the specified NativeFlowButton message. Does not implicitly {@link proto.NativeFlowButton.verify|verify} messages. - * @param message NativeFlowButton message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.INativeFlowButton, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NativeFlowButton message, length delimited. Does not implicitly {@link proto.NativeFlowButton.verify|verify} messages. - * @param message NativeFlowButton message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.INativeFlowButton, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NativeFlowButton message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NativeFlowButton - * @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.NativeFlowButton; - - /** - * Decodes a NativeFlowButton message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NativeFlowButton - * @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.NativeFlowButton; - - /** - * Verifies a NativeFlowButton 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 NativeFlowButton message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NativeFlowButton - */ - public static fromObject(object: { [k: string]: any }): proto.NativeFlowButton; - - /** - * Creates a plain object from a NativeFlowButton message. Also converts values to other types if specified. - * @param message NativeFlowButton - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.NativeFlowButton, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NativeFlowButton to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a NativeFlowInfo. */ - interface INativeFlowInfo { - - /** NativeFlowInfo name */ - name?: (string|null); - - /** NativeFlowInfo paramsJson */ - paramsJson?: (string|null); - } - - /** Represents a NativeFlowInfo. */ - class NativeFlowInfo implements INativeFlowInfo { - - /** - * Constructs a new NativeFlowInfo. - * @param [properties] Properties to set - */ - constructor(properties?: proto.INativeFlowInfo); - - /** NativeFlowInfo name. */ - public name: string; - - /** NativeFlowInfo paramsJson. */ - public paramsJson: string; - - /** - * Creates a new NativeFlowInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns NativeFlowInfo instance - */ - public static create(properties?: proto.INativeFlowInfo): proto.NativeFlowInfo; - - /** - * Encodes the specified NativeFlowInfo message. Does not implicitly {@link proto.NativeFlowInfo.verify|verify} messages. - * @param message NativeFlowInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.INativeFlowInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NativeFlowInfo message, length delimited. Does not implicitly {@link proto.NativeFlowInfo.verify|verify} messages. - * @param message NativeFlowInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.INativeFlowInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NativeFlowInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NativeFlowInfo - * @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.NativeFlowInfo; - - /** - * Decodes a NativeFlowInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NativeFlowInfo - * @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.NativeFlowInfo; - - /** - * Verifies a NativeFlowInfo 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 NativeFlowInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NativeFlowInfo - */ - public static fromObject(object: { [k: string]: any }): proto.NativeFlowInfo; - - /** - * Creates a plain object from a NativeFlowInfo message. Also converts values to other types if specified. - * @param message NativeFlowInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.NativeFlowInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NativeFlowInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a NativeFlowMessage. */ - interface INativeFlowMessage { - - /** NativeFlowMessage buttons */ - buttons?: (proto.INativeFlowButton[]|null); - - /** NativeFlowMessage messageParamsJson */ - messageParamsJson?: (string|null); - - /** NativeFlowMessage messageVersion */ - messageVersion?: (number|null); - } - - /** Represents a NativeFlowMessage. */ - class NativeFlowMessage implements INativeFlowMessage { - - /** - * Constructs a new NativeFlowMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.INativeFlowMessage); - - /** NativeFlowMessage buttons. */ - public buttons: proto.INativeFlowButton[]; - - /** NativeFlowMessage messageParamsJson. */ - public messageParamsJson: string; - - /** NativeFlowMessage messageVersion. */ - public messageVersion: number; - - /** - * Creates a new NativeFlowMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns NativeFlowMessage instance - */ - public static create(properties?: proto.INativeFlowMessage): proto.NativeFlowMessage; - - /** - * Encodes the specified NativeFlowMessage message. Does not implicitly {@link proto.NativeFlowMessage.verify|verify} messages. - * @param message NativeFlowMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.INativeFlowMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NativeFlowMessage message, length delimited. Does not implicitly {@link proto.NativeFlowMessage.verify|verify} messages. - * @param message NativeFlowMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.INativeFlowMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NativeFlowMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NativeFlowMessage - * @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.NativeFlowMessage; - - /** - * Decodes a NativeFlowMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NativeFlowMessage - * @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.NativeFlowMessage; - - /** - * Verifies a NativeFlowMessage 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 NativeFlowMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NativeFlowMessage - */ - public static fromObject(object: { [k: string]: any }): proto.NativeFlowMessage; - - /** - * Creates a plain object from a NativeFlowMessage message. Also converts values to other types if specified. - * @param message NativeFlowMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.NativeFlowMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NativeFlowMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a NativeFlowResponseMessage. */ - interface INativeFlowResponseMessage { - - /** NativeFlowResponseMessage name */ - name?: (string|null); - - /** NativeFlowResponseMessage paramsJson */ - paramsJson?: (string|null); - - /** NativeFlowResponseMessage version */ - version?: (number|null); - } - - /** Represents a NativeFlowResponseMessage. */ - class NativeFlowResponseMessage implements INativeFlowResponseMessage { - - /** - * Constructs a new NativeFlowResponseMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.INativeFlowResponseMessage); - - /** NativeFlowResponseMessage name. */ - public name: string; - - /** NativeFlowResponseMessage paramsJson. */ - public paramsJson: string; - - /** NativeFlowResponseMessage version. */ - public version: number; - - /** - * Creates a new NativeFlowResponseMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns NativeFlowResponseMessage instance - */ - public static create(properties?: proto.INativeFlowResponseMessage): proto.NativeFlowResponseMessage; - - /** - * Encodes the specified NativeFlowResponseMessage message. Does not implicitly {@link proto.NativeFlowResponseMessage.verify|verify} messages. - * @param message NativeFlowResponseMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.INativeFlowResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NativeFlowResponseMessage message, length delimited. Does not implicitly {@link proto.NativeFlowResponseMessage.verify|verify} messages. - * @param message NativeFlowResponseMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.INativeFlowResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NativeFlowResponseMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NativeFlowResponseMessage - * @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.NativeFlowResponseMessage; - - /** - * Decodes a NativeFlowResponseMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NativeFlowResponseMessage - * @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.NativeFlowResponseMessage; - - /** - * Verifies a NativeFlowResponseMessage 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 NativeFlowResponseMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NativeFlowResponseMessage - */ - public static fromObject(object: { [k: string]: any }): proto.NativeFlowResponseMessage; - - /** - * Creates a plain object from a NativeFlowResponseMessage message. Also converts values to other types if specified. - * @param message NativeFlowResponseMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.NativeFlowResponseMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NativeFlowResponseMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - /** Properties of a NoiseCertificate. */ interface INoiseCertificate { @@ -14408,118 +17483,121 @@ export namespace proto { public toJSON(): { [k: string]: any }; } - /** Properties of a NoiseCertificateDetails. */ - interface INoiseCertificateDetails { + namespace NoiseCertificate { - /** NoiseCertificateDetails serial */ - serial?: (number|null); + /** Properties of a Details. */ + interface IDetails { - /** NoiseCertificateDetails issuer */ - issuer?: (string|null); + /** Details serial */ + serial?: (number|null); - /** NoiseCertificateDetails expires */ - expires?: (number|Long|null); + /** Details issuer */ + issuer?: (string|null); - /** NoiseCertificateDetails subject */ - subject?: (string|null); + /** Details expires */ + expires?: (number|Long|null); - /** NoiseCertificateDetails key */ - key?: (Uint8Array|null); - } + /** Details subject */ + subject?: (string|null); - /** Represents a NoiseCertificateDetails. */ - class NoiseCertificateDetails implements INoiseCertificateDetails { + /** Details key */ + key?: (Uint8Array|null); + } - /** - * Constructs a new NoiseCertificateDetails. - * @param [properties] Properties to set - */ - constructor(properties?: proto.INoiseCertificateDetails); + /** Represents a Details. */ + class Details implements IDetails { - /** NoiseCertificateDetails serial. */ - public serial: number; + /** + * Constructs a new Details. + * @param [properties] Properties to set + */ + constructor(properties?: proto.NoiseCertificate.IDetails); - /** NoiseCertificateDetails issuer. */ - public issuer: string; + /** Details serial. */ + public serial: number; - /** NoiseCertificateDetails expires. */ - public expires: (number|Long); + /** Details issuer. */ + public issuer: string; - /** NoiseCertificateDetails subject. */ - public subject: string; + /** Details expires. */ + public expires: (number|Long); - /** NoiseCertificateDetails key. */ - public key: Uint8Array; + /** Details subject. */ + public subject: string; - /** - * 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; + /** Details key. */ + public key: Uint8Array; - /** - * 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; + /** + * Creates a new Details instance using the specified properties. + * @param [properties] Properties to set + * @returns Details instance + */ + public static create(properties?: proto.NoiseCertificate.IDetails): proto.NoiseCertificate.Details; - /** - * 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; + /** + * Encodes the specified Details message. Does not implicitly {@link proto.NoiseCertificate.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.NoiseCertificate.IDetails, 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; + /** + * Encodes the specified Details message, length delimited. Does not implicitly {@link proto.NoiseCertificate.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.NoiseCertificate.IDetails, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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; + /** + * 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.NoiseCertificate.Details; - /** - * 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); + /** + * 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.NoiseCertificate.Details; - /** - * 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; + /** + * 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 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 }; + /** + * 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.NoiseCertificate.Details; - /** - * Converts this NoiseCertificateDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * 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.NoiseCertificate.Details, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Details to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } /** Properties of a NotificationMessageInfo. */ @@ -14630,464 +17708,208 @@ export namespace proto { public toJSON(): { [k: string]: any }; } - /** Properties of a NuxAction. */ - interface INuxAction { + /** Properties of a PastParticipant. */ + interface IPastParticipant { - /** NuxAction acknowledged */ - acknowledged?: (boolean|null); + /** PastParticipant userJid */ + userJid: string; + + /** PastParticipant leaveReason */ + leaveReason: proto.PastParticipant.LeaveReason; + + /** PastParticipant leaveTs */ + leaveTs: (number|Long); } - /** Represents a NuxAction. */ - class NuxAction implements INuxAction { + /** Represents a PastParticipant. */ + class PastParticipant implements IPastParticipant { /** - * Constructs a new NuxAction. + * Constructs a new PastParticipant. * @param [properties] Properties to set */ - constructor(properties?: proto.INuxAction); + constructor(properties?: proto.IPastParticipant); - /** NuxAction acknowledged. */ - public acknowledged: boolean; + /** PastParticipant userJid. */ + public userJid: string; + + /** PastParticipant leaveReason. */ + public leaveReason: proto.PastParticipant.LeaveReason; + + /** PastParticipant leaveTs. */ + public leaveTs: (number|Long); /** - * Creates a new NuxAction instance using the specified properties. + * Creates a new PastParticipant instance using the specified properties. * @param [properties] Properties to set - * @returns NuxAction instance + * @returns PastParticipant instance */ - public static create(properties?: proto.INuxAction): proto.NuxAction; + public static create(properties?: proto.IPastParticipant): proto.PastParticipant; /** - * Encodes the specified NuxAction message. Does not implicitly {@link proto.NuxAction.verify|verify} messages. - * @param message NuxAction message or plain object to encode + * Encodes the specified PastParticipant message. Does not implicitly {@link proto.PastParticipant.verify|verify} messages. + * @param message PastParticipant message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: proto.INuxAction, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: proto.IPastParticipant, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified NuxAction message, length delimited. Does not implicitly {@link proto.NuxAction.verify|verify} messages. - * @param message NuxAction message or plain object to encode + * Encodes the specified PastParticipant message, length delimited. Does not implicitly {@link proto.PastParticipant.verify|verify} messages. + * @param message PastParticipant message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: proto.INuxAction, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: proto.IPastParticipant, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a NuxAction message from the specified reader or buffer. + * Decodes a PastParticipant message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns NuxAction + * @returns PastParticipant * @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.NuxAction; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.PastParticipant; /** - * Decodes a NuxAction message from the specified reader or buffer, length delimited. + * Decodes a PastParticipant message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns NuxAction + * @returns PastParticipant * @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.NuxAction; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.PastParticipant; /** - * Verifies a NuxAction message. + * Verifies a PastParticipant 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 NuxAction message from a plain object. Also converts values to their respective internal types. + * Creates a PastParticipant message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns NuxAction + * @returns PastParticipant */ - public static fromObject(object: { [k: string]: any }): proto.NuxAction; + public static fromObject(object: { [k: string]: any }): proto.PastParticipant; /** - * Creates a plain object from a NuxAction message. Also converts values to other types if specified. - * @param message NuxAction + * Creates a plain object from a PastParticipant message. Also converts values to other types if specified. + * @param message PastParticipant * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: proto.NuxAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: proto.PastParticipant, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this NuxAction to JSON. + * Converts this PastParticipant to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an Option. */ - interface IOption { + namespace PastParticipant { - /** Option optionName */ - optionName?: (string|null); - } - - /** Represents an Option. */ - class Option implements IOption { - - /** - * Constructs a new Option. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IOption); - - /** Option optionName. */ - public optionName: string; - - /** - * Creates a new Option instance using the specified properties. - * @param [properties] Properties to set - * @returns Option instance - */ - public static create(properties?: proto.IOption): proto.Option; - - /** - * Encodes the specified Option message. Does not implicitly {@link proto.Option.verify|verify} messages. - * @param message Option message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Option message, length delimited. Does not implicitly {@link proto.Option.verify|verify} messages. - * @param message Option message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Option message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Option - * @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.Option; - - /** - * Decodes an Option message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Option - * @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.Option; - - /** - * Verifies an Option 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 Option message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Option - */ - public static fromObject(object: { [k: string]: any }): proto.Option; - - /** - * Creates a plain object from an Option message. Also converts values to other types if specified. - * @param message Option - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.Option, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Option to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an OrderMessage. */ - interface IOrderMessage { - - /** OrderMessage orderId */ - orderId?: (string|null); - - /** OrderMessage thumbnail */ - thumbnail?: (Uint8Array|null); - - /** OrderMessage itemCount */ - itemCount?: (number|null); - - /** OrderMessage status */ - status?: (proto.OrderMessage.OrderMessageOrderStatus|null); - - /** OrderMessage surface */ - surface?: (proto.OrderMessage.OrderMessageOrderSurface|null); - - /** OrderMessage message */ - message?: (string|null); - - /** OrderMessage orderTitle */ - orderTitle?: (string|null); - - /** OrderMessage sellerJid */ - sellerJid?: (string|null); - - /** OrderMessage token */ - token?: (string|null); - - /** OrderMessage totalAmount1000 */ - totalAmount1000?: (number|Long|null); - - /** OrderMessage totalCurrencyCode */ - totalCurrencyCode?: (string|null); - - /** OrderMessage contextInfo */ - contextInfo?: (proto.IContextInfo|null); - } - - /** Represents an OrderMessage. */ - class OrderMessage implements IOrderMessage { - - /** - * Constructs a new OrderMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IOrderMessage); - - /** OrderMessage orderId. */ - public orderId: string; - - /** OrderMessage thumbnail. */ - public thumbnail: Uint8Array; - - /** OrderMessage itemCount. */ - public itemCount: number; - - /** OrderMessage status. */ - public status: proto.OrderMessage.OrderMessageOrderStatus; - - /** OrderMessage surface. */ - public surface: proto.OrderMessage.OrderMessageOrderSurface; - - /** OrderMessage message. */ - public message: string; - - /** OrderMessage orderTitle. */ - public orderTitle: string; - - /** OrderMessage sellerJid. */ - public sellerJid: string; - - /** OrderMessage token. */ - public token: string; - - /** OrderMessage totalAmount1000. */ - public totalAmount1000: (number|Long); - - /** OrderMessage totalCurrencyCode. */ - public totalCurrencyCode: string; - - /** OrderMessage contextInfo. */ - public contextInfo?: (proto.IContextInfo|null); - - /** - * Creates a new OrderMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns OrderMessage instance - */ - public static create(properties?: proto.IOrderMessage): proto.OrderMessage; - - /** - * Encodes the specified OrderMessage message. Does not implicitly {@link proto.OrderMessage.verify|verify} messages. - * @param message OrderMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IOrderMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OrderMessage message, length delimited. Does not implicitly {@link proto.OrderMessage.verify|verify} messages. - * @param message OrderMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IOrderMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OrderMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OrderMessage - * @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.OrderMessage; - - /** - * Decodes an OrderMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OrderMessage - * @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.OrderMessage; - - /** - * Verifies an OrderMessage 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 OrderMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OrderMessage - */ - public static fromObject(object: { [k: string]: any }): proto.OrderMessage; - - /** - * Creates a plain object from an OrderMessage message. Also converts values to other types if specified. - * @param message OrderMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.OrderMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OrderMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace OrderMessage { - - /** OrderMessageOrderStatus enum. */ - enum OrderMessageOrderStatus { - INQUIRY = 1 - } - - /** OrderMessageOrderSurface enum. */ - enum OrderMessageOrderSurface { - CATALOG = 1 + /** LeaveReason enum. */ + enum LeaveReason { + LEFT = 0, + REMOVED = 1 } } - /** Properties of a PBMediaData. */ - interface IPBMediaData { + /** Properties of a PastParticipants. */ + interface IPastParticipants { - /** PBMediaData mediaKey */ - mediaKey?: (Uint8Array|null); + /** PastParticipants groupJid */ + groupJid: string; - /** PBMediaData mediaKeyTimestamp */ - mediaKeyTimestamp?: (number|Long|null); - - /** PBMediaData fileSha256 */ - fileSha256?: (Uint8Array|null); - - /** PBMediaData fileEncSha256 */ - fileEncSha256?: (Uint8Array|null); - - /** PBMediaData directPath */ - directPath?: (string|null); + /** PastParticipants pastParticipants */ + pastParticipants?: (proto.IPastParticipant[]|null); } - /** Represents a PBMediaData. */ - class PBMediaData implements IPBMediaData { + /** Represents a PastParticipants. */ + class PastParticipants implements IPastParticipants { /** - * Constructs a new PBMediaData. + * Constructs a new PastParticipants. * @param [properties] Properties to set */ - constructor(properties?: proto.IPBMediaData); + constructor(properties?: proto.IPastParticipants); - /** PBMediaData mediaKey. */ - public mediaKey: Uint8Array; + /** PastParticipants groupJid. */ + public groupJid: string; - /** PBMediaData mediaKeyTimestamp. */ - public mediaKeyTimestamp: (number|Long); - - /** PBMediaData fileSha256. */ - public fileSha256: Uint8Array; - - /** PBMediaData fileEncSha256. */ - public fileEncSha256: Uint8Array; - - /** PBMediaData directPath. */ - public directPath: string; + /** PastParticipants pastParticipants. */ + public pastParticipants: proto.IPastParticipant[]; /** - * Creates a new PBMediaData instance using the specified properties. + * Creates a new PastParticipants instance using the specified properties. * @param [properties] Properties to set - * @returns PBMediaData instance + * @returns PastParticipants instance */ - public static create(properties?: proto.IPBMediaData): proto.PBMediaData; + public static create(properties?: proto.IPastParticipants): proto.PastParticipants; /** - * 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 PastParticipants message. Does not implicitly {@link proto.PastParticipants.verify|verify} messages. + * @param message PastParticipants 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.IPastParticipants, 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 PastParticipants message, length delimited. Does not implicitly {@link proto.PastParticipants.verify|verify} messages. + * @param message PastParticipants 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.IPastParticipants, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PBMediaData message from the specified reader or buffer. + * Decodes a PastParticipants 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 PastParticipants * @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.PastParticipants; /** - * Decodes a PBMediaData message from the specified reader or buffer, length delimited. + * Decodes a PastParticipants message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PBMediaData + * @returns PastParticipants * @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.PastParticipants; /** - * Verifies a PBMediaData message. + * Verifies a PastParticipants 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 PastParticipants message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PBMediaData + * @returns PastParticipants */ - public static fromObject(object: { [k: string]: any }): proto.PBMediaData; + public static fromObject(object: { [k: string]: any }): proto.PastParticipants; /** - * 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 PastParticipants message. Also converts values to other types if specified. + * @param message PastParticipants * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: proto.PBMediaData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: proto.PastParticipants, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PBMediaData to JSON. + * Converts this PastParticipants to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; @@ -15121,10 +17943,10 @@ export namespace proto { subtextArgb?: (number|null); /** PaymentBackground mediaData */ - mediaData?: (proto.IPBMediaData|null); + mediaData?: (proto.PaymentBackground.IMediaData|null); /** PaymentBackground type */ - type?: (proto.PaymentBackground.PaymentBackgroundType|null); + type?: (proto.PaymentBackground.Type|null); } /** Represents a PaymentBackground. */ @@ -15161,10 +17983,10 @@ export namespace proto { public subtextArgb: number; /** PaymentBackground mediaData. */ - public mediaData?: (proto.IPBMediaData|null); + public mediaData?: (proto.PaymentBackground.IMediaData|null); /** PaymentBackground type. */ - public type: proto.PaymentBackground.PaymentBackgroundType; + public type: proto.PaymentBackground.Type; /** * Creates a new PaymentBackground instance using the specified properties. @@ -15239,8 +18061,122 @@ export namespace proto { namespace PaymentBackground { - /** PaymentBackgroundType enum. */ - enum PaymentBackgroundType { + /** Properties of a MediaData. */ + interface IMediaData { + + /** MediaData mediaKey */ + mediaKey?: (Uint8Array|null); + + /** MediaData mediaKeyTimestamp */ + mediaKeyTimestamp?: (number|Long|null); + + /** MediaData fileSha256 */ + fileSha256?: (Uint8Array|null); + + /** MediaData fileEncSha256 */ + fileEncSha256?: (Uint8Array|null); + + /** MediaData directPath */ + directPath?: (string|null); + } + + /** Represents a MediaData. */ + class MediaData implements IMediaData { + + /** + * Constructs a new MediaData. + * @param [properties] Properties to set + */ + constructor(properties?: proto.PaymentBackground.IMediaData); + + /** MediaData mediaKey. */ + public mediaKey: Uint8Array; + + /** MediaData mediaKeyTimestamp. */ + public mediaKeyTimestamp: (number|Long); + + /** MediaData fileSha256. */ + public fileSha256: Uint8Array; + + /** MediaData fileEncSha256. */ + public fileEncSha256: Uint8Array; + + /** MediaData directPath. */ + public directPath: string; + + /** + * Creates a new MediaData instance using the specified properties. + * @param [properties] Properties to set + * @returns MediaData instance + */ + public static create(properties?: proto.PaymentBackground.IMediaData): proto.PaymentBackground.MediaData; + + /** + * Encodes the specified MediaData message. Does not implicitly {@link proto.PaymentBackground.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.PaymentBackground.IMediaData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MediaData message, length delimited. Does not implicitly {@link proto.PaymentBackground.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.PaymentBackground.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.PaymentBackground.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.PaymentBackground.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.PaymentBackground.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.PaymentBackground.MediaData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MediaData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Type enum. */ + enum Type { UNKNOWN = 0, DEFAULT = 1 } @@ -15250,7 +18186,7 @@ export namespace proto { interface IPaymentInfo { /** PaymentInfo currencyDeprecated */ - currencyDeprecated?: (proto.PaymentInfo.PaymentInfoCurrency|null); + currencyDeprecated?: (proto.PaymentInfo.Currency|null); /** PaymentInfo amount1000 */ amount1000?: (number|Long|null); @@ -15259,7 +18195,7 @@ export namespace proto { receiverJid?: (string|null); /** PaymentInfo status */ - status?: (proto.PaymentInfo.PaymentInfoStatus|null); + status?: (proto.PaymentInfo.Status|null); /** PaymentInfo transactionTimestamp */ transactionTimestamp?: (number|Long|null); @@ -15277,7 +18213,7 @@ export namespace proto { currency?: (string|null); /** PaymentInfo txnStatus */ - txnStatus?: (proto.PaymentInfo.PaymentInfoTxnStatus|null); + txnStatus?: (proto.PaymentInfo.TxnStatus|null); /** PaymentInfo useNoviFiatFormat */ useNoviFiatFormat?: (boolean|null); @@ -15299,7 +18235,7 @@ export namespace proto { constructor(properties?: proto.IPaymentInfo); /** PaymentInfo currencyDeprecated. */ - public currencyDeprecated: proto.PaymentInfo.PaymentInfoCurrency; + public currencyDeprecated: proto.PaymentInfo.Currency; /** PaymentInfo amount1000. */ public amount1000: (number|Long); @@ -15308,7 +18244,7 @@ export namespace proto { public receiverJid: string; /** PaymentInfo status. */ - public status: proto.PaymentInfo.PaymentInfoStatus; + public status: proto.PaymentInfo.Status; /** PaymentInfo transactionTimestamp. */ public transactionTimestamp: (number|Long); @@ -15326,7 +18262,7 @@ export namespace proto { public currency: string; /** PaymentInfo txnStatus. */ - public txnStatus: proto.PaymentInfo.PaymentInfoTxnStatus; + public txnStatus: proto.PaymentInfo.TxnStatus; /** PaymentInfo useNoviFiatFormat. */ public useNoviFiatFormat: boolean; @@ -15410,14 +18346,14 @@ export namespace proto { namespace PaymentInfo { - /** PaymentInfoCurrency enum. */ - enum PaymentInfoCurrency { + /** Currency enum. */ + enum Currency { UNKNOWN_CURRENCY = 0, INR = 1 } - /** PaymentInfoStatus enum. */ - enum PaymentInfoStatus { + /** Status enum. */ + enum Status { UNKNOWN_STATUS = 0, PROCESSING = 1, SENT = 2, @@ -15432,8 +18368,8 @@ export namespace proto { WAITING = 11 } - /** PaymentInfoTxnStatus enum. */ - enum PaymentInfoTxnStatus { + /** TxnStatus enum. */ + enum TxnStatus { UNKNOWN = 0, PENDING_SETUP = 1, PENDING_RECEIVER_SETUP = 2, @@ -15469,113 +18405,6 @@ export namespace proto { } } - /** Properties of a PaymentInviteMessage. */ - interface IPaymentInviteMessage { - - /** PaymentInviteMessage serviceType */ - serviceType?: (proto.PaymentInviteMessage.PaymentInviteMessageServiceType|null); - - /** PaymentInviteMessage expiryTimestamp */ - expiryTimestamp?: (number|Long|null); - } - - /** Represents a PaymentInviteMessage. */ - class PaymentInviteMessage implements IPaymentInviteMessage { - - /** - * Constructs a new PaymentInviteMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IPaymentInviteMessage); - - /** PaymentInviteMessage serviceType. */ - public serviceType: proto.PaymentInviteMessage.PaymentInviteMessageServiceType; - - /** PaymentInviteMessage expiryTimestamp. */ - public expiryTimestamp: (number|Long); - - /** - * Creates a new PaymentInviteMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns PaymentInviteMessage instance - */ - public static create(properties?: proto.IPaymentInviteMessage): proto.PaymentInviteMessage; - - /** - * Encodes the specified PaymentInviteMessage message. Does not implicitly {@link proto.PaymentInviteMessage.verify|verify} messages. - * @param message PaymentInviteMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IPaymentInviteMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PaymentInviteMessage message, length delimited. Does not implicitly {@link proto.PaymentInviteMessage.verify|verify} messages. - * @param message PaymentInviteMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IPaymentInviteMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PaymentInviteMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PaymentInviteMessage - * @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.PaymentInviteMessage; - - /** - * Decodes a PaymentInviteMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PaymentInviteMessage - * @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.PaymentInviteMessage; - - /** - * Verifies a PaymentInviteMessage 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 PaymentInviteMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PaymentInviteMessage - */ - public static fromObject(object: { [k: string]: any }): proto.PaymentInviteMessage; - - /** - * Creates a plain object from a PaymentInviteMessage message. Also converts values to other types if specified. - * @param message PaymentInviteMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.PaymentInviteMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PaymentInviteMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace PaymentInviteMessage { - - /** PaymentInviteMessageServiceType enum. */ - enum PaymentInviteMessageServiceType { - UNKNOWN = 0, - FBPAY = 1, - NOVI = 2, - UPI = 3 - } - } - /** Properties of a PendingKeyExchange. */ interface IPendingKeyExchange { @@ -15906,96 +18735,6 @@ export namespace proto { 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 Point. */ interface IPoint { @@ -16194,120 +18933,6 @@ export namespace proto { public toJSON(): { [k: string]: any }; } - /** Properties of a PollCreationMessage. */ - interface IPollCreationMessage { - - /** PollCreationMessage encKey */ - encKey?: (Uint8Array|null); - - /** PollCreationMessage name */ - name?: (string|null); - - /** PollCreationMessage options */ - options?: (proto.IOption[]|null); - - /** PollCreationMessage selectableOptionsCount */ - selectableOptionsCount?: (number|null); - - /** PollCreationMessage contextInfo */ - contextInfo?: (proto.IContextInfo|null); - } - - /** Represents a PollCreationMessage. */ - class PollCreationMessage implements IPollCreationMessage { - - /** - * Constructs a new PollCreationMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IPollCreationMessage); - - /** PollCreationMessage encKey. */ - public encKey: Uint8Array; - - /** PollCreationMessage name. */ - public name: string; - - /** PollCreationMessage options. */ - public options: proto.IOption[]; - - /** PollCreationMessage selectableOptionsCount. */ - public selectableOptionsCount: number; - - /** PollCreationMessage contextInfo. */ - public contextInfo?: (proto.IContextInfo|null); - - /** - * Creates a new PollCreationMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns PollCreationMessage instance - */ - public static create(properties?: proto.IPollCreationMessage): proto.PollCreationMessage; - - /** - * Encodes the specified PollCreationMessage message. Does not implicitly {@link proto.PollCreationMessage.verify|verify} messages. - * @param message PollCreationMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IPollCreationMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PollCreationMessage message, length delimited. Does not implicitly {@link proto.PollCreationMessage.verify|verify} messages. - * @param message PollCreationMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IPollCreationMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PollCreationMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PollCreationMessage - * @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.PollCreationMessage; - - /** - * Decodes a PollCreationMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PollCreationMessage - * @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.PollCreationMessage; - - /** - * Verifies a PollCreationMessage 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 PollCreationMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PollCreationMessage - */ - public static fromObject(object: { [k: string]: any }): proto.PollCreationMessage; - - /** - * Creates a plain object from a PollCreationMessage message. Also converts values to other types if specified. - * @param message PollCreationMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.PollCreationMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PollCreationMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - /** Properties of a PollEncValue. */ interface IPollEncValue { @@ -16404,96 +19029,6 @@ 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 { @@ -16501,7 +19036,10 @@ export namespace proto { pollUpdateMessageKey?: (proto.IMessageKey|null); /** PollUpdate vote */ - vote?: (proto.IPollVoteMessage|null); + vote?: (proto.Message.IPollVoteMessage|null); + + /** PollUpdate senderTimestampMs */ + senderTimestampMs?: (number|Long|null); } /** Represents a PollUpdate. */ @@ -16517,7 +19055,10 @@ export namespace proto { public pollUpdateMessageKey?: (proto.IMessageKey|null); /** PollUpdate vote. */ - public vote?: (proto.IPollVoteMessage|null); + public vote?: (proto.Message.IPollVoteMessage|null); + + /** PollUpdate senderTimestampMs. */ + public senderTimestampMs: (number|Long); /** * Creates a new PollUpdate instance using the specified properties. @@ -16590,288 +19131,6 @@ export namespace proto { public toJSON(): { [k: string]: any }; } - /** Properties of a PollUpdateMessage. */ - interface IPollUpdateMessage { - - /** PollUpdateMessage pollCreationMessageKey */ - pollCreationMessageKey?: (proto.IMessageKey|null); - - /** PollUpdateMessage vote */ - vote?: (proto.IPollEncValue|null); - - /** PollUpdateMessage metadata */ - metadata?: (proto.IPollUpdateMessageMetadata|null); - } - - /** Represents a PollUpdateMessage. */ - class PollUpdateMessage implements IPollUpdateMessage { - - /** - * Constructs a new PollUpdateMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IPollUpdateMessage); - - /** PollUpdateMessage pollCreationMessageKey. */ - public pollCreationMessageKey?: (proto.IMessageKey|null); - - /** 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 - * @returns PollUpdateMessage instance - */ - public static create(properties?: proto.IPollUpdateMessage): proto.PollUpdateMessage; - - /** - * Encodes the specified PollUpdateMessage message. Does not implicitly {@link proto.PollUpdateMessage.verify|verify} messages. - * @param message PollUpdateMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IPollUpdateMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PollUpdateMessage message, length delimited. Does not implicitly {@link proto.PollUpdateMessage.verify|verify} messages. - * @param message PollUpdateMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IPollUpdateMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PollUpdateMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PollUpdateMessage - * @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.PollUpdateMessage; - - /** - * Decodes a PollUpdateMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PollUpdateMessage - * @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.PollUpdateMessage; - - /** - * Verifies a PollUpdateMessage 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 PollUpdateMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PollUpdateMessage - */ - public static fromObject(object: { [k: string]: any }): proto.PollUpdateMessage; - - /** - * Creates a plain object from a PollUpdateMessage message. Also converts values to other types if specified. - * @param message PollUpdateMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.PollUpdateMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PollUpdateMessage to JSON. - * @returns JSON object - */ - 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 { - - /** PollVoteMessage selectedOptions */ - selectedOptions?: (Uint8Array[]|null); - - /** PollVoteMessage senderTimestampMs */ - senderTimestampMs?: (number|Long|null); - } - - /** Represents a PollVoteMessage. */ - class PollVoteMessage implements IPollVoteMessage { - - /** - * Constructs a new PollVoteMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IPollVoteMessage); - - /** PollVoteMessage selectedOptions. */ - public selectedOptions: Uint8Array[]; - - /** PollVoteMessage senderTimestampMs. */ - public senderTimestampMs: (number|Long); - - /** - * Creates a new PollVoteMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns PollVoteMessage instance - */ - public static create(properties?: proto.IPollVoteMessage): proto.PollVoteMessage; - - /** - * Encodes the specified PollVoteMessage message. Does not implicitly {@link proto.PollVoteMessage.verify|verify} messages. - * @param message PollVoteMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IPollVoteMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PollVoteMessage message, length delimited. Does not implicitly {@link proto.PollVoteMessage.verify|verify} messages. - * @param message PollVoteMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IPollVoteMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PollVoteMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PollVoteMessage - * @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.PollVoteMessage; - - /** - * Decodes a PollVoteMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PollVoteMessage - * @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.PollVoteMessage; - - /** - * Verifies a PollVoteMessage 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 PollVoteMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PollVoteMessage - */ - public static fromObject(object: { [k: string]: any }): proto.PollVoteMessage; - - /** - * Creates a plain object from a PollVoteMessage message. Also converts values to other types if specified. - * @param message PollVoteMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.PollVoteMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PollVoteMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - /** Properties of a PreKeyRecordStructure. */ interface IPreKeyRecordStructure { @@ -16974,1000 +19233,6 @@ export namespace proto { 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 { - - /** Product productId */ - productId?: (string|null); - } - - /** Represents a Product. */ - class Product implements IProduct { - - /** - * Constructs a new Product. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IProduct); - - /** Product productId. */ - public productId: string; - - /** - * Creates a new Product instance using the specified properties. - * @param [properties] Properties to set - * @returns Product instance - */ - public static create(properties?: proto.IProduct): proto.Product; - - /** - * Encodes the specified Product message. Does not implicitly {@link proto.Product.verify|verify} messages. - * @param message Product message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IProduct, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Product message, length delimited. Does not implicitly {@link proto.Product.verify|verify} messages. - * @param message Product message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IProduct, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Product message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Product - * @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.Product; - - /** - * Decodes a Product message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Product - * @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.Product; - - /** - * Verifies a Product 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 Product message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Product - */ - public static fromObject(object: { [k: string]: any }): proto.Product; - - /** - * Creates a plain object from a Product message. Also converts values to other types if specified. - * @param message Product - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.Product, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Product to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ProductListHeaderImage. */ - interface IProductListHeaderImage { - - /** ProductListHeaderImage productId */ - productId?: (string|null); - - /** ProductListHeaderImage jpegThumbnail */ - jpegThumbnail?: (Uint8Array|null); - } - - /** Represents a ProductListHeaderImage. */ - class ProductListHeaderImage implements IProductListHeaderImage { - - /** - * Constructs a new ProductListHeaderImage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IProductListHeaderImage); - - /** ProductListHeaderImage productId. */ - public productId: string; - - /** ProductListHeaderImage jpegThumbnail. */ - public jpegThumbnail: Uint8Array; - - /** - * Creates a new ProductListHeaderImage instance using the specified properties. - * @param [properties] Properties to set - * @returns ProductListHeaderImage instance - */ - public static create(properties?: proto.IProductListHeaderImage): proto.ProductListHeaderImage; - - /** - * Encodes the specified ProductListHeaderImage message. Does not implicitly {@link proto.ProductListHeaderImage.verify|verify} messages. - * @param message ProductListHeaderImage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IProductListHeaderImage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ProductListHeaderImage message, length delimited. Does not implicitly {@link proto.ProductListHeaderImage.verify|verify} messages. - * @param message ProductListHeaderImage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IProductListHeaderImage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ProductListHeaderImage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ProductListHeaderImage - * @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.ProductListHeaderImage; - - /** - * Decodes a ProductListHeaderImage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ProductListHeaderImage - * @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.ProductListHeaderImage; - - /** - * Verifies a ProductListHeaderImage 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 ProductListHeaderImage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ProductListHeaderImage - */ - public static fromObject(object: { [k: string]: any }): proto.ProductListHeaderImage; - - /** - * Creates a plain object from a ProductListHeaderImage message. Also converts values to other types if specified. - * @param message ProductListHeaderImage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.ProductListHeaderImage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ProductListHeaderImage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ProductListInfo. */ - interface IProductListInfo { - - /** ProductListInfo productSections */ - productSections?: (proto.IProductSection[]|null); - - /** ProductListInfo headerImage */ - headerImage?: (proto.IProductListHeaderImage|null); - - /** ProductListInfo businessOwnerJid */ - businessOwnerJid?: (string|null); - } - - /** Represents a ProductListInfo. */ - class ProductListInfo implements IProductListInfo { - - /** - * Constructs a new ProductListInfo. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IProductListInfo); - - /** ProductListInfo productSections. */ - public productSections: proto.IProductSection[]; - - /** ProductListInfo headerImage. */ - public headerImage?: (proto.IProductListHeaderImage|null); - - /** ProductListInfo businessOwnerJid. */ - public businessOwnerJid: string; - - /** - * Creates a new ProductListInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ProductListInfo instance - */ - public static create(properties?: proto.IProductListInfo): proto.ProductListInfo; - - /** - * Encodes the specified ProductListInfo message. Does not implicitly {@link proto.ProductListInfo.verify|verify} messages. - * @param message ProductListInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IProductListInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ProductListInfo message, length delimited. Does not implicitly {@link proto.ProductListInfo.verify|verify} messages. - * @param message ProductListInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IProductListInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ProductListInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ProductListInfo - * @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.ProductListInfo; - - /** - * Decodes a ProductListInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ProductListInfo - * @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.ProductListInfo; - - /** - * Verifies a ProductListInfo 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 ProductListInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ProductListInfo - */ - public static fromObject(object: { [k: string]: any }): proto.ProductListInfo; - - /** - * Creates a plain object from a ProductListInfo message. Also converts values to other types if specified. - * @param message ProductListInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.ProductListInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ProductListInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ProductMessage. */ - interface IProductMessage { - - /** ProductMessage product */ - product?: (proto.IProductSnapshot|null); - - /** ProductMessage businessOwnerJid */ - businessOwnerJid?: (string|null); - - /** ProductMessage catalog */ - catalog?: (proto.ICatalogSnapshot|null); - - /** ProductMessage body */ - body?: (string|null); - - /** ProductMessage footer */ - footer?: (string|null); - - /** ProductMessage contextInfo */ - contextInfo?: (proto.IContextInfo|null); - } - - /** Represents a ProductMessage. */ - class ProductMessage implements IProductMessage { - - /** - * Constructs a new ProductMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IProductMessage); - - /** ProductMessage product. */ - public product?: (proto.IProductSnapshot|null); - - /** ProductMessage businessOwnerJid. */ - public businessOwnerJid: string; - - /** ProductMessage catalog. */ - public catalog?: (proto.ICatalogSnapshot|null); - - /** ProductMessage body. */ - public body: string; - - /** ProductMessage footer. */ - public footer: string; - - /** ProductMessage contextInfo. */ - public contextInfo?: (proto.IContextInfo|null); - - /** - * Creates a new ProductMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns ProductMessage instance - */ - public static create(properties?: proto.IProductMessage): proto.ProductMessage; - - /** - * Encodes the specified ProductMessage message. Does not implicitly {@link proto.ProductMessage.verify|verify} messages. - * @param message ProductMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IProductMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ProductMessage message, length delimited. Does not implicitly {@link proto.ProductMessage.verify|verify} messages. - * @param message ProductMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IProductMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ProductMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ProductMessage - * @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.ProductMessage; - - /** - * Decodes a ProductMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ProductMessage - * @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.ProductMessage; - - /** - * Verifies a ProductMessage 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 ProductMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ProductMessage - */ - public static fromObject(object: { [k: string]: any }): proto.ProductMessage; - - /** - * Creates a plain object from a ProductMessage message. Also converts values to other types if specified. - * @param message ProductMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.ProductMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ProductMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ProductSection. */ - interface IProductSection { - - /** ProductSection title */ - title?: (string|null); - - /** ProductSection products */ - products?: (proto.IProduct[]|null); - } - - /** Represents a ProductSection. */ - class ProductSection implements IProductSection { - - /** - * Constructs a new ProductSection. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IProductSection); - - /** ProductSection title. */ - public title: string; - - /** ProductSection products. */ - public products: proto.IProduct[]; - - /** - * Creates a new ProductSection instance using the specified properties. - * @param [properties] Properties to set - * @returns ProductSection instance - */ - public static create(properties?: proto.IProductSection): proto.ProductSection; - - /** - * Encodes the specified ProductSection message. Does not implicitly {@link proto.ProductSection.verify|verify} messages. - * @param message ProductSection message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IProductSection, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ProductSection message, length delimited. Does not implicitly {@link proto.ProductSection.verify|verify} messages. - * @param message ProductSection message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IProductSection, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ProductSection message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ProductSection - * @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.ProductSection; - - /** - * Decodes a ProductSection message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ProductSection - * @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.ProductSection; - - /** - * Verifies a ProductSection 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 ProductSection message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ProductSection - */ - public static fromObject(object: { [k: string]: any }): proto.ProductSection; - - /** - * Creates a plain object from a ProductSection message. Also converts values to other types if specified. - * @param message ProductSection - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.ProductSection, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ProductSection to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ProductSnapshot. */ - interface IProductSnapshot { - - /** ProductSnapshot productImage */ - productImage?: (proto.IImageMessage|null); - - /** ProductSnapshot productId */ - productId?: (string|null); - - /** ProductSnapshot title */ - title?: (string|null); - - /** ProductSnapshot description */ - description?: (string|null); - - /** ProductSnapshot currencyCode */ - currencyCode?: (string|null); - - /** ProductSnapshot priceAmount1000 */ - priceAmount1000?: (number|Long|null); - - /** ProductSnapshot retailerId */ - retailerId?: (string|null); - - /** ProductSnapshot url */ - url?: (string|null); - - /** ProductSnapshot productImageCount */ - productImageCount?: (number|null); - - /** ProductSnapshot firstImageId */ - firstImageId?: (string|null); - - /** ProductSnapshot salePriceAmount1000 */ - salePriceAmount1000?: (number|Long|null); - } - - /** Represents a ProductSnapshot. */ - class ProductSnapshot implements IProductSnapshot { - - /** - * Constructs a new ProductSnapshot. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IProductSnapshot); - - /** ProductSnapshot productImage. */ - public productImage?: (proto.IImageMessage|null); - - /** ProductSnapshot productId. */ - public productId: string; - - /** ProductSnapshot title. */ - public title: string; - - /** ProductSnapshot description. */ - public description: string; - - /** ProductSnapshot currencyCode. */ - public currencyCode: string; - - /** ProductSnapshot priceAmount1000. */ - public priceAmount1000: (number|Long); - - /** ProductSnapshot retailerId. */ - public retailerId: string; - - /** ProductSnapshot url. */ - public url: string; - - /** ProductSnapshot productImageCount. */ - public productImageCount: number; - - /** ProductSnapshot firstImageId. */ - public firstImageId: string; - - /** ProductSnapshot salePriceAmount1000. */ - public salePriceAmount1000: (number|Long); - - /** - * Creates a new ProductSnapshot instance using the specified properties. - * @param [properties] Properties to set - * @returns ProductSnapshot instance - */ - public static create(properties?: proto.IProductSnapshot): proto.ProductSnapshot; - - /** - * Encodes the specified ProductSnapshot message. Does not implicitly {@link proto.ProductSnapshot.verify|verify} messages. - * @param message ProductSnapshot message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IProductSnapshot, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ProductSnapshot message, length delimited. Does not implicitly {@link proto.ProductSnapshot.verify|verify} messages. - * @param message ProductSnapshot message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IProductSnapshot, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ProductSnapshot message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ProductSnapshot - * @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.ProductSnapshot; - - /** - * Decodes a ProductSnapshot message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ProductSnapshot - * @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.ProductSnapshot; - - /** - * Verifies a ProductSnapshot 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 ProductSnapshot message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ProductSnapshot - */ - public static fromObject(object: { [k: string]: any }): proto.ProductSnapshot; - - /** - * Creates a plain object from a ProductSnapshot message. Also converts values to other types if specified. - * @param message ProductSnapshot - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.ProductSnapshot, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ProductSnapshot to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ProtocolMessage. */ - interface IProtocolMessage { - - /** ProtocolMessage key */ - key?: (proto.IMessageKey|null); - - /** ProtocolMessage type */ - type?: (proto.ProtocolMessage.ProtocolMessageType|null); - - /** ProtocolMessage ephemeralExpiration */ - ephemeralExpiration?: (number|null); - - /** ProtocolMessage ephemeralSettingTimestamp */ - ephemeralSettingTimestamp?: (number|Long|null); - - /** ProtocolMessage historySyncNotification */ - historySyncNotification?: (proto.IHistorySyncNotification|null); - - /** ProtocolMessage appStateSyncKeyShare */ - appStateSyncKeyShare?: (proto.IAppStateSyncKeyShare|null); - - /** ProtocolMessage appStateSyncKeyRequest */ - appStateSyncKeyRequest?: (proto.IAppStateSyncKeyRequest|null); - - /** ProtocolMessage initialSecurityNotificationSettingSync */ - initialSecurityNotificationSettingSync?: (proto.IInitialSecurityNotificationSettingSync|null); - - /** ProtocolMessage appStateFatalExceptionNotification */ - appStateFatalExceptionNotification?: (proto.IAppStateFatalExceptionNotification|null); - - /** ProtocolMessage disappearingMode */ - disappearingMode?: (proto.IDisappearingMode|null); - } - - /** Represents a ProtocolMessage. */ - class ProtocolMessage implements IProtocolMessage { - - /** - * Constructs a new ProtocolMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IProtocolMessage); - - /** ProtocolMessage key. */ - public key?: (proto.IMessageKey|null); - - /** ProtocolMessage type. */ - public type: proto.ProtocolMessage.ProtocolMessageType; - - /** ProtocolMessage ephemeralExpiration. */ - public ephemeralExpiration: number; - - /** ProtocolMessage ephemeralSettingTimestamp. */ - public ephemeralSettingTimestamp: (number|Long); - - /** ProtocolMessage historySyncNotification. */ - public historySyncNotification?: (proto.IHistorySyncNotification|null); - - /** ProtocolMessage appStateSyncKeyShare. */ - public appStateSyncKeyShare?: (proto.IAppStateSyncKeyShare|null); - - /** ProtocolMessage appStateSyncKeyRequest. */ - public appStateSyncKeyRequest?: (proto.IAppStateSyncKeyRequest|null); - - /** ProtocolMessage initialSecurityNotificationSettingSync. */ - public initialSecurityNotificationSettingSync?: (proto.IInitialSecurityNotificationSettingSync|null); - - /** ProtocolMessage appStateFatalExceptionNotification. */ - public appStateFatalExceptionNotification?: (proto.IAppStateFatalExceptionNotification|null); - - /** ProtocolMessage disappearingMode. */ - public disappearingMode?: (proto.IDisappearingMode|null); - - /** - * Creates a new ProtocolMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns ProtocolMessage instance - */ - public static create(properties?: proto.IProtocolMessage): proto.ProtocolMessage; - - /** - * Encodes the specified ProtocolMessage message. Does not implicitly {@link proto.ProtocolMessage.verify|verify} messages. - * @param message ProtocolMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IProtocolMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ProtocolMessage message, length delimited. Does not implicitly {@link proto.ProtocolMessage.verify|verify} messages. - * @param message ProtocolMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IProtocolMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ProtocolMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ProtocolMessage - * @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.ProtocolMessage; - - /** - * Decodes a ProtocolMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ProtocolMessage - * @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.ProtocolMessage; - - /** - * Verifies a ProtocolMessage 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 ProtocolMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ProtocolMessage - */ - public static fromObject(object: { [k: string]: any }): proto.ProtocolMessage; - - /** - * Creates a plain object from a ProtocolMessage message. Also converts values to other types if specified. - * @param message ProtocolMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.ProtocolMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ProtocolMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace ProtocolMessage { - - /** ProtocolMessageType enum. */ - 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 - } - } - - /** 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 { @@ -18064,216 +19329,6 @@ export namespace proto { 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 { - - /** QuickReplyButton displayText */ - displayText?: (proto.IHighlyStructuredMessage|null); - - /** QuickReplyButton id */ - id?: (string|null); - } - - /** Represents a QuickReplyButton. */ - class QuickReplyButton implements IQuickReplyButton { - - /** - * Constructs a new QuickReplyButton. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IQuickReplyButton); - - /** QuickReplyButton displayText. */ - public displayText?: (proto.IHighlyStructuredMessage|null); - - /** QuickReplyButton id. */ - public id: string; - - /** - * Creates a new QuickReplyButton instance using the specified properties. - * @param [properties] Properties to set - * @returns QuickReplyButton instance - */ - public static create(properties?: proto.IQuickReplyButton): proto.QuickReplyButton; - - /** - * Encodes the specified QuickReplyButton message. Does not implicitly {@link proto.QuickReplyButton.verify|verify} messages. - * @param message QuickReplyButton message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IQuickReplyButton, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QuickReplyButton message, length delimited. Does not implicitly {@link proto.QuickReplyButton.verify|verify} messages. - * @param message QuickReplyButton message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IQuickReplyButton, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QuickReplyButton message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QuickReplyButton - * @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.QuickReplyButton; - - /** - * Decodes a QuickReplyButton message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QuickReplyButton - * @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.QuickReplyButton; - - /** - * Verifies a QuickReplyButton 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 QuickReplyButton message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QuickReplyButton - */ - public static fromObject(object: { [k: string]: any }): proto.QuickReplyButton; - - /** - * Creates a plain object from a QuickReplyButton message. Also converts values to other types if specified. - * @param message QuickReplyButton - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.QuickReplyButton, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QuickReplyButton to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - /** Properties of a Reaction. */ interface IReaction { @@ -18388,114 +19443,6 @@ export namespace proto { public toJSON(): { [k: string]: any }; } - /** Properties of a ReactionMessage. */ - interface IReactionMessage { - - /** ReactionMessage key */ - key?: (proto.IMessageKey|null); - - /** ReactionMessage text */ - text?: (string|null); - - /** ReactionMessage groupingKey */ - groupingKey?: (string|null); - - /** ReactionMessage senderTimestampMs */ - senderTimestampMs?: (number|Long|null); - } - - /** Represents a ReactionMessage. */ - class ReactionMessage implements IReactionMessage { - - /** - * Constructs a new ReactionMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IReactionMessage); - - /** ReactionMessage key. */ - public key?: (proto.IMessageKey|null); - - /** ReactionMessage text. */ - public text: string; - - /** ReactionMessage groupingKey. */ - public groupingKey: string; - - /** ReactionMessage senderTimestampMs. */ - public senderTimestampMs: (number|Long); - - /** - * Creates a new ReactionMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns ReactionMessage instance - */ - public static create(properties?: proto.IReactionMessage): proto.ReactionMessage; - - /** - * Encodes the specified ReactionMessage message. Does not implicitly {@link proto.ReactionMessage.verify|verify} messages. - * @param message ReactionMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IReactionMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReactionMessage message, length delimited. Does not implicitly {@link proto.ReactionMessage.verify|verify} messages. - * @param message ReactionMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IReactionMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReactionMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReactionMessage - * @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.ReactionMessage; - - /** - * Decodes a ReactionMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReactionMessage - * @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.ReactionMessage; - - /** - * Verifies a ReactionMessage 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 ReactionMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReactionMessage - */ - public static fromObject(object: { [k: string]: any }): proto.ReactionMessage; - - /** - * Creates a plain object from a ReactionMessage message. Also converts values to other types if specified. - * @param message ReactionMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.ReactionMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReactionMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - /** Properties of a RecentEmojiWeight. */ interface IRecentEmojiWeight { @@ -18592,408 +19539,6 @@ export namespace proto { 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 { @@ -19090,522 +19635,6 @@ export namespace proto { public toJSON(): { [k: string]: any }; } - /** Properties of a RequestPaymentMessage. */ - interface IRequestPaymentMessage { - - /** RequestPaymentMessage noteMessage */ - noteMessage?: (proto.IMessage|null); - - /** RequestPaymentMessage currencyCodeIso4217 */ - currencyCodeIso4217?: (string|null); - - /** RequestPaymentMessage amount1000 */ - amount1000?: (number|Long|null); - - /** RequestPaymentMessage requestFrom */ - requestFrom?: (string|null); - - /** RequestPaymentMessage expiryTimestamp */ - expiryTimestamp?: (number|Long|null); - - /** RequestPaymentMessage amount */ - amount?: (proto.IMoney|null); - - /** RequestPaymentMessage background */ - background?: (proto.IPaymentBackground|null); - } - - /** Represents a RequestPaymentMessage. */ - class RequestPaymentMessage implements IRequestPaymentMessage { - - /** - * Constructs a new RequestPaymentMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IRequestPaymentMessage); - - /** RequestPaymentMessage noteMessage. */ - public noteMessage?: (proto.IMessage|null); - - /** RequestPaymentMessage currencyCodeIso4217. */ - public currencyCodeIso4217: string; - - /** RequestPaymentMessage amount1000. */ - public amount1000: (number|Long); - - /** RequestPaymentMessage requestFrom. */ - public requestFrom: string; - - /** RequestPaymentMessage expiryTimestamp. */ - public expiryTimestamp: (number|Long); - - /** RequestPaymentMessage amount. */ - public amount?: (proto.IMoney|null); - - /** RequestPaymentMessage background. */ - public background?: (proto.IPaymentBackground|null); - - /** - * Creates a new RequestPaymentMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns RequestPaymentMessage instance - */ - public static create(properties?: proto.IRequestPaymentMessage): proto.RequestPaymentMessage; - - /** - * Encodes the specified RequestPaymentMessage message. Does not implicitly {@link proto.RequestPaymentMessage.verify|verify} messages. - * @param message RequestPaymentMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IRequestPaymentMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestPaymentMessage message, length delimited. Does not implicitly {@link proto.RequestPaymentMessage.verify|verify} messages. - * @param message RequestPaymentMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IRequestPaymentMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RequestPaymentMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RequestPaymentMessage - * @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.RequestPaymentMessage; - - /** - * Decodes a RequestPaymentMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RequestPaymentMessage - * @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.RequestPaymentMessage; - - /** - * Verifies a RequestPaymentMessage 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 RequestPaymentMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestPaymentMessage - */ - public static fromObject(object: { [k: string]: any }): proto.RequestPaymentMessage; - - /** - * Creates a plain object from a RequestPaymentMessage message. Also converts values to other types if specified. - * @param message RequestPaymentMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.RequestPaymentMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RequestPaymentMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Row. */ - interface IRow { - - /** Row title */ - title?: (string|null); - - /** Row description */ - description?: (string|null); - - /** Row rowId */ - rowId?: (string|null); - } - - /** Represents a Row. */ - class Row implements IRow { - - /** - * Constructs a new Row. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IRow); - - /** Row title. */ - public title: string; - - /** Row description. */ - public description: string; - - /** Row rowId. */ - public rowId: string; - - /** - * Creates a new Row instance using the specified properties. - * @param [properties] Properties to set - * @returns Row instance - */ - public static create(properties?: proto.IRow): proto.Row; - - /** - * Encodes the specified Row message. Does not implicitly {@link proto.Row.verify|verify} messages. - * @param message Row message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IRow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Row message, length delimited. Does not implicitly {@link proto.Row.verify|verify} messages. - * @param message Row message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IRow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Row message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Row - * @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.Row; - - /** - * Decodes a Row message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Row - * @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.Row; - - /** - * Verifies a Row 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 Row message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Row - */ - public static fromObject(object: { [k: string]: any }): proto.Row; - - /** - * Creates a plain object from a Row message. Also converts values to other types if specified. - * @param message Row - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.Row, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Row to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Section. */ - interface ISection { - - /** Section title */ - title?: (string|null); - - /** Section rows */ - rows?: (proto.IRow[]|null); - } - - /** Represents a Section. */ - class Section implements ISection { - - /** - * Constructs a new Section. - * @param [properties] Properties to set - */ - constructor(properties?: proto.ISection); - - /** Section title. */ - public title: string; - - /** Section rows. */ - public rows: proto.IRow[]; - - /** - * Creates a new Section instance using the specified properties. - * @param [properties] Properties to set - * @returns Section instance - */ - public static create(properties?: proto.ISection): proto.Section; - - /** - * Encodes the specified Section message. Does not implicitly {@link proto.Section.verify|verify} messages. - * @param message Section message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.ISection, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Section message, length delimited. Does not implicitly {@link proto.Section.verify|verify} messages. - * @param message Section message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.ISection, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Section message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Section - * @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.Section; - - /** - * Decodes a Section message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Section - * @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.Section; - - /** - * Verifies a Section 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 Section message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Section - */ - public static fromObject(object: { [k: string]: any }): proto.Section; - - /** - * Creates a plain object from a Section message. Also converts values to other types if specified. - * @param message Section - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.Section, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Section 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 SendPaymentMessage. */ - interface ISendPaymentMessage { - - /** SendPaymentMessage noteMessage */ - noteMessage?: (proto.IMessage|null); - - /** SendPaymentMessage requestMessageKey */ - requestMessageKey?: (proto.IMessageKey|null); - - /** SendPaymentMessage background */ - background?: (proto.IPaymentBackground|null); - } - - /** Represents a SendPaymentMessage. */ - class SendPaymentMessage implements ISendPaymentMessage { - - /** - * Constructs a new SendPaymentMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.ISendPaymentMessage); - - /** SendPaymentMessage noteMessage. */ - public noteMessage?: (proto.IMessage|null); - - /** SendPaymentMessage requestMessageKey. */ - public requestMessageKey?: (proto.IMessageKey|null); - - /** SendPaymentMessage background. */ - public background?: (proto.IPaymentBackground|null); - - /** - * Creates a new SendPaymentMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns SendPaymentMessage instance - */ - public static create(properties?: proto.ISendPaymentMessage): proto.SendPaymentMessage; - - /** - * Encodes the specified SendPaymentMessage message. Does not implicitly {@link proto.SendPaymentMessage.verify|verify} messages. - * @param message SendPaymentMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.ISendPaymentMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SendPaymentMessage message, length delimited. Does not implicitly {@link proto.SendPaymentMessage.verify|verify} messages. - * @param message SendPaymentMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.ISendPaymentMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SendPaymentMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SendPaymentMessage - * @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.SendPaymentMessage; - - /** - * Decodes a SendPaymentMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SendPaymentMessage - * @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.SendPaymentMessage; - - /** - * Verifies a SendPaymentMessage 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 SendPaymentMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SendPaymentMessage - */ - public static fromObject(object: { [k: string]: any }): proto.SendPaymentMessage; - - /** - * Creates a plain object from a SendPaymentMessage message. Also converts values to other types if specified. - * @param message SendPaymentMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.SendPaymentMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SendPaymentMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - /** Properties of a SenderChainKey. */ interface ISenderChainKey { @@ -19702,102 +19731,6 @@ export namespace proto { 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 { @@ -20278,108 +20211,6 @@ export namespace proto { 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 { @@ -20542,119 +20373,6 @@ export namespace proto { public toJSON(): { [k: string]: any }; } - /** Properties of a ShopMessage. */ - interface IShopMessage { - - /** ShopMessage id */ - id?: (string|null); - - /** ShopMessage surface */ - surface?: (proto.ShopMessage.ShopMessageSurface|null); - - /** ShopMessage messageVersion */ - messageVersion?: (number|null); - } - - /** Represents a ShopMessage. */ - class ShopMessage implements IShopMessage { - - /** - * Constructs a new ShopMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IShopMessage); - - /** ShopMessage id. */ - public id: string; - - /** ShopMessage surface. */ - public surface: proto.ShopMessage.ShopMessageSurface; - - /** ShopMessage messageVersion. */ - public messageVersion: number; - - /** - * Creates a new ShopMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns ShopMessage instance - */ - public static create(properties?: proto.IShopMessage): proto.ShopMessage; - - /** - * Encodes the specified ShopMessage message. Does not implicitly {@link proto.ShopMessage.verify|verify} messages. - * @param message ShopMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IShopMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ShopMessage message, length delimited. Does not implicitly {@link proto.ShopMessage.verify|verify} messages. - * @param message ShopMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IShopMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ShopMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ShopMessage - * @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.ShopMessage; - - /** - * Decodes a ShopMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ShopMessage - * @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.ShopMessage; - - /** - * Verifies a ShopMessage 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 ShopMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ShopMessage - */ - public static fromObject(object: { [k: string]: any }): proto.ShopMessage; - - /** - * Creates a plain object from a ShopMessage message. Also converts values to other types if specified. - * @param message ShopMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.ShopMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ShopMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace ShopMessage { - - /** ShopMessageSurface enum. */ - enum ShopMessageSurface { - UNKNOWN_SURFACE = 0, - FB = 1, - IG = 2, - WA = 3 - } - } - /** Properties of a SignedPreKeyRecordStructure. */ interface ISignedPreKeyRecordStructure { @@ -20769,186 +20487,6 @@ export namespace proto { public toJSON(): { [k: string]: any }; } - /** Properties of a SingleSelectReply. */ - interface ISingleSelectReply { - - /** SingleSelectReply selectedRowId */ - selectedRowId?: (string|null); - } - - /** Represents a SingleSelectReply. */ - class SingleSelectReply implements ISingleSelectReply { - - /** - * Constructs a new SingleSelectReply. - * @param [properties] Properties to set - */ - constructor(properties?: proto.ISingleSelectReply); - - /** SingleSelectReply selectedRowId. */ - public selectedRowId: string; - - /** - * Creates a new SingleSelectReply instance using the specified properties. - * @param [properties] Properties to set - * @returns SingleSelectReply instance - */ - public static create(properties?: proto.ISingleSelectReply): proto.SingleSelectReply; - - /** - * Encodes the specified SingleSelectReply message. Does not implicitly {@link proto.SingleSelectReply.verify|verify} messages. - * @param message SingleSelectReply message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.ISingleSelectReply, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SingleSelectReply message, length delimited. Does not implicitly {@link proto.SingleSelectReply.verify|verify} messages. - * @param message SingleSelectReply message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.ISingleSelectReply, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SingleSelectReply message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SingleSelectReply - * @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.SingleSelectReply; - - /** - * Decodes a SingleSelectReply message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SingleSelectReply - * @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.SingleSelectReply; - - /** - * Verifies a SingleSelectReply 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 SingleSelectReply message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SingleSelectReply - */ - public static fromObject(object: { [k: string]: any }): proto.SingleSelectReply; - - /** - * Creates a plain object from a SingleSelectReply message. Also converts values to other types if specified. - * @param message SingleSelectReply - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.SingleSelectReply, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SingleSelectReply 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 StatusPSA. */ interface IStatusPSA { @@ -21045,379 +20583,145 @@ export namespace proto { public toJSON(): { [k: string]: any }; } - /** Properties of a StickerMessage. */ - interface IStickerMessage { + /** Properties of a StickerMetadata. */ + interface IStickerMetadata { - /** StickerMessage url */ + /** StickerMetadata url */ url?: (string|null); - /** StickerMessage fileSha256 */ + /** StickerMetadata fileSha256 */ fileSha256?: (Uint8Array|null); - /** StickerMessage fileEncSha256 */ + /** StickerMetadata fileEncSha256 */ fileEncSha256?: (Uint8Array|null); - /** StickerMessage mediaKey */ + /** StickerMetadata mediaKey */ mediaKey?: (Uint8Array|null); - /** StickerMessage mimetype */ + /** StickerMetadata mimetype */ mimetype?: (string|null); - /** StickerMessage height */ + /** StickerMetadata height */ height?: (number|null); - /** StickerMessage width */ + /** StickerMetadata width */ width?: (number|null); - /** StickerMessage directPath */ + /** StickerMetadata directPath */ directPath?: (string|null); - /** StickerMessage fileLength */ + /** StickerMetadata fileLength */ fileLength?: (number|Long|null); - /** StickerMessage mediaKeyTimestamp */ - mediaKeyTimestamp?: (number|Long|null); - - /** StickerMessage firstFrameLength */ - firstFrameLength?: (number|null); - - /** StickerMessage firstFrameSidecar */ - firstFrameSidecar?: (Uint8Array|null); - - /** StickerMessage isAnimated */ - isAnimated?: (boolean|null); - - /** StickerMessage pngThumbnail */ - pngThumbnail?: (Uint8Array|null); - - /** StickerMessage contextInfo */ - contextInfo?: (proto.IContextInfo|null); + /** StickerMetadata weight */ + weight?: (number|null); } - /** Represents a StickerMessage. */ - class StickerMessage implements IStickerMessage { + /** Represents a StickerMetadata. */ + class StickerMetadata implements IStickerMetadata { /** - * Constructs a new StickerMessage. + * Constructs a new StickerMetadata. * @param [properties] Properties to set */ - constructor(properties?: proto.IStickerMessage); + constructor(properties?: proto.IStickerMetadata); - /** StickerMessage url. */ + /** StickerMetadata url. */ public url: string; - /** StickerMessage fileSha256. */ + /** StickerMetadata fileSha256. */ public fileSha256: Uint8Array; - /** StickerMessage fileEncSha256. */ + /** StickerMetadata fileEncSha256. */ public fileEncSha256: Uint8Array; - /** StickerMessage mediaKey. */ + /** StickerMetadata mediaKey. */ public mediaKey: Uint8Array; - /** StickerMessage mimetype. */ + /** StickerMetadata mimetype. */ public mimetype: string; - /** StickerMessage height. */ + /** StickerMetadata height. */ public height: number; - /** StickerMessage width. */ + /** StickerMetadata width. */ public width: number; - /** StickerMessage directPath. */ + /** StickerMetadata directPath. */ public directPath: string; - /** StickerMessage fileLength. */ + /** StickerMetadata fileLength. */ public fileLength: (number|Long); - /** StickerMessage mediaKeyTimestamp. */ - public mediaKeyTimestamp: (number|Long); - - /** StickerMessage firstFrameLength. */ - public firstFrameLength: number; - - /** StickerMessage firstFrameSidecar. */ - public firstFrameSidecar: Uint8Array; - - /** StickerMessage isAnimated. */ - public isAnimated: boolean; - - /** StickerMessage pngThumbnail. */ - public pngThumbnail: Uint8Array; - - /** StickerMessage contextInfo. */ - public contextInfo?: (proto.IContextInfo|null); + /** StickerMetadata weight. */ + public weight: number; /** - * Creates a new StickerMessage instance using the specified properties. + * Creates a new StickerMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns StickerMessage instance + * @returns StickerMetadata instance */ - public static create(properties?: proto.IStickerMessage): proto.StickerMessage; + public static create(properties?: proto.IStickerMetadata): proto.StickerMetadata; /** - * Encodes the specified StickerMessage message. Does not implicitly {@link proto.StickerMessage.verify|verify} messages. - * @param message StickerMessage message or plain object to encode + * Encodes the specified StickerMetadata message. Does not implicitly {@link proto.StickerMetadata.verify|verify} messages. + * @param message StickerMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: proto.IStickerMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: proto.IStickerMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StickerMessage message, length delimited. Does not implicitly {@link proto.StickerMessage.verify|verify} messages. - * @param message StickerMessage message or plain object to encode + * Encodes the specified StickerMetadata message, length delimited. Does not implicitly {@link proto.StickerMetadata.verify|verify} messages. + * @param message StickerMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: proto.IStickerMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: proto.IStickerMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StickerMessage message from the specified reader or buffer. + * Decodes a StickerMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns StickerMessage + * @returns StickerMetadata * @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.StickerMessage; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.StickerMetadata; /** - * Decodes a StickerMessage message from the specified reader or buffer, length delimited. + * Decodes a StickerMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StickerMessage + * @returns StickerMetadata * @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.StickerMessage; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.StickerMetadata; /** - * Verifies a StickerMessage message. + * Verifies a StickerMetadata 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 StickerMessage message from a plain object. Also converts values to their respective internal types. + * Creates a StickerMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StickerMessage + * @returns StickerMetadata */ - public static fromObject(object: { [k: string]: any }): proto.StickerMessage; + public static fromObject(object: { [k: string]: any }): proto.StickerMetadata; /** - * Creates a plain object from a StickerMessage message. Also converts values to other types if specified. - * @param message StickerMessage + * Creates a plain object from a StickerMetadata message. Also converts values to other types if specified. + * @param message StickerMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: proto.StickerMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: proto.StickerMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StickerMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a StickerSyncRMRMessage. */ - interface IStickerSyncRMRMessage { - - /** StickerSyncRMRMessage filehash */ - filehash?: (string[]|null); - - /** StickerSyncRMRMessage rmrSource */ - rmrSource?: (string|null); - - /** StickerSyncRMRMessage requestTimestamp */ - requestTimestamp?: (number|Long|null); - } - - /** Represents a StickerSyncRMRMessage. */ - class StickerSyncRMRMessage implements IStickerSyncRMRMessage { - - /** - * Constructs a new StickerSyncRMRMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IStickerSyncRMRMessage); - - /** StickerSyncRMRMessage filehash. */ - public filehash: string[]; - - /** StickerSyncRMRMessage rmrSource. */ - public rmrSource: string; - - /** StickerSyncRMRMessage requestTimestamp. */ - public requestTimestamp: (number|Long); - - /** - * Creates a new StickerSyncRMRMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns StickerSyncRMRMessage instance - */ - public static create(properties?: proto.IStickerSyncRMRMessage): proto.StickerSyncRMRMessage; - - /** - * Encodes the specified StickerSyncRMRMessage message. Does not implicitly {@link proto.StickerSyncRMRMessage.verify|verify} messages. - * @param message StickerSyncRMRMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IStickerSyncRMRMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StickerSyncRMRMessage message, length delimited. Does not implicitly {@link proto.StickerSyncRMRMessage.verify|verify} messages. - * @param message StickerSyncRMRMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IStickerSyncRMRMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StickerSyncRMRMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StickerSyncRMRMessage - * @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.StickerSyncRMRMessage; - - /** - * Decodes a StickerSyncRMRMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StickerSyncRMRMessage - * @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.StickerSyncRMRMessage; - - /** - * Verifies a StickerSyncRMRMessage 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 StickerSyncRMRMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StickerSyncRMRMessage - */ - public static fromObject(object: { [k: string]: any }): proto.StickerSyncRMRMessage; - - /** - * Creates a plain object from a StickerSyncRMRMessage message. Also converts values to other types if specified. - * @param message StickerSyncRMRMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.StickerSyncRMRMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StickerSyncRMRMessage 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. + * Converts this StickerMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; @@ -21531,204 +20835,6 @@ export namespace proto { 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 { @@ -21736,88 +20842,85 @@ export namespace proto { timestamp?: (number|Long|null); /** SyncActionValue starAction */ - starAction?: (proto.IStarAction|null); + starAction?: (proto.SyncActionValue.IStarAction|null); /** SyncActionValue contactAction */ - contactAction?: (proto.IContactAction|null); + contactAction?: (proto.SyncActionValue.IContactAction|null); /** SyncActionValue muteAction */ - muteAction?: (proto.IMuteAction|null); + muteAction?: (proto.SyncActionValue.IMuteAction|null); /** SyncActionValue pinAction */ - pinAction?: (proto.IPinAction|null); + pinAction?: (proto.SyncActionValue.IPinAction|null); /** SyncActionValue securityNotificationSetting */ - securityNotificationSetting?: (proto.ISecurityNotificationSetting|null); + securityNotificationSetting?: (proto.SyncActionValue.ISecurityNotificationSetting|null); /** SyncActionValue pushNameSetting */ - pushNameSetting?: (proto.IPushNameSetting|null); + pushNameSetting?: (proto.SyncActionValue.IPushNameSetting|null); /** SyncActionValue quickReplyAction */ - quickReplyAction?: (proto.IQuickReplyAction|null); - - /** SyncActionValue recentStickerWeightsAction */ - recentStickerWeightsAction?: (proto.IRecentStickerWeightsAction|null); - - /** SyncActionValue recentStickerMetadata */ - recentStickerMetadata?: (proto.IRecentStickerMetadata|null); + quickReplyAction?: (proto.SyncActionValue.IQuickReplyAction|null); /** SyncActionValue recentEmojiWeightsAction */ - recentEmojiWeightsAction?: (proto.IRecentEmojiWeightsAction|null); + recentEmojiWeightsAction?: (proto.SyncActionValue.IRecentEmojiWeightsAction|null); /** SyncActionValue labelEditAction */ - labelEditAction?: (proto.ILabelEditAction|null); + labelEditAction?: (proto.SyncActionValue.ILabelEditAction|null); /** SyncActionValue labelAssociationAction */ - labelAssociationAction?: (proto.ILabelAssociationAction|null); + labelAssociationAction?: (proto.SyncActionValue.ILabelAssociationAction|null); /** SyncActionValue localeSetting */ - localeSetting?: (proto.ILocaleSetting|null); + localeSetting?: (proto.SyncActionValue.ILocaleSetting|null); /** SyncActionValue archiveChatAction */ - archiveChatAction?: (proto.IArchiveChatAction|null); + archiveChatAction?: (proto.SyncActionValue.IArchiveChatAction|null); /** SyncActionValue deleteMessageForMeAction */ - deleteMessageForMeAction?: (proto.IDeleteMessageForMeAction|null); + deleteMessageForMeAction?: (proto.SyncActionValue.IDeleteMessageForMeAction|null); /** SyncActionValue keyExpiration */ - keyExpiration?: (proto.IKeyExpiration|null); + keyExpiration?: (proto.SyncActionValue.IKeyExpiration|null); /** SyncActionValue markChatAsReadAction */ - markChatAsReadAction?: (proto.IMarkChatAsReadAction|null); + markChatAsReadAction?: (proto.SyncActionValue.IMarkChatAsReadAction|null); /** SyncActionValue clearChatAction */ - clearChatAction?: (proto.IClearChatAction|null); + clearChatAction?: (proto.SyncActionValue.IClearChatAction|null); /** SyncActionValue deleteChatAction */ - deleteChatAction?: (proto.IDeleteChatAction|null); + deleteChatAction?: (proto.SyncActionValue.IDeleteChatAction|null); /** SyncActionValue unarchiveChatsSetting */ - unarchiveChatsSetting?: (proto.IUnarchiveChatsSetting|null); + unarchiveChatsSetting?: (proto.SyncActionValue.IUnarchiveChatsSetting|null); /** SyncActionValue primaryFeature */ - primaryFeature?: (proto.IPrimaryFeature|null); - - /** SyncActionValue favoriteStickerAction */ - favoriteStickerAction?: (proto.IFavoriteStickerAction|null); + primaryFeature?: (proto.SyncActionValue.IPrimaryFeature|null); /** SyncActionValue androidUnsupportedActions */ - androidUnsupportedActions?: (proto.IAndroidUnsupportedActions|null); + androidUnsupportedActions?: (proto.SyncActionValue.IAndroidUnsupportedActions|null); /** SyncActionValue agentAction */ - agentAction?: (proto.IAgentAction|null); + agentAction?: (proto.SyncActionValue.IAgentAction|null); /** SyncActionValue subscriptionAction */ - subscriptionAction?: (proto.ISubscriptionAction|null); + subscriptionAction?: (proto.SyncActionValue.ISubscriptionAction|null); /** SyncActionValue userStatusMuteAction */ - userStatusMuteAction?: (proto.IUserStatusMuteAction|null); + userStatusMuteAction?: (proto.SyncActionValue.IUserStatusMuteAction|null); /** SyncActionValue timeFormatAction */ - timeFormatAction?: (proto.ITimeFormatAction|null); + timeFormatAction?: (proto.SyncActionValue.ITimeFormatAction|null); /** SyncActionValue nuxAction */ - nuxAction?: (proto.INuxAction|null); + nuxAction?: (proto.SyncActionValue.INuxAction|null); + + /** SyncActionValue primaryVersionAction */ + primaryVersionAction?: (proto.SyncActionValue.IPrimaryVersionAction|null); + + /** SyncActionValue stickerAction */ + stickerAction?: (proto.SyncActionValue.IStickerAction|null); } /** Represents a SyncActionValue. */ @@ -21833,88 +20936,85 @@ export namespace proto { public timestamp: (number|Long); /** SyncActionValue starAction. */ - public starAction?: (proto.IStarAction|null); + public starAction?: (proto.SyncActionValue.IStarAction|null); /** SyncActionValue contactAction. */ - public contactAction?: (proto.IContactAction|null); + public contactAction?: (proto.SyncActionValue.IContactAction|null); /** SyncActionValue muteAction. */ - public muteAction?: (proto.IMuteAction|null); + public muteAction?: (proto.SyncActionValue.IMuteAction|null); /** SyncActionValue pinAction. */ - public pinAction?: (proto.IPinAction|null); + public pinAction?: (proto.SyncActionValue.IPinAction|null); /** SyncActionValue securityNotificationSetting. */ - public securityNotificationSetting?: (proto.ISecurityNotificationSetting|null); + public securityNotificationSetting?: (proto.SyncActionValue.ISecurityNotificationSetting|null); /** SyncActionValue pushNameSetting. */ - public pushNameSetting?: (proto.IPushNameSetting|null); + public pushNameSetting?: (proto.SyncActionValue.IPushNameSetting|null); /** SyncActionValue quickReplyAction. */ - public quickReplyAction?: (proto.IQuickReplyAction|null); - - /** SyncActionValue recentStickerWeightsAction. */ - public recentStickerWeightsAction?: (proto.IRecentStickerWeightsAction|null); - - /** SyncActionValue recentStickerMetadata. */ - public recentStickerMetadata?: (proto.IRecentStickerMetadata|null); + public quickReplyAction?: (proto.SyncActionValue.IQuickReplyAction|null); /** SyncActionValue recentEmojiWeightsAction. */ - public recentEmojiWeightsAction?: (proto.IRecentEmojiWeightsAction|null); + public recentEmojiWeightsAction?: (proto.SyncActionValue.IRecentEmojiWeightsAction|null); /** SyncActionValue labelEditAction. */ - public labelEditAction?: (proto.ILabelEditAction|null); + public labelEditAction?: (proto.SyncActionValue.ILabelEditAction|null); /** SyncActionValue labelAssociationAction. */ - public labelAssociationAction?: (proto.ILabelAssociationAction|null); + public labelAssociationAction?: (proto.SyncActionValue.ILabelAssociationAction|null); /** SyncActionValue localeSetting. */ - public localeSetting?: (proto.ILocaleSetting|null); + public localeSetting?: (proto.SyncActionValue.ILocaleSetting|null); /** SyncActionValue archiveChatAction. */ - public archiveChatAction?: (proto.IArchiveChatAction|null); + public archiveChatAction?: (proto.SyncActionValue.IArchiveChatAction|null); /** SyncActionValue deleteMessageForMeAction. */ - public deleteMessageForMeAction?: (proto.IDeleteMessageForMeAction|null); + public deleteMessageForMeAction?: (proto.SyncActionValue.IDeleteMessageForMeAction|null); /** SyncActionValue keyExpiration. */ - public keyExpiration?: (proto.IKeyExpiration|null); + public keyExpiration?: (proto.SyncActionValue.IKeyExpiration|null); /** SyncActionValue markChatAsReadAction. */ - public markChatAsReadAction?: (proto.IMarkChatAsReadAction|null); + public markChatAsReadAction?: (proto.SyncActionValue.IMarkChatAsReadAction|null); /** SyncActionValue clearChatAction. */ - public clearChatAction?: (proto.IClearChatAction|null); + public clearChatAction?: (proto.SyncActionValue.IClearChatAction|null); /** SyncActionValue deleteChatAction. */ - public deleteChatAction?: (proto.IDeleteChatAction|null); + public deleteChatAction?: (proto.SyncActionValue.IDeleteChatAction|null); /** SyncActionValue unarchiveChatsSetting. */ - public unarchiveChatsSetting?: (proto.IUnarchiveChatsSetting|null); + public unarchiveChatsSetting?: (proto.SyncActionValue.IUnarchiveChatsSetting|null); /** SyncActionValue primaryFeature. */ - public primaryFeature?: (proto.IPrimaryFeature|null); - - /** SyncActionValue favoriteStickerAction. */ - public favoriteStickerAction?: (proto.IFavoriteStickerAction|null); + public primaryFeature?: (proto.SyncActionValue.IPrimaryFeature|null); /** SyncActionValue androidUnsupportedActions. */ - public androidUnsupportedActions?: (proto.IAndroidUnsupportedActions|null); + public androidUnsupportedActions?: (proto.SyncActionValue.IAndroidUnsupportedActions|null); /** SyncActionValue agentAction. */ - public agentAction?: (proto.IAgentAction|null); + public agentAction?: (proto.SyncActionValue.IAgentAction|null); /** SyncActionValue subscriptionAction. */ - public subscriptionAction?: (proto.ISubscriptionAction|null); + public subscriptionAction?: (proto.SyncActionValue.ISubscriptionAction|null); /** SyncActionValue userStatusMuteAction. */ - public userStatusMuteAction?: (proto.IUserStatusMuteAction|null); + public userStatusMuteAction?: (proto.SyncActionValue.IUserStatusMuteAction|null); /** SyncActionValue timeFormatAction. */ - public timeFormatAction?: (proto.ITimeFormatAction|null); + public timeFormatAction?: (proto.SyncActionValue.ITimeFormatAction|null); /** SyncActionValue nuxAction. */ - public nuxAction?: (proto.INuxAction|null); + public nuxAction?: (proto.SyncActionValue.INuxAction|null); + + /** SyncActionValue primaryVersionAction. */ + public primaryVersionAction?: (proto.SyncActionValue.IPrimaryVersionAction|null); + + /** SyncActionValue stickerAction. */ + public stickerAction?: (proto.SyncActionValue.IStickerAction|null); /** * Creates a new SyncActionValue instance using the specified properties. @@ -21987,6 +21087,2787 @@ export namespace proto { public toJSON(): { [k: string]: any }; } + namespace SyncActionValue { + + /** 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.SyncActionValue.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.SyncActionValue.IAgentAction): proto.SyncActionValue.AgentAction; + + /** + * Encodes the specified AgentAction message. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.IAgentAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AgentAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.IAndroidUnsupportedActions): proto.SyncActionValue.AndroidUnsupportedActions; + + /** + * Encodes the specified AndroidUnsupportedActions message. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.IAndroidUnsupportedActions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AndroidUnsupportedActions message, length delimited. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.AndroidUnsupportedActions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AndroidUnsupportedActions 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.SyncActionValue.ISyncActionMessageRange|null); + } + + /** Represents an ArchiveChatAction. */ + class ArchiveChatAction implements IArchiveChatAction { + + /** + * Constructs a new ArchiveChatAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.SyncActionValue.IArchiveChatAction); + + /** ArchiveChatAction archived. */ + public archived: boolean; + + /** ArchiveChatAction messageRange. */ + public messageRange?: (proto.SyncActionValue.ISyncActionMessageRange|null); + + /** + * Creates a new ArchiveChatAction instance using the specified properties. + * @param [properties] Properties to set + * @returns ArchiveChatAction instance + */ + public static create(properties?: proto.SyncActionValue.IArchiveChatAction): proto.SyncActionValue.ArchiveChatAction; + + /** + * Encodes the specified ArchiveChatAction message. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.IArchiveChatAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ArchiveChatAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.ArchiveChatAction, 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.SyncActionValue.ISyncActionMessageRange|null); + } + + /** Represents a ClearChatAction. */ + class ClearChatAction implements IClearChatAction { + + /** + * Constructs a new ClearChatAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.SyncActionValue.IClearChatAction); + + /** ClearChatAction messageRange. */ + public messageRange?: (proto.SyncActionValue.ISyncActionMessageRange|null); + + /** + * Creates a new ClearChatAction instance using the specified properties. + * @param [properties] Properties to set + * @returns ClearChatAction instance + */ + public static create(properties?: proto.SyncActionValue.IClearChatAction): proto.SyncActionValue.ClearChatAction; + + /** + * Encodes the specified ClearChatAction message. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.IClearChatAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClearChatAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.IContactAction): proto.SyncActionValue.ContactAction; + + /** + * Encodes the specified ContactAction message. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.IContactAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ContactAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.ISyncActionMessageRange|null); + } + + /** Represents a DeleteChatAction. */ + class DeleteChatAction implements IDeleteChatAction { + + /** + * Constructs a new DeleteChatAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.SyncActionValue.IDeleteChatAction); + + /** DeleteChatAction messageRange. */ + public messageRange?: (proto.SyncActionValue.ISyncActionMessageRange|null); + + /** + * Creates a new DeleteChatAction instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteChatAction instance + */ + public static create(properties?: proto.SyncActionValue.IDeleteChatAction): proto.SyncActionValue.DeleteChatAction; + + /** + * Encodes the specified DeleteChatAction message. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.IDeleteChatAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteChatAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.IDeleteMessageForMeAction): proto.SyncActionValue.DeleteMessageForMeAction; + + /** + * Encodes the specified DeleteMessageForMeAction message. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.IDeleteMessageForMeAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteMessageForMeAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.DeleteMessageForMeAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteMessageForMeAction 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.SyncActionValue.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.SyncActionValue.IKeyExpiration): proto.SyncActionValue.KeyExpiration; + + /** + * Encodes the specified KeyExpiration message. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.IKeyExpiration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KeyExpiration message, length delimited. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.ILabelAssociationAction): proto.SyncActionValue.LabelAssociationAction; + + /** + * Encodes the specified LabelAssociationAction message. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.ILabelAssociationAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LabelAssociationAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.ILabelEditAction): proto.SyncActionValue.LabelEditAction; + + /** + * Encodes the specified LabelEditAction message. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.ILabelEditAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LabelEditAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.ILocaleSetting): proto.SyncActionValue.LocaleSetting; + + /** + * Encodes the specified LocaleSetting message. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.ILocaleSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LocaleSetting message, length delimited. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.ISyncActionMessageRange|null); + } + + /** Represents a MarkChatAsReadAction. */ + class MarkChatAsReadAction implements IMarkChatAsReadAction { + + /** + * Constructs a new MarkChatAsReadAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.SyncActionValue.IMarkChatAsReadAction); + + /** MarkChatAsReadAction read. */ + public read: boolean; + + /** MarkChatAsReadAction messageRange. */ + public messageRange?: (proto.SyncActionValue.ISyncActionMessageRange|null); + + /** + * Creates a new MarkChatAsReadAction instance using the specified properties. + * @param [properties] Properties to set + * @returns MarkChatAsReadAction instance + */ + public static create(properties?: proto.SyncActionValue.IMarkChatAsReadAction): proto.SyncActionValue.MarkChatAsReadAction; + + /** + * Encodes the specified MarkChatAsReadAction message. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.IMarkChatAsReadAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MarkChatAsReadAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.IMuteAction): proto.SyncActionValue.MuteAction; + + /** + * Encodes the specified MuteAction message. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.IMuteAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MuteAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.MuteAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MuteAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a NuxAction. */ + interface INuxAction { + + /** NuxAction acknowledged */ + acknowledged?: (boolean|null); + } + + /** Represents a NuxAction. */ + class NuxAction implements INuxAction { + + /** + * Constructs a new NuxAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.SyncActionValue.INuxAction); + + /** NuxAction acknowledged. */ + public acknowledged: boolean; + + /** + * Creates a new NuxAction instance using the specified properties. + * @param [properties] Properties to set + * @returns NuxAction instance + */ + public static create(properties?: proto.SyncActionValue.INuxAction): proto.SyncActionValue.NuxAction; + + /** + * Encodes the specified NuxAction message. Does not implicitly {@link proto.SyncActionValue.NuxAction.verify|verify} messages. + * @param message NuxAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.SyncActionValue.INuxAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NuxAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.NuxAction.verify|verify} messages. + * @param message NuxAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.SyncActionValue.INuxAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NuxAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NuxAction + * @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.NuxAction; + + /** + * Decodes a NuxAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NuxAction + * @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.NuxAction; + + /** + * Verifies a NuxAction 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 NuxAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NuxAction + */ + public static fromObject(object: { [k: string]: any }): proto.SyncActionValue.NuxAction; + + /** + * Creates a plain object from a NuxAction message. Also converts values to other types if specified. + * @param message NuxAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SyncActionValue.NuxAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NuxAction 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.SyncActionValue.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.SyncActionValue.IPinAction): proto.SyncActionValue.PinAction; + + /** + * Encodes the specified PinAction message. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.IPinAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PinAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.IPrimaryFeature): proto.SyncActionValue.PrimaryFeature; + + /** + * Encodes the specified PrimaryFeature message. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.IPrimaryFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PrimaryFeature message, length delimited. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.PrimaryFeature, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PrimaryFeature to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PrimaryVersionAction. */ + interface IPrimaryVersionAction { + + /** PrimaryVersionAction version */ + version?: (string|null); + } + + /** Represents a PrimaryVersionAction. */ + class PrimaryVersionAction implements IPrimaryVersionAction { + + /** + * Constructs a new PrimaryVersionAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.SyncActionValue.IPrimaryVersionAction); + + /** PrimaryVersionAction version. */ + public version: string; + + /** + * Creates a new PrimaryVersionAction instance using the specified properties. + * @param [properties] Properties to set + * @returns PrimaryVersionAction instance + */ + public static create(properties?: proto.SyncActionValue.IPrimaryVersionAction): proto.SyncActionValue.PrimaryVersionAction; + + /** + * Encodes the specified PrimaryVersionAction message. Does not implicitly {@link proto.SyncActionValue.PrimaryVersionAction.verify|verify} messages. + * @param message PrimaryVersionAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.SyncActionValue.IPrimaryVersionAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PrimaryVersionAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.PrimaryVersionAction.verify|verify} messages. + * @param message PrimaryVersionAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.SyncActionValue.IPrimaryVersionAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PrimaryVersionAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PrimaryVersionAction + * @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.PrimaryVersionAction; + + /** + * Decodes a PrimaryVersionAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PrimaryVersionAction + * @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.PrimaryVersionAction; + + /** + * Verifies a PrimaryVersionAction 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 PrimaryVersionAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PrimaryVersionAction + */ + public static fromObject(object: { [k: string]: any }): proto.SyncActionValue.PrimaryVersionAction; + + /** + * Creates a plain object from a PrimaryVersionAction message. Also converts values to other types if specified. + * @param message PrimaryVersionAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SyncActionValue.PrimaryVersionAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PrimaryVersionAction 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.SyncActionValue.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.SyncActionValue.IPushNameSetting): proto.SyncActionValue.PushNameSetting; + + /** + * Encodes the specified PushNameSetting message. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.IPushNameSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PushNameSetting message, length delimited. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.IQuickReplyAction): proto.SyncActionValue.QuickReplyAction; + + /** + * Encodes the specified QuickReplyAction message. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.IQuickReplyAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QuickReplyAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.QuickReplyAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QuickReplyAction 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.SyncActionValue.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.SyncActionValue.IRecentEmojiWeightsAction): proto.SyncActionValue.RecentEmojiWeightsAction; + + /** + * Encodes the specified RecentEmojiWeightsAction message. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.IRecentEmojiWeightsAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RecentEmojiWeightsAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.RecentEmojiWeightsAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RecentEmojiWeightsAction 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.SyncActionValue.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.SyncActionValue.ISecurityNotificationSetting): proto.SyncActionValue.SecurityNotificationSetting; + + /** + * Encodes the specified SecurityNotificationSetting message. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.ISecurityNotificationSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SecurityNotificationSetting message, length delimited. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.IStarAction): proto.SyncActionValue.StarAction; + + /** + * Encodes the specified StarAction message. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.IStarAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StarAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.StarAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StarAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a StickerAction. */ + interface IStickerAction { + + /** StickerAction url */ + url?: (string|null); + + /** StickerAction fileEncSha256 */ + fileEncSha256?: (Uint8Array|null); + + /** StickerAction mediaKey */ + mediaKey?: (Uint8Array|null); + + /** StickerAction mimetype */ + mimetype?: (string|null); + + /** StickerAction height */ + height?: (number|null); + + /** StickerAction width */ + width?: (number|null); + + /** StickerAction directPath */ + directPath?: (string|null); + + /** StickerAction fileLength */ + fileLength?: (number|Long|null); + + /** StickerAction isFavorite */ + isFavorite?: (boolean|null); + + /** StickerAction deviceIdHint */ + deviceIdHint?: (number|null); + } + + /** Represents a StickerAction. */ + class StickerAction implements IStickerAction { + + /** + * Constructs a new StickerAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.SyncActionValue.IStickerAction); + + /** StickerAction url. */ + public url: string; + + /** StickerAction fileEncSha256. */ + public fileEncSha256: Uint8Array; + + /** StickerAction mediaKey. */ + public mediaKey: Uint8Array; + + /** StickerAction mimetype. */ + public mimetype: string; + + /** StickerAction height. */ + public height: number; + + /** StickerAction width. */ + public width: number; + + /** StickerAction directPath. */ + public directPath: string; + + /** StickerAction fileLength. */ + public fileLength: (number|Long); + + /** StickerAction isFavorite. */ + public isFavorite: boolean; + + /** StickerAction deviceIdHint. */ + public deviceIdHint: number; + + /** + * Creates a new StickerAction instance using the specified properties. + * @param [properties] Properties to set + * @returns StickerAction instance + */ + public static create(properties?: proto.SyncActionValue.IStickerAction): proto.SyncActionValue.StickerAction; + + /** + * Encodes the specified StickerAction message. Does not implicitly {@link proto.SyncActionValue.StickerAction.verify|verify} messages. + * @param message StickerAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.SyncActionValue.IStickerAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StickerAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.StickerAction.verify|verify} messages. + * @param message StickerAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.SyncActionValue.IStickerAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StickerAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StickerAction + * @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.StickerAction; + + /** + * Decodes a StickerAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StickerAction + * @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.StickerAction; + + /** + * Verifies a StickerAction 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 StickerAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StickerAction + */ + public static fromObject(object: { [k: string]: any }): proto.SyncActionValue.StickerAction; + + /** + * Creates a plain object from a StickerAction message. Also converts values to other types if specified. + * @param message StickerAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SyncActionValue.StickerAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StickerAction 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.SyncActionValue.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.SyncActionValue.ISubscriptionAction): proto.SyncActionValue.SubscriptionAction; + + /** + * Encodes the specified SubscriptionAction message. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.ISubscriptionAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SubscriptionAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.SubscriptionAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SubscriptionAction 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.SyncActionValue.ISyncActionMessage[]|null); + } + + /** Represents a SyncActionMessageRange. */ + class SyncActionMessageRange implements ISyncActionMessageRange { + + /** + * Constructs a new SyncActionMessageRange. + * @param [properties] Properties to set + */ + constructor(properties?: proto.SyncActionValue.ISyncActionMessageRange); + + /** SyncActionMessageRange lastMessageTimestamp. */ + public lastMessageTimestamp: (number|Long); + + /** SyncActionMessageRange lastSystemMessageTimestamp. */ + public lastSystemMessageTimestamp: (number|Long); + + /** SyncActionMessageRange messages. */ + public messages: proto.SyncActionValue.ISyncActionMessage[]; + + /** + * Creates a new SyncActionMessageRange instance using the specified properties. + * @param [properties] Properties to set + * @returns SyncActionMessageRange instance + */ + public static create(properties?: proto.SyncActionValue.ISyncActionMessageRange): proto.SyncActionValue.SyncActionMessageRange; + + /** + * Encodes the specified SyncActionMessageRange message. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.ISyncActionMessageRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SyncActionMessageRange message, length delimited. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.SyncActionMessageRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SyncActionMessageRange 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.SyncActionValue.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.SyncActionValue.ISyncActionMessage): proto.SyncActionValue.SyncActionMessage; + + /** + * Encodes the specified SyncActionMessage message. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.ISyncActionMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SyncActionMessage message, length delimited. Does not implicitly {@link proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.SyncActionMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SyncActionMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a TimeFormatAction. */ + interface ITimeFormatAction { + + /** TimeFormatAction isTwentyFourHourFormatEnabled */ + isTwentyFourHourFormatEnabled?: (boolean|null); + } + + /** Represents a TimeFormatAction. */ + class TimeFormatAction implements ITimeFormatAction { + + /** + * Constructs a new TimeFormatAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.SyncActionValue.ITimeFormatAction); + + /** TimeFormatAction isTwentyFourHourFormatEnabled. */ + public isTwentyFourHourFormatEnabled: boolean; + + /** + * Creates a new TimeFormatAction instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeFormatAction instance + */ + public static create(properties?: proto.SyncActionValue.ITimeFormatAction): proto.SyncActionValue.TimeFormatAction; + + /** + * Encodes the specified TimeFormatAction message. Does not implicitly {@link proto.SyncActionValue.TimeFormatAction.verify|verify} messages. + * @param message TimeFormatAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.SyncActionValue.ITimeFormatAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimeFormatAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.TimeFormatAction.verify|verify} messages. + * @param message TimeFormatAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.SyncActionValue.ITimeFormatAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeFormatAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeFormatAction + * @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.TimeFormatAction; + + /** + * Decodes a TimeFormatAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeFormatAction + * @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.TimeFormatAction; + + /** + * Verifies a TimeFormatAction 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 TimeFormatAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeFormatAction + */ + public static fromObject(object: { [k: string]: any }): proto.SyncActionValue.TimeFormatAction; + + /** + * Creates a plain object from a TimeFormatAction message. Also converts values to other types if specified. + * @param message TimeFormatAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SyncActionValue.TimeFormatAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeFormatAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UnarchiveChatsSetting. */ + interface IUnarchiveChatsSetting { + + /** UnarchiveChatsSetting unarchiveChats */ + unarchiveChats?: (boolean|null); + } + + /** Represents an UnarchiveChatsSetting. */ + class UnarchiveChatsSetting implements IUnarchiveChatsSetting { + + /** + * Constructs a new UnarchiveChatsSetting. + * @param [properties] Properties to set + */ + constructor(properties?: proto.SyncActionValue.IUnarchiveChatsSetting); + + /** UnarchiveChatsSetting unarchiveChats. */ + public unarchiveChats: boolean; + + /** + * Creates a new UnarchiveChatsSetting instance using the specified properties. + * @param [properties] Properties to set + * @returns UnarchiveChatsSetting instance + */ + public static create(properties?: proto.SyncActionValue.IUnarchiveChatsSetting): proto.SyncActionValue.UnarchiveChatsSetting; + + /** + * Encodes the specified UnarchiveChatsSetting message. Does not implicitly {@link proto.SyncActionValue.UnarchiveChatsSetting.verify|verify} messages. + * @param message UnarchiveChatsSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.SyncActionValue.IUnarchiveChatsSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UnarchiveChatsSetting message, length delimited. Does not implicitly {@link proto.SyncActionValue.UnarchiveChatsSetting.verify|verify} messages. + * @param message UnarchiveChatsSetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.SyncActionValue.IUnarchiveChatsSetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UnarchiveChatsSetting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UnarchiveChatsSetting + * @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.UnarchiveChatsSetting; + + /** + * Decodes an UnarchiveChatsSetting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UnarchiveChatsSetting + * @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.UnarchiveChatsSetting; + + /** + * Verifies an UnarchiveChatsSetting 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 UnarchiveChatsSetting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UnarchiveChatsSetting + */ + public static fromObject(object: { [k: string]: any }): proto.SyncActionValue.UnarchiveChatsSetting; + + /** + * Creates a plain object from an UnarchiveChatsSetting message. Also converts values to other types if specified. + * @param message UnarchiveChatsSetting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SyncActionValue.UnarchiveChatsSetting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UnarchiveChatsSetting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a UserStatusMuteAction. */ + interface IUserStatusMuteAction { + + /** UserStatusMuteAction muted */ + muted?: (boolean|null); + } + + /** Represents a UserStatusMuteAction. */ + class UserStatusMuteAction implements IUserStatusMuteAction { + + /** + * Constructs a new UserStatusMuteAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.SyncActionValue.IUserStatusMuteAction); + + /** UserStatusMuteAction muted. */ + public muted: boolean; + + /** + * Creates a new UserStatusMuteAction instance using the specified properties. + * @param [properties] Properties to set + * @returns UserStatusMuteAction instance + */ + public static create(properties?: proto.SyncActionValue.IUserStatusMuteAction): proto.SyncActionValue.UserStatusMuteAction; + + /** + * Encodes the specified UserStatusMuteAction message. Does not implicitly {@link proto.SyncActionValue.UserStatusMuteAction.verify|verify} messages. + * @param message UserStatusMuteAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.SyncActionValue.IUserStatusMuteAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserStatusMuteAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.UserStatusMuteAction.verify|verify} messages. + * @param message UserStatusMuteAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.SyncActionValue.IUserStatusMuteAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserStatusMuteAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserStatusMuteAction + * @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.UserStatusMuteAction; + + /** + * Decodes a UserStatusMuteAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserStatusMuteAction + * @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.UserStatusMuteAction; + + /** + * Verifies a UserStatusMuteAction 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 UserStatusMuteAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserStatusMuteAction + */ + public static fromObject(object: { [k: string]: any }): proto.SyncActionValue.UserStatusMuteAction; + + /** + * Creates a plain object from a UserStatusMuteAction message. Also converts values to other types if specified. + * @param message UserStatusMuteAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SyncActionValue.UserStatusMuteAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserStatusMuteAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + /** Properties of a SyncdIndex. */ interface ISyncdIndex { @@ -22081,7 +23962,7 @@ export namespace proto { interface ISyncdMutation { /** SyncdMutation operation */ - operation?: (proto.SyncdMutation.SyncdMutationSyncdOperation|null); + operation?: (proto.SyncdMutation.SyncdOperation|null); /** SyncdMutation record */ record?: (proto.ISyncdRecord|null); @@ -22097,7 +23978,7 @@ export namespace proto { constructor(properties?: proto.ISyncdMutation); /** SyncdMutation operation. */ - public operation: proto.SyncdMutation.SyncdMutationSyncdOperation; + public operation: proto.SyncdMutation.SyncdOperation; /** SyncdMutation record. */ public record?: (proto.ISyncdRecord|null); @@ -22175,8 +24056,8 @@ export namespace proto { namespace SyncdMutation { - /** SyncdMutationSyncdOperation enum. */ - enum SyncdMutationSyncdOperation { + /** SyncdOperation enum. */ + enum SyncdOperation { SET = 0, REMOVE = 1 } @@ -22801,13 +24682,13 @@ export namespace proto { index?: (number|null); /** TemplateButton quickReplyButton */ - quickReplyButton?: (proto.IQuickReplyButton|null); + quickReplyButton?: (proto.TemplateButton.IQuickReplyButton|null); /** TemplateButton urlButton */ - urlButton?: (proto.IURLButton|null); + urlButton?: (proto.TemplateButton.IURLButton|null); /** TemplateButton callButton */ - callButton?: (proto.ICallButton|null); + callButton?: (proto.TemplateButton.ICallButton|null); } /** Represents a TemplateButton. */ @@ -22823,13 +24704,13 @@ export namespace proto { public index: number; /** TemplateButton quickReplyButton. */ - public quickReplyButton?: (proto.IQuickReplyButton|null); + public quickReplyButton?: (proto.TemplateButton.IQuickReplyButton|null); /** TemplateButton urlButton. */ - public urlButton?: (proto.IURLButton|null); + public urlButton?: (proto.TemplateButton.IURLButton|null); /** TemplateButton callButton. */ - public callButton?: (proto.ICallButton|null); + public callButton?: (proto.TemplateButton.ICallButton|null); /** TemplateButton button. */ public button?: ("quickReplyButton"|"urlButton"|"callButton"); @@ -22905,704 +24786,294 @@ export namespace proto { public toJSON(): { [k: string]: any }; } - /** Properties of a TemplateButtonReplyMessage. */ - interface ITemplateButtonReplyMessage { + namespace TemplateButton { - /** TemplateButtonReplyMessage selectedId */ - selectedId?: (string|null); + /** Properties of a CallButton. */ + interface ICallButton { - /** TemplateButtonReplyMessage selectedDisplayText */ - selectedDisplayText?: (string|null); + /** CallButton displayText */ + displayText?: (proto.Message.IHighlyStructuredMessage|null); - /** TemplateButtonReplyMessage contextInfo */ - contextInfo?: (proto.IContextInfo|null); - - /** TemplateButtonReplyMessage selectedIndex */ - selectedIndex?: (number|null); - } - - /** Represents a TemplateButtonReplyMessage. */ - class TemplateButtonReplyMessage implements ITemplateButtonReplyMessage { - - /** - * Constructs a new TemplateButtonReplyMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.ITemplateButtonReplyMessage); - - /** 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 TemplateButtonReplyMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns TemplateButtonReplyMessage instance - */ - public static create(properties?: proto.ITemplateButtonReplyMessage): proto.TemplateButtonReplyMessage; - - /** - * 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.ITemplateButtonReplyMessage, 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 - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.ITemplateButtonReplyMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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 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.TemplateButtonReplyMessage; - - /** - * Decodes a TemplateButtonReplyMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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.TemplateButtonReplyMessage; - - /** - * 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 a TemplateButtonReplyMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TemplateButtonReplyMessage - */ - public static fromObject(object: { [k: string]: any }): proto.TemplateButtonReplyMessage; - - /** - * 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.TemplateButtonReplyMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TemplateButtonReplyMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a TemplateMessage. */ - interface ITemplateMessage { - - /** TemplateMessage contextInfo */ - contextInfo?: (proto.IContextInfo|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 TimeFormatAction. */ - interface ITimeFormatAction { - - /** TimeFormatAction isTwentyFourHourFormatEnabled */ - isTwentyFourHourFormatEnabled?: (boolean|null); - } - - /** Represents a TimeFormatAction. */ - class TimeFormatAction implements ITimeFormatAction { - - /** - * Constructs a new TimeFormatAction. - * @param [properties] Properties to set - */ - constructor(properties?: proto.ITimeFormatAction); - - /** TimeFormatAction isTwentyFourHourFormatEnabled. */ - public isTwentyFourHourFormatEnabled: boolean; - - /** - * Creates a new TimeFormatAction instance using the specified properties. - * @param [properties] Properties to set - * @returns TimeFormatAction instance - */ - public static create(properties?: proto.ITimeFormatAction): proto.TimeFormatAction; - - /** - * Encodes the specified TimeFormatAction message. Does not implicitly {@link proto.TimeFormatAction.verify|verify} messages. - * @param message TimeFormatAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.ITimeFormatAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TimeFormatAction message, length delimited. Does not implicitly {@link proto.TimeFormatAction.verify|verify} messages. - * @param message TimeFormatAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.ITimeFormatAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TimeFormatAction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TimeFormatAction - * @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.TimeFormatAction; - - /** - * Decodes a TimeFormatAction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TimeFormatAction - * @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.TimeFormatAction; - - /** - * Verifies a TimeFormatAction 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 TimeFormatAction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TimeFormatAction - */ - public static fromObject(object: { [k: string]: any }): proto.TimeFormatAction; - - /** - * Creates a plain object from a TimeFormatAction message. Also converts values to other types if specified. - * @param message TimeFormatAction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.TimeFormatAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TimeFormatAction 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 an UnarchiveChatsSetting. */ - interface IUnarchiveChatsSetting { - - /** UnarchiveChatsSetting unarchiveChats */ - unarchiveChats?: (boolean|null); - } - - /** Represents an UnarchiveChatsSetting. */ - class UnarchiveChatsSetting implements IUnarchiveChatsSetting { - - /** - * Constructs a new UnarchiveChatsSetting. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IUnarchiveChatsSetting); - - /** UnarchiveChatsSetting unarchiveChats. */ - public unarchiveChats: boolean; - - /** - * Creates a new UnarchiveChatsSetting instance using the specified properties. - * @param [properties] Properties to set - * @returns UnarchiveChatsSetting instance - */ - public static create(properties?: proto.IUnarchiveChatsSetting): proto.UnarchiveChatsSetting; - - /** - * Encodes the specified UnarchiveChatsSetting message. Does not implicitly {@link proto.UnarchiveChatsSetting.verify|verify} messages. - * @param message UnarchiveChatsSetting message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IUnarchiveChatsSetting, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UnarchiveChatsSetting message, length delimited. Does not implicitly {@link proto.UnarchiveChatsSetting.verify|verify} messages. - * @param message UnarchiveChatsSetting message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IUnarchiveChatsSetting, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UnarchiveChatsSetting message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UnarchiveChatsSetting - * @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.UnarchiveChatsSetting; - - /** - * Decodes an UnarchiveChatsSetting message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UnarchiveChatsSetting - * @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.UnarchiveChatsSetting; - - /** - * Verifies an UnarchiveChatsSetting 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 UnarchiveChatsSetting message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UnarchiveChatsSetting - */ - public static fromObject(object: { [k: string]: any }): proto.UnarchiveChatsSetting; - - /** - * Creates a plain object from an UnarchiveChatsSetting message. Also converts values to other types if specified. - * @param message UnarchiveChatsSetting - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.UnarchiveChatsSetting, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UnarchiveChatsSetting 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 + /** CallButton phoneNumber */ + phoneNumber?: (proto.Message.IHighlyStructuredMessage|null); } - /** UserAgentReleaseChannel enum. */ - enum UserAgentReleaseChannel { - RELEASE = 0, - BETA = 1, - ALPHA = 2, - DEBUG = 3 + /** Represents a CallButton. */ + class CallButton implements ICallButton { + + /** + * Constructs a new CallButton. + * @param [properties] Properties to set + */ + constructor(properties?: proto.TemplateButton.ICallButton); + + /** CallButton displayText. */ + public displayText?: (proto.Message.IHighlyStructuredMessage|null); + + /** CallButton phoneNumber. */ + public phoneNumber?: (proto.Message.IHighlyStructuredMessage|null); + + /** + * Creates a new CallButton instance using the specified properties. + * @param [properties] Properties to set + * @returns CallButton instance + */ + public static create(properties?: proto.TemplateButton.ICallButton): proto.TemplateButton.CallButton; + + /** + * Encodes the specified CallButton message. Does not implicitly {@link proto.TemplateButton.CallButton.verify|verify} messages. + * @param message CallButton message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.TemplateButton.ICallButton, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CallButton message, length delimited. Does not implicitly {@link proto.TemplateButton.CallButton.verify|verify} messages. + * @param message CallButton message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.TemplateButton.ICallButton, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CallButton message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CallButton + * @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.CallButton; + + /** + * Decodes a CallButton message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CallButton + * @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.CallButton; + + /** + * Verifies a CallButton 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 CallButton message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CallButton + */ + public static fromObject(object: { [k: string]: any }): proto.TemplateButton.CallButton; + + /** + * Creates a plain object from a CallButton message. Also converts values to other types if specified. + * @param message CallButton + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.TemplateButton.CallButton, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CallButton to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a QuickReplyButton. */ + interface IQuickReplyButton { + + /** QuickReplyButton displayText */ + displayText?: (proto.Message.IHighlyStructuredMessage|null); + + /** QuickReplyButton id */ + id?: (string|null); + } + + /** Represents a QuickReplyButton. */ + class QuickReplyButton implements IQuickReplyButton { + + /** + * Constructs a new QuickReplyButton. + * @param [properties] Properties to set + */ + constructor(properties?: proto.TemplateButton.IQuickReplyButton); + + /** QuickReplyButton displayText. */ + public displayText?: (proto.Message.IHighlyStructuredMessage|null); + + /** QuickReplyButton id. */ + public id: string; + + /** + * Creates a new QuickReplyButton instance using the specified properties. + * @param [properties] Properties to set + * @returns QuickReplyButton instance + */ + public static create(properties?: proto.TemplateButton.IQuickReplyButton): proto.TemplateButton.QuickReplyButton; + + /** + * Encodes the specified QuickReplyButton message. Does not implicitly {@link proto.TemplateButton.QuickReplyButton.verify|verify} messages. + * @param message QuickReplyButton message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.TemplateButton.IQuickReplyButton, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QuickReplyButton message, length delimited. Does not implicitly {@link proto.TemplateButton.QuickReplyButton.verify|verify} messages. + * @param message QuickReplyButton message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.TemplateButton.IQuickReplyButton, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QuickReplyButton message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QuickReplyButton + * @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.QuickReplyButton; + + /** + * Decodes a QuickReplyButton message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QuickReplyButton + * @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.QuickReplyButton; + + /** + * Verifies a QuickReplyButton 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 QuickReplyButton message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QuickReplyButton + */ + public static fromObject(object: { [k: string]: any }): proto.TemplateButton.QuickReplyButton; + + /** + * Creates a plain object from a QuickReplyButton message. Also converts values to other types if specified. + * @param message QuickReplyButton + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.TemplateButton.QuickReplyButton, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QuickReplyButton to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a URLButton. */ + interface IURLButton { + + /** URLButton displayText */ + displayText?: (proto.Message.IHighlyStructuredMessage|null); + + /** URLButton url */ + url?: (proto.Message.IHighlyStructuredMessage|null); + } + + /** Represents a URLButton. */ + class URLButton implements IURLButton { + + /** + * Constructs a new URLButton. + * @param [properties] Properties to set + */ + constructor(properties?: proto.TemplateButton.IURLButton); + + /** URLButton displayText. */ + public displayText?: (proto.Message.IHighlyStructuredMessage|null); + + /** URLButton url. */ + public url?: (proto.Message.IHighlyStructuredMessage|null); + + /** + * Creates a new URLButton instance using the specified properties. + * @param [properties] Properties to set + * @returns URLButton instance + */ + public static create(properties?: proto.TemplateButton.IURLButton): proto.TemplateButton.URLButton; + + /** + * Encodes the specified URLButton message. Does not implicitly {@link proto.TemplateButton.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.TemplateButton.IURLButton, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified URLButton message, length delimited. Does not implicitly {@link proto.TemplateButton.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.TemplateButton.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.TemplateButton.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.TemplateButton.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.TemplateButton.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.TemplateButton.URLButton, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this URLButton to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } } @@ -23726,96 +25197,6 @@ export namespace proto { public toJSON(): { [k: string]: any }; } - /** Properties of a UserStatusMuteAction. */ - interface IUserStatusMuteAction { - - /** UserStatusMuteAction muted */ - muted?: (boolean|null); - } - - /** Represents a UserStatusMuteAction. */ - class UserStatusMuteAction implements IUserStatusMuteAction { - - /** - * Constructs a new UserStatusMuteAction. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IUserStatusMuteAction); - - /** UserStatusMuteAction muted. */ - public muted: boolean; - - /** - * Creates a new UserStatusMuteAction instance using the specified properties. - * @param [properties] Properties to set - * @returns UserStatusMuteAction instance - */ - public static create(properties?: proto.IUserStatusMuteAction): proto.UserStatusMuteAction; - - /** - * Encodes the specified UserStatusMuteAction message. Does not implicitly {@link proto.UserStatusMuteAction.verify|verify} messages. - * @param message UserStatusMuteAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IUserStatusMuteAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UserStatusMuteAction message, length delimited. Does not implicitly {@link proto.UserStatusMuteAction.verify|verify} messages. - * @param message UserStatusMuteAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IUserStatusMuteAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UserStatusMuteAction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UserStatusMuteAction - * @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.UserStatusMuteAction; - - /** - * Decodes a UserStatusMuteAction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UserStatusMuteAction - * @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.UserStatusMuteAction; - - /** - * Verifies a UserStatusMuteAction 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 UserStatusMuteAction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UserStatusMuteAction - */ - public static fromObject(object: { [k: string]: any }): proto.UserStatusMuteAction; - - /** - * Creates a plain object from a UserStatusMuteAction message. Also converts values to other types if specified. - * @param message UserStatusMuteAction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.UserStatusMuteAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UserStatusMuteAction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - /** Properties of a VerifiedNameCertificate. */ interface IVerifiedNameCertificate { @@ -23918,349 +25299,120 @@ export namespace proto { public toJSON(): { [k: string]: any }; } - /** Properties of a VerifiedNameDetails. */ - interface IVerifiedNameDetails { - - /** VerifiedNameDetails serial */ - serial?: (number|Long|null); - - /** VerifiedNameDetails issuer */ - issuer?: (string|null); - - /** VerifiedNameDetails verifiedName */ - verifiedName?: (string|null); - - /** VerifiedNameDetails localizedNames */ - localizedNames?: (proto.ILocalizedName[]|null); - - /** VerifiedNameDetails issueTime */ - issueTime?: (number|Long|null); - } - - /** Represents a VerifiedNameDetails. */ - class VerifiedNameDetails implements IVerifiedNameDetails { - - /** - * Constructs a new VerifiedNameDetails. - * @param [properties] Properties to set - */ - constructor(properties?: proto.IVerifiedNameDetails); - - /** VerifiedNameDetails serial. */ - public serial: (number|Long); - - /** VerifiedNameDetails issuer. */ - public issuer: string; - - /** VerifiedNameDetails verifiedName. */ - public verifiedName: string; - - /** VerifiedNameDetails localizedNames. */ - public localizedNames: proto.ILocalizedName[]; - - /** VerifiedNameDetails issueTime. */ - public issueTime: (number|Long); - - /** - * Creates a new VerifiedNameDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns VerifiedNameDetails instance - */ - public static create(properties?: proto.IVerifiedNameDetails): proto.VerifiedNameDetails; - - /** - * Encodes the specified VerifiedNameDetails message. Does not implicitly {@link proto.VerifiedNameDetails.verify|verify} messages. - * @param message VerifiedNameDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IVerifiedNameDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VerifiedNameDetails message, length delimited. Does not implicitly {@link proto.VerifiedNameDetails.verify|verify} messages. - * @param message VerifiedNameDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IVerifiedNameDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VerifiedNameDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VerifiedNameDetails - * @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.VerifiedNameDetails; - - /** - * Decodes a VerifiedNameDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VerifiedNameDetails - * @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.VerifiedNameDetails; - - /** - * Verifies a VerifiedNameDetails 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 VerifiedNameDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VerifiedNameDetails - */ - public static fromObject(object: { [k: string]: any }): proto.VerifiedNameDetails; - - /** - * Creates a plain object from a VerifiedNameDetails message. Also converts values to other types if specified. - * @param message VerifiedNameDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.VerifiedNameDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VerifiedNameDetails 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 + namespace VerifiedNameCertificate { + + /** Properties of a Details. */ + interface IDetails { + + /** Details serial */ + serial?: (number|Long|null); + + /** Details issuer */ + issuer?: (string|null); + + /** Details verifiedName */ + verifiedName?: (string|null); + + /** Details localizedNames */ + localizedNames?: (proto.ILocalizedName[]|null); + + /** Details issueTime */ + issueTime?: (number|Long|null); + } + + /** Represents a Details. */ + class Details implements IDetails { + + /** + * Constructs a new Details. + * @param [properties] Properties to set + */ + constructor(properties?: proto.VerifiedNameCertificate.IDetails); + + /** Details serial. */ + public serial: (number|Long); + + /** Details issuer. */ + public issuer: string; + + /** Details verifiedName. */ + public verifiedName: string; + + /** Details localizedNames. */ + public localizedNames: proto.ILocalizedName[]; + + /** Details issueTime. */ + public issueTime: (number|Long); + + /** + * Creates a new Details instance using the specified properties. + * @param [properties] Properties to set + * @returns Details instance + */ + public static create(properties?: proto.VerifiedNameCertificate.IDetails): proto.VerifiedNameCertificate.Details; + + /** + * Encodes the specified Details message. Does not implicitly {@link proto.VerifiedNameCertificate.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.VerifiedNameCertificate.IDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Details message, length delimited. Does not implicitly {@link proto.VerifiedNameCertificate.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.VerifiedNameCertificate.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.VerifiedNameCertificate.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.VerifiedNameCertificate.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.VerifiedNameCertificate.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.VerifiedNameCertificate.Details, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Details to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } } @@ -24364,139 +25516,139 @@ export namespace proto { interface IWebFeatures { /** WebFeatures labelsDisplay */ - labelsDisplay?: (proto.WebFeatures.WebFeaturesFlag|null); + labelsDisplay?: (proto.WebFeatures.Flag|null); /** WebFeatures voipIndividualOutgoing */ - voipIndividualOutgoing?: (proto.WebFeatures.WebFeaturesFlag|null); + voipIndividualOutgoing?: (proto.WebFeatures.Flag|null); /** WebFeatures groupsV3 */ - groupsV3?: (proto.WebFeatures.WebFeaturesFlag|null); + groupsV3?: (proto.WebFeatures.Flag|null); /** WebFeatures groupsV3Create */ - groupsV3Create?: (proto.WebFeatures.WebFeaturesFlag|null); + groupsV3Create?: (proto.WebFeatures.Flag|null); /** WebFeatures changeNumberV2 */ - changeNumberV2?: (proto.WebFeatures.WebFeaturesFlag|null); + changeNumberV2?: (proto.WebFeatures.Flag|null); /** WebFeatures queryStatusV3Thumbnail */ - queryStatusV3Thumbnail?: (proto.WebFeatures.WebFeaturesFlag|null); + queryStatusV3Thumbnail?: (proto.WebFeatures.Flag|null); /** WebFeatures liveLocations */ - liveLocations?: (proto.WebFeatures.WebFeaturesFlag|null); + liveLocations?: (proto.WebFeatures.Flag|null); /** WebFeatures queryVname */ - queryVname?: (proto.WebFeatures.WebFeaturesFlag|null); + queryVname?: (proto.WebFeatures.Flag|null); /** WebFeatures voipIndividualIncoming */ - voipIndividualIncoming?: (proto.WebFeatures.WebFeaturesFlag|null); + voipIndividualIncoming?: (proto.WebFeatures.Flag|null); /** WebFeatures quickRepliesQuery */ - quickRepliesQuery?: (proto.WebFeatures.WebFeaturesFlag|null); + quickRepliesQuery?: (proto.WebFeatures.Flag|null); /** WebFeatures payments */ - payments?: (proto.WebFeatures.WebFeaturesFlag|null); + payments?: (proto.WebFeatures.Flag|null); /** WebFeatures stickerPackQuery */ - stickerPackQuery?: (proto.WebFeatures.WebFeaturesFlag|null); + stickerPackQuery?: (proto.WebFeatures.Flag|null); /** WebFeatures liveLocationsFinal */ - liveLocationsFinal?: (proto.WebFeatures.WebFeaturesFlag|null); + liveLocationsFinal?: (proto.WebFeatures.Flag|null); /** WebFeatures labelsEdit */ - labelsEdit?: (proto.WebFeatures.WebFeaturesFlag|null); + labelsEdit?: (proto.WebFeatures.Flag|null); /** WebFeatures mediaUpload */ - mediaUpload?: (proto.WebFeatures.WebFeaturesFlag|null); + mediaUpload?: (proto.WebFeatures.Flag|null); /** WebFeatures mediaUploadRichQuickReplies */ - mediaUploadRichQuickReplies?: (proto.WebFeatures.WebFeaturesFlag|null); + mediaUploadRichQuickReplies?: (proto.WebFeatures.Flag|null); /** WebFeatures vnameV2 */ - vnameV2?: (proto.WebFeatures.WebFeaturesFlag|null); + vnameV2?: (proto.WebFeatures.Flag|null); /** WebFeatures videoPlaybackUrl */ - videoPlaybackUrl?: (proto.WebFeatures.WebFeaturesFlag|null); + videoPlaybackUrl?: (proto.WebFeatures.Flag|null); /** WebFeatures statusRanking */ - statusRanking?: (proto.WebFeatures.WebFeaturesFlag|null); + statusRanking?: (proto.WebFeatures.Flag|null); /** WebFeatures voipIndividualVideo */ - voipIndividualVideo?: (proto.WebFeatures.WebFeaturesFlag|null); + voipIndividualVideo?: (proto.WebFeatures.Flag|null); /** WebFeatures thirdPartyStickers */ - thirdPartyStickers?: (proto.WebFeatures.WebFeaturesFlag|null); + thirdPartyStickers?: (proto.WebFeatures.Flag|null); /** WebFeatures frequentlyForwardedSetting */ - frequentlyForwardedSetting?: (proto.WebFeatures.WebFeaturesFlag|null); + frequentlyForwardedSetting?: (proto.WebFeatures.Flag|null); /** WebFeatures groupsV4JoinPermission */ - groupsV4JoinPermission?: (proto.WebFeatures.WebFeaturesFlag|null); + groupsV4JoinPermission?: (proto.WebFeatures.Flag|null); /** WebFeatures recentStickers */ - recentStickers?: (proto.WebFeatures.WebFeaturesFlag|null); + recentStickers?: (proto.WebFeatures.Flag|null); /** WebFeatures catalog */ - catalog?: (proto.WebFeatures.WebFeaturesFlag|null); + catalog?: (proto.WebFeatures.Flag|null); /** WebFeatures starredStickers */ - starredStickers?: (proto.WebFeatures.WebFeaturesFlag|null); + starredStickers?: (proto.WebFeatures.Flag|null); /** WebFeatures voipGroupCall */ - voipGroupCall?: (proto.WebFeatures.WebFeaturesFlag|null); + voipGroupCall?: (proto.WebFeatures.Flag|null); /** WebFeatures templateMessage */ - templateMessage?: (proto.WebFeatures.WebFeaturesFlag|null); + templateMessage?: (proto.WebFeatures.Flag|null); /** WebFeatures templateMessageInteractivity */ - templateMessageInteractivity?: (proto.WebFeatures.WebFeaturesFlag|null); + templateMessageInteractivity?: (proto.WebFeatures.Flag|null); /** WebFeatures ephemeralMessages */ - ephemeralMessages?: (proto.WebFeatures.WebFeaturesFlag|null); + ephemeralMessages?: (proto.WebFeatures.Flag|null); /** WebFeatures e2ENotificationSync */ - e2ENotificationSync?: (proto.WebFeatures.WebFeaturesFlag|null); + e2ENotificationSync?: (proto.WebFeatures.Flag|null); /** WebFeatures recentStickersV2 */ - recentStickersV2?: (proto.WebFeatures.WebFeaturesFlag|null); + recentStickersV2?: (proto.WebFeatures.Flag|null); /** WebFeatures recentStickersV3 */ - recentStickersV3?: (proto.WebFeatures.WebFeaturesFlag|null); + recentStickersV3?: (proto.WebFeatures.Flag|null); /** WebFeatures userNotice */ - userNotice?: (proto.WebFeatures.WebFeaturesFlag|null); + userNotice?: (proto.WebFeatures.Flag|null); /** WebFeatures support */ - support?: (proto.WebFeatures.WebFeaturesFlag|null); + support?: (proto.WebFeatures.Flag|null); /** WebFeatures groupUiiCleanup */ - groupUiiCleanup?: (proto.WebFeatures.WebFeaturesFlag|null); + groupUiiCleanup?: (proto.WebFeatures.Flag|null); /** WebFeatures groupDogfoodingInternalOnly */ - groupDogfoodingInternalOnly?: (proto.WebFeatures.WebFeaturesFlag|null); + groupDogfoodingInternalOnly?: (proto.WebFeatures.Flag|null); /** WebFeatures settingsSync */ - settingsSync?: (proto.WebFeatures.WebFeaturesFlag|null); + settingsSync?: (proto.WebFeatures.Flag|null); /** WebFeatures archiveV2 */ - archiveV2?: (proto.WebFeatures.WebFeaturesFlag|null); + archiveV2?: (proto.WebFeatures.Flag|null); /** WebFeatures ephemeralAllowGroupMembers */ - ephemeralAllowGroupMembers?: (proto.WebFeatures.WebFeaturesFlag|null); + ephemeralAllowGroupMembers?: (proto.WebFeatures.Flag|null); /** WebFeatures ephemeral24HDuration */ - ephemeral24HDuration?: (proto.WebFeatures.WebFeaturesFlag|null); + ephemeral24HDuration?: (proto.WebFeatures.Flag|null); /** WebFeatures mdForceUpgrade */ - mdForceUpgrade?: (proto.WebFeatures.WebFeaturesFlag|null); + mdForceUpgrade?: (proto.WebFeatures.Flag|null); /** WebFeatures disappearingMode */ - disappearingMode?: (proto.WebFeatures.WebFeaturesFlag|null); + disappearingMode?: (proto.WebFeatures.Flag|null); /** WebFeatures externalMdOptInAvailable */ - externalMdOptInAvailable?: (proto.WebFeatures.WebFeaturesFlag|null); + externalMdOptInAvailable?: (proto.WebFeatures.Flag|null); /** WebFeatures noDeleteMessageTimeLimit */ - noDeleteMessageTimeLimit?: (proto.WebFeatures.WebFeaturesFlag|null); + noDeleteMessageTimeLimit?: (proto.WebFeatures.Flag|null); } /** Represents a WebFeatures. */ @@ -24509,139 +25661,139 @@ export namespace proto { constructor(properties?: proto.IWebFeatures); /** WebFeatures labelsDisplay. */ - public labelsDisplay: proto.WebFeatures.WebFeaturesFlag; + public labelsDisplay: proto.WebFeatures.Flag; /** WebFeatures voipIndividualOutgoing. */ - public voipIndividualOutgoing: proto.WebFeatures.WebFeaturesFlag; + public voipIndividualOutgoing: proto.WebFeatures.Flag; /** WebFeatures groupsV3. */ - public groupsV3: proto.WebFeatures.WebFeaturesFlag; + public groupsV3: proto.WebFeatures.Flag; /** WebFeatures groupsV3Create. */ - public groupsV3Create: proto.WebFeatures.WebFeaturesFlag; + public groupsV3Create: proto.WebFeatures.Flag; /** WebFeatures changeNumberV2. */ - public changeNumberV2: proto.WebFeatures.WebFeaturesFlag; + public changeNumberV2: proto.WebFeatures.Flag; /** WebFeatures queryStatusV3Thumbnail. */ - public queryStatusV3Thumbnail: proto.WebFeatures.WebFeaturesFlag; + public queryStatusV3Thumbnail: proto.WebFeatures.Flag; /** WebFeatures liveLocations. */ - public liveLocations: proto.WebFeatures.WebFeaturesFlag; + public liveLocations: proto.WebFeatures.Flag; /** WebFeatures queryVname. */ - public queryVname: proto.WebFeatures.WebFeaturesFlag; + public queryVname: proto.WebFeatures.Flag; /** WebFeatures voipIndividualIncoming. */ - public voipIndividualIncoming: proto.WebFeatures.WebFeaturesFlag; + public voipIndividualIncoming: proto.WebFeatures.Flag; /** WebFeatures quickRepliesQuery. */ - public quickRepliesQuery: proto.WebFeatures.WebFeaturesFlag; + public quickRepliesQuery: proto.WebFeatures.Flag; /** WebFeatures payments. */ - public payments: proto.WebFeatures.WebFeaturesFlag; + public payments: proto.WebFeatures.Flag; /** WebFeatures stickerPackQuery. */ - public stickerPackQuery: proto.WebFeatures.WebFeaturesFlag; + public stickerPackQuery: proto.WebFeatures.Flag; /** WebFeatures liveLocationsFinal. */ - public liveLocationsFinal: proto.WebFeatures.WebFeaturesFlag; + public liveLocationsFinal: proto.WebFeatures.Flag; /** WebFeatures labelsEdit. */ - public labelsEdit: proto.WebFeatures.WebFeaturesFlag; + public labelsEdit: proto.WebFeatures.Flag; /** WebFeatures mediaUpload. */ - public mediaUpload: proto.WebFeatures.WebFeaturesFlag; + public mediaUpload: proto.WebFeatures.Flag; /** WebFeatures mediaUploadRichQuickReplies. */ - public mediaUploadRichQuickReplies: proto.WebFeatures.WebFeaturesFlag; + public mediaUploadRichQuickReplies: proto.WebFeatures.Flag; /** WebFeatures vnameV2. */ - public vnameV2: proto.WebFeatures.WebFeaturesFlag; + public vnameV2: proto.WebFeatures.Flag; /** WebFeatures videoPlaybackUrl. */ - public videoPlaybackUrl: proto.WebFeatures.WebFeaturesFlag; + public videoPlaybackUrl: proto.WebFeatures.Flag; /** WebFeatures statusRanking. */ - public statusRanking: proto.WebFeatures.WebFeaturesFlag; + public statusRanking: proto.WebFeatures.Flag; /** WebFeatures voipIndividualVideo. */ - public voipIndividualVideo: proto.WebFeatures.WebFeaturesFlag; + public voipIndividualVideo: proto.WebFeatures.Flag; /** WebFeatures thirdPartyStickers. */ - public thirdPartyStickers: proto.WebFeatures.WebFeaturesFlag; + public thirdPartyStickers: proto.WebFeatures.Flag; /** WebFeatures frequentlyForwardedSetting. */ - public frequentlyForwardedSetting: proto.WebFeatures.WebFeaturesFlag; + public frequentlyForwardedSetting: proto.WebFeatures.Flag; /** WebFeatures groupsV4JoinPermission. */ - public groupsV4JoinPermission: proto.WebFeatures.WebFeaturesFlag; + public groupsV4JoinPermission: proto.WebFeatures.Flag; /** WebFeatures recentStickers. */ - public recentStickers: proto.WebFeatures.WebFeaturesFlag; + public recentStickers: proto.WebFeatures.Flag; /** WebFeatures catalog. */ - public catalog: proto.WebFeatures.WebFeaturesFlag; + public catalog: proto.WebFeatures.Flag; /** WebFeatures starredStickers. */ - public starredStickers: proto.WebFeatures.WebFeaturesFlag; + public starredStickers: proto.WebFeatures.Flag; /** WebFeatures voipGroupCall. */ - public voipGroupCall: proto.WebFeatures.WebFeaturesFlag; + public voipGroupCall: proto.WebFeatures.Flag; /** WebFeatures templateMessage. */ - public templateMessage: proto.WebFeatures.WebFeaturesFlag; + public templateMessage: proto.WebFeatures.Flag; /** WebFeatures templateMessageInteractivity. */ - public templateMessageInteractivity: proto.WebFeatures.WebFeaturesFlag; + public templateMessageInteractivity: proto.WebFeatures.Flag; /** WebFeatures ephemeralMessages. */ - public ephemeralMessages: proto.WebFeatures.WebFeaturesFlag; + public ephemeralMessages: proto.WebFeatures.Flag; /** WebFeatures e2ENotificationSync. */ - public e2ENotificationSync: proto.WebFeatures.WebFeaturesFlag; + public e2ENotificationSync: proto.WebFeatures.Flag; /** WebFeatures recentStickersV2. */ - public recentStickersV2: proto.WebFeatures.WebFeaturesFlag; + public recentStickersV2: proto.WebFeatures.Flag; /** WebFeatures recentStickersV3. */ - public recentStickersV3: proto.WebFeatures.WebFeaturesFlag; + public recentStickersV3: proto.WebFeatures.Flag; /** WebFeatures userNotice. */ - public userNotice: proto.WebFeatures.WebFeaturesFlag; + public userNotice: proto.WebFeatures.Flag; /** WebFeatures support. */ - public support: proto.WebFeatures.WebFeaturesFlag; + public support: proto.WebFeatures.Flag; /** WebFeatures groupUiiCleanup. */ - public groupUiiCleanup: proto.WebFeatures.WebFeaturesFlag; + public groupUiiCleanup: proto.WebFeatures.Flag; /** WebFeatures groupDogfoodingInternalOnly. */ - public groupDogfoodingInternalOnly: proto.WebFeatures.WebFeaturesFlag; + public groupDogfoodingInternalOnly: proto.WebFeatures.Flag; /** WebFeatures settingsSync. */ - public settingsSync: proto.WebFeatures.WebFeaturesFlag; + public settingsSync: proto.WebFeatures.Flag; /** WebFeatures archiveV2. */ - public archiveV2: proto.WebFeatures.WebFeaturesFlag; + public archiveV2: proto.WebFeatures.Flag; /** WebFeatures ephemeralAllowGroupMembers. */ - public ephemeralAllowGroupMembers: proto.WebFeatures.WebFeaturesFlag; + public ephemeralAllowGroupMembers: proto.WebFeatures.Flag; /** WebFeatures ephemeral24HDuration. */ - public ephemeral24HDuration: proto.WebFeatures.WebFeaturesFlag; + public ephemeral24HDuration: proto.WebFeatures.Flag; /** WebFeatures mdForceUpgrade. */ - public mdForceUpgrade: proto.WebFeatures.WebFeaturesFlag; + public mdForceUpgrade: proto.WebFeatures.Flag; /** WebFeatures disappearingMode. */ - public disappearingMode: proto.WebFeatures.WebFeaturesFlag; + public disappearingMode: proto.WebFeatures.Flag; /** WebFeatures externalMdOptInAvailable. */ - public externalMdOptInAvailable: proto.WebFeatures.WebFeaturesFlag; + public externalMdOptInAvailable: proto.WebFeatures.Flag; /** WebFeatures noDeleteMessageTimeLimit. */ - public noDeleteMessageTimeLimit: proto.WebFeatures.WebFeaturesFlag; + public noDeleteMessageTimeLimit: proto.WebFeatures.Flag; /** * Creates a new WebFeatures instance using the specified properties. @@ -24716,8 +25868,8 @@ export namespace proto { namespace WebFeatures { - /** WebFeaturesFlag enum. */ - enum WebFeaturesFlag { + /** Flag enum. */ + enum Flag { NOT_STARTED = 0, FORCE_UPGRADE = 1, DEVELOPMENT = 2, @@ -24725,126 +25877,6 @@ 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 { @@ -24858,7 +25890,7 @@ export namespace proto { messageTimestamp?: (number|Long|null); /** WebMessageInfo status */ - status?: (proto.WebMessageInfo.WebMessageInfoStatus|null); + status?: (proto.WebMessageInfo.Status|null); /** WebMessageInfo participant */ participant?: (string|null); @@ -24891,7 +25923,7 @@ export namespace proto { urlNumber?: (boolean|null); /** WebMessageInfo messageStubType */ - messageStubType?: (proto.WebMessageInfo.WebMessageInfoStubType|null); + messageStubType?: (proto.WebMessageInfo.StubType|null); /** WebMessageInfo clearMedia */ clearMedia?: (boolean|null); @@ -24909,7 +25941,7 @@ export namespace proto { paymentInfo?: (proto.IPaymentInfo|null); /** WebMessageInfo finalLiveLocation */ - finalLiveLocation?: (proto.ILiveLocationMessage|null); + finalLiveLocation?: (proto.Message.ILiveLocationMessage|null); /** WebMessageInfo quotedPaymentInfo */ quotedPaymentInfo?: (proto.IPaymentInfo|null); @@ -24927,7 +25959,7 @@ export namespace proto { ephemeralOutOfSync?: (boolean|null); /** WebMessageInfo bizPrivacyStatus */ - bizPrivacyStatus?: (proto.WebMessageInfo.WebMessageInfoBizPrivacyStatus|null); + bizPrivacyStatus?: (proto.WebMessageInfo.BizPrivacyStatus|null); /** WebMessageInfo verifiedBizName */ verifiedBizName?: (string|null); @@ -24970,6 +26002,12 @@ export namespace proto { /** WebMessageInfo keepInChat */ keepInChat?: (proto.IKeepInChat|null); + + /** WebMessageInfo originalSelfAuthorUserJidString */ + originalSelfAuthorUserJidString?: (string|null); + + /** WebMessageInfo revokeMessageTimestamp */ + revokeMessageTimestamp?: (number|Long|null); } /** Represents a WebMessageInfo. */ @@ -24991,7 +26029,7 @@ export namespace proto { public messageTimestamp: (number|Long); /** WebMessageInfo status. */ - public status: proto.WebMessageInfo.WebMessageInfoStatus; + public status: proto.WebMessageInfo.Status; /** WebMessageInfo participant. */ public participant: string; @@ -25024,7 +26062,7 @@ export namespace proto { public urlNumber: boolean; /** WebMessageInfo messageStubType. */ - public messageStubType: proto.WebMessageInfo.WebMessageInfoStubType; + public messageStubType: proto.WebMessageInfo.StubType; /** WebMessageInfo clearMedia. */ public clearMedia: boolean; @@ -25042,7 +26080,7 @@ export namespace proto { public paymentInfo?: (proto.IPaymentInfo|null); /** WebMessageInfo finalLiveLocation. */ - public finalLiveLocation?: (proto.ILiveLocationMessage|null); + public finalLiveLocation?: (proto.Message.ILiveLocationMessage|null); /** WebMessageInfo quotedPaymentInfo. */ public quotedPaymentInfo?: (proto.IPaymentInfo|null); @@ -25060,7 +26098,7 @@ export namespace proto { public ephemeralOutOfSync: boolean; /** WebMessageInfo bizPrivacyStatus. */ - public bizPrivacyStatus: proto.WebMessageInfo.WebMessageInfoBizPrivacyStatus; + public bizPrivacyStatus: proto.WebMessageInfo.BizPrivacyStatus; /** WebMessageInfo verifiedBizName. */ public verifiedBizName: string; @@ -25104,6 +26142,12 @@ export namespace proto { /** WebMessageInfo keepInChat. */ public keepInChat?: (proto.IKeepInChat|null); + /** WebMessageInfo originalSelfAuthorUserJidString. */ + public originalSelfAuthorUserJidString: string; + + /** WebMessageInfo revokeMessageTimestamp. */ + public revokeMessageTimestamp: (number|Long); + /** * Creates a new WebMessageInfo instance using the specified properties. * @param [properties] Properties to set @@ -25177,8 +26221,16 @@ export namespace proto { namespace WebMessageInfo { - /** WebMessageInfoStatus enum. */ - enum WebMessageInfoStatus { + /** BizPrivacyStatus enum. */ + enum BizPrivacyStatus { + E2EE = 0, + FB = 2, + BSP = 1, + BSP_AND_FB = 3 + } + + /** Status enum. */ + enum Status { ERROR = 0, PENDING = 1, SERVER_ACK = 2, @@ -25187,8 +26239,8 @@ export namespace proto { PLAYED = 5 } - /** WebMessageInfoStubType enum. */ - enum WebMessageInfoStubType { + /** StubType enum. */ + enum StubType { UNKNOWN = 0, REVOKE = 1, CIPHERTEXT = 2, @@ -25332,15 +26384,13 @@ export namespace proto { GROUP_PARTICIPANT_ACCEPT = 140, GROUP_PARTICIPANT_LINKED_GROUP_JOIN = 141, COMMUNITY_CREATE = 142, - EPHEMERAL_KEEP_IN_CHAT = 143 - } - - /** WebMessageInfoBizPrivacyStatus enum. */ - enum WebMessageInfoBizPrivacyStatus { - E2EE = 0, - FB = 2, - BSP = 1, - BSP_AND_FB = 3 + EPHEMERAL_KEEP_IN_CHAT = 143, + GROUP_MEMBERSHIP_JOIN_APPROVAL_REQUEST = 144, + GROUP_MEMBERSHIP_JOIN_APPROVAL_MODE = 145, + INTEGRITY_UNLINK_PARENT_GROUP = 146, + COMMUNITY_PARTICIPANT_PROMOTE = 147, + COMMUNITY_PARTICIPANT_DEMOTE = 148, + COMMUNITY_PARENT_GROUP_DELETED = 149 } } @@ -25451,154 +26501,4 @@ 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 24a6634..309b617 100644 --- a/WAProto/index.js +++ b/WAProto/index.js @@ -1513,3332 +1513,6 @@ $root.proto = (function() { return ActionLink; })(); - proto.AdReplyInfo = (function() { - - /** - * Properties of an AdReplyInfo. - * @memberof proto - * @interface IAdReplyInfo - * @property {string|null} [advertiserName] AdReplyInfo advertiserName - * @property {proto.AdReplyInfo.AdReplyInfoMediaType|null} [mediaType] AdReplyInfo mediaType - * @property {Uint8Array|null} [jpegThumbnail] AdReplyInfo jpegThumbnail - * @property {string|null} [caption] AdReplyInfo caption - */ - - /** - * Constructs a new AdReplyInfo. - * @memberof proto - * @classdesc Represents an AdReplyInfo. - * @implements IAdReplyInfo - * @constructor - * @param {proto.IAdReplyInfo=} [properties] Properties to set - */ - function AdReplyInfo(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]]; - } - - /** - * AdReplyInfo advertiserName. - * @member {string} advertiserName - * @memberof proto.AdReplyInfo - * @instance - */ - AdReplyInfo.prototype.advertiserName = ""; - - /** - * AdReplyInfo mediaType. - * @member {proto.AdReplyInfo.AdReplyInfoMediaType} mediaType - * @memberof proto.AdReplyInfo - * @instance - */ - AdReplyInfo.prototype.mediaType = 0; - - /** - * AdReplyInfo jpegThumbnail. - * @member {Uint8Array} jpegThumbnail - * @memberof proto.AdReplyInfo - * @instance - */ - AdReplyInfo.prototype.jpegThumbnail = $util.newBuffer([]); - - /** - * AdReplyInfo caption. - * @member {string} caption - * @memberof proto.AdReplyInfo - * @instance - */ - AdReplyInfo.prototype.caption = ""; - - /** - * Creates a new AdReplyInfo instance using the specified properties. - * @function create - * @memberof proto.AdReplyInfo - * @static - * @param {proto.IAdReplyInfo=} [properties] Properties to set - * @returns {proto.AdReplyInfo} AdReplyInfo instance - */ - AdReplyInfo.create = function create(properties) { - return new AdReplyInfo(properties); - }; - - /** - * Encodes the specified AdReplyInfo message. Does not implicitly {@link proto.AdReplyInfo.verify|verify} messages. - * @function encode - * @memberof proto.AdReplyInfo - * @static - * @param {proto.IAdReplyInfo} message AdReplyInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AdReplyInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.advertiserName != null && Object.hasOwnProperty.call(message, "advertiserName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.advertiserName); - if (message.mediaType != null && Object.hasOwnProperty.call(message, "mediaType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.mediaType); - if (message.jpegThumbnail != null && Object.hasOwnProperty.call(message, "jpegThumbnail")) - writer.uint32(/* id 16, wireType 2 =*/130).bytes(message.jpegThumbnail); - if (message.caption != null && Object.hasOwnProperty.call(message, "caption")) - writer.uint32(/* id 17, wireType 2 =*/138).string(message.caption); - return writer; - }; - - /** - * Encodes the specified AdReplyInfo message, length delimited. Does not implicitly {@link proto.AdReplyInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.AdReplyInfo - * @static - * @param {proto.IAdReplyInfo} message AdReplyInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AdReplyInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AdReplyInfo message from the specified reader or buffer. - * @function decode - * @memberof proto.AdReplyInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.AdReplyInfo} AdReplyInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AdReplyInfo.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.AdReplyInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.advertiserName = reader.string(); - break; - case 2: - message.mediaType = reader.int32(); - break; - case 16: - message.jpegThumbnail = reader.bytes(); - break; - case 17: - message.caption = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AdReplyInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.AdReplyInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.AdReplyInfo} AdReplyInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AdReplyInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AdReplyInfo message. - * @function verify - * @memberof proto.AdReplyInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AdReplyInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.advertiserName != null && message.hasOwnProperty("advertiserName")) - if (!$util.isString(message.advertiserName)) - return "advertiserName: string expected"; - if (message.mediaType != null && message.hasOwnProperty("mediaType")) - switch (message.mediaType) { - default: - return "mediaType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - 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.caption != null && message.hasOwnProperty("caption")) - if (!$util.isString(message.caption)) - return "caption: string expected"; - return null; - }; - - /** - * Creates an AdReplyInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.AdReplyInfo - * @static - * @param {Object.} object Plain object - * @returns {proto.AdReplyInfo} AdReplyInfo - */ - AdReplyInfo.fromObject = function fromObject(object) { - if (object instanceof $root.proto.AdReplyInfo) - return object; - var message = new $root.proto.AdReplyInfo(); - if (object.advertiserName != null) - message.advertiserName = String(object.advertiserName); - switch (object.mediaType) { - case "NONE": - case 0: - message.mediaType = 0; - break; - case "IMAGE": - case 1: - message.mediaType = 1; - break; - case "VIDEO": - case 2: - message.mediaType = 2; - break; - } - 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.caption != null) - message.caption = String(object.caption); - return message; - }; - - /** - * Creates a plain object from an AdReplyInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.AdReplyInfo - * @static - * @param {proto.AdReplyInfo} message AdReplyInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AdReplyInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.advertiserName = ""; - object.mediaType = options.enums === String ? "NONE" : 0; - if (options.bytes === String) - object.jpegThumbnail = ""; - else { - object.jpegThumbnail = []; - if (options.bytes !== Array) - object.jpegThumbnail = $util.newBuffer(object.jpegThumbnail); - } - object.caption = ""; - } - if (message.advertiserName != null && message.hasOwnProperty("advertiserName")) - object.advertiserName = message.advertiserName; - if (message.mediaType != null && message.hasOwnProperty("mediaType")) - object.mediaType = options.enums === String ? $root.proto.AdReplyInfo.AdReplyInfoMediaType[message.mediaType] : message.mediaType; - 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.caption != null && message.hasOwnProperty("caption")) - object.caption = message.caption; - return object; - }; - - /** - * Converts this AdReplyInfo to JSON. - * @function toJSON - * @memberof proto.AdReplyInfo - * @instance - * @returns {Object.} JSON object - */ - AdReplyInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * AdReplyInfoMediaType enum. - * @name proto.AdReplyInfo.AdReplyInfoMediaType - * @enum {number} - * @property {number} NONE=0 NONE value - * @property {number} IMAGE=1 IMAGE value - * @property {number} VIDEO=2 VIDEO value - */ - AdReplyInfo.AdReplyInfoMediaType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NONE"] = 0; - values[valuesById[1] = "IMAGE"] = 1; - values[valuesById[2] = "VIDEO"] = 2; - return values; - })(); - - 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() { - - /** - * Properties of an AppStateFatalExceptionNotification. - * @memberof proto - * @interface IAppStateFatalExceptionNotification - * @property {Array.|null} [collectionNames] AppStateFatalExceptionNotification collectionNames - * @property {number|Long|null} [timestamp] AppStateFatalExceptionNotification timestamp - */ - - /** - * Constructs a new AppStateFatalExceptionNotification. - * @memberof proto - * @classdesc Represents an AppStateFatalExceptionNotification. - * @implements IAppStateFatalExceptionNotification - * @constructor - * @param {proto.IAppStateFatalExceptionNotification=} [properties] Properties to set - */ - function AppStateFatalExceptionNotification(properties) { - this.collectionNames = []; - 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]]; - } - - /** - * AppStateFatalExceptionNotification collectionNames. - * @member {Array.} collectionNames - * @memberof proto.AppStateFatalExceptionNotification - * @instance - */ - AppStateFatalExceptionNotification.prototype.collectionNames = $util.emptyArray; - - /** - * AppStateFatalExceptionNotification timestamp. - * @member {number|Long} timestamp - * @memberof proto.AppStateFatalExceptionNotification - * @instance - */ - AppStateFatalExceptionNotification.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new AppStateFatalExceptionNotification instance using the specified properties. - * @function create - * @memberof proto.AppStateFatalExceptionNotification - * @static - * @param {proto.IAppStateFatalExceptionNotification=} [properties] Properties to set - * @returns {proto.AppStateFatalExceptionNotification} AppStateFatalExceptionNotification instance - */ - AppStateFatalExceptionNotification.create = function create(properties) { - return new AppStateFatalExceptionNotification(properties); - }; - - /** - * Encodes the specified AppStateFatalExceptionNotification message. Does not implicitly {@link proto.AppStateFatalExceptionNotification.verify|verify} messages. - * @function encode - * @memberof proto.AppStateFatalExceptionNotification - * @static - * @param {proto.IAppStateFatalExceptionNotification} message AppStateFatalExceptionNotification message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppStateFatalExceptionNotification.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.collectionNames != null && message.collectionNames.length) - for (var i = 0; i < message.collectionNames.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.collectionNames[i]); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.timestamp); - return writer; - }; - - /** - * Encodes the specified AppStateFatalExceptionNotification message, length delimited. Does not implicitly {@link proto.AppStateFatalExceptionNotification.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.AppStateFatalExceptionNotification - * @static - * @param {proto.IAppStateFatalExceptionNotification} message AppStateFatalExceptionNotification message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppStateFatalExceptionNotification.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AppStateFatalExceptionNotification message from the specified reader or buffer. - * @function decode - * @memberof proto.AppStateFatalExceptionNotification - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.AppStateFatalExceptionNotification} AppStateFatalExceptionNotification - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppStateFatalExceptionNotification.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.AppStateFatalExceptionNotification(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.collectionNames && message.collectionNames.length)) - message.collectionNames = []; - message.collectionNames.push(reader.string()); - break; - case 2: - message.timestamp = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AppStateFatalExceptionNotification message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.AppStateFatalExceptionNotification - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.AppStateFatalExceptionNotification} AppStateFatalExceptionNotification - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppStateFatalExceptionNotification.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AppStateFatalExceptionNotification message. - * @function verify - * @memberof proto.AppStateFatalExceptionNotification - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AppStateFatalExceptionNotification.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.collectionNames != null && message.hasOwnProperty("collectionNames")) { - if (!Array.isArray(message.collectionNames)) - return "collectionNames: array expected"; - for (var i = 0; i < message.collectionNames.length; ++i) - if (!$util.isString(message.collectionNames[i])) - return "collectionNames: string[] 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 AppStateFatalExceptionNotification message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.AppStateFatalExceptionNotification - * @static - * @param {Object.} object Plain object - * @returns {proto.AppStateFatalExceptionNotification} AppStateFatalExceptionNotification - */ - AppStateFatalExceptionNotification.fromObject = function fromObject(object) { - if (object instanceof $root.proto.AppStateFatalExceptionNotification) - return object; - var message = new $root.proto.AppStateFatalExceptionNotification(); - if (object.collectionNames) { - if (!Array.isArray(object.collectionNames)) - throw TypeError(".proto.AppStateFatalExceptionNotification.collectionNames: array expected"); - message.collectionNames = []; - for (var i = 0; i < object.collectionNames.length; ++i) - message.collectionNames[i] = String(object.collectionNames[i]); - } - 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 AppStateFatalExceptionNotification message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.AppStateFatalExceptionNotification - * @static - * @param {proto.AppStateFatalExceptionNotification} message AppStateFatalExceptionNotification - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AppStateFatalExceptionNotification.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.collectionNames = []; - 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; - if (message.collectionNames && message.collectionNames.length) { - object.collectionNames = []; - for (var j = 0; j < message.collectionNames.length; ++j) - object.collectionNames[j] = message.collectionNames[j]; - } - 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 AppStateFatalExceptionNotification to JSON. - * @function toJSON - * @memberof proto.AppStateFatalExceptionNotification - * @instance - * @returns {Object.} JSON object - */ - AppStateFatalExceptionNotification.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return AppStateFatalExceptionNotification; - })(); - - proto.AppStateSyncKey = (function() { - - /** - * Properties of an AppStateSyncKey. - * @memberof proto - * @interface IAppStateSyncKey - * @property {proto.IAppStateSyncKeyId|null} [keyId] AppStateSyncKey keyId - * @property {proto.IAppStateSyncKeyData|null} [keyData] AppStateSyncKey keyData - */ - - /** - * Constructs a new AppStateSyncKey. - * @memberof proto - * @classdesc Represents an AppStateSyncKey. - * @implements IAppStateSyncKey - * @constructor - * @param {proto.IAppStateSyncKey=} [properties] Properties to set - */ - function AppStateSyncKey(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]]; - } - - /** - * AppStateSyncKey keyId. - * @member {proto.IAppStateSyncKeyId|null|undefined} keyId - * @memberof proto.AppStateSyncKey - * @instance - */ - AppStateSyncKey.prototype.keyId = null; - - /** - * AppStateSyncKey keyData. - * @member {proto.IAppStateSyncKeyData|null|undefined} keyData - * @memberof proto.AppStateSyncKey - * @instance - */ - AppStateSyncKey.prototype.keyData = null; - - /** - * Creates a new AppStateSyncKey instance using the specified properties. - * @function create - * @memberof proto.AppStateSyncKey - * @static - * @param {proto.IAppStateSyncKey=} [properties] Properties to set - * @returns {proto.AppStateSyncKey} AppStateSyncKey instance - */ - AppStateSyncKey.create = function create(properties) { - return new AppStateSyncKey(properties); - }; - - /** - * Encodes the specified AppStateSyncKey message. Does not implicitly {@link proto.AppStateSyncKey.verify|verify} messages. - * @function encode - * @memberof proto.AppStateSyncKey - * @static - * @param {proto.IAppStateSyncKey} message AppStateSyncKey message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppStateSyncKey.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyId != null && Object.hasOwnProperty.call(message, "keyId")) - $root.proto.AppStateSyncKeyId.encode(message.keyId, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.keyData != null && Object.hasOwnProperty.call(message, "keyData")) - $root.proto.AppStateSyncKeyData.encode(message.keyData, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AppStateSyncKey message, length delimited. Does not implicitly {@link proto.AppStateSyncKey.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.AppStateSyncKey - * @static - * @param {proto.IAppStateSyncKey} message AppStateSyncKey message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppStateSyncKey.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AppStateSyncKey message from the specified reader or buffer. - * @function decode - * @memberof proto.AppStateSyncKey - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.AppStateSyncKey} AppStateSyncKey - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppStateSyncKey.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.AppStateSyncKey(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyId = $root.proto.AppStateSyncKeyId.decode(reader, reader.uint32()); - break; - case 2: - message.keyData = $root.proto.AppStateSyncKeyData.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AppStateSyncKey message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.AppStateSyncKey - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.AppStateSyncKey} AppStateSyncKey - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppStateSyncKey.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AppStateSyncKey message. - * @function verify - * @memberof proto.AppStateSyncKey - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AppStateSyncKey.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyId != null && message.hasOwnProperty("keyId")) { - var error = $root.proto.AppStateSyncKeyId.verify(message.keyId); - if (error) - return "keyId." + error; - } - if (message.keyData != null && message.hasOwnProperty("keyData")) { - var error = $root.proto.AppStateSyncKeyData.verify(message.keyData); - if (error) - return "keyData." + error; - } - return null; - }; - - /** - * Creates an AppStateSyncKey message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.AppStateSyncKey - * @static - * @param {Object.} object Plain object - * @returns {proto.AppStateSyncKey} AppStateSyncKey - */ - AppStateSyncKey.fromObject = function fromObject(object) { - if (object instanceof $root.proto.AppStateSyncKey) - return object; - var message = new $root.proto.AppStateSyncKey(); - if (object.keyId != null) { - if (typeof object.keyId !== "object") - throw TypeError(".proto.AppStateSyncKey.keyId: object expected"); - message.keyId = $root.proto.AppStateSyncKeyId.fromObject(object.keyId); - } - if (object.keyData != null) { - if (typeof object.keyData !== "object") - throw TypeError(".proto.AppStateSyncKey.keyData: object expected"); - message.keyData = $root.proto.AppStateSyncKeyData.fromObject(object.keyData); - } - return message; - }; - - /** - * Creates a plain object from an AppStateSyncKey message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.AppStateSyncKey - * @static - * @param {proto.AppStateSyncKey} message AppStateSyncKey - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AppStateSyncKey.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.keyId = null; - object.keyData = null; - } - if (message.keyId != null && message.hasOwnProperty("keyId")) - object.keyId = $root.proto.AppStateSyncKeyId.toObject(message.keyId, options); - if (message.keyData != null && message.hasOwnProperty("keyData")) - object.keyData = $root.proto.AppStateSyncKeyData.toObject(message.keyData, options); - return object; - }; - - /** - * Converts this AppStateSyncKey to JSON. - * @function toJSON - * @memberof proto.AppStateSyncKey - * @instance - * @returns {Object.} JSON object - */ - AppStateSyncKey.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return AppStateSyncKey; - })(); - - proto.AppStateSyncKeyData = (function() { - - /** - * Properties of an AppStateSyncKeyData. - * @memberof proto - * @interface IAppStateSyncKeyData - * @property {Uint8Array|null} [keyData] AppStateSyncKeyData keyData - * @property {proto.IAppStateSyncKeyFingerprint|null} [fingerprint] AppStateSyncKeyData fingerprint - * @property {number|Long|null} [timestamp] AppStateSyncKeyData timestamp - */ - - /** - * Constructs a new AppStateSyncKeyData. - * @memberof proto - * @classdesc Represents an AppStateSyncKeyData. - * @implements IAppStateSyncKeyData - * @constructor - * @param {proto.IAppStateSyncKeyData=} [properties] Properties to set - */ - function AppStateSyncKeyData(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]]; - } - - /** - * AppStateSyncKeyData keyData. - * @member {Uint8Array} keyData - * @memberof proto.AppStateSyncKeyData - * @instance - */ - AppStateSyncKeyData.prototype.keyData = $util.newBuffer([]); - - /** - * AppStateSyncKeyData fingerprint. - * @member {proto.IAppStateSyncKeyFingerprint|null|undefined} fingerprint - * @memberof proto.AppStateSyncKeyData - * @instance - */ - AppStateSyncKeyData.prototype.fingerprint = null; - - /** - * AppStateSyncKeyData timestamp. - * @member {number|Long} timestamp - * @memberof proto.AppStateSyncKeyData - * @instance - */ - AppStateSyncKeyData.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new AppStateSyncKeyData instance using the specified properties. - * @function create - * @memberof proto.AppStateSyncKeyData - * @static - * @param {proto.IAppStateSyncKeyData=} [properties] Properties to set - * @returns {proto.AppStateSyncKeyData} AppStateSyncKeyData instance - */ - AppStateSyncKeyData.create = function create(properties) { - return new AppStateSyncKeyData(properties); - }; - - /** - * Encodes the specified AppStateSyncKeyData message. Does not implicitly {@link proto.AppStateSyncKeyData.verify|verify} messages. - * @function encode - * @memberof proto.AppStateSyncKeyData - * @static - * @param {proto.IAppStateSyncKeyData} message AppStateSyncKeyData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppStateSyncKeyData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyData != null && Object.hasOwnProperty.call(message, "keyData")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.keyData); - if (message.fingerprint != null && Object.hasOwnProperty.call(message, "fingerprint")) - $root.proto.AppStateSyncKeyFingerprint.encode(message.fingerprint, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.timestamp); - return writer; - }; - - /** - * Encodes the specified AppStateSyncKeyData message, length delimited. Does not implicitly {@link proto.AppStateSyncKeyData.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.AppStateSyncKeyData - * @static - * @param {proto.IAppStateSyncKeyData} message AppStateSyncKeyData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppStateSyncKeyData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AppStateSyncKeyData message from the specified reader or buffer. - * @function decode - * @memberof proto.AppStateSyncKeyData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.AppStateSyncKeyData} AppStateSyncKeyData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppStateSyncKeyData.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.AppStateSyncKeyData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyData = reader.bytes(); - break; - case 2: - message.fingerprint = $root.proto.AppStateSyncKeyFingerprint.decode(reader, reader.uint32()); - break; - case 3: - message.timestamp = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AppStateSyncKeyData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.AppStateSyncKeyData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.AppStateSyncKeyData} AppStateSyncKeyData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppStateSyncKeyData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AppStateSyncKeyData message. - * @function verify - * @memberof proto.AppStateSyncKeyData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AppStateSyncKeyData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyData != null && message.hasOwnProperty("keyData")) - if (!(message.keyData && typeof message.keyData.length === "number" || $util.isString(message.keyData))) - return "keyData: buffer expected"; - if (message.fingerprint != null && message.hasOwnProperty("fingerprint")) { - var error = $root.proto.AppStateSyncKeyFingerprint.verify(message.fingerprint); - if (error) - return "fingerprint." + 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 an AppStateSyncKeyData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.AppStateSyncKeyData - * @static - * @param {Object.} object Plain object - * @returns {proto.AppStateSyncKeyData} AppStateSyncKeyData - */ - AppStateSyncKeyData.fromObject = function fromObject(object) { - if (object instanceof $root.proto.AppStateSyncKeyData) - return object; - var message = new $root.proto.AppStateSyncKeyData(); - if (object.keyData != null) - if (typeof object.keyData === "string") - $util.base64.decode(object.keyData, message.keyData = $util.newBuffer($util.base64.length(object.keyData)), 0); - else if (object.keyData.length) - message.keyData = object.keyData; - if (object.fingerprint != null) { - if (typeof object.fingerprint !== "object") - throw TypeError(".proto.AppStateSyncKeyData.fingerprint: object expected"); - message.fingerprint = $root.proto.AppStateSyncKeyFingerprint.fromObject(object.fingerprint); - } - 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 AppStateSyncKeyData message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.AppStateSyncKeyData - * @static - * @param {proto.AppStateSyncKeyData} message AppStateSyncKeyData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AppStateSyncKeyData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.keyData = ""; - else { - object.keyData = []; - if (options.bytes !== Array) - object.keyData = $util.newBuffer(object.keyData); - } - object.fingerprint = 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.keyData != null && message.hasOwnProperty("keyData")) - object.keyData = options.bytes === String ? $util.base64.encode(message.keyData, 0, message.keyData.length) : options.bytes === Array ? Array.prototype.slice.call(message.keyData) : message.keyData; - if (message.fingerprint != null && message.hasOwnProperty("fingerprint")) - object.fingerprint = $root.proto.AppStateSyncKeyFingerprint.toObject(message.fingerprint, 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 AppStateSyncKeyData to JSON. - * @function toJSON - * @memberof proto.AppStateSyncKeyData - * @instance - * @returns {Object.} JSON object - */ - AppStateSyncKeyData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return AppStateSyncKeyData; - })(); - - proto.AppStateSyncKeyFingerprint = (function() { - - /** - * Properties of an AppStateSyncKeyFingerprint. - * @memberof proto - * @interface IAppStateSyncKeyFingerprint - * @property {number|null} [rawId] AppStateSyncKeyFingerprint rawId - * @property {number|null} [currentIndex] AppStateSyncKeyFingerprint currentIndex - * @property {Array.|null} [deviceIndexes] AppStateSyncKeyFingerprint deviceIndexes - */ - - /** - * Constructs a new AppStateSyncKeyFingerprint. - * @memberof proto - * @classdesc Represents an AppStateSyncKeyFingerprint. - * @implements IAppStateSyncKeyFingerprint - * @constructor - * @param {proto.IAppStateSyncKeyFingerprint=} [properties] Properties to set - */ - function AppStateSyncKeyFingerprint(properties) { - this.deviceIndexes = []; - 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]]; - } - - /** - * AppStateSyncKeyFingerprint rawId. - * @member {number} rawId - * @memberof proto.AppStateSyncKeyFingerprint - * @instance - */ - AppStateSyncKeyFingerprint.prototype.rawId = 0; - - /** - * AppStateSyncKeyFingerprint currentIndex. - * @member {number} currentIndex - * @memberof proto.AppStateSyncKeyFingerprint - * @instance - */ - AppStateSyncKeyFingerprint.prototype.currentIndex = 0; - - /** - * AppStateSyncKeyFingerprint deviceIndexes. - * @member {Array.} deviceIndexes - * @memberof proto.AppStateSyncKeyFingerprint - * @instance - */ - AppStateSyncKeyFingerprint.prototype.deviceIndexes = $util.emptyArray; - - /** - * Creates a new AppStateSyncKeyFingerprint instance using the specified properties. - * @function create - * @memberof proto.AppStateSyncKeyFingerprint - * @static - * @param {proto.IAppStateSyncKeyFingerprint=} [properties] Properties to set - * @returns {proto.AppStateSyncKeyFingerprint} AppStateSyncKeyFingerprint instance - */ - AppStateSyncKeyFingerprint.create = function create(properties) { - return new AppStateSyncKeyFingerprint(properties); - }; - - /** - * Encodes the specified AppStateSyncKeyFingerprint message. Does not implicitly {@link proto.AppStateSyncKeyFingerprint.verify|verify} messages. - * @function encode - * @memberof proto.AppStateSyncKeyFingerprint - * @static - * @param {proto.IAppStateSyncKeyFingerprint} message AppStateSyncKeyFingerprint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppStateSyncKeyFingerprint.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rawId != null && Object.hasOwnProperty.call(message, "rawId")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.rawId); - if (message.currentIndex != null && Object.hasOwnProperty.call(message, "currentIndex")) - writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.currentIndex); - if (message.deviceIndexes != null && message.deviceIndexes.length) { - writer.uint32(/* id 3, wireType 2 =*/26).fork(); - for (var i = 0; i < message.deviceIndexes.length; ++i) - writer.uint32(message.deviceIndexes[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified AppStateSyncKeyFingerprint message, length delimited. Does not implicitly {@link proto.AppStateSyncKeyFingerprint.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.AppStateSyncKeyFingerprint - * @static - * @param {proto.IAppStateSyncKeyFingerprint} message AppStateSyncKeyFingerprint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppStateSyncKeyFingerprint.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AppStateSyncKeyFingerprint message from the specified reader or buffer. - * @function decode - * @memberof proto.AppStateSyncKeyFingerprint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.AppStateSyncKeyFingerprint} AppStateSyncKeyFingerprint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppStateSyncKeyFingerprint.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.AppStateSyncKeyFingerprint(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rawId = reader.uint32(); - break; - case 2: - message.currentIndex = reader.uint32(); - break; - case 3: - if (!(message.deviceIndexes && message.deviceIndexes.length)) - message.deviceIndexes = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.deviceIndexes.push(reader.uint32()); - } else - message.deviceIndexes.push(reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AppStateSyncKeyFingerprint message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.AppStateSyncKeyFingerprint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.AppStateSyncKeyFingerprint} AppStateSyncKeyFingerprint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppStateSyncKeyFingerprint.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AppStateSyncKeyFingerprint message. - * @function verify - * @memberof proto.AppStateSyncKeyFingerprint - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AppStateSyncKeyFingerprint.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rawId != null && message.hasOwnProperty("rawId")) - if (!$util.isInteger(message.rawId)) - return "rawId: integer expected"; - if (message.currentIndex != null && message.hasOwnProperty("currentIndex")) - if (!$util.isInteger(message.currentIndex)) - return "currentIndex: integer expected"; - if (message.deviceIndexes != null && message.hasOwnProperty("deviceIndexes")) { - if (!Array.isArray(message.deviceIndexes)) - return "deviceIndexes: array expected"; - for (var i = 0; i < message.deviceIndexes.length; ++i) - if (!$util.isInteger(message.deviceIndexes[i])) - return "deviceIndexes: integer[] expected"; - } - return null; - }; - - /** - * Creates an AppStateSyncKeyFingerprint message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.AppStateSyncKeyFingerprint - * @static - * @param {Object.} object Plain object - * @returns {proto.AppStateSyncKeyFingerprint} AppStateSyncKeyFingerprint - */ - AppStateSyncKeyFingerprint.fromObject = function fromObject(object) { - if (object instanceof $root.proto.AppStateSyncKeyFingerprint) - return object; - var message = new $root.proto.AppStateSyncKeyFingerprint(); - if (object.rawId != null) - message.rawId = object.rawId >>> 0; - if (object.currentIndex != null) - message.currentIndex = object.currentIndex >>> 0; - if (object.deviceIndexes) { - if (!Array.isArray(object.deviceIndexes)) - throw TypeError(".proto.AppStateSyncKeyFingerprint.deviceIndexes: array expected"); - message.deviceIndexes = []; - for (var i = 0; i < object.deviceIndexes.length; ++i) - message.deviceIndexes[i] = object.deviceIndexes[i] >>> 0; - } - return message; - }; - - /** - * Creates a plain object from an AppStateSyncKeyFingerprint message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.AppStateSyncKeyFingerprint - * @static - * @param {proto.AppStateSyncKeyFingerprint} message AppStateSyncKeyFingerprint - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AppStateSyncKeyFingerprint.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.deviceIndexes = []; - if (options.defaults) { - object.rawId = 0; - object.currentIndex = 0; - } - if (message.rawId != null && message.hasOwnProperty("rawId")) - object.rawId = message.rawId; - if (message.currentIndex != null && message.hasOwnProperty("currentIndex")) - object.currentIndex = message.currentIndex; - if (message.deviceIndexes && message.deviceIndexes.length) { - object.deviceIndexes = []; - for (var j = 0; j < message.deviceIndexes.length; ++j) - object.deviceIndexes[j] = message.deviceIndexes[j]; - } - return object; - }; - - /** - * Converts this AppStateSyncKeyFingerprint to JSON. - * @function toJSON - * @memberof proto.AppStateSyncKeyFingerprint - * @instance - * @returns {Object.} JSON object - */ - AppStateSyncKeyFingerprint.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return AppStateSyncKeyFingerprint; - })(); - - proto.AppStateSyncKeyId = (function() { - - /** - * Properties of an AppStateSyncKeyId. - * @memberof proto - * @interface IAppStateSyncKeyId - * @property {Uint8Array|null} [keyId] AppStateSyncKeyId keyId - */ - - /** - * Constructs a new AppStateSyncKeyId. - * @memberof proto - * @classdesc Represents an AppStateSyncKeyId. - * @implements IAppStateSyncKeyId - * @constructor - * @param {proto.IAppStateSyncKeyId=} [properties] Properties to set - */ - function AppStateSyncKeyId(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]]; - } - - /** - * AppStateSyncKeyId keyId. - * @member {Uint8Array} keyId - * @memberof proto.AppStateSyncKeyId - * @instance - */ - AppStateSyncKeyId.prototype.keyId = $util.newBuffer([]); - - /** - * Creates a new AppStateSyncKeyId instance using the specified properties. - * @function create - * @memberof proto.AppStateSyncKeyId - * @static - * @param {proto.IAppStateSyncKeyId=} [properties] Properties to set - * @returns {proto.AppStateSyncKeyId} AppStateSyncKeyId instance - */ - AppStateSyncKeyId.create = function create(properties) { - return new AppStateSyncKeyId(properties); - }; - - /** - * Encodes the specified AppStateSyncKeyId message. Does not implicitly {@link proto.AppStateSyncKeyId.verify|verify} messages. - * @function encode - * @memberof proto.AppStateSyncKeyId - * @static - * @param {proto.IAppStateSyncKeyId} message AppStateSyncKeyId message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppStateSyncKeyId.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyId != null && Object.hasOwnProperty.call(message, "keyId")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.keyId); - return writer; - }; - - /** - * Encodes the specified AppStateSyncKeyId message, length delimited. Does not implicitly {@link proto.AppStateSyncKeyId.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.AppStateSyncKeyId - * @static - * @param {proto.IAppStateSyncKeyId} message AppStateSyncKeyId message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppStateSyncKeyId.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AppStateSyncKeyId message from the specified reader or buffer. - * @function decode - * @memberof proto.AppStateSyncKeyId - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.AppStateSyncKeyId} AppStateSyncKeyId - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppStateSyncKeyId.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.AppStateSyncKeyId(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.keyId = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AppStateSyncKeyId message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.AppStateSyncKeyId - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.AppStateSyncKeyId} AppStateSyncKeyId - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppStateSyncKeyId.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AppStateSyncKeyId message. - * @function verify - * @memberof proto.AppStateSyncKeyId - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AppStateSyncKeyId.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyId != null && message.hasOwnProperty("keyId")) - if (!(message.keyId && typeof message.keyId.length === "number" || $util.isString(message.keyId))) - return "keyId: buffer expected"; - return null; - }; - - /** - * Creates an AppStateSyncKeyId message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.AppStateSyncKeyId - * @static - * @param {Object.} object Plain object - * @returns {proto.AppStateSyncKeyId} AppStateSyncKeyId - */ - AppStateSyncKeyId.fromObject = function fromObject(object) { - if (object instanceof $root.proto.AppStateSyncKeyId) - return object; - var message = new $root.proto.AppStateSyncKeyId(); - if (object.keyId != null) - if (typeof object.keyId === "string") - $util.base64.decode(object.keyId, message.keyId = $util.newBuffer($util.base64.length(object.keyId)), 0); - else if (object.keyId.length) - message.keyId = object.keyId; - return message; - }; - - /** - * Creates a plain object from an AppStateSyncKeyId message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.AppStateSyncKeyId - * @static - * @param {proto.AppStateSyncKeyId} message AppStateSyncKeyId - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AppStateSyncKeyId.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if (options.bytes === String) - object.keyId = ""; - else { - object.keyId = []; - if (options.bytes !== Array) - object.keyId = $util.newBuffer(object.keyId); - } - if (message.keyId != null && message.hasOwnProperty("keyId")) - object.keyId = options.bytes === String ? $util.base64.encode(message.keyId, 0, message.keyId.length) : options.bytes === Array ? Array.prototype.slice.call(message.keyId) : message.keyId; - return object; - }; - - /** - * Converts this AppStateSyncKeyId to JSON. - * @function toJSON - * @memberof proto.AppStateSyncKeyId - * @instance - * @returns {Object.} JSON object - */ - AppStateSyncKeyId.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return AppStateSyncKeyId; - })(); - - proto.AppStateSyncKeyRequest = (function() { - - /** - * Properties of an AppStateSyncKeyRequest. - * @memberof proto - * @interface IAppStateSyncKeyRequest - * @property {Array.|null} [keyIds] AppStateSyncKeyRequest keyIds - */ - - /** - * Constructs a new AppStateSyncKeyRequest. - * @memberof proto - * @classdesc Represents an AppStateSyncKeyRequest. - * @implements IAppStateSyncKeyRequest - * @constructor - * @param {proto.IAppStateSyncKeyRequest=} [properties] Properties to set - */ - function AppStateSyncKeyRequest(properties) { - this.keyIds = []; - 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]]; - } - - /** - * AppStateSyncKeyRequest keyIds. - * @member {Array.} keyIds - * @memberof proto.AppStateSyncKeyRequest - * @instance - */ - AppStateSyncKeyRequest.prototype.keyIds = $util.emptyArray; - - /** - * Creates a new AppStateSyncKeyRequest instance using the specified properties. - * @function create - * @memberof proto.AppStateSyncKeyRequest - * @static - * @param {proto.IAppStateSyncKeyRequest=} [properties] Properties to set - * @returns {proto.AppStateSyncKeyRequest} AppStateSyncKeyRequest instance - */ - AppStateSyncKeyRequest.create = function create(properties) { - return new AppStateSyncKeyRequest(properties); - }; - - /** - * Encodes the specified AppStateSyncKeyRequest message. Does not implicitly {@link proto.AppStateSyncKeyRequest.verify|verify} messages. - * @function encode - * @memberof proto.AppStateSyncKeyRequest - * @static - * @param {proto.IAppStateSyncKeyRequest} message AppStateSyncKeyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppStateSyncKeyRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyIds != null && message.keyIds.length) - for (var i = 0; i < message.keyIds.length; ++i) - $root.proto.AppStateSyncKeyId.encode(message.keyIds[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AppStateSyncKeyRequest message, length delimited. Does not implicitly {@link proto.AppStateSyncKeyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.AppStateSyncKeyRequest - * @static - * @param {proto.IAppStateSyncKeyRequest} message AppStateSyncKeyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppStateSyncKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AppStateSyncKeyRequest message from the specified reader or buffer. - * @function decode - * @memberof proto.AppStateSyncKeyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.AppStateSyncKeyRequest} AppStateSyncKeyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppStateSyncKeyRequest.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.AppStateSyncKeyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.keyIds && message.keyIds.length)) - message.keyIds = []; - message.keyIds.push($root.proto.AppStateSyncKeyId.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AppStateSyncKeyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.AppStateSyncKeyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.AppStateSyncKeyRequest} AppStateSyncKeyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppStateSyncKeyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AppStateSyncKeyRequest message. - * @function verify - * @memberof proto.AppStateSyncKeyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AppStateSyncKeyRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyIds != null && message.hasOwnProperty("keyIds")) { - if (!Array.isArray(message.keyIds)) - return "keyIds: array expected"; - for (var i = 0; i < message.keyIds.length; ++i) { - var error = $root.proto.AppStateSyncKeyId.verify(message.keyIds[i]); - if (error) - return "keyIds." + error; - } - } - return null; - }; - - /** - * Creates an AppStateSyncKeyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.AppStateSyncKeyRequest - * @static - * @param {Object.} object Plain object - * @returns {proto.AppStateSyncKeyRequest} AppStateSyncKeyRequest - */ - AppStateSyncKeyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.proto.AppStateSyncKeyRequest) - return object; - var message = new $root.proto.AppStateSyncKeyRequest(); - if (object.keyIds) { - if (!Array.isArray(object.keyIds)) - throw TypeError(".proto.AppStateSyncKeyRequest.keyIds: array expected"); - message.keyIds = []; - for (var i = 0; i < object.keyIds.length; ++i) { - if (typeof object.keyIds[i] !== "object") - throw TypeError(".proto.AppStateSyncKeyRequest.keyIds: object expected"); - message.keyIds[i] = $root.proto.AppStateSyncKeyId.fromObject(object.keyIds[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an AppStateSyncKeyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.AppStateSyncKeyRequest - * @static - * @param {proto.AppStateSyncKeyRequest} message AppStateSyncKeyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AppStateSyncKeyRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.keyIds = []; - if (message.keyIds && message.keyIds.length) { - object.keyIds = []; - for (var j = 0; j < message.keyIds.length; ++j) - object.keyIds[j] = $root.proto.AppStateSyncKeyId.toObject(message.keyIds[j], options); - } - return object; - }; - - /** - * Converts this AppStateSyncKeyRequest to JSON. - * @function toJSON - * @memberof proto.AppStateSyncKeyRequest - * @instance - * @returns {Object.} JSON object - */ - AppStateSyncKeyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return AppStateSyncKeyRequest; - })(); - - proto.AppStateSyncKeyShare = (function() { - - /** - * Properties of an AppStateSyncKeyShare. - * @memberof proto - * @interface IAppStateSyncKeyShare - * @property {Array.|null} [keys] AppStateSyncKeyShare keys - */ - - /** - * Constructs a new AppStateSyncKeyShare. - * @memberof proto - * @classdesc Represents an AppStateSyncKeyShare. - * @implements IAppStateSyncKeyShare - * @constructor - * @param {proto.IAppStateSyncKeyShare=} [properties] Properties to set - */ - function AppStateSyncKeyShare(properties) { - this.keys = []; - 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]]; - } - - /** - * AppStateSyncKeyShare keys. - * @member {Array.} keys - * @memberof proto.AppStateSyncKeyShare - * @instance - */ - AppStateSyncKeyShare.prototype.keys = $util.emptyArray; - - /** - * Creates a new AppStateSyncKeyShare instance using the specified properties. - * @function create - * @memberof proto.AppStateSyncKeyShare - * @static - * @param {proto.IAppStateSyncKeyShare=} [properties] Properties to set - * @returns {proto.AppStateSyncKeyShare} AppStateSyncKeyShare instance - */ - AppStateSyncKeyShare.create = function create(properties) { - return new AppStateSyncKeyShare(properties); - }; - - /** - * Encodes the specified AppStateSyncKeyShare message. Does not implicitly {@link proto.AppStateSyncKeyShare.verify|verify} messages. - * @function encode - * @memberof proto.AppStateSyncKeyShare - * @static - * @param {proto.IAppStateSyncKeyShare} message AppStateSyncKeyShare message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppStateSyncKeyShare.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keys != null && message.keys.length) - for (var i = 0; i < message.keys.length; ++i) - $root.proto.AppStateSyncKey.encode(message.keys[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AppStateSyncKeyShare message, length delimited. Does not implicitly {@link proto.AppStateSyncKeyShare.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.AppStateSyncKeyShare - * @static - * @param {proto.IAppStateSyncKeyShare} message AppStateSyncKeyShare message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppStateSyncKeyShare.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AppStateSyncKeyShare message from the specified reader or buffer. - * @function decode - * @memberof proto.AppStateSyncKeyShare - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.AppStateSyncKeyShare} AppStateSyncKeyShare - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppStateSyncKeyShare.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.AppStateSyncKeyShare(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.keys && message.keys.length)) - message.keys = []; - message.keys.push($root.proto.AppStateSyncKey.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AppStateSyncKeyShare message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.AppStateSyncKeyShare - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.AppStateSyncKeyShare} AppStateSyncKeyShare - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppStateSyncKeyShare.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AppStateSyncKeyShare message. - * @function verify - * @memberof proto.AppStateSyncKeyShare - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AppStateSyncKeyShare.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keys != null && message.hasOwnProperty("keys")) { - if (!Array.isArray(message.keys)) - return "keys: array expected"; - for (var i = 0; i < message.keys.length; ++i) { - var error = $root.proto.AppStateSyncKey.verify(message.keys[i]); - if (error) - return "keys." + error; - } - } - return null; - }; - - /** - * Creates an AppStateSyncKeyShare message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.AppStateSyncKeyShare - * @static - * @param {Object.} object Plain object - * @returns {proto.AppStateSyncKeyShare} AppStateSyncKeyShare - */ - AppStateSyncKeyShare.fromObject = function fromObject(object) { - if (object instanceof $root.proto.AppStateSyncKeyShare) - return object; - var message = new $root.proto.AppStateSyncKeyShare(); - if (object.keys) { - if (!Array.isArray(object.keys)) - throw TypeError(".proto.AppStateSyncKeyShare.keys: array expected"); - message.keys = []; - for (var i = 0; i < object.keys.length; ++i) { - if (typeof object.keys[i] !== "object") - throw TypeError(".proto.AppStateSyncKeyShare.keys: object expected"); - message.keys[i] = $root.proto.AppStateSyncKey.fromObject(object.keys[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an AppStateSyncKeyShare message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.AppStateSyncKeyShare - * @static - * @param {proto.AppStateSyncKeyShare} message AppStateSyncKeyShare - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AppStateSyncKeyShare.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.keys = []; - if (message.keys && message.keys.length) { - object.keys = []; - for (var j = 0; j < message.keys.length; ++j) - object.keys[j] = $root.proto.AppStateSyncKey.toObject(message.keys[j], options); - } - return object; - }; - - /** - * Converts this AppStateSyncKeyShare to JSON. - * @function toJSON - * @memberof proto.AppStateSyncKeyShare - * @instance - * @returns {Object.} JSON object - */ - AppStateSyncKeyShare.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - 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() { - - /** - * Properties of an AudioMessage. - * @memberof proto - * @interface IAudioMessage - * @property {string|null} [url] AudioMessage url - * @property {string|null} [mimetype] AudioMessage mimetype - * @property {Uint8Array|null} [fileSha256] AudioMessage fileSha256 - * @property {number|Long|null} [fileLength] AudioMessage fileLength - * @property {number|null} [seconds] AudioMessage seconds - * @property {boolean|null} [ptt] AudioMessage ptt - * @property {Uint8Array|null} [mediaKey] AudioMessage mediaKey - * @property {Uint8Array|null} [fileEncSha256] AudioMessage fileEncSha256 - * @property {string|null} [directPath] AudioMessage directPath - * @property {number|Long|null} [mediaKeyTimestamp] AudioMessage mediaKeyTimestamp - * @property {proto.IContextInfo|null} [contextInfo] AudioMessage contextInfo - * @property {Uint8Array|null} [streamingSidecar] AudioMessage streamingSidecar - * @property {Uint8Array|null} [waveform] AudioMessage waveform - */ - - /** - * Constructs a new AudioMessage. - * @memberof proto - * @classdesc Represents an AudioMessage. - * @implements IAudioMessage - * @constructor - * @param {proto.IAudioMessage=} [properties] Properties to set - */ - function AudioMessage(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]]; - } - - /** - * AudioMessage url. - * @member {string} url - * @memberof proto.AudioMessage - * @instance - */ - AudioMessage.prototype.url = ""; - - /** - * AudioMessage mimetype. - * @member {string} mimetype - * @memberof proto.AudioMessage - * @instance - */ - AudioMessage.prototype.mimetype = ""; - - /** - * AudioMessage fileSha256. - * @member {Uint8Array} fileSha256 - * @memberof proto.AudioMessage - * @instance - */ - AudioMessage.prototype.fileSha256 = $util.newBuffer([]); - - /** - * AudioMessage fileLength. - * @member {number|Long} fileLength - * @memberof proto.AudioMessage - * @instance - */ - AudioMessage.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * AudioMessage seconds. - * @member {number} seconds - * @memberof proto.AudioMessage - * @instance - */ - AudioMessage.prototype.seconds = 0; - - /** - * AudioMessage ptt. - * @member {boolean} ptt - * @memberof proto.AudioMessage - * @instance - */ - AudioMessage.prototype.ptt = false; - - /** - * AudioMessage mediaKey. - * @member {Uint8Array} mediaKey - * @memberof proto.AudioMessage - * @instance - */ - AudioMessage.prototype.mediaKey = $util.newBuffer([]); - - /** - * AudioMessage fileEncSha256. - * @member {Uint8Array} fileEncSha256 - * @memberof proto.AudioMessage - * @instance - */ - AudioMessage.prototype.fileEncSha256 = $util.newBuffer([]); - - /** - * AudioMessage directPath. - * @member {string} directPath - * @memberof proto.AudioMessage - * @instance - */ - AudioMessage.prototype.directPath = ""; - - /** - * AudioMessage mediaKeyTimestamp. - * @member {number|Long} mediaKeyTimestamp - * @memberof proto.AudioMessage - * @instance - */ - AudioMessage.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * AudioMessage contextInfo. - * @member {proto.IContextInfo|null|undefined} contextInfo - * @memberof proto.AudioMessage - * @instance - */ - AudioMessage.prototype.contextInfo = null; - - /** - * AudioMessage streamingSidecar. - * @member {Uint8Array} streamingSidecar - * @memberof proto.AudioMessage - * @instance - */ - AudioMessage.prototype.streamingSidecar = $util.newBuffer([]); - - /** - * AudioMessage waveform. - * @member {Uint8Array} waveform - * @memberof proto.AudioMessage - * @instance - */ - AudioMessage.prototype.waveform = $util.newBuffer([]); - - /** - * Creates a new AudioMessage instance using the specified properties. - * @function create - * @memberof proto.AudioMessage - * @static - * @param {proto.IAudioMessage=} [properties] Properties to set - * @returns {proto.AudioMessage} AudioMessage instance - */ - AudioMessage.create = function create(properties) { - return new AudioMessage(properties); - }; - - /** - * Encodes the specified AudioMessage message. Does not implicitly {@link proto.AudioMessage.verify|verify} messages. - * @function encode - * @memberof proto.AudioMessage - * @static - * @param {proto.IAudioMessage} message AudioMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudioMessage.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.ptt != null && Object.hasOwnProperty.call(message, "ptt")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.ptt); - if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.mediaKey); - if (message.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256")) - writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.fileEncSha256); - if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.directPath); - if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp")) - writer.uint32(/* id 10, wireType 0 =*/80).int64(message.mediaKeyTimestamp); - 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.waveform != null && Object.hasOwnProperty.call(message, "waveform")) - writer.uint32(/* id 19, wireType 2 =*/154).bytes(message.waveform); - return writer; - }; - - /** - * Encodes the specified AudioMessage message, length delimited. Does not implicitly {@link proto.AudioMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.AudioMessage - * @static - * @param {proto.IAudioMessage} message AudioMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudioMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AudioMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.AudioMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.AudioMessage} AudioMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudioMessage.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.AudioMessage(); - 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.ptt = reader.bool(); - break; - case 7: - message.mediaKey = reader.bytes(); - break; - case 8: - message.fileEncSha256 = reader.bytes(); - break; - case 9: - message.directPath = reader.string(); - break; - case 10: - message.mediaKeyTimestamp = reader.int64(); - break; - case 17: - message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); - break; - case 18: - message.streamingSidecar = reader.bytes(); - break; - case 19: - message.waveform = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AudioMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.AudioMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.AudioMessage} AudioMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudioMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AudioMessage message. - * @function verify - * @memberof proto.AudioMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AudioMessage.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.ptt != null && message.hasOwnProperty("ptt")) - if (typeof message.ptt !== "boolean") - return "ptt: boolean 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.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.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.waveform != null && message.hasOwnProperty("waveform")) - if (!(message.waveform && typeof message.waveform.length === "number" || $util.isString(message.waveform))) - return "waveform: buffer expected"; - return null; - }; - - /** - * Creates an AudioMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.AudioMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.AudioMessage} AudioMessage - */ - AudioMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.AudioMessage) - return object; - var message = new $root.proto.AudioMessage(); - 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.ptt != null) - message.ptt = Boolean(object.ptt); - 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); - 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.contextInfo != null) { - if (typeof object.contextInfo !== "object") - throw TypeError(".proto.AudioMessage.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; - if (object.waveform != null) - if (typeof object.waveform === "string") - $util.base64.decode(object.waveform, message.waveform = $util.newBuffer($util.base64.length(object.waveform)), 0); - else if (object.waveform.length) - message.waveform = object.waveform; - return message; - }; - - /** - * Creates a plain object from an AudioMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.AudioMessage - * @static - * @param {proto.AudioMessage} message AudioMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AudioMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - 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; - object.ptt = false; - 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 = ""; - 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.contextInfo = null; - if (options.bytes === String) - object.streamingSidecar = ""; - else { - object.streamingSidecar = []; - if (options.bytes !== Array) - object.streamingSidecar = $util.newBuffer(object.streamingSidecar); - } - if (options.bytes === String) - object.waveform = ""; - else { - object.waveform = []; - if (options.bytes !== Array) - object.waveform = $util.newBuffer(object.waveform); - } - } - 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.ptt != null && message.hasOwnProperty("ptt")) - object.ptt = message.ptt; - 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.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.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.waveform != null && message.hasOwnProperty("waveform")) - object.waveform = options.bytes === String ? $util.base64.encode(message.waveform, 0, message.waveform.length) : options.bytes === Array ? Array.prototype.slice.call(message.waveform) : message.waveform; - return object; - }; - - /** - * Converts this AudioMessage to JSON. - * @function toJSON - * @memberof proto.AudioMessage - * @instance - * @returns {Object.} JSON object - */ - AudioMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return AudioMessage; - })(); - proto.AutoDownloadSettings = (function() { /** @@ -5102,8 +1776,8 @@ $root.proto = (function() { * @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 + * @property {proto.BizAccountLinkInfo.HostStorageType|null} [hostStorage] BizAccountLinkInfo hostStorage + * @property {proto.BizAccountLinkInfo.AccountType|null} [accountType] BizAccountLinkInfo accountType */ /** @@ -5147,7 +1821,7 @@ $root.proto = (function() { /** * BizAccountLinkInfo hostStorage. - * @member {proto.BizAccountLinkInfo.BizAccountLinkInfoHostStorageType} hostStorage + * @member {proto.BizAccountLinkInfo.HostStorageType} hostStorage * @memberof proto.BizAccountLinkInfo * @instance */ @@ -5155,7 +1829,7 @@ $root.proto = (function() { /** * BizAccountLinkInfo accountType. - * @member {proto.BizAccountLinkInfo.BizAccountLinkInfoAccountType} accountType + * @member {proto.BizAccountLinkInfo.AccountType} accountType * @memberof proto.BizAccountLinkInfo * @instance */ @@ -5398,9 +2072,9 @@ $root.proto = (function() { 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; + object.hostStorage = options.enums === String ? $root.proto.BizAccountLinkInfo.HostStorageType[message.hostStorage] : message.hostStorage; if (message.accountType != null && message.hasOwnProperty("accountType")) - object.accountType = options.enums === String ? $root.proto.BizAccountLinkInfo.BizAccountLinkInfoAccountType[message.accountType] : message.accountType; + object.accountType = options.enums === String ? $root.proto.BizAccountLinkInfo.AccountType[message.accountType] : message.accountType; return object; }; @@ -5416,28 +2090,28 @@ $root.proto = (function() { }; /** - * BizAccountLinkInfoHostStorageType enum. - * @name proto.BizAccountLinkInfo.BizAccountLinkInfoHostStorageType + * AccountType enum. + * @name proto.BizAccountLinkInfo.AccountType * @enum {number} - * @property {number} ON_PREMISE=0 ON_PREMISE value - * @property {number} FACEBOOK=1 FACEBOOK value + * @property {number} ENTERPRISE=0 ENTERPRISE value */ - BizAccountLinkInfo.BizAccountLinkInfoHostStorageType = (function() { + BizAccountLinkInfo.AccountType = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ON_PREMISE"] = 0; - values[valuesById[1] = "FACEBOOK"] = 1; + values[valuesById[0] = "ENTERPRISE"] = 0; return values; })(); /** - * BizAccountLinkInfoAccountType enum. - * @name proto.BizAccountLinkInfo.BizAccountLinkInfoAccountType + * HostStorageType enum. + * @name proto.BizAccountLinkInfo.HostStorageType * @enum {number} - * @property {number} ENTERPRISE=0 ENTERPRISE value + * @property {number} ON_PREMISE=0 ON_PREMISE value + * @property {number} FACEBOOK=1 FACEBOOK value */ - BizAccountLinkInfo.BizAccountLinkInfoAccountType = (function() { + BizAccountLinkInfo.HostStorageType = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENTERPRISE"] = 0; + values[valuesById[0] = "ON_PREMISE"] = 0; + values[valuesById[1] = "FACEBOOK"] = 1; return values; })(); @@ -5674,12 +2348,12 @@ $root.proto = (function() { * Properties of a BizIdentityInfo. * @memberof proto * @interface IBizIdentityInfo - * @property {proto.BizIdentityInfo.BizIdentityInfoVerifiedLevelValue|null} [vlevel] BizIdentityInfo vlevel + * @property {proto.BizIdentityInfo.VerifiedLevelValue|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 {proto.BizIdentityInfo.HostStorageType|null} [hostStorage] BizIdentityInfo hostStorage + * @property {proto.BizIdentityInfo.ActualActorsType|null} [actualActors] BizIdentityInfo actualActors * @property {number|Long|null} [privacyModeTs] BizIdentityInfo privacyModeTs * @property {number|Long|null} [featureControls] BizIdentityInfo featureControls */ @@ -5701,7 +2375,7 @@ $root.proto = (function() { /** * BizIdentityInfo vlevel. - * @member {proto.BizIdentityInfo.BizIdentityInfoVerifiedLevelValue} vlevel + * @member {proto.BizIdentityInfo.VerifiedLevelValue} vlevel * @memberof proto.BizIdentityInfo * @instance */ @@ -5733,7 +2407,7 @@ $root.proto = (function() { /** * BizIdentityInfo hostStorage. - * @member {proto.BizIdentityInfo.BizIdentityInfoHostStorageType} hostStorage + * @member {proto.BizIdentityInfo.HostStorageType} hostStorage * @memberof proto.BizIdentityInfo * @instance */ @@ -5741,7 +2415,7 @@ $root.proto = (function() { /** * BizIdentityInfo actualActors. - * @member {proto.BizIdentityInfo.BizIdentityInfoActualActorsType} actualActors + * @member {proto.BizIdentityInfo.ActualActorsType} actualActors * @memberof proto.BizIdentityInfo * @instance */ @@ -6049,7 +2723,7 @@ $root.proto = (function() { 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; + object.vlevel = options.enums === String ? $root.proto.BizIdentityInfo.VerifiedLevelValue[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")) @@ -6057,9 +2731,9 @@ $root.proto = (function() { 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; + object.hostStorage = options.enums === String ? $root.proto.BizIdentityInfo.HostStorageType[message.hostStorage] : message.hostStorage; if (message.actualActors != null && message.hasOwnProperty("actualActors")) - object.actualActors = options.enums === String ? $root.proto.BizIdentityInfo.BizIdentityInfoActualActorsType[message.actualActors] : message.actualActors; + object.actualActors = options.enums === String ? $root.proto.BizIdentityInfo.ActualActorsType[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; @@ -6085,29 +2759,27 @@ $root.proto = (function() { }; /** - * BizIdentityInfoVerifiedLevelValue enum. - * @name proto.BizIdentityInfo.BizIdentityInfoVerifiedLevelValue + * ActualActorsType enum. + * @name proto.BizIdentityInfo.ActualActorsType * @enum {number} - * @property {number} UNKNOWN=0 UNKNOWN value - * @property {number} LOW=1 LOW value - * @property {number} HIGH=2 HIGH value + * @property {number} SELF=0 SELF value + * @property {number} BSP=1 BSP value */ - BizIdentityInfo.BizIdentityInfoVerifiedLevelValue = (function() { + BizIdentityInfo.ActualActorsType = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN"] = 0; - values[valuesById[1] = "LOW"] = 1; - values[valuesById[2] = "HIGH"] = 2; + values[valuesById[0] = "SELF"] = 0; + values[valuesById[1] = "BSP"] = 1; return values; })(); /** - * BizIdentityInfoHostStorageType enum. - * @name proto.BizIdentityInfo.BizIdentityInfoHostStorageType + * HostStorageType enum. + * @name proto.BizIdentityInfo.HostStorageType * @enum {number} * @property {number} ON_PREMISE=0 ON_PREMISE value * @property {number} FACEBOOK=1 FACEBOOK value */ - BizIdentityInfo.BizIdentityInfoHostStorageType = (function() { + BizIdentityInfo.HostStorageType = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "ON_PREMISE"] = 0; values[valuesById[1] = "FACEBOOK"] = 1; @@ -6115,2283 +2787,32 @@ $root.proto = (function() { })(); /** - * BizIdentityInfoActualActorsType enum. - * @name proto.BizIdentityInfo.BizIdentityInfoActualActorsType + * VerifiedLevelValue enum. + * @name proto.BizIdentityInfo.VerifiedLevelValue * @enum {number} - * @property {number} SELF=0 SELF value - * @property {number} BSP=1 BSP value + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} LOW=1 LOW value + * @property {number} HIGH=2 HIGH value */ - BizIdentityInfo.BizIdentityInfoActualActorsType = (function() { + BizIdentityInfo.VerifiedLevelValue = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SELF"] = 0; - values[valuesById[1] = "BSP"] = 1; + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "LOW"] = 1; + values[valuesById[2] = "HIGH"] = 2; return values; })(); return BizIdentityInfo; })(); - proto.Button = (function() { - - /** - * Properties of a Button. - * @memberof proto - * @interface IButton - * @property {string|null} [buttonId] Button buttonId - * @property {proto.IButtonText|null} [buttonText] Button buttonText - * @property {proto.Button.ButtonType|null} [type] Button type - * @property {proto.INativeFlowInfo|null} [nativeFlowInfo] Button nativeFlowInfo - */ - - /** - * Constructs a new Button. - * @memberof proto - * @classdesc Represents a Button. - * @implements IButton - * @constructor - * @param {proto.IButton=} [properties] Properties to set - */ - function Button(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]]; - } - - /** - * Button buttonId. - * @member {string} buttonId - * @memberof proto.Button - * @instance - */ - Button.prototype.buttonId = ""; - - /** - * Button buttonText. - * @member {proto.IButtonText|null|undefined} buttonText - * @memberof proto.Button - * @instance - */ - Button.prototype.buttonText = null; - - /** - * Button type. - * @member {proto.Button.ButtonType} type - * @memberof proto.Button - * @instance - */ - Button.prototype.type = 0; - - /** - * Button nativeFlowInfo. - * @member {proto.INativeFlowInfo|null|undefined} nativeFlowInfo - * @memberof proto.Button - * @instance - */ - Button.prototype.nativeFlowInfo = null; - - /** - * Creates a new Button instance using the specified properties. - * @function create - * @memberof proto.Button - * @static - * @param {proto.IButton=} [properties] Properties to set - * @returns {proto.Button} Button instance - */ - Button.create = function create(properties) { - return new Button(properties); - }; - - /** - * Encodes the specified Button message. Does not implicitly {@link proto.Button.verify|verify} messages. - * @function encode - * @memberof proto.Button - * @static - * @param {proto.IButton} message Button message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Button.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.buttonId != null && Object.hasOwnProperty.call(message, "buttonId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.buttonId); - if (message.buttonText != null && Object.hasOwnProperty.call(message, "buttonText")) - $root.proto.ButtonText.encode(message.buttonText, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type); - if (message.nativeFlowInfo != null && Object.hasOwnProperty.call(message, "nativeFlowInfo")) - $root.proto.NativeFlowInfo.encode(message.nativeFlowInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Button message, length delimited. Does not implicitly {@link proto.Button.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.Button - * @static - * @param {proto.IButton} message Button message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Button.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Button message from the specified reader or buffer. - * @function decode - * @memberof proto.Button - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.Button} Button - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Button.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.Button(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.buttonId = reader.string(); - break; - case 2: - message.buttonText = $root.proto.ButtonText.decode(reader, reader.uint32()); - break; - case 3: - message.type = reader.int32(); - break; - case 4: - message.nativeFlowInfo = $root.proto.NativeFlowInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Button message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.Button - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Button} Button - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Button.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Button message. - * @function verify - * @memberof proto.Button - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Button.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.buttonId != null && message.hasOwnProperty("buttonId")) - if (!$util.isString(message.buttonId)) - return "buttonId: string expected"; - if (message.buttonText != null && message.hasOwnProperty("buttonText")) { - var error = $root.proto.ButtonText.verify(message.buttonText); - if (error) - return "buttonText." + error; - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.nativeFlowInfo != null && message.hasOwnProperty("nativeFlowInfo")) { - var error = $root.proto.NativeFlowInfo.verify(message.nativeFlowInfo); - if (error) - return "nativeFlowInfo." + error; - } - return null; - }; - - /** - * Creates a Button message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.Button - * @static - * @param {Object.} object Plain object - * @returns {proto.Button} Button - */ - Button.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Button) - return object; - var message = new $root.proto.Button(); - if (object.buttonId != null) - message.buttonId = String(object.buttonId); - if (object.buttonText != null) { - if (typeof object.buttonText !== "object") - throw TypeError(".proto.Button.buttonText: object expected"); - message.buttonText = $root.proto.ButtonText.fromObject(object.buttonText); - } - switch (object.type) { - case "UNKNOWN": - case 0: - message.type = 0; - break; - case "RESPONSE": - case 1: - message.type = 1; - break; - case "NATIVE_FLOW": - case 2: - message.type = 2; - break; - } - if (object.nativeFlowInfo != null) { - if (typeof object.nativeFlowInfo !== "object") - throw TypeError(".proto.Button.nativeFlowInfo: object expected"); - message.nativeFlowInfo = $root.proto.NativeFlowInfo.fromObject(object.nativeFlowInfo); - } - return message; - }; - - /** - * Creates a plain object from a Button message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.Button - * @static - * @param {proto.Button} message Button - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Button.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.buttonId = ""; - object.buttonText = null; - object.type = options.enums === String ? "UNKNOWN" : 0; - object.nativeFlowInfo = null; - } - if (message.buttonId != null && message.hasOwnProperty("buttonId")) - object.buttonId = message.buttonId; - if (message.buttonText != null && message.hasOwnProperty("buttonText")) - object.buttonText = $root.proto.ButtonText.toObject(message.buttonText, options); - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.proto.Button.ButtonType[message.type] : message.type; - if (message.nativeFlowInfo != null && message.hasOwnProperty("nativeFlowInfo")) - object.nativeFlowInfo = $root.proto.NativeFlowInfo.toObject(message.nativeFlowInfo, options); - return object; - }; - - /** - * Converts this Button to JSON. - * @function toJSON - * @memberof proto.Button - * @instance - * @returns {Object.} JSON object - */ - Button.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * ButtonType enum. - * @name proto.Button.ButtonType - * @enum {number} - * @property {number} UNKNOWN=0 UNKNOWN value - * @property {number} RESPONSE=1 RESPONSE value - * @property {number} NATIVE_FLOW=2 NATIVE_FLOW value - */ - Button.ButtonType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN"] = 0; - values[valuesById[1] = "RESPONSE"] = 1; - values[valuesById[2] = "NATIVE_FLOW"] = 2; - return values; - })(); - - 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() { - - /** - * Properties of a ButtonsMessage. - * @memberof proto - * @interface IButtonsMessage - * @property {string|null} [contentText] ButtonsMessage contentText - * @property {string|null} [footerText] ButtonsMessage footerText - * @property {proto.IContextInfo|null} [contextInfo] ButtonsMessage contextInfo - * @property {Array.|null} [buttons] ButtonsMessage buttons - * @property {proto.ButtonsMessage.ButtonsMessageHeaderType|null} [headerType] ButtonsMessage headerType - * @property {string|null} [text] ButtonsMessage text - * @property {proto.IDocumentMessage|null} [documentMessage] ButtonsMessage documentMessage - * @property {proto.IImageMessage|null} [imageMessage] ButtonsMessage imageMessage - * @property {proto.IVideoMessage|null} [videoMessage] ButtonsMessage videoMessage - * @property {proto.ILocationMessage|null} [locationMessage] ButtonsMessage locationMessage - */ - - /** - * Constructs a new ButtonsMessage. - * @memberof proto - * @classdesc Represents a ButtonsMessage. - * @implements IButtonsMessage - * @constructor - * @param {proto.IButtonsMessage=} [properties] Properties to set - */ - function ButtonsMessage(properties) { - this.buttons = []; - 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]]; - } - - /** - * ButtonsMessage contentText. - * @member {string} contentText - * @memberof proto.ButtonsMessage - * @instance - */ - ButtonsMessage.prototype.contentText = ""; - - /** - * ButtonsMessage footerText. - * @member {string} footerText - * @memberof proto.ButtonsMessage - * @instance - */ - ButtonsMessage.prototype.footerText = ""; - - /** - * ButtonsMessage contextInfo. - * @member {proto.IContextInfo|null|undefined} contextInfo - * @memberof proto.ButtonsMessage - * @instance - */ - ButtonsMessage.prototype.contextInfo = null; - - /** - * ButtonsMessage buttons. - * @member {Array.} buttons - * @memberof proto.ButtonsMessage - * @instance - */ - ButtonsMessage.prototype.buttons = $util.emptyArray; - - /** - * ButtonsMessage headerType. - * @member {proto.ButtonsMessage.ButtonsMessageHeaderType} headerType - * @memberof proto.ButtonsMessage - * @instance - */ - ButtonsMessage.prototype.headerType = 0; - - /** - * ButtonsMessage text. - * @member {string|null|undefined} text - * @memberof proto.ButtonsMessage - * @instance - */ - ButtonsMessage.prototype.text = null; - - /** - * ButtonsMessage documentMessage. - * @member {proto.IDocumentMessage|null|undefined} documentMessage - * @memberof proto.ButtonsMessage - * @instance - */ - ButtonsMessage.prototype.documentMessage = null; - - /** - * ButtonsMessage imageMessage. - * @member {proto.IImageMessage|null|undefined} imageMessage - * @memberof proto.ButtonsMessage - * @instance - */ - ButtonsMessage.prototype.imageMessage = null; - - /** - * ButtonsMessage videoMessage. - * @member {proto.IVideoMessage|null|undefined} videoMessage - * @memberof proto.ButtonsMessage - * @instance - */ - ButtonsMessage.prototype.videoMessage = null; - - /** - * ButtonsMessage locationMessage. - * @member {proto.ILocationMessage|null|undefined} locationMessage - * @memberof proto.ButtonsMessage - * @instance - */ - ButtonsMessage.prototype.locationMessage = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ButtonsMessage header. - * @member {"text"|"documentMessage"|"imageMessage"|"videoMessage"|"locationMessage"|undefined} header - * @memberof proto.ButtonsMessage - * @instance - */ - Object.defineProperty(ButtonsMessage.prototype, "header", { - get: $util.oneOfGetter($oneOfFields = ["text", "documentMessage", "imageMessage", "videoMessage", "locationMessage"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ButtonsMessage instance using the specified properties. - * @function create - * @memberof proto.ButtonsMessage - * @static - * @param {proto.IButtonsMessage=} [properties] Properties to set - * @returns {proto.ButtonsMessage} ButtonsMessage instance - */ - ButtonsMessage.create = function create(properties) { - return new ButtonsMessage(properties); - }; - - /** - * Encodes the specified ButtonsMessage message. Does not implicitly {@link proto.ButtonsMessage.verify|verify} messages. - * @function encode - * @memberof proto.ButtonsMessage - * @static - * @param {proto.IButtonsMessage} message ButtonsMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ButtonsMessage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); - if (message.documentMessage != null && Object.hasOwnProperty.call(message, "documentMessage")) - $root.proto.DocumentMessage.encode(message.documentMessage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.imageMessage != null && Object.hasOwnProperty.call(message, "imageMessage")) - $root.proto.ImageMessage.encode(message.imageMessage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.videoMessage != null && Object.hasOwnProperty.call(message, "videoMessage")) - $root.proto.VideoMessage.encode(message.videoMessage, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.locationMessage != null && Object.hasOwnProperty.call(message, "locationMessage")) - $root.proto.LocationMessage.encode(message.locationMessage, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.contentText != null && Object.hasOwnProperty.call(message, "contentText")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.contentText); - if (message.footerText != null && Object.hasOwnProperty.call(message, "footerText")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.footerText); - if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) - $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.buttons != null && message.buttons.length) - for (var i = 0; i < message.buttons.length; ++i) - $root.proto.Button.encode(message.buttons[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.headerType != null && Object.hasOwnProperty.call(message, "headerType")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.headerType); - return writer; - }; - - /** - * Encodes the specified ButtonsMessage message, length delimited. Does not implicitly {@link proto.ButtonsMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.ButtonsMessage - * @static - * @param {proto.IButtonsMessage} message ButtonsMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ButtonsMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ButtonsMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.ButtonsMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.ButtonsMessage} ButtonsMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ButtonsMessage.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.ButtonsMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 6: - message.contentText = reader.string(); - break; - case 7: - message.footerText = reader.string(); - break; - case 8: - message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); - break; - case 9: - if (!(message.buttons && message.buttons.length)) - message.buttons = []; - message.buttons.push($root.proto.Button.decode(reader, reader.uint32())); - break; - case 10: - message.headerType = reader.int32(); - break; - case 1: - message.text = reader.string(); - break; - case 2: - message.documentMessage = $root.proto.DocumentMessage.decode(reader, reader.uint32()); - break; - case 3: - message.imageMessage = $root.proto.ImageMessage.decode(reader, reader.uint32()); - break; - case 4: - message.videoMessage = $root.proto.VideoMessage.decode(reader, reader.uint32()); - break; - case 5: - message.locationMessage = $root.proto.LocationMessage.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ButtonsMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.ButtonsMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ButtonsMessage} ButtonsMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ButtonsMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ButtonsMessage message. - * @function verify - * @memberof proto.ButtonsMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ButtonsMessage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.contentText != null && message.hasOwnProperty("contentText")) - if (!$util.isString(message.contentText)) - return "contentText: string expected"; - if (message.footerText != null && message.hasOwnProperty("footerText")) - if (!$util.isString(message.footerText)) - return "footerText: string expected"; - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { - var error = $root.proto.ContextInfo.verify(message.contextInfo); - if (error) - return "contextInfo." + error; - } - if (message.buttons != null && message.hasOwnProperty("buttons")) { - if (!Array.isArray(message.buttons)) - return "buttons: array expected"; - for (var i = 0; i < message.buttons.length; ++i) { - var error = $root.proto.Button.verify(message.buttons[i]); - if (error) - return "buttons." + error; - } - } - if (message.headerType != null && message.hasOwnProperty("headerType")) - switch (message.headerType) { - default: - return "headerType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.text != null && message.hasOwnProperty("text")) { - properties.header = 1; - if (!$util.isString(message.text)) - return "text: string expected"; - } - if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) { - if (properties.header === 1) - return "header: multiple values"; - properties.header = 1; - { - var error = $root.proto.DocumentMessage.verify(message.documentMessage); - if (error) - return "documentMessage." + error; - } - } - if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) { - if (properties.header === 1) - return "header: multiple values"; - properties.header = 1; - { - var error = $root.proto.ImageMessage.verify(message.imageMessage); - if (error) - return "imageMessage." + error; - } - } - if (message.videoMessage != null && message.hasOwnProperty("videoMessage")) { - if (properties.header === 1) - return "header: multiple values"; - properties.header = 1; - { - var error = $root.proto.VideoMessage.verify(message.videoMessage); - if (error) - return "videoMessage." + error; - } - } - if (message.locationMessage != null && message.hasOwnProperty("locationMessage")) { - if (properties.header === 1) - return "header: multiple values"; - properties.header = 1; - { - var error = $root.proto.LocationMessage.verify(message.locationMessage); - if (error) - return "locationMessage." + error; - } - } - return null; - }; - - /** - * Creates a ButtonsMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.ButtonsMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.ButtonsMessage} ButtonsMessage - */ - ButtonsMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ButtonsMessage) - return object; - var message = new $root.proto.ButtonsMessage(); - if (object.contentText != null) - message.contentText = String(object.contentText); - if (object.footerText != null) - message.footerText = String(object.footerText); - if (object.contextInfo != null) { - if (typeof object.contextInfo !== "object") - throw TypeError(".proto.ButtonsMessage.contextInfo: object expected"); - message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); - } - if (object.buttons) { - if (!Array.isArray(object.buttons)) - throw TypeError(".proto.ButtonsMessage.buttons: array expected"); - message.buttons = []; - for (var i = 0; i < object.buttons.length; ++i) { - if (typeof object.buttons[i] !== "object") - throw TypeError(".proto.ButtonsMessage.buttons: object expected"); - message.buttons[i] = $root.proto.Button.fromObject(object.buttons[i]); - } - } - switch (object.headerType) { - case "UNKNOWN": - case 0: - message.headerType = 0; - break; - case "EMPTY": - case 1: - message.headerType = 1; - break; - case "TEXT": - case 2: - message.headerType = 2; - break; - case "DOCUMENT": - case 3: - message.headerType = 3; - break; - case "IMAGE": - case 4: - message.headerType = 4; - break; - case "VIDEO": - case 5: - message.headerType = 5; - break; - case "LOCATION": - case 6: - message.headerType = 6; - break; - } - if (object.text != null) - message.text = String(object.text); - if (object.documentMessage != null) { - if (typeof object.documentMessage !== "object") - throw TypeError(".proto.ButtonsMessage.documentMessage: object expected"); - message.documentMessage = $root.proto.DocumentMessage.fromObject(object.documentMessage); - } - if (object.imageMessage != null) { - if (typeof object.imageMessage !== "object") - throw TypeError(".proto.ButtonsMessage.imageMessage: object expected"); - message.imageMessage = $root.proto.ImageMessage.fromObject(object.imageMessage); - } - if (object.videoMessage != null) { - if (typeof object.videoMessage !== "object") - throw TypeError(".proto.ButtonsMessage.videoMessage: object expected"); - message.videoMessage = $root.proto.VideoMessage.fromObject(object.videoMessage); - } - if (object.locationMessage != null) { - if (typeof object.locationMessage !== "object") - throw TypeError(".proto.ButtonsMessage.locationMessage: object expected"); - message.locationMessage = $root.proto.LocationMessage.fromObject(object.locationMessage); - } - return message; - }; - - /** - * Creates a plain object from a ButtonsMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.ButtonsMessage - * @static - * @param {proto.ButtonsMessage} message ButtonsMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ButtonsMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.buttons = []; - if (options.defaults) { - object.contentText = ""; - object.footerText = ""; - object.contextInfo = null; - object.headerType = options.enums === String ? "UNKNOWN" : 0; - } - if (message.text != null && message.hasOwnProperty("text")) { - object.text = message.text; - if (options.oneofs) - object.header = "text"; - } - if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) { - object.documentMessage = $root.proto.DocumentMessage.toObject(message.documentMessage, options); - if (options.oneofs) - object.header = "documentMessage"; - } - if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) { - object.imageMessage = $root.proto.ImageMessage.toObject(message.imageMessage, options); - if (options.oneofs) - object.header = "imageMessage"; - } - if (message.videoMessage != null && message.hasOwnProperty("videoMessage")) { - object.videoMessage = $root.proto.VideoMessage.toObject(message.videoMessage, options); - if (options.oneofs) - object.header = "videoMessage"; - } - if (message.locationMessage != null && message.hasOwnProperty("locationMessage")) { - object.locationMessage = $root.proto.LocationMessage.toObject(message.locationMessage, options); - if (options.oneofs) - object.header = "locationMessage"; - } - if (message.contentText != null && message.hasOwnProperty("contentText")) - object.contentText = message.contentText; - if (message.footerText != null && message.hasOwnProperty("footerText")) - object.footerText = message.footerText; - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) - object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); - if (message.buttons && message.buttons.length) { - object.buttons = []; - for (var j = 0; j < message.buttons.length; ++j) - object.buttons[j] = $root.proto.Button.toObject(message.buttons[j], options); - } - if (message.headerType != null && message.hasOwnProperty("headerType")) - object.headerType = options.enums === String ? $root.proto.ButtonsMessage.ButtonsMessageHeaderType[message.headerType] : message.headerType; - return object; - }; - - /** - * Converts this ButtonsMessage to JSON. - * @function toJSON - * @memberof proto.ButtonsMessage - * @instance - * @returns {Object.} JSON object - */ - ButtonsMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * ButtonsMessageHeaderType enum. - * @name proto.ButtonsMessage.ButtonsMessageHeaderType - * @enum {number} - * @property {number} UNKNOWN=0 UNKNOWN value - * @property {number} EMPTY=1 EMPTY value - * @property {number} TEXT=2 TEXT value - * @property {number} DOCUMENT=3 DOCUMENT value - * @property {number} IMAGE=4 IMAGE value - * @property {number} VIDEO=5 VIDEO value - * @property {number} LOCATION=6 LOCATION value - */ - ButtonsMessage.ButtonsMessageHeaderType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN"] = 0; - values[valuesById[1] = "EMPTY"] = 1; - values[valuesById[2] = "TEXT"] = 2; - values[valuesById[3] = "DOCUMENT"] = 3; - values[valuesById[4] = "IMAGE"] = 4; - values[valuesById[5] = "VIDEO"] = 5; - values[valuesById[6] = "LOCATION"] = 6; - return values; - })(); - - return ButtonsMessage; - })(); - - proto.ButtonsResponseMessage = (function() { - - /** - * Properties of a ButtonsResponseMessage. - * @memberof proto - * @interface IButtonsResponseMessage - * @property {string|null} [selectedButtonId] ButtonsResponseMessage selectedButtonId - * @property {proto.IContextInfo|null} [contextInfo] ButtonsResponseMessage contextInfo - * @property {proto.ButtonsResponseMessage.ButtonsResponseMessageType|null} [type] ButtonsResponseMessage type - * @property {string|null} [selectedDisplayText] ButtonsResponseMessage selectedDisplayText - */ - - /** - * Constructs a new ButtonsResponseMessage. - * @memberof proto - * @classdesc Represents a ButtonsResponseMessage. - * @implements IButtonsResponseMessage - * @constructor - * @param {proto.IButtonsResponseMessage=} [properties] Properties to set - */ - function ButtonsResponseMessage(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]]; - } - - /** - * ButtonsResponseMessage selectedButtonId. - * @member {string} selectedButtonId - * @memberof proto.ButtonsResponseMessage - * @instance - */ - ButtonsResponseMessage.prototype.selectedButtonId = ""; - - /** - * ButtonsResponseMessage contextInfo. - * @member {proto.IContextInfo|null|undefined} contextInfo - * @memberof proto.ButtonsResponseMessage - * @instance - */ - ButtonsResponseMessage.prototype.contextInfo = null; - - /** - * ButtonsResponseMessage type. - * @member {proto.ButtonsResponseMessage.ButtonsResponseMessageType} type - * @memberof proto.ButtonsResponseMessage - * @instance - */ - ButtonsResponseMessage.prototype.type = 0; - - /** - * ButtonsResponseMessage selectedDisplayText. - * @member {string|null|undefined} selectedDisplayText - * @memberof proto.ButtonsResponseMessage - * @instance - */ - ButtonsResponseMessage.prototype.selectedDisplayText = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ButtonsResponseMessage response. - * @member {"selectedDisplayText"|undefined} response - * @memberof proto.ButtonsResponseMessage - * @instance - */ - Object.defineProperty(ButtonsResponseMessage.prototype, "response", { - get: $util.oneOfGetter($oneOfFields = ["selectedDisplayText"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ButtonsResponseMessage instance using the specified properties. - * @function create - * @memberof proto.ButtonsResponseMessage - * @static - * @param {proto.IButtonsResponseMessage=} [properties] Properties to set - * @returns {proto.ButtonsResponseMessage} ButtonsResponseMessage instance - */ - ButtonsResponseMessage.create = function create(properties) { - return new ButtonsResponseMessage(properties); - }; - - /** - * Encodes the specified ButtonsResponseMessage message. Does not implicitly {@link proto.ButtonsResponseMessage.verify|verify} messages. - * @function encode - * @memberof proto.ButtonsResponseMessage - * @static - * @param {proto.IButtonsResponseMessage} message ButtonsResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ButtonsResponseMessage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selectedButtonId != null && Object.hasOwnProperty.call(message, "selectedButtonId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selectedButtonId); - 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.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.type); - return writer; - }; - - /** - * Encodes the specified ButtonsResponseMessage message, length delimited. Does not implicitly {@link proto.ButtonsResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.ButtonsResponseMessage - * @static - * @param {proto.IButtonsResponseMessage} message ButtonsResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ButtonsResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ButtonsResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.ButtonsResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.ButtonsResponseMessage} ButtonsResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ButtonsResponseMessage.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.ButtonsResponseMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selectedButtonId = reader.string(); - break; - case 3: - message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); - break; - case 4: - message.type = reader.int32(); - break; - case 2: - message.selectedDisplayText = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ButtonsResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.ButtonsResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ButtonsResponseMessage} ButtonsResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ButtonsResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ButtonsResponseMessage message. - * @function verify - * @memberof proto.ButtonsResponseMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ButtonsResponseMessage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.selectedButtonId != null && message.hasOwnProperty("selectedButtonId")) - if (!$util.isString(message.selectedButtonId)) - return "selectedButtonId: string expected"; - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { - var error = $root.proto.ContextInfo.verify(message.contextInfo); - if (error) - return "contextInfo." + error; - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - break; - } - if (message.selectedDisplayText != null && message.hasOwnProperty("selectedDisplayText")) { - properties.response = 1; - if (!$util.isString(message.selectedDisplayText)) - return "selectedDisplayText: string expected"; - } - return null; - }; - - /** - * Creates a ButtonsResponseMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.ButtonsResponseMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.ButtonsResponseMessage} ButtonsResponseMessage - */ - ButtonsResponseMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ButtonsResponseMessage) - return object; - var message = new $root.proto.ButtonsResponseMessage(); - if (object.selectedButtonId != null) - message.selectedButtonId = String(object.selectedButtonId); - if (object.contextInfo != null) { - if (typeof object.contextInfo !== "object") - throw TypeError(".proto.ButtonsResponseMessage.contextInfo: object expected"); - message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); - } - switch (object.type) { - case "UNKNOWN": - case 0: - message.type = 0; - break; - case "DISPLAY_TEXT": - case 1: - message.type = 1; - break; - } - if (object.selectedDisplayText != null) - message.selectedDisplayText = String(object.selectedDisplayText); - return message; - }; - - /** - * Creates a plain object from a ButtonsResponseMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.ButtonsResponseMessage - * @static - * @param {proto.ButtonsResponseMessage} message ButtonsResponseMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ButtonsResponseMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.selectedButtonId = ""; - object.contextInfo = null; - object.type = options.enums === String ? "UNKNOWN" : 0; - } - if (message.selectedButtonId != null && message.hasOwnProperty("selectedButtonId")) - object.selectedButtonId = message.selectedButtonId; - if (message.selectedDisplayText != null && message.hasOwnProperty("selectedDisplayText")) { - object.selectedDisplayText = message.selectedDisplayText; - if (options.oneofs) - object.response = "selectedDisplayText"; - } - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) - object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.proto.ButtonsResponseMessage.ButtonsResponseMessageType[message.type] : message.type; - return object; - }; - - /** - * Converts this ButtonsResponseMessage to JSON. - * @function toJSON - * @memberof proto.ButtonsResponseMessage - * @instance - * @returns {Object.} JSON object - */ - ButtonsResponseMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * ButtonsResponseMessageType enum. - * @name proto.ButtonsResponseMessage.ButtonsResponseMessageType - * @enum {number} - * @property {number} UNKNOWN=0 UNKNOWN value - * @property {number} DISPLAY_TEXT=1 DISPLAY_TEXT value - */ - ButtonsResponseMessage.ButtonsResponseMessageType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN"] = 0; - values[valuesById[1] = "DISPLAY_TEXT"] = 1; - return values; - })(); - - return ButtonsResponseMessage; - })(); - - proto.Call = (function() { - - /** - * Properties of a Call. - * @memberof proto - * @interface ICall - * @property {Uint8Array|null} [callKey] Call callKey - * @property {string|null} [conversionSource] Call conversionSource - * @property {Uint8Array|null} [conversionData] Call conversionData - * @property {number|null} [conversionDelaySeconds] Call conversionDelaySeconds - */ - - /** - * Constructs a new Call. - * @memberof proto - * @classdesc Represents a Call. - * @implements ICall - * @constructor - * @param {proto.ICall=} [properties] Properties to set - */ - function Call(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]]; - } - - /** - * Call callKey. - * @member {Uint8Array} callKey - * @memberof proto.Call - * @instance - */ - Call.prototype.callKey = $util.newBuffer([]); - - /** - * Call conversionSource. - * @member {string} conversionSource - * @memberof proto.Call - * @instance - */ - Call.prototype.conversionSource = ""; - - /** - * Call conversionData. - * @member {Uint8Array} conversionData - * @memberof proto.Call - * @instance - */ - Call.prototype.conversionData = $util.newBuffer([]); - - /** - * Call conversionDelaySeconds. - * @member {number} conversionDelaySeconds - * @memberof proto.Call - * @instance - */ - Call.prototype.conversionDelaySeconds = 0; - - /** - * Creates a new Call instance using the specified properties. - * @function create - * @memberof proto.Call - * @static - * @param {proto.ICall=} [properties] Properties to set - * @returns {proto.Call} Call instance - */ - Call.create = function create(properties) { - return new Call(properties); - }; - - /** - * Encodes the specified Call message. Does not implicitly {@link proto.Call.verify|verify} messages. - * @function encode - * @memberof proto.Call - * @static - * @param {proto.ICall} message Call message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Call.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.callKey != null && Object.hasOwnProperty.call(message, "callKey")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.callKey); - if (message.conversionSource != null && Object.hasOwnProperty.call(message, "conversionSource")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.conversionSource); - if (message.conversionData != null && Object.hasOwnProperty.call(message, "conversionData")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.conversionData); - if (message.conversionDelaySeconds != null && Object.hasOwnProperty.call(message, "conversionDelaySeconds")) - writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.conversionDelaySeconds); - return writer; - }; - - /** - * Encodes the specified Call message, length delimited. Does not implicitly {@link proto.Call.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.Call - * @static - * @param {proto.ICall} message Call message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Call.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Call message from the specified reader or buffer. - * @function decode - * @memberof proto.Call - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.Call} Call - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Call.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.Call(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.callKey = reader.bytes(); - break; - case 2: - message.conversionSource = reader.string(); - break; - case 3: - message.conversionData = reader.bytes(); - break; - case 4: - message.conversionDelaySeconds = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Call message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.Call - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Call} Call - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Call.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Call message. - * @function verify - * @memberof proto.Call - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Call.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.callKey != null && message.hasOwnProperty("callKey")) - if (!(message.callKey && typeof message.callKey.length === "number" || $util.isString(message.callKey))) - return "callKey: buffer expected"; - if (message.conversionSource != null && message.hasOwnProperty("conversionSource")) - if (!$util.isString(message.conversionSource)) - return "conversionSource: string expected"; - if (message.conversionData != null && message.hasOwnProperty("conversionData")) - if (!(message.conversionData && typeof message.conversionData.length === "number" || $util.isString(message.conversionData))) - return "conversionData: buffer expected"; - if (message.conversionDelaySeconds != null && message.hasOwnProperty("conversionDelaySeconds")) - if (!$util.isInteger(message.conversionDelaySeconds)) - return "conversionDelaySeconds: integer expected"; - return null; - }; - - /** - * Creates a Call message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.Call - * @static - * @param {Object.} object Plain object - * @returns {proto.Call} Call - */ - Call.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Call) - return object; - var message = new $root.proto.Call(); - if (object.callKey != null) - if (typeof object.callKey === "string") - $util.base64.decode(object.callKey, message.callKey = $util.newBuffer($util.base64.length(object.callKey)), 0); - else if (object.callKey.length) - message.callKey = object.callKey; - if (object.conversionSource != null) - message.conversionSource = String(object.conversionSource); - if (object.conversionData != null) - if (typeof object.conversionData === "string") - $util.base64.decode(object.conversionData, message.conversionData = $util.newBuffer($util.base64.length(object.conversionData)), 0); - else if (object.conversionData.length) - message.conversionData = object.conversionData; - if (object.conversionDelaySeconds != null) - message.conversionDelaySeconds = object.conversionDelaySeconds >>> 0; - return message; - }; - - /** - * Creates a plain object from a Call message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.Call - * @static - * @param {proto.Call} message Call - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Call.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.callKey = ""; - else { - object.callKey = []; - if (options.bytes !== Array) - object.callKey = $util.newBuffer(object.callKey); - } - object.conversionSource = ""; - if (options.bytes === String) - object.conversionData = ""; - else { - object.conversionData = []; - if (options.bytes !== Array) - object.conversionData = $util.newBuffer(object.conversionData); - } - object.conversionDelaySeconds = 0; - } - if (message.callKey != null && message.hasOwnProperty("callKey")) - object.callKey = options.bytes === String ? $util.base64.encode(message.callKey, 0, message.callKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.callKey) : message.callKey; - if (message.conversionSource != null && message.hasOwnProperty("conversionSource")) - object.conversionSource = message.conversionSource; - if (message.conversionData != null && message.hasOwnProperty("conversionData")) - object.conversionData = options.bytes === String ? $util.base64.encode(message.conversionData, 0, message.conversionData.length) : options.bytes === Array ? Array.prototype.slice.call(message.conversionData) : message.conversionData; - if (message.conversionDelaySeconds != null && message.hasOwnProperty("conversionDelaySeconds")) - object.conversionDelaySeconds = message.conversionDelaySeconds; - return object; - }; - - /** - * Converts this Call to JSON. - * @function toJSON - * @memberof proto.Call - * @instance - * @returns {Object.} JSON object - */ - Call.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Call; - })(); - - proto.CallButton = (function() { - - /** - * Properties of a CallButton. - * @memberof proto - * @interface ICallButton - * @property {proto.IHighlyStructuredMessage|null} [displayText] CallButton displayText - * @property {proto.IHighlyStructuredMessage|null} [phoneNumber] CallButton phoneNumber - */ - - /** - * Constructs a new CallButton. - * @memberof proto - * @classdesc Represents a CallButton. - * @implements ICallButton - * @constructor - * @param {proto.ICallButton=} [properties] Properties to set - */ - function CallButton(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]]; - } - - /** - * CallButton displayText. - * @member {proto.IHighlyStructuredMessage|null|undefined} displayText - * @memberof proto.CallButton - * @instance - */ - CallButton.prototype.displayText = null; - - /** - * CallButton phoneNumber. - * @member {proto.IHighlyStructuredMessage|null|undefined} phoneNumber - * @memberof proto.CallButton - * @instance - */ - CallButton.prototype.phoneNumber = null; - - /** - * Creates a new CallButton instance using the specified properties. - * @function create - * @memberof proto.CallButton - * @static - * @param {proto.ICallButton=} [properties] Properties to set - * @returns {proto.CallButton} CallButton instance - */ - CallButton.create = function create(properties) { - return new CallButton(properties); - }; - - /** - * Encodes the specified CallButton message. Does not implicitly {@link proto.CallButton.verify|verify} messages. - * @function encode - * @memberof proto.CallButton - * @static - * @param {proto.ICallButton} message CallButton message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CallButton.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.phoneNumber != null && Object.hasOwnProperty.call(message, "phoneNumber")) - $root.proto.HighlyStructuredMessage.encode(message.phoneNumber, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CallButton message, length delimited. Does not implicitly {@link proto.CallButton.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.CallButton - * @static - * @param {proto.ICallButton} message CallButton message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CallButton.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CallButton message from the specified reader or buffer. - * @function decode - * @memberof proto.CallButton - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.CallButton} CallButton - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CallButton.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.CallButton(); - 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.phoneNumber = $root.proto.HighlyStructuredMessage.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CallButton message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.CallButton - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.CallButton} CallButton - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CallButton.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CallButton message. - * @function verify - * @memberof proto.CallButton - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CallButton.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.phoneNumber != null && message.hasOwnProperty("phoneNumber")) { - var error = $root.proto.HighlyStructuredMessage.verify(message.phoneNumber); - if (error) - return "phoneNumber." + error; - } - return null; - }; - - /** - * Creates a CallButton message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.CallButton - * @static - * @param {Object.} object Plain object - * @returns {proto.CallButton} CallButton - */ - CallButton.fromObject = function fromObject(object) { - if (object instanceof $root.proto.CallButton) - return object; - var message = new $root.proto.CallButton(); - if (object.displayText != null) { - if (typeof object.displayText !== "object") - throw TypeError(".proto.CallButton.displayText: object expected"); - message.displayText = $root.proto.HighlyStructuredMessage.fromObject(object.displayText); - } - if (object.phoneNumber != null) { - if (typeof object.phoneNumber !== "object") - throw TypeError(".proto.CallButton.phoneNumber: object expected"); - message.phoneNumber = $root.proto.HighlyStructuredMessage.fromObject(object.phoneNumber); - } - return message; - }; - - /** - * Creates a plain object from a CallButton message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.CallButton - * @static - * @param {proto.CallButton} message CallButton - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CallButton.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayText = null; - object.phoneNumber = null; - } - if (message.displayText != null && message.hasOwnProperty("displayText")) - object.displayText = $root.proto.HighlyStructuredMessage.toObject(message.displayText, options); - if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) - object.phoneNumber = $root.proto.HighlyStructuredMessage.toObject(message.phoneNumber, options); - return object; - }; - - /** - * Converts this CallButton to JSON. - * @function toJSON - * @memberof proto.CallButton - * @instance - * @returns {Object.} JSON object - */ - CallButton.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CallButton; - })(); - - proto.CancelPaymentRequestMessage = (function() { - - /** - * Properties of a CancelPaymentRequestMessage. - * @memberof proto - * @interface ICancelPaymentRequestMessage - * @property {proto.IMessageKey|null} [key] CancelPaymentRequestMessage key - */ - - /** - * Constructs a new CancelPaymentRequestMessage. - * @memberof proto - * @classdesc Represents a CancelPaymentRequestMessage. - * @implements ICancelPaymentRequestMessage - * @constructor - * @param {proto.ICancelPaymentRequestMessage=} [properties] Properties to set - */ - function CancelPaymentRequestMessage(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]]; - } - - /** - * CancelPaymentRequestMessage key. - * @member {proto.IMessageKey|null|undefined} key - * @memberof proto.CancelPaymentRequestMessage - * @instance - */ - CancelPaymentRequestMessage.prototype.key = null; - - /** - * Creates a new CancelPaymentRequestMessage instance using the specified properties. - * @function create - * @memberof proto.CancelPaymentRequestMessage - * @static - * @param {proto.ICancelPaymentRequestMessage=} [properties] Properties to set - * @returns {proto.CancelPaymentRequestMessage} CancelPaymentRequestMessage instance - */ - CancelPaymentRequestMessage.create = function create(properties) { - return new CancelPaymentRequestMessage(properties); - }; - - /** - * Encodes the specified CancelPaymentRequestMessage message. Does not implicitly {@link proto.CancelPaymentRequestMessage.verify|verify} messages. - * @function encode - * @memberof proto.CancelPaymentRequestMessage - * @static - * @param {proto.ICancelPaymentRequestMessage} message CancelPaymentRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CancelPaymentRequestMessage.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(); - return writer; - }; - - /** - * Encodes the specified CancelPaymentRequestMessage message, length delimited. Does not implicitly {@link proto.CancelPaymentRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.CancelPaymentRequestMessage - * @static - * @param {proto.ICancelPaymentRequestMessage} message CancelPaymentRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CancelPaymentRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CancelPaymentRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.CancelPaymentRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.CancelPaymentRequestMessage} CancelPaymentRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CancelPaymentRequestMessage.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.CancelPaymentRequestMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = $root.proto.MessageKey.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CancelPaymentRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.CancelPaymentRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.CancelPaymentRequestMessage} CancelPaymentRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CancelPaymentRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CancelPaymentRequestMessage message. - * @function verify - * @memberof proto.CancelPaymentRequestMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CancelPaymentRequestMessage.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; - } - return null; - }; - - /** - * Creates a CancelPaymentRequestMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.CancelPaymentRequestMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.CancelPaymentRequestMessage} CancelPaymentRequestMessage - */ - CancelPaymentRequestMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.CancelPaymentRequestMessage) - return object; - var message = new $root.proto.CancelPaymentRequestMessage(); - if (object.key != null) { - if (typeof object.key !== "object") - throw TypeError(".proto.CancelPaymentRequestMessage.key: object expected"); - message.key = $root.proto.MessageKey.fromObject(object.key); - } - return message; - }; - - /** - * Creates a plain object from a CancelPaymentRequestMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.CancelPaymentRequestMessage - * @static - * @param {proto.CancelPaymentRequestMessage} message CancelPaymentRequestMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CancelPaymentRequestMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.key = null; - if (message.key != null && message.hasOwnProperty("key")) - object.key = $root.proto.MessageKey.toObject(message.key, options); - return object; - }; - - /** - * Converts this CancelPaymentRequestMessage to JSON. - * @function toJSON - * @memberof proto.CancelPaymentRequestMessage - * @instance - * @returns {Object.} JSON object - */ - CancelPaymentRequestMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CancelPaymentRequestMessage; - })(); - - proto.CatalogSnapshot = (function() { - - /** - * Properties of a CatalogSnapshot. - * @memberof proto - * @interface ICatalogSnapshot - * @property {proto.IImageMessage|null} [catalogImage] CatalogSnapshot catalogImage - * @property {string|null} [title] CatalogSnapshot title - * @property {string|null} [description] CatalogSnapshot description - */ - - /** - * Constructs a new CatalogSnapshot. - * @memberof proto - * @classdesc Represents a CatalogSnapshot. - * @implements ICatalogSnapshot - * @constructor - * @param {proto.ICatalogSnapshot=} [properties] Properties to set - */ - function CatalogSnapshot(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]]; - } - - /** - * CatalogSnapshot catalogImage. - * @member {proto.IImageMessage|null|undefined} catalogImage - * @memberof proto.CatalogSnapshot - * @instance - */ - CatalogSnapshot.prototype.catalogImage = null; - - /** - * CatalogSnapshot title. - * @member {string} title - * @memberof proto.CatalogSnapshot - * @instance - */ - CatalogSnapshot.prototype.title = ""; - - /** - * CatalogSnapshot description. - * @member {string} description - * @memberof proto.CatalogSnapshot - * @instance - */ - CatalogSnapshot.prototype.description = ""; - - /** - * Creates a new CatalogSnapshot instance using the specified properties. - * @function create - * @memberof proto.CatalogSnapshot - * @static - * @param {proto.ICatalogSnapshot=} [properties] Properties to set - * @returns {proto.CatalogSnapshot} CatalogSnapshot instance - */ - CatalogSnapshot.create = function create(properties) { - return new CatalogSnapshot(properties); - }; - - /** - * Encodes the specified CatalogSnapshot message. Does not implicitly {@link proto.CatalogSnapshot.verify|verify} messages. - * @function encode - * @memberof proto.CatalogSnapshot - * @static - * @param {proto.ICatalogSnapshot} message CatalogSnapshot message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CatalogSnapshot.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.catalogImage != null && Object.hasOwnProperty.call(message, "catalogImage")) - $root.proto.ImageMessage.encode(message.catalogImage, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.title); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - return writer; - }; - - /** - * Encodes the specified CatalogSnapshot message, length delimited. Does not implicitly {@link proto.CatalogSnapshot.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.CatalogSnapshot - * @static - * @param {proto.ICatalogSnapshot} message CatalogSnapshot message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CatalogSnapshot.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CatalogSnapshot message from the specified reader or buffer. - * @function decode - * @memberof proto.CatalogSnapshot - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.CatalogSnapshot} CatalogSnapshot - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CatalogSnapshot.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.CatalogSnapshot(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.catalogImage = $root.proto.ImageMessage.decode(reader, reader.uint32()); - break; - case 2: - message.title = reader.string(); - break; - case 3: - message.description = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CatalogSnapshot message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.CatalogSnapshot - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.CatalogSnapshot} CatalogSnapshot - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CatalogSnapshot.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CatalogSnapshot message. - * @function verify - * @memberof proto.CatalogSnapshot - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CatalogSnapshot.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.catalogImage != null && message.hasOwnProperty("catalogImage")) { - var error = $root.proto.ImageMessage.verify(message.catalogImage); - if (error) - return "catalogImage." + error; - } - 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"; - return null; - }; - - /** - * Creates a CatalogSnapshot message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.CatalogSnapshot - * @static - * @param {Object.} object Plain object - * @returns {proto.CatalogSnapshot} CatalogSnapshot - */ - CatalogSnapshot.fromObject = function fromObject(object) { - if (object instanceof $root.proto.CatalogSnapshot) - return object; - var message = new $root.proto.CatalogSnapshot(); - if (object.catalogImage != null) { - if (typeof object.catalogImage !== "object") - throw TypeError(".proto.CatalogSnapshot.catalogImage: object expected"); - message.catalogImage = $root.proto.ImageMessage.fromObject(object.catalogImage); - } - if (object.title != null) - message.title = String(object.title); - if (object.description != null) - message.description = String(object.description); - return message; - }; - - /** - * Creates a plain object from a CatalogSnapshot message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.CatalogSnapshot - * @static - * @param {proto.CatalogSnapshot} message CatalogSnapshot - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CatalogSnapshot.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.catalogImage = null; - object.title = ""; - object.description = ""; - } - if (message.catalogImage != null && message.hasOwnProperty("catalogImage")) - object.catalogImage = $root.proto.ImageMessage.toObject(message.catalogImage, options); - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - return object; - }; - - /** - * Converts this CatalogSnapshot to JSON. - * @function toJSON - * @memberof proto.CatalogSnapshot - * @instance - * @returns {Object.} JSON object - */ - CatalogSnapshot.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - 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 + * @property {proto.CertChain.INoiseCertificate|null} [leaf] CertChain leaf + * @property {proto.CertChain.INoiseCertificate|null} [intermediate] CertChain intermediate */ /** @@ -8411,7 +2832,7 @@ $root.proto = (function() { /** * CertChain leaf. - * @member {proto.ICertChainNoiseCertificate|null|undefined} leaf + * @member {proto.CertChain.INoiseCertificate|null|undefined} leaf * @memberof proto.CertChain * @instance */ @@ -8419,7 +2840,7 @@ $root.proto = (function() { /** * CertChain intermediate. - * @member {proto.ICertChainNoiseCertificate|null|undefined} intermediate + * @member {proto.CertChain.INoiseCertificate|null|undefined} intermediate * @memberof proto.CertChain * @instance */ @@ -8450,9 +2871,9 @@ $root.proto = (function() { 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(); + $root.proto.CertChain.NoiseCertificate.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(); + $root.proto.CertChain.NoiseCertificate.encode(message.intermediate, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -8488,10 +2909,10 @@ $root.proto = (function() { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.leaf = $root.proto.CertChainNoiseCertificate.decode(reader, reader.uint32()); + message.leaf = $root.proto.CertChain.NoiseCertificate.decode(reader, reader.uint32()); break; case 2: - message.intermediate = $root.proto.CertChainNoiseCertificate.decode(reader, reader.uint32()); + message.intermediate = $root.proto.CertChain.NoiseCertificate.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -8529,12 +2950,12 @@ $root.proto = (function() { if (typeof message !== "object" || message === null) return "object expected"; if (message.leaf != null && message.hasOwnProperty("leaf")) { - var error = $root.proto.CertChainNoiseCertificate.verify(message.leaf); + var error = $root.proto.CertChain.NoiseCertificate.verify(message.leaf); if (error) return "leaf." + error; } if (message.intermediate != null && message.hasOwnProperty("intermediate")) { - var error = $root.proto.CertChainNoiseCertificate.verify(message.intermediate); + var error = $root.proto.CertChain.NoiseCertificate.verify(message.intermediate); if (error) return "intermediate." + error; } @@ -8556,12 +2977,12 @@ $root.proto = (function() { if (object.leaf != null) { if (typeof object.leaf !== "object") throw TypeError(".proto.CertChain.leaf: object expected"); - message.leaf = $root.proto.CertChainNoiseCertificate.fromObject(object.leaf); + message.leaf = $root.proto.CertChain.NoiseCertificate.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); + message.intermediate = $root.proto.CertChain.NoiseCertificate.fromObject(object.intermediate); } return message; }; @@ -8584,9 +3005,9 @@ $root.proto = (function() { object.intermediate = null; } if (message.leaf != null && message.hasOwnProperty("leaf")) - object.leaf = $root.proto.CertChainNoiseCertificate.toObject(message.leaf, options); + object.leaf = $root.proto.CertChain.NoiseCertificate.toObject(message.leaf, options); if (message.intermediate != null && message.hasOwnProperty("intermediate")) - object.intermediate = $root.proto.CertChainNoiseCertificate.toObject(message.intermediate, options); + object.intermediate = $root.proto.CertChain.NoiseCertificate.toObject(message.intermediate, options); return object; }; @@ -8601,550 +3022,550 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + CertChain.NoiseCertificate = (function() { + + /** + * Properties of a NoiseCertificate. + * @memberof proto.CertChain + * @interface INoiseCertificate + * @property {Uint8Array|null} [details] NoiseCertificate details + * @property {Uint8Array|null} [signature] NoiseCertificate signature + */ + + /** + * Constructs a new NoiseCertificate. + * @memberof proto.CertChain + * @classdesc Represents a NoiseCertificate. + * @implements INoiseCertificate + * @constructor + * @param {proto.CertChain.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.CertChain.NoiseCertificate + * @instance + */ + NoiseCertificate.prototype.details = $util.newBuffer([]); + + /** + * NoiseCertificate signature. + * @member {Uint8Array} signature + * @memberof proto.CertChain.NoiseCertificate + * @instance + */ + NoiseCertificate.prototype.signature = $util.newBuffer([]); + + /** + * Creates a new NoiseCertificate instance using the specified properties. + * @function create + * @memberof proto.CertChain.NoiseCertificate + * @static + * @param {proto.CertChain.INoiseCertificate=} [properties] Properties to set + * @returns {proto.CertChain.NoiseCertificate} NoiseCertificate instance + */ + NoiseCertificate.create = function create(properties) { + return new NoiseCertificate(properties); + }; + + /** + * Encodes the specified NoiseCertificate message. Does not implicitly {@link proto.CertChain.NoiseCertificate.verify|verify} messages. + * @function encode + * @memberof proto.CertChain.NoiseCertificate + * @static + * @param {proto.CertChain.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.CertChain.NoiseCertificate.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.CertChain.NoiseCertificate + * @static + * @param {proto.CertChain.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.CertChain.NoiseCertificate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.CertChain.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.CertChain.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.CertChain.NoiseCertificate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.CertChain.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.CertChain.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.CertChain.NoiseCertificate + * @static + * @param {Object.} object Plain object + * @returns {proto.CertChain.NoiseCertificate} NoiseCertificate + */ + NoiseCertificate.fromObject = function fromObject(object) { + if (object instanceof $root.proto.CertChain.NoiseCertificate) + return object; + var message = new $root.proto.CertChain.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.CertChain.NoiseCertificate + * @static + * @param {proto.CertChain.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.CertChain.NoiseCertificate + * @instance + * @returns {Object.} JSON object + */ + NoiseCertificate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + NoiseCertificate.Details = (function() { + + /** + * Properties of a Details. + * @memberof proto.CertChain.NoiseCertificate + * @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.CertChain.NoiseCertificate + * @classdesc Represents a Details. + * @implements IDetails + * @constructor + * @param {proto.CertChain.NoiseCertificate.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.CertChain.NoiseCertificate.Details + * @instance + */ + Details.prototype.serial = 0; + + /** + * Details issuerSerial. + * @member {number} issuerSerial + * @memberof proto.CertChain.NoiseCertificate.Details + * @instance + */ + Details.prototype.issuerSerial = 0; + + /** + * Details key. + * @member {Uint8Array} key + * @memberof proto.CertChain.NoiseCertificate.Details + * @instance + */ + Details.prototype.key = $util.newBuffer([]); + + /** + * Details notBefore. + * @member {number|Long} notBefore + * @memberof proto.CertChain.NoiseCertificate.Details + * @instance + */ + Details.prototype.notBefore = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Details notAfter. + * @member {number|Long} notAfter + * @memberof proto.CertChain.NoiseCertificate.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.CertChain.NoiseCertificate.Details + * @static + * @param {proto.CertChain.NoiseCertificate.IDetails=} [properties] Properties to set + * @returns {proto.CertChain.NoiseCertificate.Details} Details instance + */ + Details.create = function create(properties) { + return new Details(properties); + }; + + /** + * Encodes the specified Details message. Does not implicitly {@link proto.CertChain.NoiseCertificate.Details.verify|verify} messages. + * @function encode + * @memberof proto.CertChain.NoiseCertificate.Details + * @static + * @param {proto.CertChain.NoiseCertificate.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.CertChain.NoiseCertificate.Details.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.CertChain.NoiseCertificate.Details + * @static + * @param {proto.CertChain.NoiseCertificate.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.CertChain.NoiseCertificate.Details + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.CertChain.NoiseCertificate.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.CertChain.NoiseCertificate.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.CertChain.NoiseCertificate.Details + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.CertChain.NoiseCertificate.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.CertChain.NoiseCertificate.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.CertChain.NoiseCertificate.Details + * @static + * @param {Object.} object Plain object + * @returns {proto.CertChain.NoiseCertificate.Details} Details + */ + Details.fromObject = function fromObject(object) { + if (object instanceof $root.proto.CertChain.NoiseCertificate.Details) + return object; + var message = new $root.proto.CertChain.NoiseCertificate.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.CertChain.NoiseCertificate.Details + * @static + * @param {proto.CertChain.NoiseCertificate.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.CertChain.NoiseCertificate.Details + * @instance + * @returns {Object.} JSON object + */ + Details.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Details; + })(); + + return NoiseCertificate; + })(); + 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() { /** @@ -9663,895 +4084,6 @@ $root.proto = (function() { return ChainKey; })(); - proto.Chat = (function() { - - /** - * Properties of a Chat. - * @memberof proto - * @interface IChat - * @property {string|null} [displayName] Chat displayName - * @property {string|null} [id] Chat id - */ - - /** - * Constructs a new Chat. - * @memberof proto - * @classdesc Represents a Chat. - * @implements IChat - * @constructor - * @param {proto.IChat=} [properties] Properties to set - */ - function Chat(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]]; - } - - /** - * Chat displayName. - * @member {string} displayName - * @memberof proto.Chat - * @instance - */ - Chat.prototype.displayName = ""; - - /** - * Chat id. - * @member {string} id - * @memberof proto.Chat - * @instance - */ - Chat.prototype.id = ""; - - /** - * Creates a new Chat instance using the specified properties. - * @function create - * @memberof proto.Chat - * @static - * @param {proto.IChat=} [properties] Properties to set - * @returns {proto.Chat} Chat instance - */ - Chat.create = function create(properties) { - return new Chat(properties); - }; - - /** - * Encodes the specified Chat message. Does not implicitly {@link proto.Chat.verify|verify} messages. - * @function encode - * @memberof proto.Chat - * @static - * @param {proto.IChat} message Chat message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Chat.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); - return writer; - }; - - /** - * Encodes the specified Chat message, length delimited. Does not implicitly {@link proto.Chat.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.Chat - * @static - * @param {proto.IChat} message Chat message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Chat.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Chat message from the specified reader or buffer. - * @function decode - * @memberof proto.Chat - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.Chat} Chat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Chat.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.Chat(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.displayName = reader.string(); - break; - case 2: - message.id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Chat message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.Chat - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Chat} Chat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Chat.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Chat message. - * @function verify - * @memberof proto.Chat - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Chat.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - return null; - }; - - /** - * Creates a Chat message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.Chat - * @static - * @param {Object.} object Plain object - * @returns {proto.Chat} Chat - */ - Chat.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Chat) - return object; - var message = new $root.proto.Chat(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.id != null) - message.id = String(object.id); - return message; - }; - - /** - * Creates a plain object from a Chat message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.Chat - * @static - * @param {proto.Chat} message Chat - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Chat.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.id = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - return object; - }; - - /** - * Converts this Chat to JSON. - * @function toJSON - * @memberof proto.Chat - * @instance - * @returns {Object.} JSON object - */ - Chat.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - 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() { /** @@ -10560,24 +4092,24 @@ $root.proto = (function() { * @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 {proto.ClientPayload.IUserAgent|null} [userAgent] ClientPayload userAgent + * @property {proto.ClientPayload.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 {proto.ClientPayload.ConnectType|null} [connectType] ClientPayload connectType + * @property {proto.ClientPayload.ConnectReason|null} [connectReason] ClientPayload connectReason * @property {Array.|null} [shards] ClientPayload shards - * @property {proto.IDNSSource|null} [dnsSource] ClientPayload dnsSource + * @property {proto.ClientPayload.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 {proto.ClientPayload.IDevicePairingRegistrationData|null} [devicePairingData] ClientPayload devicePairingData + * @property {proto.ClientPayload.Product|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 {proto.ClientPayload.IOSAppExtension|null} [iosAppExtension] ClientPayload iosAppExtension * @property {number|Long|null} [fbAppId] ClientPayload fbAppId * @property {Uint8Array|null} [fbDeviceId] ClientPayload fbDeviceId * @property {boolean|null} [pull] ClientPayload pull @@ -10618,7 +4150,7 @@ $root.proto = (function() { /** * ClientPayload userAgent. - * @member {proto.IUserAgent|null|undefined} userAgent + * @member {proto.ClientPayload.IUserAgent|null|undefined} userAgent * @memberof proto.ClientPayload * @instance */ @@ -10626,7 +4158,7 @@ $root.proto = (function() { /** * ClientPayload webInfo. - * @member {proto.IWebInfo|null|undefined} webInfo + * @member {proto.ClientPayload.IWebInfo|null|undefined} webInfo * @memberof proto.ClientPayload * @instance */ @@ -10658,7 +4190,7 @@ $root.proto = (function() { /** * ClientPayload connectType. - * @member {proto.ClientPayload.ClientPayloadConnectType} connectType + * @member {proto.ClientPayload.ConnectType} connectType * @memberof proto.ClientPayload * @instance */ @@ -10666,7 +4198,7 @@ $root.proto = (function() { /** * ClientPayload connectReason. - * @member {proto.ClientPayload.ClientPayloadConnectReason} connectReason + * @member {proto.ClientPayload.ConnectReason} connectReason * @memberof proto.ClientPayload * @instance */ @@ -10682,7 +4214,7 @@ $root.proto = (function() { /** * ClientPayload dnsSource. - * @member {proto.IDNSSource|null|undefined} dnsSource + * @member {proto.ClientPayload.IDNSSource|null|undefined} dnsSource * @memberof proto.ClientPayload * @instance */ @@ -10706,7 +4238,7 @@ $root.proto = (function() { /** * ClientPayload devicePairingData. - * @member {proto.IDevicePairingRegistrationData|null|undefined} devicePairingData + * @member {proto.ClientPayload.IDevicePairingRegistrationData|null|undefined} devicePairingData * @memberof proto.ClientPayload * @instance */ @@ -10714,7 +4246,7 @@ $root.proto = (function() { /** * ClientPayload product. - * @member {proto.ClientPayload.ClientPayloadProduct} product + * @member {proto.ClientPayload.Product} product * @memberof proto.ClientPayload * @instance */ @@ -10754,7 +4286,7 @@ $root.proto = (function() { /** * ClientPayload iosAppExtension. - * @member {proto.ClientPayload.ClientPayloadIOSAppExtension} iosAppExtension + * @member {proto.ClientPayload.IOSAppExtension} iosAppExtension * @memberof proto.ClientPayload * @instance */ @@ -10821,9 +4353,9 @@ $root.proto = (function() { 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(); + $root.proto.ClientPayload.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(); + $root.proto.ClientPayload.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")) @@ -10838,13 +4370,13 @@ $root.proto = (function() { 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(); + $root.proto.ClientPayload.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(); + $root.proto.ClientPayload.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")) @@ -10906,10 +4438,10 @@ $root.proto = (function() { message.passive = reader.bool(); break; case 5: - message.userAgent = $root.proto.UserAgent.decode(reader, reader.uint32()); + message.userAgent = $root.proto.ClientPayload.UserAgent.decode(reader, reader.uint32()); break; case 6: - message.webInfo = $root.proto.WebInfo.decode(reader, reader.uint32()); + message.webInfo = $root.proto.ClientPayload.WebInfo.decode(reader, reader.uint32()); break; case 7: message.pushName = reader.string(); @@ -10937,7 +4469,7 @@ $root.proto = (function() { message.shards.push(reader.int32()); break; case 15: - message.dnsSource = $root.proto.DNSSource.decode(reader, reader.uint32()); + message.dnsSource = $root.proto.ClientPayload.DNSSource.decode(reader, reader.uint32()); break; case 16: message.connectAttemptCount = reader.uint32(); @@ -10946,7 +4478,7 @@ $root.proto = (function() { message.device = reader.uint32(); break; case 19: - message.devicePairingData = $root.proto.DevicePairingRegistrationData.decode(reader, reader.uint32()); + message.devicePairingData = $root.proto.ClientPayload.DevicePairingRegistrationData.decode(reader, reader.uint32()); break; case 20: message.product = reader.int32(); @@ -11020,12 +4552,12 @@ $root.proto = (function() { if (typeof message.passive !== "boolean") return "passive: boolean expected"; if (message.userAgent != null && message.hasOwnProperty("userAgent")) { - var error = $root.proto.UserAgent.verify(message.userAgent); + var error = $root.proto.ClientPayload.UserAgent.verify(message.userAgent); if (error) return "userAgent." + error; } if (message.webInfo != null && message.hasOwnProperty("webInfo")) { - var error = $root.proto.WebInfo.verify(message.webInfo); + var error = $root.proto.ClientPayload.WebInfo.verify(message.webInfo); if (error) return "webInfo." + error; } @@ -11079,7 +4611,7 @@ $root.proto = (function() { return "shards: integer[] expected"; } if (message.dnsSource != null && message.hasOwnProperty("dnsSource")) { - var error = $root.proto.DNSSource.verify(message.dnsSource); + var error = $root.proto.ClientPayload.DNSSource.verify(message.dnsSource); if (error) return "dnsSource." + error; } @@ -11090,7 +4622,7 @@ $root.proto = (function() { if (!$util.isInteger(message.device)) return "device: integer expected"; if (message.devicePairingData != null && message.hasOwnProperty("devicePairingData")) { - var error = $root.proto.DevicePairingRegistrationData.verify(message.devicePairingData); + var error = $root.proto.ClientPayload.DevicePairingRegistrationData.verify(message.devicePairingData); if (error) return "devicePairingData." + error; } @@ -11164,12 +4696,12 @@ $root.proto = (function() { if (object.userAgent != null) { if (typeof object.userAgent !== "object") throw TypeError(".proto.ClientPayload.userAgent: object expected"); - message.userAgent = $root.proto.UserAgent.fromObject(object.userAgent); + message.userAgent = $root.proto.ClientPayload.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); + message.webInfo = $root.proto.ClientPayload.WebInfo.fromObject(object.webInfo); } if (object.pushName != null) message.pushName = String(object.pushName); @@ -11275,7 +4807,7 @@ $root.proto = (function() { if (object.dnsSource != null) { if (typeof object.dnsSource !== "object") throw TypeError(".proto.ClientPayload.dnsSource: object expected"); - message.dnsSource = $root.proto.DNSSource.fromObject(object.dnsSource); + message.dnsSource = $root.proto.ClientPayload.DNSSource.fromObject(object.dnsSource); } if (object.connectAttemptCount != null) message.connectAttemptCount = object.connectAttemptCount >>> 0; @@ -11284,7 +4816,7 @@ $root.proto = (function() { if (object.devicePairingData != null) { if (typeof object.devicePairingData !== "object") throw TypeError(".proto.ClientPayload.devicePairingData: object expected"); - message.devicePairingData = $root.proto.DevicePairingRegistrationData.fromObject(object.devicePairingData); + message.devicePairingData = $root.proto.ClientPayload.DevicePairingRegistrationData.fromObject(object.devicePairingData); } switch (object.product) { case "WHATSAPP": @@ -11428,9 +4960,9 @@ $root.proto = (function() { 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); + object.userAgent = $root.proto.ClientPayload.UserAgent.toObject(message.userAgent, options); if (message.webInfo != null && message.hasOwnProperty("webInfo")) - object.webInfo = $root.proto.WebInfo.toObject(message.webInfo, options); + object.webInfo = $root.proto.ClientPayload.WebInfo.toObject(message.webInfo, options); if (message.pushName != null && message.hasOwnProperty("pushName")) object.pushName = message.pushName; if (message.sessionId != null && message.hasOwnProperty("sessionId")) @@ -11438,24 +4970,24 @@ $root.proto = (function() { 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; + object.connectType = options.enums === String ? $root.proto.ClientPayload.ConnectType[message.connectType] : message.connectType; if (message.connectReason != null && message.hasOwnProperty("connectReason")) - object.connectReason = options.enums === String ? $root.proto.ClientPayload.ClientPayloadConnectReason[message.connectReason] : message.connectReason; + object.connectReason = options.enums === String ? $root.proto.ClientPayload.ConnectReason[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); + object.dnsSource = $root.proto.ClientPayload.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); + object.devicePairingData = $root.proto.ClientPayload.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; + object.product = options.enums === String ? $root.proto.ClientPayload.Product[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")) @@ -11465,7 +4997,7 @@ $root.proto = (function() { 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; + object.iosAppExtension = options.enums === String ? $root.proto.ClientPayload.IOSAppExtension[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; @@ -11492,8 +5024,30 @@ $root.proto = (function() { }; /** - * ClientPayloadConnectType enum. - * @name proto.ClientPayload.ClientPayloadConnectType + * ConnectReason enum. + * @name proto.ClientPayload.ConnectReason + * @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.ConnectReason = (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; + })(); + + /** + * ConnectType enum. + * @name proto.ClientPayload.ConnectType * @enum {number} * @property {number} CELLULAR_UNKNOWN=0 CELLULAR_UNKNOWN value * @property {number} WIFI_UNKNOWN=1 WIFI_UNKNOWN value @@ -11511,7 +5065,7 @@ $root.proto = (function() { * @property {number} CELLULAR_LTE=111 CELLULAR_LTE value * @property {number} CELLULAR_HSPAP=112 CELLULAR_HSPAP value */ - ClientPayload.ClientPayloadConnectType = (function() { + ClientPayload.ConnectType = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "CELLULAR_UNKNOWN"] = 0; values[valuesById[1] = "WIFI_UNKNOWN"] = 1; @@ -11531,51 +5085,687 @@ $root.proto = (function() { 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; + ClientPayload.DNSSource = (function() { + + /** + * Properties of a DNSSource. + * @memberof proto.ClientPayload + * @interface IDNSSource + * @property {proto.ClientPayload.DNSSource.DNSResolutionMethod|null} [dnsMethod] DNSSource dnsMethod + * @property {boolean|null} [appCached] DNSSource appCached + */ + + /** + * Constructs a new DNSSource. + * @memberof proto.ClientPayload + * @classdesc Represents a DNSSource. + * @implements IDNSSource + * @constructor + * @param {proto.ClientPayload.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.ClientPayload.DNSSource.DNSResolutionMethod} dnsMethod + * @memberof proto.ClientPayload.DNSSource + * @instance + */ + DNSSource.prototype.dnsMethod = 0; + + /** + * DNSSource appCached. + * @member {boolean} appCached + * @memberof proto.ClientPayload.DNSSource + * @instance + */ + DNSSource.prototype.appCached = false; + + /** + * Creates a new DNSSource instance using the specified properties. + * @function create + * @memberof proto.ClientPayload.DNSSource + * @static + * @param {proto.ClientPayload.IDNSSource=} [properties] Properties to set + * @returns {proto.ClientPayload.DNSSource} DNSSource instance + */ + DNSSource.create = function create(properties) { + return new DNSSource(properties); + }; + + /** + * Encodes the specified DNSSource message. Does not implicitly {@link proto.ClientPayload.DNSSource.verify|verify} messages. + * @function encode + * @memberof proto.ClientPayload.DNSSource + * @static + * @param {proto.ClientPayload.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.ClientPayload.DNSSource.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ClientPayload.DNSSource + * @static + * @param {proto.ClientPayload.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.ClientPayload.DNSSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ClientPayload.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.ClientPayload.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.ClientPayload.DNSSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ClientPayload.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.ClientPayload.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.ClientPayload.DNSSource + * @static + * @param {Object.} object Plain object + * @returns {proto.ClientPayload.DNSSource} DNSSource + */ + DNSSource.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ClientPayload.DNSSource) + return object; + var message = new $root.proto.ClientPayload.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.ClientPayload.DNSSource + * @static + * @param {proto.ClientPayload.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.ClientPayload.DNSSource.DNSResolutionMethod[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.ClientPayload.DNSSource + * @instance + * @returns {Object.} JSON object + */ + DNSSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * DNSResolutionMethod enum. + * @name proto.ClientPayload.DNSSource.DNSResolutionMethod + * @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.DNSResolutionMethod = (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; + })(); + + ClientPayload.DevicePairingRegistrationData = (function() { + + /** + * Properties of a DevicePairingRegistrationData. + * @memberof proto.ClientPayload + * @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.ClientPayload + * @classdesc Represents a DevicePairingRegistrationData. + * @implements IDevicePairingRegistrationData + * @constructor + * @param {proto.ClientPayload.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.ClientPayload.DevicePairingRegistrationData + * @instance + */ + DevicePairingRegistrationData.prototype.eRegid = $util.newBuffer([]); + + /** + * DevicePairingRegistrationData eKeytype. + * @member {Uint8Array} eKeytype + * @memberof proto.ClientPayload.DevicePairingRegistrationData + * @instance + */ + DevicePairingRegistrationData.prototype.eKeytype = $util.newBuffer([]); + + /** + * DevicePairingRegistrationData eIdent. + * @member {Uint8Array} eIdent + * @memberof proto.ClientPayload.DevicePairingRegistrationData + * @instance + */ + DevicePairingRegistrationData.prototype.eIdent = $util.newBuffer([]); + + /** + * DevicePairingRegistrationData eSkeyId. + * @member {Uint8Array} eSkeyId + * @memberof proto.ClientPayload.DevicePairingRegistrationData + * @instance + */ + DevicePairingRegistrationData.prototype.eSkeyId = $util.newBuffer([]); + + /** + * DevicePairingRegistrationData eSkeyVal. + * @member {Uint8Array} eSkeyVal + * @memberof proto.ClientPayload.DevicePairingRegistrationData + * @instance + */ + DevicePairingRegistrationData.prototype.eSkeyVal = $util.newBuffer([]); + + /** + * DevicePairingRegistrationData eSkeySig. + * @member {Uint8Array} eSkeySig + * @memberof proto.ClientPayload.DevicePairingRegistrationData + * @instance + */ + DevicePairingRegistrationData.prototype.eSkeySig = $util.newBuffer([]); + + /** + * DevicePairingRegistrationData buildHash. + * @member {Uint8Array} buildHash + * @memberof proto.ClientPayload.DevicePairingRegistrationData + * @instance + */ + DevicePairingRegistrationData.prototype.buildHash = $util.newBuffer([]); + + /** + * DevicePairingRegistrationData deviceProps. + * @member {Uint8Array} deviceProps + * @memberof proto.ClientPayload.DevicePairingRegistrationData + * @instance + */ + DevicePairingRegistrationData.prototype.deviceProps = $util.newBuffer([]); + + /** + * Creates a new DevicePairingRegistrationData instance using the specified properties. + * @function create + * @memberof proto.ClientPayload.DevicePairingRegistrationData + * @static + * @param {proto.ClientPayload.IDevicePairingRegistrationData=} [properties] Properties to set + * @returns {proto.ClientPayload.DevicePairingRegistrationData} DevicePairingRegistrationData instance + */ + DevicePairingRegistrationData.create = function create(properties) { + return new DevicePairingRegistrationData(properties); + }; + + /** + * Encodes the specified DevicePairingRegistrationData message. Does not implicitly {@link proto.ClientPayload.DevicePairingRegistrationData.verify|verify} messages. + * @function encode + * @memberof proto.ClientPayload.DevicePairingRegistrationData + * @static + * @param {proto.ClientPayload.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.ClientPayload.DevicePairingRegistrationData.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ClientPayload.DevicePairingRegistrationData + * @static + * @param {proto.ClientPayload.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.ClientPayload.DevicePairingRegistrationData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ClientPayload.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.ClientPayload.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.ClientPayload.DevicePairingRegistrationData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ClientPayload.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.ClientPayload.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.ClientPayload.DevicePairingRegistrationData + * @static + * @param {Object.} object Plain object + * @returns {proto.ClientPayload.DevicePairingRegistrationData} DevicePairingRegistrationData + */ + DevicePairingRegistrationData.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ClientPayload.DevicePairingRegistrationData) + return object; + var message = new $root.proto.ClientPayload.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.ClientPayload.DevicePairingRegistrationData + * @static + * @param {proto.ClientPayload.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.ClientPayload.DevicePairingRegistrationData + * @instance + * @returns {Object.} JSON object + */ + DevicePairingRegistrationData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DevicePairingRegistrationData; })(); /** - * 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 + * IOSAppExtension enum. + * @name proto.ClientPayload.IOSAppExtension * @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() { + ClientPayload.IOSAppExtension = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "SHARE_EXTENSION"] = 0; values[valuesById[1] = "SERVICE_EXTENSION"] = 1; @@ -11583,945 +5773,1735 @@ $root.proto = (function() { return values; })(); - return ClientPayload; - })(); - - proto.CollectionMessage = (function() { - /** - * Properties of a CollectionMessage. - * @memberof proto - * @interface ICollectionMessage - * @property {string|null} [bizJid] CollectionMessage bizJid - * @property {string|null} [id] CollectionMessage id - * @property {number|null} [messageVersion] CollectionMessage messageVersion + * Product enum. + * @name proto.ClientPayload.Product + * @enum {number} + * @property {number} WHATSAPP=0 WHATSAPP value + * @property {number} MESSENGER=1 MESSENGER value */ + ClientPayload.Product = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "WHATSAPP"] = 0; + values[valuesById[1] = "MESSENGER"] = 1; + return values; + })(); - /** - * Constructs a new CollectionMessage. - * @memberof proto - * @classdesc Represents a CollectionMessage. - * @implements ICollectionMessage - * @constructor - * @param {proto.ICollectionMessage=} [properties] Properties to set - */ - function CollectionMessage(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]]; - } + ClientPayload.UserAgent = (function() { - /** - * CollectionMessage bizJid. - * @member {string} bizJid - * @memberof proto.CollectionMessage - * @instance - */ - CollectionMessage.prototype.bizJid = ""; + /** + * Properties of a UserAgent. + * @memberof proto.ClientPayload + * @interface IUserAgent + * @property {proto.ClientPayload.UserAgent.Platform|null} [platform] UserAgent platform + * @property {proto.ClientPayload.UserAgent.IAppVersion|null} [appVersion] UserAgent appVersion + * @property {string|null} [mcc] UserAgent mcc + * @property {string|null} [mnc] UserAgent mnc + * @property {string|null} [osVersion] UserAgent osVersion + * @property {string|null} [manufacturer] UserAgent manufacturer + * @property {string|null} [device] UserAgent device + * @property {string|null} [osBuildNumber] UserAgent osBuildNumber + * @property {string|null} [phoneId] UserAgent phoneId + * @property {proto.ClientPayload.UserAgent.ReleaseChannel|null} [releaseChannel] UserAgent releaseChannel + * @property {string|null} [localeLanguageIso6391] UserAgent localeLanguageIso6391 + * @property {string|null} [localeCountryIso31661Alpha2] UserAgent localeCountryIso31661Alpha2 + * @property {string|null} [deviceBoard] UserAgent deviceBoard + */ - /** - * CollectionMessage id. - * @member {string} id - * @memberof proto.CollectionMessage - * @instance - */ - CollectionMessage.prototype.id = ""; + /** + * Constructs a new UserAgent. + * @memberof proto.ClientPayload + * @classdesc Represents a UserAgent. + * @implements IUserAgent + * @constructor + * @param {proto.ClientPayload.IUserAgent=} [properties] Properties to set + */ + function UserAgent(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]]; + } - /** - * CollectionMessage messageVersion. - * @member {number} messageVersion - * @memberof proto.CollectionMessage - * @instance - */ - CollectionMessage.prototype.messageVersion = 0; + /** + * UserAgent platform. + * @member {proto.ClientPayload.UserAgent.Platform} platform + * @memberof proto.ClientPayload.UserAgent + * @instance + */ + UserAgent.prototype.platform = 0; - /** - * Creates a new CollectionMessage instance using the specified properties. - * @function create - * @memberof proto.CollectionMessage - * @static - * @param {proto.ICollectionMessage=} [properties] Properties to set - * @returns {proto.CollectionMessage} CollectionMessage instance - */ - CollectionMessage.create = function create(properties) { - return new CollectionMessage(properties); - }; + /** + * UserAgent appVersion. + * @member {proto.ClientPayload.UserAgent.IAppVersion|null|undefined} appVersion + * @memberof proto.ClientPayload.UserAgent + * @instance + */ + UserAgent.prototype.appVersion = null; - /** - * Encodes the specified CollectionMessage message. Does not implicitly {@link proto.CollectionMessage.verify|verify} messages. - * @function encode - * @memberof proto.CollectionMessage - * @static - * @param {proto.ICollectionMessage} message CollectionMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CollectionMessage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bizJid != null && Object.hasOwnProperty.call(message, "bizJid")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.bizJid); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); - if (message.messageVersion != null && Object.hasOwnProperty.call(message, "messageVersion")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.messageVersion); - return writer; - }; + /** + * UserAgent mcc. + * @member {string} mcc + * @memberof proto.ClientPayload.UserAgent + * @instance + */ + UserAgent.prototype.mcc = ""; - /** - * Encodes the specified CollectionMessage message, length delimited. Does not implicitly {@link proto.CollectionMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.CollectionMessage - * @static - * @param {proto.ICollectionMessage} message CollectionMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CollectionMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * UserAgent mnc. + * @member {string} mnc + * @memberof proto.ClientPayload.UserAgent + * @instance + */ + UserAgent.prototype.mnc = ""; - /** - * Decodes a CollectionMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.CollectionMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.CollectionMessage} CollectionMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CollectionMessage.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.CollectionMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.bizJid = reader.string(); - break; - case 2: - message.id = reader.string(); - break; - case 3: - message.messageVersion = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * UserAgent osVersion. + * @member {string} osVersion + * @memberof proto.ClientPayload.UserAgent + * @instance + */ + UserAgent.prototype.osVersion = ""; + + /** + * UserAgent manufacturer. + * @member {string} manufacturer + * @memberof proto.ClientPayload.UserAgent + * @instance + */ + UserAgent.prototype.manufacturer = ""; + + /** + * UserAgent device. + * @member {string} device + * @memberof proto.ClientPayload.UserAgent + * @instance + */ + UserAgent.prototype.device = ""; + + /** + * UserAgent osBuildNumber. + * @member {string} osBuildNumber + * @memberof proto.ClientPayload.UserAgent + * @instance + */ + UserAgent.prototype.osBuildNumber = ""; + + /** + * UserAgent phoneId. + * @member {string} phoneId + * @memberof proto.ClientPayload.UserAgent + * @instance + */ + UserAgent.prototype.phoneId = ""; + + /** + * UserAgent releaseChannel. + * @member {proto.ClientPayload.UserAgent.ReleaseChannel} releaseChannel + * @memberof proto.ClientPayload.UserAgent + * @instance + */ + UserAgent.prototype.releaseChannel = 0; + + /** + * UserAgent localeLanguageIso6391. + * @member {string} localeLanguageIso6391 + * @memberof proto.ClientPayload.UserAgent + * @instance + */ + UserAgent.prototype.localeLanguageIso6391 = ""; + + /** + * UserAgent localeCountryIso31661Alpha2. + * @member {string} localeCountryIso31661Alpha2 + * @memberof proto.ClientPayload.UserAgent + * @instance + */ + UserAgent.prototype.localeCountryIso31661Alpha2 = ""; + + /** + * UserAgent deviceBoard. + * @member {string} deviceBoard + * @memberof proto.ClientPayload.UserAgent + * @instance + */ + UserAgent.prototype.deviceBoard = ""; + + /** + * Creates a new UserAgent instance using the specified properties. + * @function create + * @memberof proto.ClientPayload.UserAgent + * @static + * @param {proto.ClientPayload.IUserAgent=} [properties] Properties to set + * @returns {proto.ClientPayload.UserAgent} UserAgent instance + */ + UserAgent.create = function create(properties) { + return new UserAgent(properties); + }; + + /** + * Encodes the specified UserAgent message. Does not implicitly {@link proto.ClientPayload.UserAgent.verify|verify} messages. + * @function encode + * @memberof proto.ClientPayload.UserAgent + * @static + * @param {proto.ClientPayload.IUserAgent} message UserAgent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserAgent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.platform != null && Object.hasOwnProperty.call(message, "platform")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.platform); + if (message.appVersion != null && Object.hasOwnProperty.call(message, "appVersion")) + $root.proto.ClientPayload.UserAgent.AppVersion.encode(message.appVersion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.mcc != null && Object.hasOwnProperty.call(message, "mcc")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.mcc); + if (message.mnc != null && Object.hasOwnProperty.call(message, "mnc")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.mnc); + if (message.osVersion != null && Object.hasOwnProperty.call(message, "osVersion")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.osVersion); + if (message.manufacturer != null && Object.hasOwnProperty.call(message, "manufacturer")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.manufacturer); + if (message.device != null && Object.hasOwnProperty.call(message, "device")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.device); + if (message.osBuildNumber != null && Object.hasOwnProperty.call(message, "osBuildNumber")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.osBuildNumber); + if (message.phoneId != null && Object.hasOwnProperty.call(message, "phoneId")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.phoneId); + if (message.releaseChannel != null && Object.hasOwnProperty.call(message, "releaseChannel")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.releaseChannel); + if (message.localeLanguageIso6391 != null && Object.hasOwnProperty.call(message, "localeLanguageIso6391")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.localeLanguageIso6391); + if (message.localeCountryIso31661Alpha2 != null && Object.hasOwnProperty.call(message, "localeCountryIso31661Alpha2")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.localeCountryIso31661Alpha2); + if (message.deviceBoard != null && Object.hasOwnProperty.call(message, "deviceBoard")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.deviceBoard); + return writer; + }; + + /** + * Encodes the specified UserAgent message, length delimited. Does not implicitly {@link proto.ClientPayload.UserAgent.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ClientPayload.UserAgent + * @static + * @param {proto.ClientPayload.IUserAgent} message UserAgent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserAgent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserAgent message from the specified reader or buffer. + * @function decode + * @memberof proto.ClientPayload.UserAgent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ClientPayload.UserAgent} UserAgent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserAgent.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.UserAgent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.platform = reader.int32(); + break; + case 2: + message.appVersion = $root.proto.ClientPayload.UserAgent.AppVersion.decode(reader, reader.uint32()); + break; + case 3: + message.mcc = reader.string(); + break; + case 4: + message.mnc = reader.string(); + break; + case 5: + message.osVersion = reader.string(); + break; + case 6: + message.manufacturer = reader.string(); + break; + case 7: + message.device = reader.string(); + break; + case 8: + message.osBuildNumber = reader.string(); + break; + case 9: + message.phoneId = reader.string(); + break; + case 10: + message.releaseChannel = reader.int32(); + break; + case 11: + message.localeLanguageIso6391 = reader.string(); + break; + case 12: + message.localeCountryIso31661Alpha2 = reader.string(); + break; + case 13: + message.deviceBoard = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes a CollectionMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.CollectionMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.CollectionMessage} CollectionMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CollectionMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a UserAgent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ClientPayload.UserAgent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ClientPayload.UserAgent} UserAgent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserAgent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a CollectionMessage message. - * @function verify - * @memberof proto.CollectionMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CollectionMessage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bizJid != null && message.hasOwnProperty("bizJid")) - if (!$util.isString(message.bizJid)) - return "bizJid: string expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) - if (!$util.isInteger(message.messageVersion)) - return "messageVersion: integer expected"; - return null; - }; - - /** - * Creates a CollectionMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.CollectionMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.CollectionMessage} CollectionMessage - */ - CollectionMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.CollectionMessage) - return object; - var message = new $root.proto.CollectionMessage(); - if (object.bizJid != null) - message.bizJid = String(object.bizJid); - if (object.id != null) - message.id = String(object.id); - if (object.messageVersion != null) - message.messageVersion = object.messageVersion | 0; - return message; - }; - - /** - * Creates a plain object from a CollectionMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.CollectionMessage - * @static - * @param {proto.CollectionMessage} message CollectionMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CollectionMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.bizJid = ""; - object.id = ""; - object.messageVersion = 0; - } - if (message.bizJid != null && message.hasOwnProperty("bizJid")) - object.bizJid = message.bizJid; - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) - object.messageVersion = message.messageVersion; - return object; - }; - - /** - * Converts this CollectionMessage to JSON. - * @function toJSON - * @memberof proto.CollectionMessage - * @instance - * @returns {Object.} JSON object - */ - CollectionMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - 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() { - - /** - * Properties of a ContactMessage. - * @memberof proto - * @interface IContactMessage - * @property {string|null} [displayName] ContactMessage displayName - * @property {string|null} [vcard] ContactMessage vcard - * @property {proto.IContextInfo|null} [contextInfo] ContactMessage contextInfo - */ - - /** - * Constructs a new ContactMessage. - * @memberof proto - * @classdesc Represents a ContactMessage. - * @implements IContactMessage - * @constructor - * @param {proto.IContactMessage=} [properties] Properties to set - */ - function ContactMessage(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]]; - } - - /** - * ContactMessage displayName. - * @member {string} displayName - * @memberof proto.ContactMessage - * @instance - */ - ContactMessage.prototype.displayName = ""; - - /** - * ContactMessage vcard. - * @member {string} vcard - * @memberof proto.ContactMessage - * @instance - */ - ContactMessage.prototype.vcard = ""; - - /** - * ContactMessage contextInfo. - * @member {proto.IContextInfo|null|undefined} contextInfo - * @memberof proto.ContactMessage - * @instance - */ - ContactMessage.prototype.contextInfo = null; - - /** - * Creates a new ContactMessage instance using the specified properties. - * @function create - * @memberof proto.ContactMessage - * @static - * @param {proto.IContactMessage=} [properties] Properties to set - * @returns {proto.ContactMessage} ContactMessage instance - */ - ContactMessage.create = function create(properties) { - return new ContactMessage(properties); - }; - - /** - * Encodes the specified ContactMessage message. Does not implicitly {@link proto.ContactMessage.verify|verify} messages. - * @function encode - * @memberof proto.ContactMessage - * @static - * @param {proto.IContactMessage} message ContactMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ContactMessage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.vcard != null && Object.hasOwnProperty.call(message, "vcard")) - writer.uint32(/* id 16, wireType 2 =*/130).string(message.vcard); - if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) - $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ContactMessage message, length delimited. Does not implicitly {@link proto.ContactMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.ContactMessage - * @static - * @param {proto.IContactMessage} message ContactMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ContactMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ContactMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.ContactMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.ContactMessage} ContactMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ContactMessage.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.ContactMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.displayName = reader.string(); - break; - case 16: - message.vcard = reader.string(); - break; - case 17: - message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ContactMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.ContactMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ContactMessage} ContactMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ContactMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ContactMessage message. - * @function verify - * @memberof proto.ContactMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ContactMessage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.vcard != null && message.hasOwnProperty("vcard")) - if (!$util.isString(message.vcard)) - return "vcard: string expected"; - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { - var error = $root.proto.ContextInfo.verify(message.contextInfo); - if (error) - return "contextInfo." + error; - } - return null; - }; - - /** - * Creates a ContactMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.ContactMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.ContactMessage} ContactMessage - */ - ContactMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ContactMessage) - return object; - var message = new $root.proto.ContactMessage(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.vcard != null) - message.vcard = String(object.vcard); - if (object.contextInfo != null) { - if (typeof object.contextInfo !== "object") - throw TypeError(".proto.ContactMessage.contextInfo: object expected"); - message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); - } - return message; - }; - - /** - * Creates a plain object from a ContactMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.ContactMessage - * @static - * @param {proto.ContactMessage} message ContactMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ContactMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.vcard = ""; - object.contextInfo = null; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.vcard != null && message.hasOwnProperty("vcard")) - object.vcard = message.vcard; - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) - object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); - return object; - }; - - /** - * Converts this ContactMessage to JSON. - * @function toJSON - * @memberof proto.ContactMessage - * @instance - * @returns {Object.} JSON object - */ - ContactMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ContactMessage; - })(); - - proto.ContactsArrayMessage = (function() { - - /** - * Properties of a ContactsArrayMessage. - * @memberof proto - * @interface IContactsArrayMessage - * @property {string|null} [displayName] ContactsArrayMessage displayName - * @property {Array.|null} [contacts] ContactsArrayMessage contacts - * @property {proto.IContextInfo|null} [contextInfo] ContactsArrayMessage contextInfo - */ - - /** - * Constructs a new ContactsArrayMessage. - * @memberof proto - * @classdesc Represents a ContactsArrayMessage. - * @implements IContactsArrayMessage - * @constructor - * @param {proto.IContactsArrayMessage=} [properties] Properties to set - */ - function ContactsArrayMessage(properties) { - this.contacts = []; - 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]]; - } - - /** - * ContactsArrayMessage displayName. - * @member {string} displayName - * @memberof proto.ContactsArrayMessage - * @instance - */ - ContactsArrayMessage.prototype.displayName = ""; - - /** - * ContactsArrayMessage contacts. - * @member {Array.} contacts - * @memberof proto.ContactsArrayMessage - * @instance - */ - ContactsArrayMessage.prototype.contacts = $util.emptyArray; - - /** - * ContactsArrayMessage contextInfo. - * @member {proto.IContextInfo|null|undefined} contextInfo - * @memberof proto.ContactsArrayMessage - * @instance - */ - ContactsArrayMessage.prototype.contextInfo = null; - - /** - * Creates a new ContactsArrayMessage instance using the specified properties. - * @function create - * @memberof proto.ContactsArrayMessage - * @static - * @param {proto.IContactsArrayMessage=} [properties] Properties to set - * @returns {proto.ContactsArrayMessage} ContactsArrayMessage instance - */ - ContactsArrayMessage.create = function create(properties) { - return new ContactsArrayMessage(properties); - }; - - /** - * Encodes the specified ContactsArrayMessage message. Does not implicitly {@link proto.ContactsArrayMessage.verify|verify} messages. - * @function encode - * @memberof proto.ContactsArrayMessage - * @static - * @param {proto.IContactsArrayMessage} message ContactsArrayMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ContactsArrayMessage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.contacts != null && message.contacts.length) - for (var i = 0; i < message.contacts.length; ++i) - $root.proto.ContactMessage.encode(message.contacts[i], 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 17, wireType 2 =*/138).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ContactsArrayMessage message, length delimited. Does not implicitly {@link proto.ContactsArrayMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.ContactsArrayMessage - * @static - * @param {proto.IContactsArrayMessage} message ContactsArrayMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ContactsArrayMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ContactsArrayMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.ContactsArrayMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.ContactsArrayMessage} ContactsArrayMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ContactsArrayMessage.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.ContactsArrayMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.displayName = reader.string(); - break; - case 2: - if (!(message.contacts && message.contacts.length)) - message.contacts = []; - message.contacts.push($root.proto.ContactMessage.decode(reader, reader.uint32())); - break; - case 17: - message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ContactsArrayMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.ContactsArrayMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ContactsArrayMessage} ContactsArrayMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ContactsArrayMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ContactsArrayMessage message. - * @function verify - * @memberof proto.ContactsArrayMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ContactsArrayMessage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.contacts != null && message.hasOwnProperty("contacts")) { - if (!Array.isArray(message.contacts)) - return "contacts: array expected"; - for (var i = 0; i < message.contacts.length; ++i) { - var error = $root.proto.ContactMessage.verify(message.contacts[i]); + /** + * Verifies a UserAgent message. + * @function verify + * @memberof proto.ClientPayload.UserAgent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserAgent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.platform != null && message.hasOwnProperty("platform")) + switch (message.platform) { + default: + return "platform: 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: + break; + } + if (message.appVersion != null && message.hasOwnProperty("appVersion")) { + var error = $root.proto.ClientPayload.UserAgent.AppVersion.verify(message.appVersion); if (error) - return "contacts." + error; + return "appVersion." + error; } - } - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { - var error = $root.proto.ContextInfo.verify(message.contextInfo); - if (error) - return "contextInfo." + error; - } - return null; - }; + if (message.mcc != null && message.hasOwnProperty("mcc")) + if (!$util.isString(message.mcc)) + return "mcc: string expected"; + if (message.mnc != null && message.hasOwnProperty("mnc")) + if (!$util.isString(message.mnc)) + return "mnc: string expected"; + if (message.osVersion != null && message.hasOwnProperty("osVersion")) + if (!$util.isString(message.osVersion)) + return "osVersion: string expected"; + if (message.manufacturer != null && message.hasOwnProperty("manufacturer")) + if (!$util.isString(message.manufacturer)) + return "manufacturer: string expected"; + if (message.device != null && message.hasOwnProperty("device")) + if (!$util.isString(message.device)) + return "device: string expected"; + if (message.osBuildNumber != null && message.hasOwnProperty("osBuildNumber")) + if (!$util.isString(message.osBuildNumber)) + return "osBuildNumber: string expected"; + if (message.phoneId != null && message.hasOwnProperty("phoneId")) + if (!$util.isString(message.phoneId)) + return "phoneId: string expected"; + if (message.releaseChannel != null && message.hasOwnProperty("releaseChannel")) + switch (message.releaseChannel) { + default: + return "releaseChannel: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.localeLanguageIso6391 != null && message.hasOwnProperty("localeLanguageIso6391")) + if (!$util.isString(message.localeLanguageIso6391)) + return "localeLanguageIso6391: string expected"; + if (message.localeCountryIso31661Alpha2 != null && message.hasOwnProperty("localeCountryIso31661Alpha2")) + if (!$util.isString(message.localeCountryIso31661Alpha2)) + return "localeCountryIso31661Alpha2: string expected"; + if (message.deviceBoard != null && message.hasOwnProperty("deviceBoard")) + if (!$util.isString(message.deviceBoard)) + return "deviceBoard: string expected"; + return null; + }; - /** - * Creates a ContactsArrayMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.ContactsArrayMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.ContactsArrayMessage} ContactsArrayMessage - */ - ContactsArrayMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ContactsArrayMessage) + /** + * Creates a UserAgent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ClientPayload.UserAgent + * @static + * @param {Object.} object Plain object + * @returns {proto.ClientPayload.UserAgent} UserAgent + */ + UserAgent.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ClientPayload.UserAgent) + return object; + var message = new $root.proto.ClientPayload.UserAgent(); + switch (object.platform) { + case "ANDROID": + case 0: + message.platform = 0; + break; + case "IOS": + case 1: + message.platform = 1; + break; + case "WINDOWS_PHONE": + case 2: + message.platform = 2; + break; + case "BLACKBERRY": + case 3: + message.platform = 3; + break; + case "BLACKBERRYX": + case 4: + message.platform = 4; + break; + case "S40": + case 5: + message.platform = 5; + break; + case "S60": + case 6: + message.platform = 6; + break; + case "PYTHON_CLIENT": + case 7: + message.platform = 7; + break; + case "TIZEN": + case 8: + message.platform = 8; + break; + case "ENTERPRISE": + case 9: + message.platform = 9; + break; + case "SMB_ANDROID": + case 10: + message.platform = 10; + break; + case "KAIOS": + case 11: + message.platform = 11; + break; + case "SMB_IOS": + case 12: + message.platform = 12; + break; + case "WINDOWS": + case 13: + message.platform = 13; + break; + case "WEB": + case 14: + message.platform = 14; + break; + case "PORTAL": + case 15: + message.platform = 15; + break; + case "GREEN_ANDROID": + case 16: + message.platform = 16; + break; + case "GREEN_IPHONE": + case 17: + message.platform = 17; + break; + case "BLUE_ANDROID": + case 18: + message.platform = 18; + break; + case "BLUE_IPHONE": + case 19: + message.platform = 19; + break; + case "FBLITE_ANDROID": + case 20: + message.platform = 20; + break; + case "MLITE_ANDROID": + case 21: + message.platform = 21; + break; + case "IGLITE_ANDROID": + case 22: + message.platform = 22; + break; + case "PAGE": + case 23: + message.platform = 23; + break; + case "MACOS": + case 24: + message.platform = 24; + break; + case "OCULUS_MSG": + case 25: + message.platform = 25; + break; + case "OCULUS_CALL": + case 26: + message.platform = 26; + break; + case "MILAN": + case 27: + message.platform = 27; + break; + case "CAPI": + case 28: + message.platform = 28; + break; + } + if (object.appVersion != null) { + if (typeof object.appVersion !== "object") + throw TypeError(".proto.ClientPayload.UserAgent.appVersion: object expected"); + message.appVersion = $root.proto.ClientPayload.UserAgent.AppVersion.fromObject(object.appVersion); + } + if (object.mcc != null) + message.mcc = String(object.mcc); + if (object.mnc != null) + message.mnc = String(object.mnc); + if (object.osVersion != null) + message.osVersion = String(object.osVersion); + if (object.manufacturer != null) + message.manufacturer = String(object.manufacturer); + if (object.device != null) + message.device = String(object.device); + if (object.osBuildNumber != null) + message.osBuildNumber = String(object.osBuildNumber); + if (object.phoneId != null) + message.phoneId = String(object.phoneId); + switch (object.releaseChannel) { + case "RELEASE": + case 0: + message.releaseChannel = 0; + break; + case "BETA": + case 1: + message.releaseChannel = 1; + break; + case "ALPHA": + case 2: + message.releaseChannel = 2; + break; + case "DEBUG": + case 3: + message.releaseChannel = 3; + break; + } + if (object.localeLanguageIso6391 != null) + message.localeLanguageIso6391 = String(object.localeLanguageIso6391); + if (object.localeCountryIso31661Alpha2 != null) + message.localeCountryIso31661Alpha2 = String(object.localeCountryIso31661Alpha2); + if (object.deviceBoard != null) + message.deviceBoard = String(object.deviceBoard); + return message; + }; + + /** + * Creates a plain object from a UserAgent message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ClientPayload.UserAgent + * @static + * @param {proto.ClientPayload.UserAgent} message UserAgent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserAgent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.platform = options.enums === String ? "ANDROID" : 0; + object.appVersion = null; + object.mcc = ""; + object.mnc = ""; + object.osVersion = ""; + object.manufacturer = ""; + object.device = ""; + object.osBuildNumber = ""; + object.phoneId = ""; + object.releaseChannel = options.enums === String ? "RELEASE" : 0; + object.localeLanguageIso6391 = ""; + object.localeCountryIso31661Alpha2 = ""; + object.deviceBoard = ""; + } + if (message.platform != null && message.hasOwnProperty("platform")) + object.platform = options.enums === String ? $root.proto.ClientPayload.UserAgent.Platform[message.platform] : message.platform; + if (message.appVersion != null && message.hasOwnProperty("appVersion")) + object.appVersion = $root.proto.ClientPayload.UserAgent.AppVersion.toObject(message.appVersion, options); + if (message.mcc != null && message.hasOwnProperty("mcc")) + object.mcc = message.mcc; + if (message.mnc != null && message.hasOwnProperty("mnc")) + object.mnc = message.mnc; + if (message.osVersion != null && message.hasOwnProperty("osVersion")) + object.osVersion = message.osVersion; + if (message.manufacturer != null && message.hasOwnProperty("manufacturer")) + object.manufacturer = message.manufacturer; + if (message.device != null && message.hasOwnProperty("device")) + object.device = message.device; + if (message.osBuildNumber != null && message.hasOwnProperty("osBuildNumber")) + object.osBuildNumber = message.osBuildNumber; + if (message.phoneId != null && message.hasOwnProperty("phoneId")) + object.phoneId = message.phoneId; + if (message.releaseChannel != null && message.hasOwnProperty("releaseChannel")) + object.releaseChannel = options.enums === String ? $root.proto.ClientPayload.UserAgent.ReleaseChannel[message.releaseChannel] : message.releaseChannel; + if (message.localeLanguageIso6391 != null && message.hasOwnProperty("localeLanguageIso6391")) + object.localeLanguageIso6391 = message.localeLanguageIso6391; + if (message.localeCountryIso31661Alpha2 != null && message.hasOwnProperty("localeCountryIso31661Alpha2")) + object.localeCountryIso31661Alpha2 = message.localeCountryIso31661Alpha2; + if (message.deviceBoard != null && message.hasOwnProperty("deviceBoard")) + object.deviceBoard = message.deviceBoard; return object; - var message = new $root.proto.ContactsArrayMessage(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.contacts) { - if (!Array.isArray(object.contacts)) - throw TypeError(".proto.ContactsArrayMessage.contacts: array expected"); - message.contacts = []; - for (var i = 0; i < object.contacts.length; ++i) { - if (typeof object.contacts[i] !== "object") - throw TypeError(".proto.ContactsArrayMessage.contacts: object expected"); - message.contacts[i] = $root.proto.ContactMessage.fromObject(object.contacts[i]); + }; + + /** + * Converts this UserAgent to JSON. + * @function toJSON + * @memberof proto.ClientPayload.UserAgent + * @instance + * @returns {Object.} JSON object + */ + UserAgent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + UserAgent.AppVersion = (function() { + + /** + * Properties of an AppVersion. + * @memberof proto.ClientPayload.UserAgent + * @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.ClientPayload.UserAgent + * @classdesc Represents an AppVersion. + * @implements IAppVersion + * @constructor + * @param {proto.ClientPayload.UserAgent.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]]; } - } - if (object.contextInfo != null) { - if (typeof object.contextInfo !== "object") - throw TypeError(".proto.ContactsArrayMessage.contextInfo: object expected"); - message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); - } - return message; - }; - /** - * Creates a plain object from a ContactsArrayMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.ContactsArrayMessage - * @static - * @param {proto.ContactsArrayMessage} message ContactsArrayMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ContactsArrayMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.contacts = []; - if (options.defaults) { - object.displayName = ""; - object.contextInfo = null; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.contacts && message.contacts.length) { - object.contacts = []; - for (var j = 0; j < message.contacts.length; ++j) - object.contacts[j] = $root.proto.ContactMessage.toObject(message.contacts[j], options); - } - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) - object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); - return object; - }; + /** + * AppVersion primary. + * @member {number} primary + * @memberof proto.ClientPayload.UserAgent.AppVersion + * @instance + */ + AppVersion.prototype.primary = 0; - /** - * Converts this ContactsArrayMessage to JSON. - * @function toJSON - * @memberof proto.ContactsArrayMessage - * @instance - * @returns {Object.} JSON object - */ - ContactsArrayMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * AppVersion secondary. + * @member {number} secondary + * @memberof proto.ClientPayload.UserAgent.AppVersion + * @instance + */ + AppVersion.prototype.secondary = 0; - return ContactsArrayMessage; + /** + * AppVersion tertiary. + * @member {number} tertiary + * @memberof proto.ClientPayload.UserAgent.AppVersion + * @instance + */ + AppVersion.prototype.tertiary = 0; + + /** + * AppVersion quaternary. + * @member {number} quaternary + * @memberof proto.ClientPayload.UserAgent.AppVersion + * @instance + */ + AppVersion.prototype.quaternary = 0; + + /** + * AppVersion quinary. + * @member {number} quinary + * @memberof proto.ClientPayload.UserAgent.AppVersion + * @instance + */ + AppVersion.prototype.quinary = 0; + + /** + * Creates a new AppVersion instance using the specified properties. + * @function create + * @memberof proto.ClientPayload.UserAgent.AppVersion + * @static + * @param {proto.ClientPayload.UserAgent.IAppVersion=} [properties] Properties to set + * @returns {proto.ClientPayload.UserAgent.AppVersion} AppVersion instance + */ + AppVersion.create = function create(properties) { + return new AppVersion(properties); + }; + + /** + * Encodes the specified AppVersion message. Does not implicitly {@link proto.ClientPayload.UserAgent.AppVersion.verify|verify} messages. + * @function encode + * @memberof proto.ClientPayload.UserAgent.AppVersion + * @static + * @param {proto.ClientPayload.UserAgent.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.ClientPayload.UserAgent.AppVersion.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ClientPayload.UserAgent.AppVersion + * @static + * @param {proto.ClientPayload.UserAgent.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.ClientPayload.UserAgent.AppVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ClientPayload.UserAgent.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.ClientPayload.UserAgent.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.ClientPayload.UserAgent.AppVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ClientPayload.UserAgent.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.ClientPayload.UserAgent.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.ClientPayload.UserAgent.AppVersion + * @static + * @param {Object.} object Plain object + * @returns {proto.ClientPayload.UserAgent.AppVersion} AppVersion + */ + AppVersion.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ClientPayload.UserAgent.AppVersion) + return object; + var message = new $root.proto.ClientPayload.UserAgent.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.ClientPayload.UserAgent.AppVersion + * @static + * @param {proto.ClientPayload.UserAgent.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.ClientPayload.UserAgent.AppVersion + * @instance + * @returns {Object.} JSON object + */ + AppVersion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AppVersion; + })(); + + /** + * Platform enum. + * @name proto.ClientPayload.UserAgent.Platform + * @enum {number} + * @property {number} ANDROID=0 ANDROID value + * @property {number} IOS=1 IOS value + * @property {number} WINDOWS_PHONE=2 WINDOWS_PHONE value + * @property {number} BLACKBERRY=3 BLACKBERRY value + * @property {number} BLACKBERRYX=4 BLACKBERRYX value + * @property {number} S40=5 S40 value + * @property {number} S60=6 S60 value + * @property {number} PYTHON_CLIENT=7 PYTHON_CLIENT value + * @property {number} TIZEN=8 TIZEN value + * @property {number} ENTERPRISE=9 ENTERPRISE value + * @property {number} SMB_ANDROID=10 SMB_ANDROID value + * @property {number} KAIOS=11 KAIOS value + * @property {number} SMB_IOS=12 SMB_IOS value + * @property {number} WINDOWS=13 WINDOWS value + * @property {number} WEB=14 WEB value + * @property {number} PORTAL=15 PORTAL value + * @property {number} GREEN_ANDROID=16 GREEN_ANDROID value + * @property {number} GREEN_IPHONE=17 GREEN_IPHONE value + * @property {number} BLUE_ANDROID=18 BLUE_ANDROID value + * @property {number} BLUE_IPHONE=19 BLUE_IPHONE value + * @property {number} FBLITE_ANDROID=20 FBLITE_ANDROID value + * @property {number} MLITE_ANDROID=21 MLITE_ANDROID value + * @property {number} IGLITE_ANDROID=22 IGLITE_ANDROID value + * @property {number} PAGE=23 PAGE value + * @property {number} MACOS=24 MACOS value + * @property {number} OCULUS_MSG=25 OCULUS_MSG value + * @property {number} OCULUS_CALL=26 OCULUS_CALL value + * @property {number} MILAN=27 MILAN value + * @property {number} CAPI=28 CAPI value + */ + UserAgent.Platform = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ANDROID"] = 0; + values[valuesById[1] = "IOS"] = 1; + values[valuesById[2] = "WINDOWS_PHONE"] = 2; + values[valuesById[3] = "BLACKBERRY"] = 3; + values[valuesById[4] = "BLACKBERRYX"] = 4; + values[valuesById[5] = "S40"] = 5; + values[valuesById[6] = "S60"] = 6; + values[valuesById[7] = "PYTHON_CLIENT"] = 7; + values[valuesById[8] = "TIZEN"] = 8; + values[valuesById[9] = "ENTERPRISE"] = 9; + values[valuesById[10] = "SMB_ANDROID"] = 10; + values[valuesById[11] = "KAIOS"] = 11; + values[valuesById[12] = "SMB_IOS"] = 12; + values[valuesById[13] = "WINDOWS"] = 13; + values[valuesById[14] = "WEB"] = 14; + values[valuesById[15] = "PORTAL"] = 15; + values[valuesById[16] = "GREEN_ANDROID"] = 16; + values[valuesById[17] = "GREEN_IPHONE"] = 17; + values[valuesById[18] = "BLUE_ANDROID"] = 18; + values[valuesById[19] = "BLUE_IPHONE"] = 19; + values[valuesById[20] = "FBLITE_ANDROID"] = 20; + values[valuesById[21] = "MLITE_ANDROID"] = 21; + values[valuesById[22] = "IGLITE_ANDROID"] = 22; + values[valuesById[23] = "PAGE"] = 23; + values[valuesById[24] = "MACOS"] = 24; + values[valuesById[25] = "OCULUS_MSG"] = 25; + values[valuesById[26] = "OCULUS_CALL"] = 26; + values[valuesById[27] = "MILAN"] = 27; + values[valuesById[28] = "CAPI"] = 28; + return values; + })(); + + /** + * ReleaseChannel enum. + * @name proto.ClientPayload.UserAgent.ReleaseChannel + * @enum {number} + * @property {number} RELEASE=0 RELEASE value + * @property {number} BETA=1 BETA value + * @property {number} ALPHA=2 ALPHA value + * @property {number} DEBUG=3 DEBUG value + */ + UserAgent.ReleaseChannel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RELEASE"] = 0; + values[valuesById[1] = "BETA"] = 1; + values[valuesById[2] = "ALPHA"] = 2; + values[valuesById[3] = "DEBUG"] = 3; + return values; + })(); + + return UserAgent; + })(); + + ClientPayload.WebInfo = (function() { + + /** + * Properties of a WebInfo. + * @memberof proto.ClientPayload + * @interface IWebInfo + * @property {string|null} [refToken] WebInfo refToken + * @property {string|null} [version] WebInfo version + * @property {proto.ClientPayload.WebInfo.IWebdPayload|null} [webdPayload] WebInfo webdPayload + * @property {proto.ClientPayload.WebInfo.WebSubPlatform|null} [webSubPlatform] WebInfo webSubPlatform + */ + + /** + * Constructs a new WebInfo. + * @memberof proto.ClientPayload + * @classdesc Represents a WebInfo. + * @implements IWebInfo + * @constructor + * @param {proto.ClientPayload.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.ClientPayload.WebInfo + * @instance + */ + WebInfo.prototype.refToken = ""; + + /** + * WebInfo version. + * @member {string} version + * @memberof proto.ClientPayload.WebInfo + * @instance + */ + WebInfo.prototype.version = ""; + + /** + * WebInfo webdPayload. + * @member {proto.ClientPayload.WebInfo.IWebdPayload|null|undefined} webdPayload + * @memberof proto.ClientPayload.WebInfo + * @instance + */ + WebInfo.prototype.webdPayload = null; + + /** + * WebInfo webSubPlatform. + * @member {proto.ClientPayload.WebInfo.WebSubPlatform} webSubPlatform + * @memberof proto.ClientPayload.WebInfo + * @instance + */ + WebInfo.prototype.webSubPlatform = 0; + + /** + * Creates a new WebInfo instance using the specified properties. + * @function create + * @memberof proto.ClientPayload.WebInfo + * @static + * @param {proto.ClientPayload.IWebInfo=} [properties] Properties to set + * @returns {proto.ClientPayload.WebInfo} WebInfo instance + */ + WebInfo.create = function create(properties) { + return new WebInfo(properties); + }; + + /** + * Encodes the specified WebInfo message. Does not implicitly {@link proto.ClientPayload.WebInfo.verify|verify} messages. + * @function encode + * @memberof proto.ClientPayload.WebInfo + * @static + * @param {proto.ClientPayload.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.ClientPayload.WebInfo.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.ClientPayload.WebInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ClientPayload.WebInfo + * @static + * @param {proto.ClientPayload.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.ClientPayload.WebInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ClientPayload.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.ClientPayload.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.ClientPayload.WebInfo.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.ClientPayload.WebInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ClientPayload.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.ClientPayload.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.ClientPayload.WebInfo.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.ClientPayload.WebInfo + * @static + * @param {Object.} object Plain object + * @returns {proto.ClientPayload.WebInfo} WebInfo + */ + WebInfo.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ClientPayload.WebInfo) + return object; + var message = new $root.proto.ClientPayload.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.ClientPayload.WebInfo.webdPayload: object expected"); + message.webdPayload = $root.proto.ClientPayload.WebInfo.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.ClientPayload.WebInfo + * @static + * @param {proto.ClientPayload.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.ClientPayload.WebInfo.WebdPayload.toObject(message.webdPayload, options); + if (message.webSubPlatform != null && message.hasOwnProperty("webSubPlatform")) + object.webSubPlatform = options.enums === String ? $root.proto.ClientPayload.WebInfo.WebSubPlatform[message.webSubPlatform] : message.webSubPlatform; + return object; + }; + + /** + * Converts this WebInfo to JSON. + * @function toJSON + * @memberof proto.ClientPayload.WebInfo + * @instance + * @returns {Object.} JSON object + */ + WebInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * WebSubPlatform enum. + * @name proto.ClientPayload.WebInfo.WebSubPlatform + * @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.WebSubPlatform = (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; + })(); + + WebInfo.WebdPayload = (function() { + + /** + * Properties of a WebdPayload. + * @memberof proto.ClientPayload.WebInfo + * @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.ClientPayload.WebInfo + * @classdesc Represents a WebdPayload. + * @implements IWebdPayload + * @constructor + * @param {proto.ClientPayload.WebInfo.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.ClientPayload.WebInfo.WebdPayload + * @instance + */ + WebdPayload.prototype.usesParticipantInKey = false; + + /** + * WebdPayload supportsStarredMessages. + * @member {boolean} supportsStarredMessages + * @memberof proto.ClientPayload.WebInfo.WebdPayload + * @instance + */ + WebdPayload.prototype.supportsStarredMessages = false; + + /** + * WebdPayload supportsDocumentMessages. + * @member {boolean} supportsDocumentMessages + * @memberof proto.ClientPayload.WebInfo.WebdPayload + * @instance + */ + WebdPayload.prototype.supportsDocumentMessages = false; + + /** + * WebdPayload supportsUrlMessages. + * @member {boolean} supportsUrlMessages + * @memberof proto.ClientPayload.WebInfo.WebdPayload + * @instance + */ + WebdPayload.prototype.supportsUrlMessages = false; + + /** + * WebdPayload supportsMediaRetry. + * @member {boolean} supportsMediaRetry + * @memberof proto.ClientPayload.WebInfo.WebdPayload + * @instance + */ + WebdPayload.prototype.supportsMediaRetry = false; + + /** + * WebdPayload supportsE2EImage. + * @member {boolean} supportsE2EImage + * @memberof proto.ClientPayload.WebInfo.WebdPayload + * @instance + */ + WebdPayload.prototype.supportsE2EImage = false; + + /** + * WebdPayload supportsE2EVideo. + * @member {boolean} supportsE2EVideo + * @memberof proto.ClientPayload.WebInfo.WebdPayload + * @instance + */ + WebdPayload.prototype.supportsE2EVideo = false; + + /** + * WebdPayload supportsE2EAudio. + * @member {boolean} supportsE2EAudio + * @memberof proto.ClientPayload.WebInfo.WebdPayload + * @instance + */ + WebdPayload.prototype.supportsE2EAudio = false; + + /** + * WebdPayload supportsE2EDocument. + * @member {boolean} supportsE2EDocument + * @memberof proto.ClientPayload.WebInfo.WebdPayload + * @instance + */ + WebdPayload.prototype.supportsE2EDocument = false; + + /** + * WebdPayload documentTypes. + * @member {string} documentTypes + * @memberof proto.ClientPayload.WebInfo.WebdPayload + * @instance + */ + WebdPayload.prototype.documentTypes = ""; + + /** + * WebdPayload features. + * @member {Uint8Array} features + * @memberof proto.ClientPayload.WebInfo.WebdPayload + * @instance + */ + WebdPayload.prototype.features = $util.newBuffer([]); + + /** + * Creates a new WebdPayload instance using the specified properties. + * @function create + * @memberof proto.ClientPayload.WebInfo.WebdPayload + * @static + * @param {proto.ClientPayload.WebInfo.IWebdPayload=} [properties] Properties to set + * @returns {proto.ClientPayload.WebInfo.WebdPayload} WebdPayload instance + */ + WebdPayload.create = function create(properties) { + return new WebdPayload(properties); + }; + + /** + * Encodes the specified WebdPayload message. Does not implicitly {@link proto.ClientPayload.WebInfo.WebdPayload.verify|verify} messages. + * @function encode + * @memberof proto.ClientPayload.WebInfo.WebdPayload + * @static + * @param {proto.ClientPayload.WebInfo.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.ClientPayload.WebInfo.WebdPayload.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ClientPayload.WebInfo.WebdPayload + * @static + * @param {proto.ClientPayload.WebInfo.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.ClientPayload.WebInfo.WebdPayload + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ClientPayload.WebInfo.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.ClientPayload.WebInfo.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.ClientPayload.WebInfo.WebdPayload + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ClientPayload.WebInfo.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.ClientPayload.WebInfo.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.ClientPayload.WebInfo.WebdPayload + * @static + * @param {Object.} object Plain object + * @returns {proto.ClientPayload.WebInfo.WebdPayload} WebdPayload + */ + WebdPayload.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ClientPayload.WebInfo.WebdPayload) + return object; + var message = new $root.proto.ClientPayload.WebInfo.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.ClientPayload.WebInfo.WebdPayload + * @static + * @param {proto.ClientPayload.WebInfo.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.ClientPayload.WebInfo.WebdPayload + * @instance + * @returns {Object.} JSON object + */ + WebdPayload.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WebdPayload; + })(); + + return WebInfo; + })(); + + return ClientPayload; })(); proto.ContextInfo = (function() { @@ -12540,12 +7520,12 @@ $root.proto = (function() { * @property {number|null} [conversionDelaySeconds] ContextInfo conversionDelaySeconds * @property {number|null} [forwardingScore] ContextInfo forwardingScore * @property {boolean|null} [isForwarded] ContextInfo isForwarded - * @property {proto.IAdReplyInfo|null} [quotedAd] ContextInfo quotedAd + * @property {proto.ContextInfo.IAdReplyInfo|null} [quotedAd] ContextInfo quotedAd * @property {proto.IMessageKey|null} [placeholderKey] ContextInfo placeholderKey * @property {number|null} [expiration] ContextInfo expiration * @property {number|Long|null} [ephemeralSettingTimestamp] ContextInfo ephemeralSettingTimestamp * @property {Uint8Array|null} [ephemeralSharedSecret] ContextInfo ephemeralSharedSecret - * @property {proto.IExternalAdReplyInfo|null} [externalAdReply] ContextInfo externalAdReply + * @property {proto.ContextInfo.IExternalAdReplyInfo|null} [externalAdReply] ContextInfo externalAdReply * @property {string|null} [entryPointConversionSource] ContextInfo entryPointConversionSource * @property {string|null} [entryPointConversionApp] ContextInfo entryPointConversionApp * @property {number|null} [entryPointConversionDelaySeconds] ContextInfo entryPointConversionDelaySeconds @@ -12653,7 +7633,7 @@ $root.proto = (function() { /** * ContextInfo quotedAd. - * @member {proto.IAdReplyInfo|null|undefined} quotedAd + * @member {proto.ContextInfo.IAdReplyInfo|null|undefined} quotedAd * @memberof proto.ContextInfo * @instance */ @@ -12693,7 +7673,7 @@ $root.proto = (function() { /** * ContextInfo externalAdReply. - * @member {proto.IExternalAdReplyInfo|null|undefined} externalAdReply + * @member {proto.ContextInfo.IExternalAdReplyInfo|null|undefined} externalAdReply * @memberof proto.ContextInfo * @instance */ @@ -12801,7 +7781,7 @@ $root.proto = (function() { if (message.isForwarded != null && Object.hasOwnProperty.call(message, "isForwarded")) writer.uint32(/* id 22, wireType 0 =*/176).bool(message.isForwarded); if (message.quotedAd != null && Object.hasOwnProperty.call(message, "quotedAd")) - $root.proto.AdReplyInfo.encode(message.quotedAd, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + $root.proto.ContextInfo.AdReplyInfo.encode(message.quotedAd, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); if (message.placeholderKey != null && Object.hasOwnProperty.call(message, "placeholderKey")) $root.proto.MessageKey.encode(message.placeholderKey, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); if (message.expiration != null && Object.hasOwnProperty.call(message, "expiration")) @@ -12811,7 +7791,7 @@ $root.proto = (function() { if (message.ephemeralSharedSecret != null && Object.hasOwnProperty.call(message, "ephemeralSharedSecret")) writer.uint32(/* id 27, wireType 2 =*/218).bytes(message.ephemeralSharedSecret); if (message.externalAdReply != null && Object.hasOwnProperty.call(message, "externalAdReply")) - $root.proto.ExternalAdReplyInfo.encode(message.externalAdReply, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + $root.proto.ContextInfo.ExternalAdReplyInfo.encode(message.externalAdReply, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); if (message.entryPointConversionSource != null && Object.hasOwnProperty.call(message, "entryPointConversionSource")) writer.uint32(/* id 29, wireType 2 =*/234).string(message.entryPointConversionSource); if (message.entryPointConversionApp != null && Object.hasOwnProperty.call(message, "entryPointConversionApp")) @@ -12893,7 +7873,7 @@ $root.proto = (function() { message.isForwarded = reader.bool(); break; case 23: - message.quotedAd = $root.proto.AdReplyInfo.decode(reader, reader.uint32()); + message.quotedAd = $root.proto.ContextInfo.AdReplyInfo.decode(reader, reader.uint32()); break; case 24: message.placeholderKey = $root.proto.MessageKey.decode(reader, reader.uint32()); @@ -12908,7 +7888,7 @@ $root.proto = (function() { message.ephemeralSharedSecret = reader.bytes(); break; case 28: - message.externalAdReply = $root.proto.ExternalAdReplyInfo.decode(reader, reader.uint32()); + message.externalAdReply = $root.proto.ContextInfo.ExternalAdReplyInfo.decode(reader, reader.uint32()); break; case 29: message.entryPointConversionSource = reader.string(); @@ -13003,7 +7983,7 @@ $root.proto = (function() { if (typeof message.isForwarded !== "boolean") return "isForwarded: boolean expected"; if (message.quotedAd != null && message.hasOwnProperty("quotedAd")) { - var error = $root.proto.AdReplyInfo.verify(message.quotedAd); + var error = $root.proto.ContextInfo.AdReplyInfo.verify(message.quotedAd); if (error) return "quotedAd." + error; } @@ -13022,7 +8002,7 @@ $root.proto = (function() { if (!(message.ephemeralSharedSecret && typeof message.ephemeralSharedSecret.length === "number" || $util.isString(message.ephemeralSharedSecret))) return "ephemeralSharedSecret: buffer expected"; if (message.externalAdReply != null && message.hasOwnProperty("externalAdReply")) { - var error = $root.proto.ExternalAdReplyInfo.verify(message.externalAdReply); + var error = $root.proto.ContextInfo.ExternalAdReplyInfo.verify(message.externalAdReply); if (error) return "externalAdReply." + error; } @@ -13100,7 +8080,7 @@ $root.proto = (function() { if (object.quotedAd != null) { if (typeof object.quotedAd !== "object") throw TypeError(".proto.ContextInfo.quotedAd: object expected"); - message.quotedAd = $root.proto.AdReplyInfo.fromObject(object.quotedAd); + message.quotedAd = $root.proto.ContextInfo.AdReplyInfo.fromObject(object.quotedAd); } if (object.placeholderKey != null) { if (typeof object.placeholderKey !== "object") @@ -13126,7 +8106,7 @@ $root.proto = (function() { if (object.externalAdReply != null) { if (typeof object.externalAdReply !== "object") throw TypeError(".proto.ContextInfo.externalAdReply: object expected"); - message.externalAdReply = $root.proto.ExternalAdReplyInfo.fromObject(object.externalAdReply); + message.externalAdReply = $root.proto.ContextInfo.ExternalAdReplyInfo.fromObject(object.externalAdReply); } if (object.entryPointConversionSource != null) message.entryPointConversionSource = String(object.entryPointConversionSource); @@ -13230,7 +8210,7 @@ $root.proto = (function() { if (message.isForwarded != null && message.hasOwnProperty("isForwarded")) object.isForwarded = message.isForwarded; if (message.quotedAd != null && message.hasOwnProperty("quotedAd")) - object.quotedAd = $root.proto.AdReplyInfo.toObject(message.quotedAd, options); + object.quotedAd = $root.proto.ContextInfo.AdReplyInfo.toObject(message.quotedAd, options); if (message.placeholderKey != null && message.hasOwnProperty("placeholderKey")) object.placeholderKey = $root.proto.MessageKey.toObject(message.placeholderKey, options); if (message.expiration != null && message.hasOwnProperty("expiration")) @@ -13243,7 +8223,7 @@ $root.proto = (function() { if (message.ephemeralSharedSecret != null && message.hasOwnProperty("ephemeralSharedSecret")) object.ephemeralSharedSecret = options.bytes === String ? $util.base64.encode(message.ephemeralSharedSecret, 0, message.ephemeralSharedSecret.length) : options.bytes === Array ? Array.prototype.slice.call(message.ephemeralSharedSecret) : message.ephemeralSharedSecret; if (message.externalAdReply != null && message.hasOwnProperty("externalAdReply")) - object.externalAdReply = $root.proto.ExternalAdReplyInfo.toObject(message.externalAdReply, options); + object.externalAdReply = $root.proto.ContextInfo.ExternalAdReplyInfo.toObject(message.externalAdReply, options); if (message.entryPointConversionSource != null && message.hasOwnProperty("entryPointConversionSource")) object.entryPointConversionSource = message.entryPointConversionSource; if (message.entryPointConversionApp != null && message.hasOwnProperty("entryPointConversionApp")) @@ -13272,6 +8252,776 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + ContextInfo.AdReplyInfo = (function() { + + /** + * Properties of an AdReplyInfo. + * @memberof proto.ContextInfo + * @interface IAdReplyInfo + * @property {string|null} [advertiserName] AdReplyInfo advertiserName + * @property {proto.ContextInfo.AdReplyInfo.MediaType|null} [mediaType] AdReplyInfo mediaType + * @property {Uint8Array|null} [jpegThumbnail] AdReplyInfo jpegThumbnail + * @property {string|null} [caption] AdReplyInfo caption + */ + + /** + * Constructs a new AdReplyInfo. + * @memberof proto.ContextInfo + * @classdesc Represents an AdReplyInfo. + * @implements IAdReplyInfo + * @constructor + * @param {proto.ContextInfo.IAdReplyInfo=} [properties] Properties to set + */ + function AdReplyInfo(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]]; + } + + /** + * AdReplyInfo advertiserName. + * @member {string} advertiserName + * @memberof proto.ContextInfo.AdReplyInfo + * @instance + */ + AdReplyInfo.prototype.advertiserName = ""; + + /** + * AdReplyInfo mediaType. + * @member {proto.ContextInfo.AdReplyInfo.MediaType} mediaType + * @memberof proto.ContextInfo.AdReplyInfo + * @instance + */ + AdReplyInfo.prototype.mediaType = 0; + + /** + * AdReplyInfo jpegThumbnail. + * @member {Uint8Array} jpegThumbnail + * @memberof proto.ContextInfo.AdReplyInfo + * @instance + */ + AdReplyInfo.prototype.jpegThumbnail = $util.newBuffer([]); + + /** + * AdReplyInfo caption. + * @member {string} caption + * @memberof proto.ContextInfo.AdReplyInfo + * @instance + */ + AdReplyInfo.prototype.caption = ""; + + /** + * Creates a new AdReplyInfo instance using the specified properties. + * @function create + * @memberof proto.ContextInfo.AdReplyInfo + * @static + * @param {proto.ContextInfo.IAdReplyInfo=} [properties] Properties to set + * @returns {proto.ContextInfo.AdReplyInfo} AdReplyInfo instance + */ + AdReplyInfo.create = function create(properties) { + return new AdReplyInfo(properties); + }; + + /** + * Encodes the specified AdReplyInfo message. Does not implicitly {@link proto.ContextInfo.AdReplyInfo.verify|verify} messages. + * @function encode + * @memberof proto.ContextInfo.AdReplyInfo + * @static + * @param {proto.ContextInfo.IAdReplyInfo} message AdReplyInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdReplyInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.advertiserName != null && Object.hasOwnProperty.call(message, "advertiserName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.advertiserName); + if (message.mediaType != null && Object.hasOwnProperty.call(message, "mediaType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.mediaType); + if (message.jpegThumbnail != null && Object.hasOwnProperty.call(message, "jpegThumbnail")) + writer.uint32(/* id 16, wireType 2 =*/130).bytes(message.jpegThumbnail); + if (message.caption != null && Object.hasOwnProperty.call(message, "caption")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.caption); + return writer; + }; + + /** + * Encodes the specified AdReplyInfo message, length delimited. Does not implicitly {@link proto.ContextInfo.AdReplyInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ContextInfo.AdReplyInfo + * @static + * @param {proto.ContextInfo.IAdReplyInfo} message AdReplyInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdReplyInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AdReplyInfo message from the specified reader or buffer. + * @function decode + * @memberof proto.ContextInfo.AdReplyInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ContextInfo.AdReplyInfo} AdReplyInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdReplyInfo.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.ContextInfo.AdReplyInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.advertiserName = reader.string(); + break; + case 2: + message.mediaType = reader.int32(); + break; + case 16: + message.jpegThumbnail = reader.bytes(); + break; + case 17: + message.caption = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AdReplyInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ContextInfo.AdReplyInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ContextInfo.AdReplyInfo} AdReplyInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdReplyInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AdReplyInfo message. + * @function verify + * @memberof proto.ContextInfo.AdReplyInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AdReplyInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.advertiserName != null && message.hasOwnProperty("advertiserName")) + if (!$util.isString(message.advertiserName)) + return "advertiserName: string expected"; + if (message.mediaType != null && message.hasOwnProperty("mediaType")) + switch (message.mediaType) { + default: + return "mediaType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + 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.caption != null && message.hasOwnProperty("caption")) + if (!$util.isString(message.caption)) + return "caption: string expected"; + return null; + }; + + /** + * Creates an AdReplyInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ContextInfo.AdReplyInfo + * @static + * @param {Object.} object Plain object + * @returns {proto.ContextInfo.AdReplyInfo} AdReplyInfo + */ + AdReplyInfo.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ContextInfo.AdReplyInfo) + return object; + var message = new $root.proto.ContextInfo.AdReplyInfo(); + if (object.advertiserName != null) + message.advertiserName = String(object.advertiserName); + switch (object.mediaType) { + case "NONE": + case 0: + message.mediaType = 0; + break; + case "IMAGE": + case 1: + message.mediaType = 1; + break; + case "VIDEO": + case 2: + message.mediaType = 2; + break; + } + 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.caption != null) + message.caption = String(object.caption); + return message; + }; + + /** + * Creates a plain object from an AdReplyInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ContextInfo.AdReplyInfo + * @static + * @param {proto.ContextInfo.AdReplyInfo} message AdReplyInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AdReplyInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.advertiserName = ""; + object.mediaType = options.enums === String ? "NONE" : 0; + if (options.bytes === String) + object.jpegThumbnail = ""; + else { + object.jpegThumbnail = []; + if (options.bytes !== Array) + object.jpegThumbnail = $util.newBuffer(object.jpegThumbnail); + } + object.caption = ""; + } + if (message.advertiserName != null && message.hasOwnProperty("advertiserName")) + object.advertiserName = message.advertiserName; + if (message.mediaType != null && message.hasOwnProperty("mediaType")) + object.mediaType = options.enums === String ? $root.proto.ContextInfo.AdReplyInfo.MediaType[message.mediaType] : message.mediaType; + 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.caption != null && message.hasOwnProperty("caption")) + object.caption = message.caption; + return object; + }; + + /** + * Converts this AdReplyInfo to JSON. + * @function toJSON + * @memberof proto.ContextInfo.AdReplyInfo + * @instance + * @returns {Object.} JSON object + */ + AdReplyInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * MediaType enum. + * @name proto.ContextInfo.AdReplyInfo.MediaType + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} IMAGE=1 IMAGE value + * @property {number} VIDEO=2 VIDEO value + */ + AdReplyInfo.MediaType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "IMAGE"] = 1; + values[valuesById[2] = "VIDEO"] = 2; + return values; + })(); + + return AdReplyInfo; + })(); + + ContextInfo.ExternalAdReplyInfo = (function() { + + /** + * Properties of an ExternalAdReplyInfo. + * @memberof proto.ContextInfo + * @interface IExternalAdReplyInfo + * @property {string|null} [title] ExternalAdReplyInfo title + * @property {string|null} [body] ExternalAdReplyInfo body + * @property {proto.ContextInfo.ExternalAdReplyInfo.MediaType|null} [mediaType] ExternalAdReplyInfo mediaType + * @property {string|null} [thumbnailUrl] ExternalAdReplyInfo thumbnailUrl + * @property {string|null} [mediaUrl] ExternalAdReplyInfo mediaUrl + * @property {Uint8Array|null} [thumbnail] ExternalAdReplyInfo thumbnail + * @property {string|null} [sourceType] ExternalAdReplyInfo sourceType + * @property {string|null} [sourceId] ExternalAdReplyInfo sourceId + * @property {string|null} [sourceUrl] ExternalAdReplyInfo sourceUrl + * @property {boolean|null} [containsAutoReply] ExternalAdReplyInfo containsAutoReply + * @property {boolean|null} [renderLargerThumbnail] ExternalAdReplyInfo renderLargerThumbnail + * @property {boolean|null} [showAdAttribution] ExternalAdReplyInfo showAdAttribution + */ + + /** + * Constructs a new ExternalAdReplyInfo. + * @memberof proto.ContextInfo + * @classdesc Represents an ExternalAdReplyInfo. + * @implements IExternalAdReplyInfo + * @constructor + * @param {proto.ContextInfo.IExternalAdReplyInfo=} [properties] Properties to set + */ + function ExternalAdReplyInfo(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]]; + } + + /** + * ExternalAdReplyInfo title. + * @member {string} title + * @memberof proto.ContextInfo.ExternalAdReplyInfo + * @instance + */ + ExternalAdReplyInfo.prototype.title = ""; + + /** + * ExternalAdReplyInfo body. + * @member {string} body + * @memberof proto.ContextInfo.ExternalAdReplyInfo + * @instance + */ + ExternalAdReplyInfo.prototype.body = ""; + + /** + * ExternalAdReplyInfo mediaType. + * @member {proto.ContextInfo.ExternalAdReplyInfo.MediaType} mediaType + * @memberof proto.ContextInfo.ExternalAdReplyInfo + * @instance + */ + ExternalAdReplyInfo.prototype.mediaType = 0; + + /** + * ExternalAdReplyInfo thumbnailUrl. + * @member {string} thumbnailUrl + * @memberof proto.ContextInfo.ExternalAdReplyInfo + * @instance + */ + ExternalAdReplyInfo.prototype.thumbnailUrl = ""; + + /** + * ExternalAdReplyInfo mediaUrl. + * @member {string} mediaUrl + * @memberof proto.ContextInfo.ExternalAdReplyInfo + * @instance + */ + ExternalAdReplyInfo.prototype.mediaUrl = ""; + + /** + * ExternalAdReplyInfo thumbnail. + * @member {Uint8Array} thumbnail + * @memberof proto.ContextInfo.ExternalAdReplyInfo + * @instance + */ + ExternalAdReplyInfo.prototype.thumbnail = $util.newBuffer([]); + + /** + * ExternalAdReplyInfo sourceType. + * @member {string} sourceType + * @memberof proto.ContextInfo.ExternalAdReplyInfo + * @instance + */ + ExternalAdReplyInfo.prototype.sourceType = ""; + + /** + * ExternalAdReplyInfo sourceId. + * @member {string} sourceId + * @memberof proto.ContextInfo.ExternalAdReplyInfo + * @instance + */ + ExternalAdReplyInfo.prototype.sourceId = ""; + + /** + * ExternalAdReplyInfo sourceUrl. + * @member {string} sourceUrl + * @memberof proto.ContextInfo.ExternalAdReplyInfo + * @instance + */ + ExternalAdReplyInfo.prototype.sourceUrl = ""; + + /** + * ExternalAdReplyInfo containsAutoReply. + * @member {boolean} containsAutoReply + * @memberof proto.ContextInfo.ExternalAdReplyInfo + * @instance + */ + ExternalAdReplyInfo.prototype.containsAutoReply = false; + + /** + * ExternalAdReplyInfo renderLargerThumbnail. + * @member {boolean} renderLargerThumbnail + * @memberof proto.ContextInfo.ExternalAdReplyInfo + * @instance + */ + ExternalAdReplyInfo.prototype.renderLargerThumbnail = false; + + /** + * ExternalAdReplyInfo showAdAttribution. + * @member {boolean} showAdAttribution + * @memberof proto.ContextInfo.ExternalAdReplyInfo + * @instance + */ + ExternalAdReplyInfo.prototype.showAdAttribution = false; + + /** + * Creates a new ExternalAdReplyInfo instance using the specified properties. + * @function create + * @memberof proto.ContextInfo.ExternalAdReplyInfo + * @static + * @param {proto.ContextInfo.IExternalAdReplyInfo=} [properties] Properties to set + * @returns {proto.ContextInfo.ExternalAdReplyInfo} ExternalAdReplyInfo instance + */ + ExternalAdReplyInfo.create = function create(properties) { + return new ExternalAdReplyInfo(properties); + }; + + /** + * Encodes the specified ExternalAdReplyInfo message. Does not implicitly {@link proto.ContextInfo.ExternalAdReplyInfo.verify|verify} messages. + * @function encode + * @memberof proto.ContextInfo.ExternalAdReplyInfo + * @static + * @param {proto.ContextInfo.IExternalAdReplyInfo} message ExternalAdReplyInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExternalAdReplyInfo.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.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.body); + if (message.mediaType != null && Object.hasOwnProperty.call(message, "mediaType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.mediaType); + if (message.thumbnailUrl != null && Object.hasOwnProperty.call(message, "thumbnailUrl")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.thumbnailUrl); + if (message.mediaUrl != null && Object.hasOwnProperty.call(message, "mediaUrl")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.mediaUrl); + if (message.thumbnail != null && Object.hasOwnProperty.call(message, "thumbnail")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.thumbnail); + if (message.sourceType != null && Object.hasOwnProperty.call(message, "sourceType")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.sourceType); + if (message.sourceId != null && Object.hasOwnProperty.call(message, "sourceId")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.sourceId); + if (message.sourceUrl != null && Object.hasOwnProperty.call(message, "sourceUrl")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.sourceUrl); + if (message.containsAutoReply != null && Object.hasOwnProperty.call(message, "containsAutoReply")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.containsAutoReply); + if (message.renderLargerThumbnail != null && Object.hasOwnProperty.call(message, "renderLargerThumbnail")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.renderLargerThumbnail); + if (message.showAdAttribution != null && Object.hasOwnProperty.call(message, "showAdAttribution")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.showAdAttribution); + return writer; + }; + + /** + * Encodes the specified ExternalAdReplyInfo message, length delimited. Does not implicitly {@link proto.ContextInfo.ExternalAdReplyInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ContextInfo.ExternalAdReplyInfo + * @static + * @param {proto.ContextInfo.IExternalAdReplyInfo} message ExternalAdReplyInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExternalAdReplyInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExternalAdReplyInfo message from the specified reader or buffer. + * @function decode + * @memberof proto.ContextInfo.ExternalAdReplyInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ContextInfo.ExternalAdReplyInfo} ExternalAdReplyInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExternalAdReplyInfo.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.ContextInfo.ExternalAdReplyInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.body = reader.string(); + break; + case 3: + message.mediaType = reader.int32(); + break; + case 4: + message.thumbnailUrl = reader.string(); + break; + case 5: + message.mediaUrl = reader.string(); + break; + case 6: + message.thumbnail = reader.bytes(); + break; + case 7: + message.sourceType = reader.string(); + break; + case 8: + message.sourceId = reader.string(); + break; + case 9: + message.sourceUrl = reader.string(); + break; + case 10: + message.containsAutoReply = reader.bool(); + break; + case 11: + message.renderLargerThumbnail = reader.bool(); + break; + case 12: + message.showAdAttribution = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExternalAdReplyInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ContextInfo.ExternalAdReplyInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ContextInfo.ExternalAdReplyInfo} ExternalAdReplyInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExternalAdReplyInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExternalAdReplyInfo message. + * @function verify + * @memberof proto.ContextInfo.ExternalAdReplyInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExternalAdReplyInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.mediaType != null && message.hasOwnProperty("mediaType")) + switch (message.mediaType) { + default: + return "mediaType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.thumbnailUrl != null && message.hasOwnProperty("thumbnailUrl")) + if (!$util.isString(message.thumbnailUrl)) + return "thumbnailUrl: string expected"; + if (message.mediaUrl != null && message.hasOwnProperty("mediaUrl")) + if (!$util.isString(message.mediaUrl)) + return "mediaUrl: string expected"; + if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) + if (!(message.thumbnail && typeof message.thumbnail.length === "number" || $util.isString(message.thumbnail))) + return "thumbnail: buffer expected"; + if (message.sourceType != null && message.hasOwnProperty("sourceType")) + if (!$util.isString(message.sourceType)) + return "sourceType: string expected"; + if (message.sourceId != null && message.hasOwnProperty("sourceId")) + if (!$util.isString(message.sourceId)) + return "sourceId: string expected"; + if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) + if (!$util.isString(message.sourceUrl)) + return "sourceUrl: string expected"; + if (message.containsAutoReply != null && message.hasOwnProperty("containsAutoReply")) + if (typeof message.containsAutoReply !== "boolean") + return "containsAutoReply: boolean expected"; + if (message.renderLargerThumbnail != null && message.hasOwnProperty("renderLargerThumbnail")) + if (typeof message.renderLargerThumbnail !== "boolean") + return "renderLargerThumbnail: boolean expected"; + if (message.showAdAttribution != null && message.hasOwnProperty("showAdAttribution")) + if (typeof message.showAdAttribution !== "boolean") + return "showAdAttribution: boolean expected"; + return null; + }; + + /** + * Creates an ExternalAdReplyInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ContextInfo.ExternalAdReplyInfo + * @static + * @param {Object.} object Plain object + * @returns {proto.ContextInfo.ExternalAdReplyInfo} ExternalAdReplyInfo + */ + ExternalAdReplyInfo.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ContextInfo.ExternalAdReplyInfo) + return object; + var message = new $root.proto.ContextInfo.ExternalAdReplyInfo(); + if (object.title != null) + message.title = String(object.title); + if (object.body != null) + message.body = String(object.body); + switch (object.mediaType) { + case "NONE": + case 0: + message.mediaType = 0; + break; + case "IMAGE": + case 1: + message.mediaType = 1; + break; + case "VIDEO": + case 2: + message.mediaType = 2; + break; + } + if (object.thumbnailUrl != null) + message.thumbnailUrl = String(object.thumbnailUrl); + if (object.mediaUrl != null) + message.mediaUrl = String(object.mediaUrl); + if (object.thumbnail != null) + if (typeof object.thumbnail === "string") + $util.base64.decode(object.thumbnail, message.thumbnail = $util.newBuffer($util.base64.length(object.thumbnail)), 0); + else if (object.thumbnail.length) + message.thumbnail = object.thumbnail; + if (object.sourceType != null) + message.sourceType = String(object.sourceType); + if (object.sourceId != null) + message.sourceId = String(object.sourceId); + if (object.sourceUrl != null) + message.sourceUrl = String(object.sourceUrl); + if (object.containsAutoReply != null) + message.containsAutoReply = Boolean(object.containsAutoReply); + if (object.renderLargerThumbnail != null) + message.renderLargerThumbnail = Boolean(object.renderLargerThumbnail); + if (object.showAdAttribution != null) + message.showAdAttribution = Boolean(object.showAdAttribution); + return message; + }; + + /** + * Creates a plain object from an ExternalAdReplyInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ContextInfo.ExternalAdReplyInfo + * @static + * @param {proto.ContextInfo.ExternalAdReplyInfo} message ExternalAdReplyInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExternalAdReplyInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.title = ""; + object.body = ""; + object.mediaType = options.enums === String ? "NONE" : 0; + object.thumbnailUrl = ""; + object.mediaUrl = ""; + if (options.bytes === String) + object.thumbnail = ""; + else { + object.thumbnail = []; + if (options.bytes !== Array) + object.thumbnail = $util.newBuffer(object.thumbnail); + } + object.sourceType = ""; + object.sourceId = ""; + object.sourceUrl = ""; + object.containsAutoReply = false; + object.renderLargerThumbnail = false; + object.showAdAttribution = false; + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.mediaType != null && message.hasOwnProperty("mediaType")) + object.mediaType = options.enums === String ? $root.proto.ContextInfo.ExternalAdReplyInfo.MediaType[message.mediaType] : message.mediaType; + if (message.thumbnailUrl != null && message.hasOwnProperty("thumbnailUrl")) + object.thumbnailUrl = message.thumbnailUrl; + if (message.mediaUrl != null && message.hasOwnProperty("mediaUrl")) + object.mediaUrl = message.mediaUrl; + if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) + object.thumbnail = options.bytes === String ? $util.base64.encode(message.thumbnail, 0, message.thumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.thumbnail) : message.thumbnail; + if (message.sourceType != null && message.hasOwnProperty("sourceType")) + object.sourceType = message.sourceType; + if (message.sourceId != null && message.hasOwnProperty("sourceId")) + object.sourceId = message.sourceId; + if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) + object.sourceUrl = message.sourceUrl; + if (message.containsAutoReply != null && message.hasOwnProperty("containsAutoReply")) + object.containsAutoReply = message.containsAutoReply; + if (message.renderLargerThumbnail != null && message.hasOwnProperty("renderLargerThumbnail")) + object.renderLargerThumbnail = message.renderLargerThumbnail; + if (message.showAdAttribution != null && message.hasOwnProperty("showAdAttribution")) + object.showAdAttribution = message.showAdAttribution; + return object; + }; + + /** + * Converts this ExternalAdReplyInfo to JSON. + * @function toJSON + * @memberof proto.ContextInfo.ExternalAdReplyInfo + * @instance + * @returns {Object.} JSON object + */ + ExternalAdReplyInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * MediaType enum. + * @name proto.ContextInfo.ExternalAdReplyInfo.MediaType + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} IMAGE=1 IMAGE value + * @property {number} VIDEO=2 VIDEO value + */ + ExternalAdReplyInfo.MediaType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "IMAGE"] = 1; + values[valuesById[2] = "VIDEO"] = 2; + return values; + })(); + + return ExternalAdReplyInfo; + })(); + return ContextInfo; })(); @@ -13291,7 +9041,7 @@ $root.proto = (function() { * @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 {proto.Conversation.EndOfHistoryTransferType|null} [endOfHistoryTransferType] Conversation endOfHistoryTransferType * @property {number|Long|null} [conversationTimestamp] Conversation conversationTimestamp * @property {string|null} [name] Conversation name * @property {string|null} [pHash] Conversation pHash @@ -13320,7 +9070,7 @@ $root.proto = (function() { * @property {string|null} [parentGroupId] Conversation parentGroupId * @property {string|null} [displayName] Conversation displayName * @property {string|null} [pnJid] Conversation pnJid - * @property {boolean|null} [selfMasked] Conversation selfMasked + * @property {boolean|null} [selfPnExposed] Conversation selfPnExposed */ /** @@ -13422,7 +9172,7 @@ $root.proto = (function() { /** * Conversation endOfHistoryTransferType. - * @member {proto.Conversation.ConversationEndOfHistoryTransferType} endOfHistoryTransferType + * @member {proto.Conversation.EndOfHistoryTransferType} endOfHistoryTransferType * @memberof proto.Conversation * @instance */ @@ -13653,12 +9403,12 @@ $root.proto = (function() { Conversation.prototype.pnJid = ""; /** - * Conversation selfMasked. - * @member {boolean} selfMasked + * Conversation selfPnExposed. + * @member {boolean} selfPnExposed * @memberof proto.Conversation * @instance */ - Conversation.prototype.selfMasked = false; + Conversation.prototype.selfPnExposed = false; /** * Creates a new Conversation instance using the specified properties. @@ -13763,8 +9513,8 @@ $root.proto = (function() { 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); + if (message.selfPnExposed != null && Object.hasOwnProperty.call(message, "selfPnExposed")) + writer.uint32(/* id 40, wireType 0 =*/320).bool(message.selfPnExposed); return writer; }; @@ -13921,7 +9671,7 @@ $root.proto = (function() { message.pnJid = reader.string(); break; case 40: - message.selfMasked = reader.bool(); + message.selfPnExposed = reader.bool(); break; default: reader.skipType(tag & 7); @@ -14103,9 +9853,9 @@ $root.proto = (function() { 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"; + if (message.selfPnExposed != null && message.hasOwnProperty("selfPnExposed")) + if (typeof message.selfPnExposed !== "boolean") + return "selfPnExposed: boolean expected"; return null; }; @@ -14296,8 +10046,8 @@ $root.proto = (function() { message.displayName = String(object.displayName); if (object.pnJid != null) message.pnJid = String(object.pnJid); - if (object.selfMasked != null) - message.selfMasked = Boolean(object.selfMasked); + if (object.selfPnExposed != null) + message.selfPnExposed = Boolean(object.selfPnExposed); return message; }; @@ -14396,7 +10146,7 @@ $root.proto = (function() { object.parentGroupId = ""; object.displayName = ""; object.pnJid = ""; - object.selfMasked = false; + object.selfPnExposed = false; } if (message.id != null && message.hasOwnProperty("id")) object.id = message.id; @@ -14428,7 +10178,7 @@ $root.proto = (function() { 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; + object.endOfHistoryTransferType = options.enums === String ? $root.proto.Conversation.EndOfHistoryTransferType[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; @@ -14503,8 +10253,8 @@ $root.proto = (function() { 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; + if (message.selfPnExposed != null && message.hasOwnProperty("selfPnExposed")) + object.selfPnExposed = message.selfPnExposed; return object; }; @@ -14520,13 +10270,13 @@ $root.proto = (function() { }; /** - * ConversationEndOfHistoryTransferType enum. - * @name proto.Conversation.ConversationEndOfHistoryTransferType + * EndOfHistoryTransferType enum. + * @name proto.Conversation.EndOfHistoryTransferType * @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() { + Conversation.EndOfHistoryTransferType = (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; @@ -14536,872 +10286,6 @@ $root.proto = (function() { 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() { - - /** - * Properties of a DeclinePaymentRequestMessage. - * @memberof proto - * @interface IDeclinePaymentRequestMessage - * @property {proto.IMessageKey|null} [key] DeclinePaymentRequestMessage key - */ - - /** - * Constructs a new DeclinePaymentRequestMessage. - * @memberof proto - * @classdesc Represents a DeclinePaymentRequestMessage. - * @implements IDeclinePaymentRequestMessage - * @constructor - * @param {proto.IDeclinePaymentRequestMessage=} [properties] Properties to set - */ - function DeclinePaymentRequestMessage(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]]; - } - - /** - * DeclinePaymentRequestMessage key. - * @member {proto.IMessageKey|null|undefined} key - * @memberof proto.DeclinePaymentRequestMessage - * @instance - */ - DeclinePaymentRequestMessage.prototype.key = null; - - /** - * Creates a new DeclinePaymentRequestMessage instance using the specified properties. - * @function create - * @memberof proto.DeclinePaymentRequestMessage - * @static - * @param {proto.IDeclinePaymentRequestMessage=} [properties] Properties to set - * @returns {proto.DeclinePaymentRequestMessage} DeclinePaymentRequestMessage instance - */ - DeclinePaymentRequestMessage.create = function create(properties) { - return new DeclinePaymentRequestMessage(properties); - }; - - /** - * Encodes the specified DeclinePaymentRequestMessage message. Does not implicitly {@link proto.DeclinePaymentRequestMessage.verify|verify} messages. - * @function encode - * @memberof proto.DeclinePaymentRequestMessage - * @static - * @param {proto.IDeclinePaymentRequestMessage} message DeclinePaymentRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeclinePaymentRequestMessage.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(); - return writer; - }; - - /** - * Encodes the specified DeclinePaymentRequestMessage message, length delimited. Does not implicitly {@link proto.DeclinePaymentRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.DeclinePaymentRequestMessage - * @static - * @param {proto.IDeclinePaymentRequestMessage} message DeclinePaymentRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeclinePaymentRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeclinePaymentRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.DeclinePaymentRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.DeclinePaymentRequestMessage} DeclinePaymentRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeclinePaymentRequestMessage.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.DeclinePaymentRequestMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = $root.proto.MessageKey.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeclinePaymentRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.DeclinePaymentRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.DeclinePaymentRequestMessage} DeclinePaymentRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeclinePaymentRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeclinePaymentRequestMessage message. - * @function verify - * @memberof proto.DeclinePaymentRequestMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeclinePaymentRequestMessage.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; - } - return null; - }; - - /** - * Creates a DeclinePaymentRequestMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.DeclinePaymentRequestMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.DeclinePaymentRequestMessage} DeclinePaymentRequestMessage - */ - DeclinePaymentRequestMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.DeclinePaymentRequestMessage) - return object; - var message = new $root.proto.DeclinePaymentRequestMessage(); - if (object.key != null) { - if (typeof object.key !== "object") - throw TypeError(".proto.DeclinePaymentRequestMessage.key: object expected"); - message.key = $root.proto.MessageKey.fromObject(object.key); - } - return message; - }; - - /** - * Creates a plain object from a DeclinePaymentRequestMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.DeclinePaymentRequestMessage - * @static - * @param {proto.DeclinePaymentRequestMessage} message DeclinePaymentRequestMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeclinePaymentRequestMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.key = null; - if (message.key != null && message.hasOwnProperty("key")) - object.key = $root.proto.MessageKey.toObject(message.key, options); - return object; - }; - - /** - * Converts this DeclinePaymentRequestMessage to JSON. - * @function toJSON - * @memberof proto.DeclinePaymentRequestMessage - * @instance - * @returns {Object.} JSON object - */ - DeclinePaymentRequestMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - 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() { /** @@ -15796,420 +10680,6 @@ $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() { /** @@ -16217,8 +10687,8 @@ $root.proto = (function() { * @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 {proto.DeviceProps.IAppVersion|null} [version] DeviceProps version + * @property {proto.DeviceProps.PlatformType|null} [platformType] DeviceProps platformType * @property {boolean|null} [requireFullSync] DeviceProps requireFullSync */ @@ -16247,7 +10717,7 @@ $root.proto = (function() { /** * DeviceProps version. - * @member {proto.IAppVersion|null|undefined} version + * @member {proto.DeviceProps.IAppVersion|null|undefined} version * @memberof proto.DeviceProps * @instance */ @@ -16255,7 +10725,7 @@ $root.proto = (function() { /** * DeviceProps platformType. - * @member {proto.DeviceProps.DevicePropsPlatformType} platformType + * @member {proto.DeviceProps.PlatformType} platformType * @memberof proto.DeviceProps * @instance */ @@ -16296,7 +10766,7 @@ $root.proto = (function() { 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(); + $root.proto.DeviceProps.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")) @@ -16339,7 +10809,7 @@ $root.proto = (function() { message.os = reader.string(); break; case 2: - message.version = $root.proto.AppVersion.decode(reader, reader.uint32()); + message.version = $root.proto.DeviceProps.AppVersion.decode(reader, reader.uint32()); break; case 3: message.platformType = reader.int32(); @@ -16386,7 +10856,7 @@ $root.proto = (function() { if (!$util.isString(message.os)) return "os: string expected"; if (message.version != null && message.hasOwnProperty("version")) { - var error = $root.proto.AppVersion.verify(message.version); + var error = $root.proto.DeviceProps.AppVersion.verify(message.version); if (error) return "version." + error; } @@ -16433,7 +10903,7 @@ $root.proto = (function() { if (object.version != null) { if (typeof object.version !== "object") throw TypeError(".proto.DeviceProps.version: object expected"); - message.version = $root.proto.AppVersion.fromObject(object.version); + message.version = $root.proto.DeviceProps.AppVersion.fromObject(object.version); } switch (object.platformType) { case "UNKNOWN": @@ -16520,9 +10990,9 @@ $root.proto = (function() { 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); + object.version = $root.proto.DeviceProps.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; + object.platformType = options.enums === String ? $root.proto.DeviceProps.PlatformType[message.platformType] : message.platformType; if (message.requireFullSync != null && message.hasOwnProperty("requireFullSync")) object.requireFullSync = message.requireFullSync; return object; @@ -16539,9 +11009,285 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + DeviceProps.AppVersion = (function() { + + /** + * Properties of an AppVersion. + * @memberof proto.DeviceProps + * @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.DeviceProps + * @classdesc Represents an AppVersion. + * @implements IAppVersion + * @constructor + * @param {proto.DeviceProps.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.DeviceProps.AppVersion + * @instance + */ + AppVersion.prototype.primary = 0; + + /** + * AppVersion secondary. + * @member {number} secondary + * @memberof proto.DeviceProps.AppVersion + * @instance + */ + AppVersion.prototype.secondary = 0; + + /** + * AppVersion tertiary. + * @member {number} tertiary + * @memberof proto.DeviceProps.AppVersion + * @instance + */ + AppVersion.prototype.tertiary = 0; + + /** + * AppVersion quaternary. + * @member {number} quaternary + * @memberof proto.DeviceProps.AppVersion + * @instance + */ + AppVersion.prototype.quaternary = 0; + + /** + * AppVersion quinary. + * @member {number} quinary + * @memberof proto.DeviceProps.AppVersion + * @instance + */ + AppVersion.prototype.quinary = 0; + + /** + * Creates a new AppVersion instance using the specified properties. + * @function create + * @memberof proto.DeviceProps.AppVersion + * @static + * @param {proto.DeviceProps.IAppVersion=} [properties] Properties to set + * @returns {proto.DeviceProps.AppVersion} AppVersion instance + */ + AppVersion.create = function create(properties) { + return new AppVersion(properties); + }; + + /** + * Encodes the specified AppVersion message. Does not implicitly {@link proto.DeviceProps.AppVersion.verify|verify} messages. + * @function encode + * @memberof proto.DeviceProps.AppVersion + * @static + * @param {proto.DeviceProps.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.DeviceProps.AppVersion.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.DeviceProps.AppVersion + * @static + * @param {proto.DeviceProps.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.DeviceProps.AppVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.DeviceProps.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.DeviceProps.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.DeviceProps.AppVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.DeviceProps.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.DeviceProps.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.DeviceProps.AppVersion + * @static + * @param {Object.} object Plain object + * @returns {proto.DeviceProps.AppVersion} AppVersion + */ + AppVersion.fromObject = function fromObject(object) { + if (object instanceof $root.proto.DeviceProps.AppVersion) + return object; + var message = new $root.proto.DeviceProps.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.DeviceProps.AppVersion + * @static + * @param {proto.DeviceProps.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.DeviceProps.AppVersion + * @instance + * @returns {Object.} JSON object + */ + AppVersion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AppVersion; + })(); + /** - * DevicePropsPlatformType enum. - * @name proto.DeviceProps.DevicePropsPlatformType + * PlatformType enum. + * @name proto.DeviceProps.PlatformType * @enum {number} * @property {number} UNKNOWN=0 UNKNOWN value * @property {number} CHROME=1 CHROME value @@ -16558,7 +11304,7 @@ $root.proto = (function() { * @property {number} CATALINA=12 CATALINA value * @property {number} TCL_TV=13 TCL_TV value */ - DeviceProps.DevicePropsPlatformType = (function() { + DeviceProps.PlatformType = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "UNKNOWN"] = 0; values[valuesById[1] = "CHROME"] = 1; @@ -16580,250 +11326,13 @@ $root.proto = (function() { return DeviceProps; })(); - proto.DeviceSentMessage = (function() { - - /** - * Properties of a DeviceSentMessage. - * @memberof proto - * @interface IDeviceSentMessage - * @property {string|null} [destinationJid] DeviceSentMessage destinationJid - * @property {proto.IMessage|null} [message] DeviceSentMessage message - * @property {string|null} [phash] DeviceSentMessage phash - */ - - /** - * Constructs a new DeviceSentMessage. - * @memberof proto - * @classdesc Represents a DeviceSentMessage. - * @implements IDeviceSentMessage - * @constructor - * @param {proto.IDeviceSentMessage=} [properties] Properties to set - */ - function DeviceSentMessage(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]]; - } - - /** - * DeviceSentMessage destinationJid. - * @member {string} destinationJid - * @memberof proto.DeviceSentMessage - * @instance - */ - DeviceSentMessage.prototype.destinationJid = ""; - - /** - * DeviceSentMessage message. - * @member {proto.IMessage|null|undefined} message - * @memberof proto.DeviceSentMessage - * @instance - */ - DeviceSentMessage.prototype.message = null; - - /** - * DeviceSentMessage phash. - * @member {string} phash - * @memberof proto.DeviceSentMessage - * @instance - */ - DeviceSentMessage.prototype.phash = ""; - - /** - * Creates a new DeviceSentMessage instance using the specified properties. - * @function create - * @memberof proto.DeviceSentMessage - * @static - * @param {proto.IDeviceSentMessage=} [properties] Properties to set - * @returns {proto.DeviceSentMessage} DeviceSentMessage instance - */ - DeviceSentMessage.create = function create(properties) { - return new DeviceSentMessage(properties); - }; - - /** - * Encodes the specified DeviceSentMessage message. Does not implicitly {@link proto.DeviceSentMessage.verify|verify} messages. - * @function encode - * @memberof proto.DeviceSentMessage - * @static - * @param {proto.IDeviceSentMessage} message DeviceSentMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeviceSentMessage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.destinationJid != null && Object.hasOwnProperty.call(message, "destinationJid")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.destinationJid); - 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.phash != null && Object.hasOwnProperty.call(message, "phash")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.phash); - return writer; - }; - - /** - * Encodes the specified DeviceSentMessage message, length delimited. Does not implicitly {@link proto.DeviceSentMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.DeviceSentMessage - * @static - * @param {proto.IDeviceSentMessage} message DeviceSentMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeviceSentMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeviceSentMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.DeviceSentMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.DeviceSentMessage} DeviceSentMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeviceSentMessage.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.DeviceSentMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.destinationJid = reader.string(); - break; - case 2: - message.message = $root.proto.Message.decode(reader, reader.uint32()); - break; - case 3: - message.phash = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeviceSentMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.DeviceSentMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.DeviceSentMessage} DeviceSentMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeviceSentMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeviceSentMessage message. - * @function verify - * @memberof proto.DeviceSentMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeviceSentMessage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.destinationJid != null && message.hasOwnProperty("destinationJid")) - if (!$util.isString(message.destinationJid)) - return "destinationJid: string expected"; - if (message.message != null && message.hasOwnProperty("message")) { - var error = $root.proto.Message.verify(message.message); - if (error) - return "message." + error; - } - if (message.phash != null && message.hasOwnProperty("phash")) - if (!$util.isString(message.phash)) - return "phash: string expected"; - return null; - }; - - /** - * Creates a DeviceSentMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.DeviceSentMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.DeviceSentMessage} DeviceSentMessage - */ - DeviceSentMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.DeviceSentMessage) - return object; - var message = new $root.proto.DeviceSentMessage(); - if (object.destinationJid != null) - message.destinationJid = String(object.destinationJid); - if (object.message != null) { - if (typeof object.message !== "object") - throw TypeError(".proto.DeviceSentMessage.message: object expected"); - message.message = $root.proto.Message.fromObject(object.message); - } - if (object.phash != null) - message.phash = String(object.phash); - return message; - }; - - /** - * Creates a plain object from a DeviceSentMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.DeviceSentMessage - * @static - * @param {proto.DeviceSentMessage} message DeviceSentMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeviceSentMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.destinationJid = ""; - object.message = null; - object.phash = ""; - } - if (message.destinationJid != null && message.hasOwnProperty("destinationJid")) - object.destinationJid = message.destinationJid; - if (message.message != null && message.hasOwnProperty("message")) - object.message = $root.proto.Message.toObject(message.message, options); - if (message.phash != null && message.hasOwnProperty("phash")) - object.phash = message.phash; - return object; - }; - - /** - * Converts this DeviceSentMessage to JSON. - * @function toJSON - * @memberof proto.DeviceSentMessage - * @instance - * @returns {Object.} JSON object - */ - DeviceSentMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DeviceSentMessage; - })(); - proto.DisappearingMode = (function() { /** * Properties of a DisappearingMode. * @memberof proto * @interface IDisappearingMode - * @property {proto.DisappearingMode.DisappearingModeInitiator|null} [initiator] DisappearingMode initiator + * @property {proto.DisappearingMode.Initiator|null} [initiator] DisappearingMode initiator */ /** @@ -16843,7 +11352,7 @@ $root.proto = (function() { /** * DisappearingMode initiator. - * @member {proto.DisappearingMode.DisappearingModeInitiator} initiator + * @member {proto.DisappearingMode.Initiator} initiator * @memberof proto.DisappearingMode * @instance */ @@ -17004,7 +11513,7 @@ $root.proto = (function() { if (options.defaults) object.initiator = options.enums === String ? "CHANGED_IN_CHAT" : 0; if (message.initiator != null && message.hasOwnProperty("initiator")) - object.initiator = options.enums === String ? $root.proto.DisappearingMode.DisappearingModeInitiator[message.initiator] : message.initiator; + object.initiator = options.enums === String ? $root.proto.DisappearingMode.Initiator[message.initiator] : message.initiator; return object; }; @@ -17020,14 +11529,14 @@ $root.proto = (function() { }; /** - * DisappearingModeInitiator enum. - * @name proto.DisappearingMode.DisappearingModeInitiator + * Initiator enum. + * @name proto.DisappearingMode.Initiator * @enum {number} * @property {number} CHANGED_IN_CHAT=0 CHANGED_IN_CHAT value * @property {number} INITIATED_BY_ME=1 INITIATED_BY_ME value * @property {number} INITIATED_BY_OTHER=2 INITIATED_BY_OTHER value */ - DisappearingMode.DisappearingModeInitiator = (function() { + DisappearingMode.Initiator = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "CHANGED_IN_CHAT"] = 0; values[valuesById[1] = "INITIATED_BY_ME"] = 1; @@ -17038,699 +11547,6 @@ $root.proto = (function() { return DisappearingMode; })(); - proto.DocumentMessage = (function() { - - /** - * Properties of a DocumentMessage. - * @memberof proto - * @interface IDocumentMessage - * @property {string|null} [url] DocumentMessage url - * @property {string|null} [mimetype] DocumentMessage mimetype - * @property {string|null} [title] DocumentMessage title - * @property {Uint8Array|null} [fileSha256] DocumentMessage fileSha256 - * @property {number|Long|null} [fileLength] DocumentMessage fileLength - * @property {number|null} [pageCount] DocumentMessage pageCount - * @property {Uint8Array|null} [mediaKey] DocumentMessage mediaKey - * @property {string|null} [fileName] DocumentMessage fileName - * @property {Uint8Array|null} [fileEncSha256] DocumentMessage fileEncSha256 - * @property {string|null} [directPath] DocumentMessage directPath - * @property {number|Long|null} [mediaKeyTimestamp] DocumentMessage mediaKeyTimestamp - * @property {boolean|null} [contactVcard] DocumentMessage contactVcard - * @property {string|null} [thumbnailDirectPath] DocumentMessage thumbnailDirectPath - * @property {Uint8Array|null} [thumbnailSha256] DocumentMessage thumbnailSha256 - * @property {Uint8Array|null} [thumbnailEncSha256] DocumentMessage thumbnailEncSha256 - * @property {Uint8Array|null} [jpegThumbnail] DocumentMessage jpegThumbnail - * @property {proto.IContextInfo|null} [contextInfo] DocumentMessage contextInfo - * @property {number|null} [thumbnailHeight] DocumentMessage thumbnailHeight - * @property {number|null} [thumbnailWidth] DocumentMessage thumbnailWidth - * @property {string|null} [caption] DocumentMessage caption - */ - - /** - * Constructs a new DocumentMessage. - * @memberof proto - * @classdesc Represents a DocumentMessage. - * @implements IDocumentMessage - * @constructor - * @param {proto.IDocumentMessage=} [properties] Properties to set - */ - function DocumentMessage(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]]; - } - - /** - * DocumentMessage url. - * @member {string} url - * @memberof proto.DocumentMessage - * @instance - */ - DocumentMessage.prototype.url = ""; - - /** - * DocumentMessage mimetype. - * @member {string} mimetype - * @memberof proto.DocumentMessage - * @instance - */ - DocumentMessage.prototype.mimetype = ""; - - /** - * DocumentMessage title. - * @member {string} title - * @memberof proto.DocumentMessage - * @instance - */ - DocumentMessage.prototype.title = ""; - - /** - * DocumentMessage fileSha256. - * @member {Uint8Array} fileSha256 - * @memberof proto.DocumentMessage - * @instance - */ - DocumentMessage.prototype.fileSha256 = $util.newBuffer([]); - - /** - * DocumentMessage fileLength. - * @member {number|Long} fileLength - * @memberof proto.DocumentMessage - * @instance - */ - DocumentMessage.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * DocumentMessage pageCount. - * @member {number} pageCount - * @memberof proto.DocumentMessage - * @instance - */ - DocumentMessage.prototype.pageCount = 0; - - /** - * DocumentMessage mediaKey. - * @member {Uint8Array} mediaKey - * @memberof proto.DocumentMessage - * @instance - */ - DocumentMessage.prototype.mediaKey = $util.newBuffer([]); - - /** - * DocumentMessage fileName. - * @member {string} fileName - * @memberof proto.DocumentMessage - * @instance - */ - DocumentMessage.prototype.fileName = ""; - - /** - * DocumentMessage fileEncSha256. - * @member {Uint8Array} fileEncSha256 - * @memberof proto.DocumentMessage - * @instance - */ - DocumentMessage.prototype.fileEncSha256 = $util.newBuffer([]); - - /** - * DocumentMessage directPath. - * @member {string} directPath - * @memberof proto.DocumentMessage - * @instance - */ - DocumentMessage.prototype.directPath = ""; - - /** - * DocumentMessage mediaKeyTimestamp. - * @member {number|Long} mediaKeyTimestamp - * @memberof proto.DocumentMessage - * @instance - */ - DocumentMessage.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * DocumentMessage contactVcard. - * @member {boolean} contactVcard - * @memberof proto.DocumentMessage - * @instance - */ - DocumentMessage.prototype.contactVcard = false; - - /** - * DocumentMessage thumbnailDirectPath. - * @member {string} thumbnailDirectPath - * @memberof proto.DocumentMessage - * @instance - */ - DocumentMessage.prototype.thumbnailDirectPath = ""; - - /** - * DocumentMessage thumbnailSha256. - * @member {Uint8Array} thumbnailSha256 - * @memberof proto.DocumentMessage - * @instance - */ - DocumentMessage.prototype.thumbnailSha256 = $util.newBuffer([]); - - /** - * DocumentMessage thumbnailEncSha256. - * @member {Uint8Array} thumbnailEncSha256 - * @memberof proto.DocumentMessage - * @instance - */ - DocumentMessage.prototype.thumbnailEncSha256 = $util.newBuffer([]); - - /** - * DocumentMessage jpegThumbnail. - * @member {Uint8Array} jpegThumbnail - * @memberof proto.DocumentMessage - * @instance - */ - DocumentMessage.prototype.jpegThumbnail = $util.newBuffer([]); - - /** - * DocumentMessage contextInfo. - * @member {proto.IContextInfo|null|undefined} contextInfo - * @memberof proto.DocumentMessage - * @instance - */ - DocumentMessage.prototype.contextInfo = null; - - /** - * DocumentMessage thumbnailHeight. - * @member {number} thumbnailHeight - * @memberof proto.DocumentMessage - * @instance - */ - DocumentMessage.prototype.thumbnailHeight = 0; - - /** - * DocumentMessage thumbnailWidth. - * @member {number} thumbnailWidth - * @memberof proto.DocumentMessage - * @instance - */ - DocumentMessage.prototype.thumbnailWidth = 0; - - /** - * DocumentMessage caption. - * @member {string} caption - * @memberof proto.DocumentMessage - * @instance - */ - DocumentMessage.prototype.caption = ""; - - /** - * Creates a new DocumentMessage instance using the specified properties. - * @function create - * @memberof proto.DocumentMessage - * @static - * @param {proto.IDocumentMessage=} [properties] Properties to set - * @returns {proto.DocumentMessage} DocumentMessage instance - */ - DocumentMessage.create = function create(properties) { - return new DocumentMessage(properties); - }; - - /** - * Encodes the specified DocumentMessage message. Does not implicitly {@link proto.DocumentMessage.verify|verify} messages. - * @function encode - * @memberof proto.DocumentMessage - * @static - * @param {proto.IDocumentMessage} message DocumentMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DocumentMessage.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.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.title); - if (message.fileSha256 != null && Object.hasOwnProperty.call(message, "fileSha256")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.fileSha256); - if (message.fileLength != null && Object.hasOwnProperty.call(message, "fileLength")) - writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.fileLength); - if (message.pageCount != null && Object.hasOwnProperty.call(message, "pageCount")) - writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.pageCount); - if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.mediaKey); - if (message.fileName != null && Object.hasOwnProperty.call(message, "fileName")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.fileName); - if (message.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256")) - writer.uint32(/* id 9, wireType 2 =*/74).bytes(message.fileEncSha256); - if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.directPath); - if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp")) - writer.uint32(/* id 11, wireType 0 =*/88).int64(message.mediaKeyTimestamp); - if (message.contactVcard != null && Object.hasOwnProperty.call(message, "contactVcard")) - writer.uint32(/* id 12, wireType 0 =*/96).bool(message.contactVcard); - if (message.thumbnailDirectPath != null && Object.hasOwnProperty.call(message, "thumbnailDirectPath")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.thumbnailDirectPath); - if (message.thumbnailSha256 != null && Object.hasOwnProperty.call(message, "thumbnailSha256")) - writer.uint32(/* id 14, wireType 2 =*/114).bytes(message.thumbnailSha256); - if (message.thumbnailEncSha256 != null && Object.hasOwnProperty.call(message, "thumbnailEncSha256")) - writer.uint32(/* id 15, wireType 2 =*/122).bytes(message.thumbnailEncSha256); - 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.thumbnailHeight != null && Object.hasOwnProperty.call(message, "thumbnailHeight")) - writer.uint32(/* id 18, wireType 0 =*/144).uint32(message.thumbnailHeight); - if (message.thumbnailWidth != null && Object.hasOwnProperty.call(message, "thumbnailWidth")) - writer.uint32(/* id 19, wireType 0 =*/152).uint32(message.thumbnailWidth); - if (message.caption != null && Object.hasOwnProperty.call(message, "caption")) - writer.uint32(/* id 20, wireType 2 =*/162).string(message.caption); - return writer; - }; - - /** - * Encodes the specified DocumentMessage message, length delimited. Does not implicitly {@link proto.DocumentMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.DocumentMessage - * @static - * @param {proto.IDocumentMessage} message DocumentMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DocumentMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DocumentMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.DocumentMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.DocumentMessage} DocumentMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DocumentMessage.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.DocumentMessage(); - 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.title = reader.string(); - break; - case 4: - message.fileSha256 = reader.bytes(); - break; - case 5: - message.fileLength = reader.uint64(); - break; - case 6: - message.pageCount = reader.uint32(); - break; - case 7: - message.mediaKey = reader.bytes(); - break; - case 8: - message.fileName = reader.string(); - break; - case 9: - message.fileEncSha256 = reader.bytes(); - break; - case 10: - message.directPath = reader.string(); - break; - case 11: - message.mediaKeyTimestamp = reader.int64(); - break; - case 12: - message.contactVcard = reader.bool(); - break; - case 13: - message.thumbnailDirectPath = reader.string(); - break; - case 14: - message.thumbnailSha256 = reader.bytes(); - break; - case 15: - message.thumbnailEncSha256 = reader.bytes(); - break; - case 16: - message.jpegThumbnail = reader.bytes(); - break; - case 17: - message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); - break; - case 18: - message.thumbnailHeight = reader.uint32(); - break; - case 19: - message.thumbnailWidth = reader.uint32(); - break; - case 20: - message.caption = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DocumentMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.DocumentMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.DocumentMessage} DocumentMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DocumentMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DocumentMessage message. - * @function verify - * @memberof proto.DocumentMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DocumentMessage.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.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: 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.pageCount != null && message.hasOwnProperty("pageCount")) - if (!$util.isInteger(message.pageCount)) - return "pageCount: 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.fileName != null && message.hasOwnProperty("fileName")) - if (!$util.isString(message.fileName)) - return "fileName: string 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.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.contactVcard != null && message.hasOwnProperty("contactVcard")) - if (typeof message.contactVcard !== "boolean") - return "contactVcard: 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.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.thumbnailHeight != null && message.hasOwnProperty("thumbnailHeight")) - if (!$util.isInteger(message.thumbnailHeight)) - return "thumbnailHeight: integer expected"; - if (message.thumbnailWidth != null && message.hasOwnProperty("thumbnailWidth")) - if (!$util.isInteger(message.thumbnailWidth)) - return "thumbnailWidth: integer expected"; - if (message.caption != null && message.hasOwnProperty("caption")) - if (!$util.isString(message.caption)) - return "caption: string expected"; - return null; - }; - - /** - * Creates a DocumentMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.DocumentMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.DocumentMessage} DocumentMessage - */ - DocumentMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.DocumentMessage) - return object; - var message = new $root.proto.DocumentMessage(); - if (object.url != null) - message.url = String(object.url); - if (object.mimetype != null) - message.mimetype = String(object.mimetype); - if (object.title != null) - message.title = String(object.title); - 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.pageCount != null) - message.pageCount = object.pageCount >>> 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.fileName != null) - message.fileName = String(object.fileName); - 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); - 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.contactVcard != null) - message.contactVcard = Boolean(object.contactVcard); - 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.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.DocumentMessage.contextInfo: object expected"); - message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); - } - if (object.thumbnailHeight != null) - message.thumbnailHeight = object.thumbnailHeight >>> 0; - if (object.thumbnailWidth != null) - message.thumbnailWidth = object.thumbnailWidth >>> 0; - if (object.caption != null) - message.caption = String(object.caption); - return message; - }; - - /** - * Creates a plain object from a DocumentMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.DocumentMessage - * @static - * @param {proto.DocumentMessage} message DocumentMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DocumentMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.url = ""; - object.mimetype = ""; - object.title = ""; - 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.pageCount = 0; - if (options.bytes === String) - object.mediaKey = ""; - else { - object.mediaKey = []; - if (options.bytes !== Array) - object.mediaKey = $util.newBuffer(object.mediaKey); - } - object.fileName = ""; - 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; - object.contactVcard = 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); - } - if (options.bytes === String) - object.jpegThumbnail = ""; - else { - object.jpegThumbnail = []; - if (options.bytes !== Array) - object.jpegThumbnail = $util.newBuffer(object.jpegThumbnail); - } - object.contextInfo = null; - object.thumbnailHeight = 0; - object.thumbnailWidth = 0; - object.caption = ""; - } - if (message.url != null && message.hasOwnProperty("url")) - object.url = message.url; - if (message.mimetype != null && message.hasOwnProperty("mimetype")) - object.mimetype = message.mimetype; - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - 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.pageCount != null && message.hasOwnProperty("pageCount")) - object.pageCount = message.pageCount; - 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.fileName != null && message.hasOwnProperty("fileName")) - object.fileName = message.fileName; - 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.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.contactVcard != null && message.hasOwnProperty("contactVcard")) - object.contactVcard = message.contactVcard; - 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.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.thumbnailHeight != null && message.hasOwnProperty("thumbnailHeight")) - object.thumbnailHeight = message.thumbnailHeight; - if (message.thumbnailWidth != null && message.hasOwnProperty("thumbnailWidth")) - object.thumbnailWidth = message.thumbnailWidth; - if (message.caption != null && message.hasOwnProperty("caption")) - object.caption = message.caption; - return object; - }; - - /** - * Converts this DocumentMessage to JSON. - * @function toJSON - * @memberof proto.DocumentMessage - * @instance - * @returns {Object.} JSON object - */ - DocumentMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DocumentMessage; - })(); - proto.EphemeralSetting = (function() { /** @@ -18179,1337 +11995,6 @@ $root.proto = (function() { return ExitCode; })(); - proto.ExtendedTextMessage = (function() { - - /** - * Properties of an ExtendedTextMessage. - * @memberof proto - * @interface IExtendedTextMessage - * @property {string|null} [text] ExtendedTextMessage text - * @property {string|null} [matchedText] ExtendedTextMessage matchedText - * @property {string|null} [canonicalUrl] ExtendedTextMessage canonicalUrl - * @property {string|null} [description] ExtendedTextMessage description - * @property {string|null} [title] ExtendedTextMessage title - * @property {number|null} [textArgb] ExtendedTextMessage textArgb - * @property {number|null} [backgroundArgb] ExtendedTextMessage backgroundArgb - * @property {proto.ExtendedTextMessage.ExtendedTextMessageFontType|null} [font] ExtendedTextMessage font - * @property {proto.ExtendedTextMessage.ExtendedTextMessagePreviewType|null} [previewType] ExtendedTextMessage previewType - * @property {Uint8Array|null} [jpegThumbnail] ExtendedTextMessage jpegThumbnail - * @property {proto.IContextInfo|null} [contextInfo] ExtendedTextMessage contextInfo - * @property {boolean|null} [doNotPlayInline] ExtendedTextMessage doNotPlayInline - * @property {string|null} [thumbnailDirectPath] ExtendedTextMessage thumbnailDirectPath - * @property {Uint8Array|null} [thumbnailSha256] ExtendedTextMessage thumbnailSha256 - * @property {Uint8Array|null} [thumbnailEncSha256] ExtendedTextMessage thumbnailEncSha256 - * @property {Uint8Array|null} [mediaKey] ExtendedTextMessage mediaKey - * @property {number|Long|null} [mediaKeyTimestamp] ExtendedTextMessage mediaKeyTimestamp - * @property {number|null} [thumbnailHeight] ExtendedTextMessage thumbnailHeight - * @property {number|null} [thumbnailWidth] ExtendedTextMessage thumbnailWidth - * @property {proto.ExtendedTextMessage.ExtendedTextMessageInviteLinkGroupType|null} [inviteLinkGroupType] ExtendedTextMessage inviteLinkGroupType - * @property {string|null} [inviteLinkParentGroupSubjectV2] ExtendedTextMessage inviteLinkParentGroupSubjectV2 - * @property {Uint8Array|null} [inviteLinkParentGroupThumbnailV2] ExtendedTextMessage inviteLinkParentGroupThumbnailV2 - * @property {proto.ExtendedTextMessage.ExtendedTextMessageInviteLinkGroupType|null} [inviteLinkGroupTypeV2] ExtendedTextMessage inviteLinkGroupTypeV2 - */ - - /** - * Constructs a new ExtendedTextMessage. - * @memberof proto - * @classdesc Represents an ExtendedTextMessage. - * @implements IExtendedTextMessage - * @constructor - * @param {proto.IExtendedTextMessage=} [properties] Properties to set - */ - function ExtendedTextMessage(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]]; - } - - /** - * ExtendedTextMessage text. - * @member {string} text - * @memberof proto.ExtendedTextMessage - * @instance - */ - ExtendedTextMessage.prototype.text = ""; - - /** - * ExtendedTextMessage matchedText. - * @member {string} matchedText - * @memberof proto.ExtendedTextMessage - * @instance - */ - ExtendedTextMessage.prototype.matchedText = ""; - - /** - * ExtendedTextMessage canonicalUrl. - * @member {string} canonicalUrl - * @memberof proto.ExtendedTextMessage - * @instance - */ - ExtendedTextMessage.prototype.canonicalUrl = ""; - - /** - * ExtendedTextMessage description. - * @member {string} description - * @memberof proto.ExtendedTextMessage - * @instance - */ - ExtendedTextMessage.prototype.description = ""; - - /** - * ExtendedTextMessage title. - * @member {string} title - * @memberof proto.ExtendedTextMessage - * @instance - */ - ExtendedTextMessage.prototype.title = ""; - - /** - * ExtendedTextMessage textArgb. - * @member {number} textArgb - * @memberof proto.ExtendedTextMessage - * @instance - */ - ExtendedTextMessage.prototype.textArgb = 0; - - /** - * ExtendedTextMessage backgroundArgb. - * @member {number} backgroundArgb - * @memberof proto.ExtendedTextMessage - * @instance - */ - ExtendedTextMessage.prototype.backgroundArgb = 0; - - /** - * ExtendedTextMessage font. - * @member {proto.ExtendedTextMessage.ExtendedTextMessageFontType} font - * @memberof proto.ExtendedTextMessage - * @instance - */ - ExtendedTextMessage.prototype.font = 0; - - /** - * ExtendedTextMessage previewType. - * @member {proto.ExtendedTextMessage.ExtendedTextMessagePreviewType} previewType - * @memberof proto.ExtendedTextMessage - * @instance - */ - ExtendedTextMessage.prototype.previewType = 0; - - /** - * ExtendedTextMessage jpegThumbnail. - * @member {Uint8Array} jpegThumbnail - * @memberof proto.ExtendedTextMessage - * @instance - */ - ExtendedTextMessage.prototype.jpegThumbnail = $util.newBuffer([]); - - /** - * ExtendedTextMessage contextInfo. - * @member {proto.IContextInfo|null|undefined} contextInfo - * @memberof proto.ExtendedTextMessage - * @instance - */ - ExtendedTextMessage.prototype.contextInfo = null; - - /** - * ExtendedTextMessage doNotPlayInline. - * @member {boolean} doNotPlayInline - * @memberof proto.ExtendedTextMessage - * @instance - */ - ExtendedTextMessage.prototype.doNotPlayInline = false; - - /** - * ExtendedTextMessage thumbnailDirectPath. - * @member {string} thumbnailDirectPath - * @memberof proto.ExtendedTextMessage - * @instance - */ - ExtendedTextMessage.prototype.thumbnailDirectPath = ""; - - /** - * ExtendedTextMessage thumbnailSha256. - * @member {Uint8Array} thumbnailSha256 - * @memberof proto.ExtendedTextMessage - * @instance - */ - ExtendedTextMessage.prototype.thumbnailSha256 = $util.newBuffer([]); - - /** - * ExtendedTextMessage thumbnailEncSha256. - * @member {Uint8Array} thumbnailEncSha256 - * @memberof proto.ExtendedTextMessage - * @instance - */ - ExtendedTextMessage.prototype.thumbnailEncSha256 = $util.newBuffer([]); - - /** - * ExtendedTextMessage mediaKey. - * @member {Uint8Array} mediaKey - * @memberof proto.ExtendedTextMessage - * @instance - */ - ExtendedTextMessage.prototype.mediaKey = $util.newBuffer([]); - - /** - * ExtendedTextMessage mediaKeyTimestamp. - * @member {number|Long} mediaKeyTimestamp - * @memberof proto.ExtendedTextMessage - * @instance - */ - ExtendedTextMessage.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ExtendedTextMessage thumbnailHeight. - * @member {number} thumbnailHeight - * @memberof proto.ExtendedTextMessage - * @instance - */ - ExtendedTextMessage.prototype.thumbnailHeight = 0; - - /** - * ExtendedTextMessage thumbnailWidth. - * @member {number} thumbnailWidth - * @memberof proto.ExtendedTextMessage - * @instance - */ - ExtendedTextMessage.prototype.thumbnailWidth = 0; - - /** - * ExtendedTextMessage inviteLinkGroupType. - * @member {proto.ExtendedTextMessage.ExtendedTextMessageInviteLinkGroupType} inviteLinkGroupType - * @memberof proto.ExtendedTextMessage - * @instance - */ - ExtendedTextMessage.prototype.inviteLinkGroupType = 0; - - /** - * ExtendedTextMessage inviteLinkParentGroupSubjectV2. - * @member {string} inviteLinkParentGroupSubjectV2 - * @memberof proto.ExtendedTextMessage - * @instance - */ - ExtendedTextMessage.prototype.inviteLinkParentGroupSubjectV2 = ""; - - /** - * ExtendedTextMessage inviteLinkParentGroupThumbnailV2. - * @member {Uint8Array} inviteLinkParentGroupThumbnailV2 - * @memberof proto.ExtendedTextMessage - * @instance - */ - ExtendedTextMessage.prototype.inviteLinkParentGroupThumbnailV2 = $util.newBuffer([]); - - /** - * ExtendedTextMessage inviteLinkGroupTypeV2. - * @member {proto.ExtendedTextMessage.ExtendedTextMessageInviteLinkGroupType} inviteLinkGroupTypeV2 - * @memberof proto.ExtendedTextMessage - * @instance - */ - ExtendedTextMessage.prototype.inviteLinkGroupTypeV2 = 0; - - /** - * Creates a new ExtendedTextMessage instance using the specified properties. - * @function create - * @memberof proto.ExtendedTextMessage - * @static - * @param {proto.IExtendedTextMessage=} [properties] Properties to set - * @returns {proto.ExtendedTextMessage} ExtendedTextMessage instance - */ - ExtendedTextMessage.create = function create(properties) { - return new ExtendedTextMessage(properties); - }; - - /** - * Encodes the specified ExtendedTextMessage message. Does not implicitly {@link proto.ExtendedTextMessage.verify|verify} messages. - * @function encode - * @memberof proto.ExtendedTextMessage - * @static - * @param {proto.IExtendedTextMessage} message ExtendedTextMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtendedTextMessage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); - if (message.matchedText != null && Object.hasOwnProperty.call(message, "matchedText")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.matchedText); - if (message.canonicalUrl != null && Object.hasOwnProperty.call(message, "canonicalUrl")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.canonicalUrl); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); - if (message.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.title); - if (message.textArgb != null && Object.hasOwnProperty.call(message, "textArgb")) - writer.uint32(/* id 7, wireType 5 =*/61).fixed32(message.textArgb); - if (message.backgroundArgb != null && Object.hasOwnProperty.call(message, "backgroundArgb")) - writer.uint32(/* id 8, wireType 5 =*/69).fixed32(message.backgroundArgb); - if (message.font != null && Object.hasOwnProperty.call(message, "font")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.font); - if (message.previewType != null && Object.hasOwnProperty.call(message, "previewType")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.previewType); - 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.doNotPlayInline != null && Object.hasOwnProperty.call(message, "doNotPlayInline")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.doNotPlayInline); - if (message.thumbnailDirectPath != null && Object.hasOwnProperty.call(message, "thumbnailDirectPath")) - writer.uint32(/* id 19, wireType 2 =*/154).string(message.thumbnailDirectPath); - if (message.thumbnailSha256 != null && Object.hasOwnProperty.call(message, "thumbnailSha256")) - writer.uint32(/* id 20, wireType 2 =*/162).bytes(message.thumbnailSha256); - if (message.thumbnailEncSha256 != null && Object.hasOwnProperty.call(message, "thumbnailEncSha256")) - writer.uint32(/* id 21, wireType 2 =*/170).bytes(message.thumbnailEncSha256); - if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey")) - writer.uint32(/* id 22, wireType 2 =*/178).bytes(message.mediaKey); - if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp")) - writer.uint32(/* id 23, wireType 0 =*/184).int64(message.mediaKeyTimestamp); - if (message.thumbnailHeight != null && Object.hasOwnProperty.call(message, "thumbnailHeight")) - writer.uint32(/* id 24, wireType 0 =*/192).uint32(message.thumbnailHeight); - if (message.thumbnailWidth != null && Object.hasOwnProperty.call(message, "thumbnailWidth")) - writer.uint32(/* id 25, wireType 0 =*/200).uint32(message.thumbnailWidth); - if (message.inviteLinkGroupType != null && Object.hasOwnProperty.call(message, "inviteLinkGroupType")) - writer.uint32(/* id 26, wireType 0 =*/208).int32(message.inviteLinkGroupType); - if (message.inviteLinkParentGroupSubjectV2 != null && Object.hasOwnProperty.call(message, "inviteLinkParentGroupSubjectV2")) - writer.uint32(/* id 27, wireType 2 =*/218).string(message.inviteLinkParentGroupSubjectV2); - if (message.inviteLinkParentGroupThumbnailV2 != null && Object.hasOwnProperty.call(message, "inviteLinkParentGroupThumbnailV2")) - writer.uint32(/* id 28, wireType 2 =*/226).bytes(message.inviteLinkParentGroupThumbnailV2); - if (message.inviteLinkGroupTypeV2 != null && Object.hasOwnProperty.call(message, "inviteLinkGroupTypeV2")) - writer.uint32(/* id 29, wireType 0 =*/232).int32(message.inviteLinkGroupTypeV2); - return writer; - }; - - /** - * Encodes the specified ExtendedTextMessage message, length delimited. Does not implicitly {@link proto.ExtendedTextMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.ExtendedTextMessage - * @static - * @param {proto.IExtendedTextMessage} message ExtendedTextMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtendedTextMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExtendedTextMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.ExtendedTextMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.ExtendedTextMessage} ExtendedTextMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtendedTextMessage.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.ExtendedTextMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.text = reader.string(); - break; - case 2: - message.matchedText = reader.string(); - break; - case 4: - message.canonicalUrl = reader.string(); - break; - case 5: - message.description = reader.string(); - break; - case 6: - message.title = reader.string(); - break; - case 7: - message.textArgb = reader.fixed32(); - break; - case 8: - message.backgroundArgb = reader.fixed32(); - break; - case 9: - message.font = reader.int32(); - break; - case 10: - message.previewType = reader.int32(); - break; - case 16: - message.jpegThumbnail = reader.bytes(); - break; - case 17: - message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); - break; - case 18: - message.doNotPlayInline = reader.bool(); - break; - case 19: - message.thumbnailDirectPath = reader.string(); - break; - case 20: - message.thumbnailSha256 = reader.bytes(); - break; - case 21: - message.thumbnailEncSha256 = reader.bytes(); - break; - case 22: - message.mediaKey = reader.bytes(); - break; - case 23: - message.mediaKeyTimestamp = reader.int64(); - break; - case 24: - message.thumbnailHeight = reader.uint32(); - break; - case 25: - message.thumbnailWidth = reader.uint32(); - break; - case 26: - message.inviteLinkGroupType = reader.int32(); - break; - case 27: - message.inviteLinkParentGroupSubjectV2 = reader.string(); - break; - case 28: - message.inviteLinkParentGroupThumbnailV2 = reader.bytes(); - break; - case 29: - message.inviteLinkGroupTypeV2 = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExtendedTextMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.ExtendedTextMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ExtendedTextMessage} ExtendedTextMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtendedTextMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExtendedTextMessage message. - * @function verify - * @memberof proto.ExtendedTextMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtendedTextMessage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.text != null && message.hasOwnProperty("text")) - if (!$util.isString(message.text)) - return "text: string expected"; - if (message.matchedText != null && message.hasOwnProperty("matchedText")) - if (!$util.isString(message.matchedText)) - return "matchedText: string expected"; - if (message.canonicalUrl != null && message.hasOwnProperty("canonicalUrl")) - if (!$util.isString(message.canonicalUrl)) - return "canonicalUrl: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.textArgb != null && message.hasOwnProperty("textArgb")) - if (!$util.isInteger(message.textArgb)) - return "textArgb: integer expected"; - if (message.backgroundArgb != null && message.hasOwnProperty("backgroundArgb")) - if (!$util.isInteger(message.backgroundArgb)) - return "backgroundArgb: integer expected"; - if (message.font != null && message.hasOwnProperty("font")) - switch (message.font) { - default: - return "font: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.previewType != null && message.hasOwnProperty("previewType")) - switch (message.previewType) { - default: - return "previewType: enum value expected"; - case 0: - case 1: - break; - } - 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.doNotPlayInline != null && message.hasOwnProperty("doNotPlayInline")) - if (typeof message.doNotPlayInline !== "boolean") - return "doNotPlayInline: 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.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.thumbnailHeight != null && message.hasOwnProperty("thumbnailHeight")) - if (!$util.isInteger(message.thumbnailHeight)) - return "thumbnailHeight: integer expected"; - if (message.thumbnailWidth != null && message.hasOwnProperty("thumbnailWidth")) - if (!$util.isInteger(message.thumbnailWidth)) - return "thumbnailWidth: integer expected"; - if (message.inviteLinkGroupType != null && message.hasOwnProperty("inviteLinkGroupType")) - switch (message.inviteLinkGroupType) { - default: - return "inviteLinkGroupType: enum value expected"; - case 0: - case 1: - break; - } - if (message.inviteLinkParentGroupSubjectV2 != null && message.hasOwnProperty("inviteLinkParentGroupSubjectV2")) - if (!$util.isString(message.inviteLinkParentGroupSubjectV2)) - return "inviteLinkParentGroupSubjectV2: string expected"; - if (message.inviteLinkParentGroupThumbnailV2 != null && message.hasOwnProperty("inviteLinkParentGroupThumbnailV2")) - if (!(message.inviteLinkParentGroupThumbnailV2 && typeof message.inviteLinkParentGroupThumbnailV2.length === "number" || $util.isString(message.inviteLinkParentGroupThumbnailV2))) - return "inviteLinkParentGroupThumbnailV2: buffer expected"; - if (message.inviteLinkGroupTypeV2 != null && message.hasOwnProperty("inviteLinkGroupTypeV2")) - switch (message.inviteLinkGroupTypeV2) { - default: - return "inviteLinkGroupTypeV2: enum value expected"; - case 0: - case 1: - break; - } - return null; - }; - - /** - * Creates an ExtendedTextMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.ExtendedTextMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.ExtendedTextMessage} ExtendedTextMessage - */ - ExtendedTextMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ExtendedTextMessage) - return object; - var message = new $root.proto.ExtendedTextMessage(); - if (object.text != null) - message.text = String(object.text); - if (object.matchedText != null) - message.matchedText = String(object.matchedText); - if (object.canonicalUrl != null) - message.canonicalUrl = String(object.canonicalUrl); - if (object.description != null) - message.description = String(object.description); - if (object.title != null) - message.title = String(object.title); - if (object.textArgb != null) - message.textArgb = object.textArgb >>> 0; - if (object.backgroundArgb != null) - message.backgroundArgb = object.backgroundArgb >>> 0; - switch (object.font) { - case "SANS_SERIF": - case 0: - message.font = 0; - break; - case "SERIF": - case 1: - message.font = 1; - break; - case "NORICAN_REGULAR": - case 2: - message.font = 2; - break; - case "BRYNDAN_WRITE": - case 3: - message.font = 3; - break; - case "BEBASNEUE_REGULAR": - case 4: - message.font = 4; - break; - case "OSWALD_HEAVY": - case 5: - message.font = 5; - break; - } - switch (object.previewType) { - case "NONE": - case 0: - message.previewType = 0; - break; - case "VIDEO": - case 1: - message.previewType = 1; - break; - } - 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.ExtendedTextMessage.contextInfo: object expected"); - message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); - } - if (object.doNotPlayInline != null) - message.doNotPlayInline = Boolean(object.doNotPlayInline); - 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.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.thumbnailHeight != null) - message.thumbnailHeight = object.thumbnailHeight >>> 0; - if (object.thumbnailWidth != null) - message.thumbnailWidth = object.thumbnailWidth >>> 0; - switch (object.inviteLinkGroupType) { - case "DEFAULT": - case 0: - message.inviteLinkGroupType = 0; - break; - case "PARENT": - case 1: - message.inviteLinkGroupType = 1; - break; - } - if (object.inviteLinkParentGroupSubjectV2 != null) - message.inviteLinkParentGroupSubjectV2 = String(object.inviteLinkParentGroupSubjectV2); - if (object.inviteLinkParentGroupThumbnailV2 != null) - if (typeof object.inviteLinkParentGroupThumbnailV2 === "string") - $util.base64.decode(object.inviteLinkParentGroupThumbnailV2, message.inviteLinkParentGroupThumbnailV2 = $util.newBuffer($util.base64.length(object.inviteLinkParentGroupThumbnailV2)), 0); - else if (object.inviteLinkParentGroupThumbnailV2.length) - message.inviteLinkParentGroupThumbnailV2 = object.inviteLinkParentGroupThumbnailV2; - switch (object.inviteLinkGroupTypeV2) { - case "DEFAULT": - case 0: - message.inviteLinkGroupTypeV2 = 0; - break; - case "PARENT": - case 1: - message.inviteLinkGroupTypeV2 = 1; - break; - } - return message; - }; - - /** - * Creates a plain object from an ExtendedTextMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.ExtendedTextMessage - * @static - * @param {proto.ExtendedTextMessage} message ExtendedTextMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtendedTextMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.text = ""; - object.matchedText = ""; - object.canonicalUrl = ""; - object.description = ""; - object.title = ""; - object.textArgb = 0; - object.backgroundArgb = 0; - object.font = options.enums === String ? "SANS_SERIF" : 0; - object.previewType = options.enums === String ? "NONE" : 0; - if (options.bytes === String) - object.jpegThumbnail = ""; - else { - object.jpegThumbnail = []; - if (options.bytes !== Array) - object.jpegThumbnail = $util.newBuffer(object.jpegThumbnail); - } - object.contextInfo = null; - object.doNotPlayInline = 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); - } - 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; - object.thumbnailHeight = 0; - object.thumbnailWidth = 0; - object.inviteLinkGroupType = options.enums === String ? "DEFAULT" : 0; - object.inviteLinkParentGroupSubjectV2 = ""; - if (options.bytes === String) - object.inviteLinkParentGroupThumbnailV2 = ""; - else { - object.inviteLinkParentGroupThumbnailV2 = []; - if (options.bytes !== Array) - object.inviteLinkParentGroupThumbnailV2 = $util.newBuffer(object.inviteLinkParentGroupThumbnailV2); - } - object.inviteLinkGroupTypeV2 = options.enums === String ? "DEFAULT" : 0; - } - if (message.text != null && message.hasOwnProperty("text")) - object.text = message.text; - if (message.matchedText != null && message.hasOwnProperty("matchedText")) - object.matchedText = message.matchedText; - if (message.canonicalUrl != null && message.hasOwnProperty("canonicalUrl")) - object.canonicalUrl = message.canonicalUrl; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.textArgb != null && message.hasOwnProperty("textArgb")) - object.textArgb = message.textArgb; - if (message.backgroundArgb != null && message.hasOwnProperty("backgroundArgb")) - object.backgroundArgb = message.backgroundArgb; - if (message.font != null && message.hasOwnProperty("font")) - object.font = options.enums === String ? $root.proto.ExtendedTextMessage.ExtendedTextMessageFontType[message.font] : message.font; - if (message.previewType != null && message.hasOwnProperty("previewType")) - object.previewType = options.enums === String ? $root.proto.ExtendedTextMessage.ExtendedTextMessagePreviewType[message.previewType] : message.previewType; - 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.doNotPlayInline != null && message.hasOwnProperty("doNotPlayInline")) - object.doNotPlayInline = message.doNotPlayInline; - 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.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.thumbnailHeight != null && message.hasOwnProperty("thumbnailHeight")) - object.thumbnailHeight = message.thumbnailHeight; - if (message.thumbnailWidth != null && message.hasOwnProperty("thumbnailWidth")) - object.thumbnailWidth = message.thumbnailWidth; - if (message.inviteLinkGroupType != null && message.hasOwnProperty("inviteLinkGroupType")) - object.inviteLinkGroupType = options.enums === String ? $root.proto.ExtendedTextMessage.ExtendedTextMessageInviteLinkGroupType[message.inviteLinkGroupType] : message.inviteLinkGroupType; - if (message.inviteLinkParentGroupSubjectV2 != null && message.hasOwnProperty("inviteLinkParentGroupSubjectV2")) - object.inviteLinkParentGroupSubjectV2 = message.inviteLinkParentGroupSubjectV2; - if (message.inviteLinkParentGroupThumbnailV2 != null && message.hasOwnProperty("inviteLinkParentGroupThumbnailV2")) - object.inviteLinkParentGroupThumbnailV2 = options.bytes === String ? $util.base64.encode(message.inviteLinkParentGroupThumbnailV2, 0, message.inviteLinkParentGroupThumbnailV2.length) : options.bytes === Array ? Array.prototype.slice.call(message.inviteLinkParentGroupThumbnailV2) : message.inviteLinkParentGroupThumbnailV2; - if (message.inviteLinkGroupTypeV2 != null && message.hasOwnProperty("inviteLinkGroupTypeV2")) - object.inviteLinkGroupTypeV2 = options.enums === String ? $root.proto.ExtendedTextMessage.ExtendedTextMessageInviteLinkGroupType[message.inviteLinkGroupTypeV2] : message.inviteLinkGroupTypeV2; - return object; - }; - - /** - * Converts this ExtendedTextMessage to JSON. - * @function toJSON - * @memberof proto.ExtendedTextMessage - * @instance - * @returns {Object.} JSON object - */ - ExtendedTextMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * ExtendedTextMessageFontType enum. - * @name proto.ExtendedTextMessage.ExtendedTextMessageFontType - * @enum {number} - * @property {number} SANS_SERIF=0 SANS_SERIF value - * @property {number} SERIF=1 SERIF value - * @property {number} NORICAN_REGULAR=2 NORICAN_REGULAR value - * @property {number} BRYNDAN_WRITE=3 BRYNDAN_WRITE value - * @property {number} BEBASNEUE_REGULAR=4 BEBASNEUE_REGULAR value - * @property {number} OSWALD_HEAVY=5 OSWALD_HEAVY value - */ - ExtendedTextMessage.ExtendedTextMessageFontType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SANS_SERIF"] = 0; - values[valuesById[1] = "SERIF"] = 1; - values[valuesById[2] = "NORICAN_REGULAR"] = 2; - values[valuesById[3] = "BRYNDAN_WRITE"] = 3; - values[valuesById[4] = "BEBASNEUE_REGULAR"] = 4; - values[valuesById[5] = "OSWALD_HEAVY"] = 5; - return values; - })(); - - /** - * ExtendedTextMessagePreviewType enum. - * @name proto.ExtendedTextMessage.ExtendedTextMessagePreviewType - * @enum {number} - * @property {number} NONE=0 NONE value - * @property {number} VIDEO=1 VIDEO value - */ - ExtendedTextMessage.ExtendedTextMessagePreviewType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NONE"] = 0; - values[valuesById[1] = "VIDEO"] = 1; - return values; - })(); - - /** - * ExtendedTextMessageInviteLinkGroupType enum. - * @name proto.ExtendedTextMessage.ExtendedTextMessageInviteLinkGroupType - * @enum {number} - * @property {number} DEFAULT=0 DEFAULT value - * @property {number} PARENT=1 PARENT value - */ - ExtendedTextMessage.ExtendedTextMessageInviteLinkGroupType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DEFAULT"] = 0; - values[valuesById[1] = "PARENT"] = 1; - return values; - })(); - - return ExtendedTextMessage; - })(); - - proto.ExternalAdReplyInfo = (function() { - - /** - * Properties of an ExternalAdReplyInfo. - * @memberof proto - * @interface IExternalAdReplyInfo - * @property {string|null} [title] ExternalAdReplyInfo title - * @property {string|null} [body] ExternalAdReplyInfo body - * @property {proto.ExternalAdReplyInfo.ExternalAdReplyInfoMediaType|null} [mediaType] ExternalAdReplyInfo mediaType - * @property {string|null} [thumbnailUrl] ExternalAdReplyInfo thumbnailUrl - * @property {string|null} [mediaUrl] ExternalAdReplyInfo mediaUrl - * @property {Uint8Array|null} [thumbnail] ExternalAdReplyInfo thumbnail - * @property {string|null} [sourceType] ExternalAdReplyInfo sourceType - * @property {string|null} [sourceId] ExternalAdReplyInfo sourceId - * @property {string|null} [sourceUrl] ExternalAdReplyInfo sourceUrl - * @property {boolean|null} [containsAutoReply] ExternalAdReplyInfo containsAutoReply - * @property {boolean|null} [renderLargerThumbnail] ExternalAdReplyInfo renderLargerThumbnail - * @property {boolean|null} [showAdAttribution] ExternalAdReplyInfo showAdAttribution - */ - - /** - * Constructs a new ExternalAdReplyInfo. - * @memberof proto - * @classdesc Represents an ExternalAdReplyInfo. - * @implements IExternalAdReplyInfo - * @constructor - * @param {proto.IExternalAdReplyInfo=} [properties] Properties to set - */ - function ExternalAdReplyInfo(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]]; - } - - /** - * ExternalAdReplyInfo title. - * @member {string} title - * @memberof proto.ExternalAdReplyInfo - * @instance - */ - ExternalAdReplyInfo.prototype.title = ""; - - /** - * ExternalAdReplyInfo body. - * @member {string} body - * @memberof proto.ExternalAdReplyInfo - * @instance - */ - ExternalAdReplyInfo.prototype.body = ""; - - /** - * ExternalAdReplyInfo mediaType. - * @member {proto.ExternalAdReplyInfo.ExternalAdReplyInfoMediaType} mediaType - * @memberof proto.ExternalAdReplyInfo - * @instance - */ - ExternalAdReplyInfo.prototype.mediaType = 0; - - /** - * ExternalAdReplyInfo thumbnailUrl. - * @member {string} thumbnailUrl - * @memberof proto.ExternalAdReplyInfo - * @instance - */ - ExternalAdReplyInfo.prototype.thumbnailUrl = ""; - - /** - * ExternalAdReplyInfo mediaUrl. - * @member {string} mediaUrl - * @memberof proto.ExternalAdReplyInfo - * @instance - */ - ExternalAdReplyInfo.prototype.mediaUrl = ""; - - /** - * ExternalAdReplyInfo thumbnail. - * @member {Uint8Array} thumbnail - * @memberof proto.ExternalAdReplyInfo - * @instance - */ - ExternalAdReplyInfo.prototype.thumbnail = $util.newBuffer([]); - - /** - * ExternalAdReplyInfo sourceType. - * @member {string} sourceType - * @memberof proto.ExternalAdReplyInfo - * @instance - */ - ExternalAdReplyInfo.prototype.sourceType = ""; - - /** - * ExternalAdReplyInfo sourceId. - * @member {string} sourceId - * @memberof proto.ExternalAdReplyInfo - * @instance - */ - ExternalAdReplyInfo.prototype.sourceId = ""; - - /** - * ExternalAdReplyInfo sourceUrl. - * @member {string} sourceUrl - * @memberof proto.ExternalAdReplyInfo - * @instance - */ - ExternalAdReplyInfo.prototype.sourceUrl = ""; - - /** - * ExternalAdReplyInfo containsAutoReply. - * @member {boolean} containsAutoReply - * @memberof proto.ExternalAdReplyInfo - * @instance - */ - ExternalAdReplyInfo.prototype.containsAutoReply = false; - - /** - * ExternalAdReplyInfo renderLargerThumbnail. - * @member {boolean} renderLargerThumbnail - * @memberof proto.ExternalAdReplyInfo - * @instance - */ - ExternalAdReplyInfo.prototype.renderLargerThumbnail = false; - - /** - * ExternalAdReplyInfo showAdAttribution. - * @member {boolean} showAdAttribution - * @memberof proto.ExternalAdReplyInfo - * @instance - */ - ExternalAdReplyInfo.prototype.showAdAttribution = false; - - /** - * Creates a new ExternalAdReplyInfo instance using the specified properties. - * @function create - * @memberof proto.ExternalAdReplyInfo - * @static - * @param {proto.IExternalAdReplyInfo=} [properties] Properties to set - * @returns {proto.ExternalAdReplyInfo} ExternalAdReplyInfo instance - */ - ExternalAdReplyInfo.create = function create(properties) { - return new ExternalAdReplyInfo(properties); - }; - - /** - * Encodes the specified ExternalAdReplyInfo message. Does not implicitly {@link proto.ExternalAdReplyInfo.verify|verify} messages. - * @function encode - * @memberof proto.ExternalAdReplyInfo - * @static - * @param {proto.IExternalAdReplyInfo} message ExternalAdReplyInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExternalAdReplyInfo.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.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.body); - if (message.mediaType != null && Object.hasOwnProperty.call(message, "mediaType")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.mediaType); - if (message.thumbnailUrl != null && Object.hasOwnProperty.call(message, "thumbnailUrl")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.thumbnailUrl); - if (message.mediaUrl != null && Object.hasOwnProperty.call(message, "mediaUrl")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.mediaUrl); - if (message.thumbnail != null && Object.hasOwnProperty.call(message, "thumbnail")) - writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.thumbnail); - if (message.sourceType != null && Object.hasOwnProperty.call(message, "sourceType")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.sourceType); - if (message.sourceId != null && Object.hasOwnProperty.call(message, "sourceId")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.sourceId); - if (message.sourceUrl != null && Object.hasOwnProperty.call(message, "sourceUrl")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.sourceUrl); - if (message.containsAutoReply != null && Object.hasOwnProperty.call(message, "containsAutoReply")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.containsAutoReply); - if (message.renderLargerThumbnail != null && Object.hasOwnProperty.call(message, "renderLargerThumbnail")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.renderLargerThumbnail); - if (message.showAdAttribution != null && Object.hasOwnProperty.call(message, "showAdAttribution")) - writer.uint32(/* id 12, wireType 0 =*/96).bool(message.showAdAttribution); - return writer; - }; - - /** - * Encodes the specified ExternalAdReplyInfo message, length delimited. Does not implicitly {@link proto.ExternalAdReplyInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.ExternalAdReplyInfo - * @static - * @param {proto.IExternalAdReplyInfo} message ExternalAdReplyInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExternalAdReplyInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExternalAdReplyInfo message from the specified reader or buffer. - * @function decode - * @memberof proto.ExternalAdReplyInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.ExternalAdReplyInfo} ExternalAdReplyInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExternalAdReplyInfo.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.ExternalAdReplyInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.body = reader.string(); - break; - case 3: - message.mediaType = reader.int32(); - break; - case 4: - message.thumbnailUrl = reader.string(); - break; - case 5: - message.mediaUrl = reader.string(); - break; - case 6: - message.thumbnail = reader.bytes(); - break; - case 7: - message.sourceType = reader.string(); - break; - case 8: - message.sourceId = reader.string(); - break; - case 9: - message.sourceUrl = reader.string(); - break; - case 10: - message.containsAutoReply = reader.bool(); - break; - case 11: - message.renderLargerThumbnail = reader.bool(); - break; - case 12: - message.showAdAttribution = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExternalAdReplyInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.ExternalAdReplyInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ExternalAdReplyInfo} ExternalAdReplyInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExternalAdReplyInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExternalAdReplyInfo message. - * @function verify - * @memberof proto.ExternalAdReplyInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExternalAdReplyInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.mediaType != null && message.hasOwnProperty("mediaType")) - switch (message.mediaType) { - default: - return "mediaType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.thumbnailUrl != null && message.hasOwnProperty("thumbnailUrl")) - if (!$util.isString(message.thumbnailUrl)) - return "thumbnailUrl: string expected"; - if (message.mediaUrl != null && message.hasOwnProperty("mediaUrl")) - if (!$util.isString(message.mediaUrl)) - return "mediaUrl: string expected"; - if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) - if (!(message.thumbnail && typeof message.thumbnail.length === "number" || $util.isString(message.thumbnail))) - return "thumbnail: buffer expected"; - if (message.sourceType != null && message.hasOwnProperty("sourceType")) - if (!$util.isString(message.sourceType)) - return "sourceType: string expected"; - if (message.sourceId != null && message.hasOwnProperty("sourceId")) - if (!$util.isString(message.sourceId)) - return "sourceId: string expected"; - if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) - if (!$util.isString(message.sourceUrl)) - return "sourceUrl: string expected"; - if (message.containsAutoReply != null && message.hasOwnProperty("containsAutoReply")) - if (typeof message.containsAutoReply !== "boolean") - return "containsAutoReply: boolean expected"; - if (message.renderLargerThumbnail != null && message.hasOwnProperty("renderLargerThumbnail")) - if (typeof message.renderLargerThumbnail !== "boolean") - return "renderLargerThumbnail: boolean expected"; - if (message.showAdAttribution != null && message.hasOwnProperty("showAdAttribution")) - if (typeof message.showAdAttribution !== "boolean") - return "showAdAttribution: boolean expected"; - return null; - }; - - /** - * Creates an ExternalAdReplyInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.ExternalAdReplyInfo - * @static - * @param {Object.} object Plain object - * @returns {proto.ExternalAdReplyInfo} ExternalAdReplyInfo - */ - ExternalAdReplyInfo.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ExternalAdReplyInfo) - return object; - var message = new $root.proto.ExternalAdReplyInfo(); - if (object.title != null) - message.title = String(object.title); - if (object.body != null) - message.body = String(object.body); - switch (object.mediaType) { - case "NONE": - case 0: - message.mediaType = 0; - break; - case "IMAGE": - case 1: - message.mediaType = 1; - break; - case "VIDEO": - case 2: - message.mediaType = 2; - break; - } - if (object.thumbnailUrl != null) - message.thumbnailUrl = String(object.thumbnailUrl); - if (object.mediaUrl != null) - message.mediaUrl = String(object.mediaUrl); - if (object.thumbnail != null) - if (typeof object.thumbnail === "string") - $util.base64.decode(object.thumbnail, message.thumbnail = $util.newBuffer($util.base64.length(object.thumbnail)), 0); - else if (object.thumbnail.length) - message.thumbnail = object.thumbnail; - if (object.sourceType != null) - message.sourceType = String(object.sourceType); - if (object.sourceId != null) - message.sourceId = String(object.sourceId); - if (object.sourceUrl != null) - message.sourceUrl = String(object.sourceUrl); - if (object.containsAutoReply != null) - message.containsAutoReply = Boolean(object.containsAutoReply); - if (object.renderLargerThumbnail != null) - message.renderLargerThumbnail = Boolean(object.renderLargerThumbnail); - if (object.showAdAttribution != null) - message.showAdAttribution = Boolean(object.showAdAttribution); - return message; - }; - - /** - * Creates a plain object from an ExternalAdReplyInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.ExternalAdReplyInfo - * @static - * @param {proto.ExternalAdReplyInfo} message ExternalAdReplyInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExternalAdReplyInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.title = ""; - object.body = ""; - object.mediaType = options.enums === String ? "NONE" : 0; - object.thumbnailUrl = ""; - object.mediaUrl = ""; - if (options.bytes === String) - object.thumbnail = ""; - else { - object.thumbnail = []; - if (options.bytes !== Array) - object.thumbnail = $util.newBuffer(object.thumbnail); - } - object.sourceType = ""; - object.sourceId = ""; - object.sourceUrl = ""; - object.containsAutoReply = false; - object.renderLargerThumbnail = false; - object.showAdAttribution = false; - } - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.mediaType != null && message.hasOwnProperty("mediaType")) - object.mediaType = options.enums === String ? $root.proto.ExternalAdReplyInfo.ExternalAdReplyInfoMediaType[message.mediaType] : message.mediaType; - if (message.thumbnailUrl != null && message.hasOwnProperty("thumbnailUrl")) - object.thumbnailUrl = message.thumbnailUrl; - if (message.mediaUrl != null && message.hasOwnProperty("mediaUrl")) - object.mediaUrl = message.mediaUrl; - if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) - object.thumbnail = options.bytes === String ? $util.base64.encode(message.thumbnail, 0, message.thumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.thumbnail) : message.thumbnail; - if (message.sourceType != null && message.hasOwnProperty("sourceType")) - object.sourceType = message.sourceType; - if (message.sourceId != null && message.hasOwnProperty("sourceId")) - object.sourceId = message.sourceId; - if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) - object.sourceUrl = message.sourceUrl; - if (message.containsAutoReply != null && message.hasOwnProperty("containsAutoReply")) - object.containsAutoReply = message.containsAutoReply; - if (message.renderLargerThumbnail != null && message.hasOwnProperty("renderLargerThumbnail")) - object.renderLargerThumbnail = message.renderLargerThumbnail; - if (message.showAdAttribution != null && message.hasOwnProperty("showAdAttribution")) - object.showAdAttribution = message.showAdAttribution; - return object; - }; - - /** - * Converts this ExternalAdReplyInfo to JSON. - * @function toJSON - * @memberof proto.ExternalAdReplyInfo - * @instance - * @returns {Object.} JSON object - */ - ExternalAdReplyInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * ExternalAdReplyInfoMediaType enum. - * @name proto.ExternalAdReplyInfo.ExternalAdReplyInfoMediaType - * @enum {number} - * @property {number} NONE=0 NONE value - * @property {number} IMAGE=1 IMAGE value - * @property {number} VIDEO=2 VIDEO value - */ - ExternalAdReplyInfo.ExternalAdReplyInfoMediaType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NONE"] = 0; - values[valuesById[1] = "IMAGE"] = 1; - values[valuesById[2] = "VIDEO"] = 2; - return values; - })(); - - return ExternalAdReplyInfo; - })(); - proto.ExternalBlobReference = (function() { /** @@ -19849,1188 +12334,6 @@ $root.proto = (function() { 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() { - - /** - * Properties of a Footer. - * @memberof proto - * @interface IFooter - * @property {string|null} [text] Footer text - */ - - /** - * Constructs a new Footer. - * @memberof proto - * @classdesc Represents a Footer. - * @implements IFooter - * @constructor - * @param {proto.IFooter=} [properties] Properties to set - */ - function Footer(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]]; - } - - /** - * Footer text. - * @member {string} text - * @memberof proto.Footer - * @instance - */ - Footer.prototype.text = ""; - - /** - * Creates a new Footer instance using the specified properties. - * @function create - * @memberof proto.Footer - * @static - * @param {proto.IFooter=} [properties] Properties to set - * @returns {proto.Footer} Footer instance - */ - Footer.create = function create(properties) { - return new Footer(properties); - }; - - /** - * Encodes the specified Footer message. Does not implicitly {@link proto.Footer.verify|verify} messages. - * @function encode - * @memberof proto.Footer - * @static - * @param {proto.IFooter} message Footer message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Footer.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); - return writer; - }; - - /** - * Encodes the specified Footer message, length delimited. Does not implicitly {@link proto.Footer.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.Footer - * @static - * @param {proto.IFooter} message Footer message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Footer.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Footer message from the specified reader or buffer. - * @function decode - * @memberof proto.Footer - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.Footer} Footer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Footer.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.Footer(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.text = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Footer message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.Footer - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Footer} Footer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Footer.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Footer message. - * @function verify - * @memberof proto.Footer - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Footer.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.text != null && message.hasOwnProperty("text")) - if (!$util.isString(message.text)) - return "text: string expected"; - return null; - }; - - /** - * Creates a Footer message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.Footer - * @static - * @param {Object.} object Plain object - * @returns {proto.Footer} Footer - */ - Footer.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Footer) - return object; - var message = new $root.proto.Footer(); - if (object.text != null) - message.text = String(object.text); - return message; - }; - - /** - * Creates a plain object from a Footer message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.Footer - * @static - * @param {proto.Footer} message Footer - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Footer.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.text = ""; - if (message.text != null && message.hasOwnProperty("text")) - object.text = message.text; - return object; - }; - - /** - * Converts this Footer to JSON. - * @function toJSON - * @memberof proto.Footer - * @instance - * @returns {Object.} JSON object - */ - Footer.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Footer; - })(); - - proto.FourRowTemplate = (function() { - - /** - * Properties of a FourRowTemplate. - * @memberof proto - * @interface IFourRowTemplate - * @property {proto.IHighlyStructuredMessage|null} [content] FourRowTemplate content - * @property {proto.IHighlyStructuredMessage|null} [footer] FourRowTemplate footer - * @property {Array.|null} [buttons] FourRowTemplate buttons - * @property {proto.IDocumentMessage|null} [documentMessage] FourRowTemplate documentMessage - * @property {proto.IHighlyStructuredMessage|null} [highlyStructuredMessage] FourRowTemplate highlyStructuredMessage - * @property {proto.IImageMessage|null} [imageMessage] FourRowTemplate imageMessage - * @property {proto.IVideoMessage|null} [videoMessage] FourRowTemplate videoMessage - * @property {proto.ILocationMessage|null} [locationMessage] FourRowTemplate locationMessage - */ - - /** - * Constructs a new FourRowTemplate. - * @memberof proto - * @classdesc Represents a FourRowTemplate. - * @implements IFourRowTemplate - * @constructor - * @param {proto.IFourRowTemplate=} [properties] Properties to set - */ - function FourRowTemplate(properties) { - this.buttons = []; - 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]]; - } - - /** - * FourRowTemplate content. - * @member {proto.IHighlyStructuredMessage|null|undefined} content - * @memberof proto.FourRowTemplate - * @instance - */ - FourRowTemplate.prototype.content = null; - - /** - * FourRowTemplate footer. - * @member {proto.IHighlyStructuredMessage|null|undefined} footer - * @memberof proto.FourRowTemplate - * @instance - */ - FourRowTemplate.prototype.footer = null; - - /** - * FourRowTemplate buttons. - * @member {Array.} buttons - * @memberof proto.FourRowTemplate - * @instance - */ - FourRowTemplate.prototype.buttons = $util.emptyArray; - - /** - * FourRowTemplate documentMessage. - * @member {proto.IDocumentMessage|null|undefined} documentMessage - * @memberof proto.FourRowTemplate - * @instance - */ - FourRowTemplate.prototype.documentMessage = null; - - /** - * FourRowTemplate highlyStructuredMessage. - * @member {proto.IHighlyStructuredMessage|null|undefined} highlyStructuredMessage - * @memberof proto.FourRowTemplate - * @instance - */ - FourRowTemplate.prototype.highlyStructuredMessage = null; - - /** - * FourRowTemplate imageMessage. - * @member {proto.IImageMessage|null|undefined} imageMessage - * @memberof proto.FourRowTemplate - * @instance - */ - FourRowTemplate.prototype.imageMessage = null; - - /** - * FourRowTemplate videoMessage. - * @member {proto.IVideoMessage|null|undefined} videoMessage - * @memberof proto.FourRowTemplate - * @instance - */ - FourRowTemplate.prototype.videoMessage = null; - - /** - * FourRowTemplate locationMessage. - * @member {proto.ILocationMessage|null|undefined} locationMessage - * @memberof proto.FourRowTemplate - * @instance - */ - FourRowTemplate.prototype.locationMessage = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * FourRowTemplate title. - * @member {"documentMessage"|"highlyStructuredMessage"|"imageMessage"|"videoMessage"|"locationMessage"|undefined} title - * @memberof proto.FourRowTemplate - * @instance - */ - Object.defineProperty(FourRowTemplate.prototype, "title", { - get: $util.oneOfGetter($oneOfFields = ["documentMessage", "highlyStructuredMessage", "imageMessage", "videoMessage", "locationMessage"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new FourRowTemplate instance using the specified properties. - * @function create - * @memberof proto.FourRowTemplate - * @static - * @param {proto.IFourRowTemplate=} [properties] Properties to set - * @returns {proto.FourRowTemplate} FourRowTemplate instance - */ - FourRowTemplate.create = function create(properties) { - return new FourRowTemplate(properties); - }; - - /** - * Encodes the specified FourRowTemplate message. Does not implicitly {@link proto.FourRowTemplate.verify|verify} messages. - * @function encode - * @memberof proto.FourRowTemplate - * @static - * @param {proto.IFourRowTemplate} message FourRowTemplate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FourRowTemplate.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.documentMessage != null && Object.hasOwnProperty.call(message, "documentMessage")) - $root.proto.DocumentMessage.encode(message.documentMessage, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.highlyStructuredMessage != null && Object.hasOwnProperty.call(message, "highlyStructuredMessage")) - $root.proto.HighlyStructuredMessage.encode(message.highlyStructuredMessage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.imageMessage != null && Object.hasOwnProperty.call(message, "imageMessage")) - $root.proto.ImageMessage.encode(message.imageMessage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.videoMessage != null && Object.hasOwnProperty.call(message, "videoMessage")) - $root.proto.VideoMessage.encode(message.videoMessage, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.locationMessage != null && Object.hasOwnProperty.call(message, "locationMessage")) - $root.proto.LocationMessage.encode(message.locationMessage, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.content != null && Object.hasOwnProperty.call(message, "content")) - $root.proto.HighlyStructuredMessage.encode(message.content, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.footer != null && Object.hasOwnProperty.call(message, "footer")) - $root.proto.HighlyStructuredMessage.encode(message.footer, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.buttons != null && message.buttons.length) - for (var i = 0; i < message.buttons.length; ++i) - $root.proto.TemplateButton.encode(message.buttons[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FourRowTemplate message, length delimited. Does not implicitly {@link proto.FourRowTemplate.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.FourRowTemplate - * @static - * @param {proto.IFourRowTemplate} message FourRowTemplate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FourRowTemplate.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FourRowTemplate message from the specified reader or buffer. - * @function decode - * @memberof proto.FourRowTemplate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.FourRowTemplate} FourRowTemplate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FourRowTemplate.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.FourRowTemplate(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 6: - message.content = $root.proto.HighlyStructuredMessage.decode(reader, reader.uint32()); - break; - case 7: - message.footer = $root.proto.HighlyStructuredMessage.decode(reader, reader.uint32()); - break; - case 8: - if (!(message.buttons && message.buttons.length)) - message.buttons = []; - message.buttons.push($root.proto.TemplateButton.decode(reader, reader.uint32())); - break; - case 1: - message.documentMessage = $root.proto.DocumentMessage.decode(reader, reader.uint32()); - break; - case 2: - message.highlyStructuredMessage = $root.proto.HighlyStructuredMessage.decode(reader, reader.uint32()); - break; - case 3: - message.imageMessage = $root.proto.ImageMessage.decode(reader, reader.uint32()); - break; - case 4: - message.videoMessage = $root.proto.VideoMessage.decode(reader, reader.uint32()); - break; - case 5: - message.locationMessage = $root.proto.LocationMessage.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FourRowTemplate message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.FourRowTemplate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.FourRowTemplate} FourRowTemplate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FourRowTemplate.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FourRowTemplate message. - * @function verify - * @memberof proto.FourRowTemplate - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FourRowTemplate.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.content != null && message.hasOwnProperty("content")) { - var error = $root.proto.HighlyStructuredMessage.verify(message.content); - if (error) - return "content." + error; - } - if (message.footer != null && message.hasOwnProperty("footer")) { - var error = $root.proto.HighlyStructuredMessage.verify(message.footer); - if (error) - return "footer." + error; - } - if (message.buttons != null && message.hasOwnProperty("buttons")) { - if (!Array.isArray(message.buttons)) - return "buttons: array expected"; - for (var i = 0; i < message.buttons.length; ++i) { - var error = $root.proto.TemplateButton.verify(message.buttons[i]); - if (error) - return "buttons." + error; - } - } - if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) { - properties.title = 1; - { - var error = $root.proto.DocumentMessage.verify(message.documentMessage); - if (error) - return "documentMessage." + error; - } - } - if (message.highlyStructuredMessage != null && message.hasOwnProperty("highlyStructuredMessage")) { - if (properties.title === 1) - return "title: multiple values"; - properties.title = 1; - { - var error = $root.proto.HighlyStructuredMessage.verify(message.highlyStructuredMessage); - if (error) - return "highlyStructuredMessage." + error; - } - } - if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) { - if (properties.title === 1) - return "title: multiple values"; - properties.title = 1; - { - var error = $root.proto.ImageMessage.verify(message.imageMessage); - if (error) - return "imageMessage." + error; - } - } - if (message.videoMessage != null && message.hasOwnProperty("videoMessage")) { - if (properties.title === 1) - return "title: multiple values"; - properties.title = 1; - { - var error = $root.proto.VideoMessage.verify(message.videoMessage); - if (error) - return "videoMessage." + error; - } - } - if (message.locationMessage != null && message.hasOwnProperty("locationMessage")) { - if (properties.title === 1) - return "title: multiple values"; - properties.title = 1; - { - var error = $root.proto.LocationMessage.verify(message.locationMessage); - if (error) - return "locationMessage." + error; - } - } - return null; - }; - - /** - * Creates a FourRowTemplate message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.FourRowTemplate - * @static - * @param {Object.} object Plain object - * @returns {proto.FourRowTemplate} FourRowTemplate - */ - FourRowTemplate.fromObject = function fromObject(object) { - if (object instanceof $root.proto.FourRowTemplate) - return object; - var message = new $root.proto.FourRowTemplate(); - if (object.content != null) { - if (typeof object.content !== "object") - throw TypeError(".proto.FourRowTemplate.content: object expected"); - message.content = $root.proto.HighlyStructuredMessage.fromObject(object.content); - } - if (object.footer != null) { - if (typeof object.footer !== "object") - throw TypeError(".proto.FourRowTemplate.footer: object expected"); - message.footer = $root.proto.HighlyStructuredMessage.fromObject(object.footer); - } - if (object.buttons) { - if (!Array.isArray(object.buttons)) - throw TypeError(".proto.FourRowTemplate.buttons: array expected"); - message.buttons = []; - for (var i = 0; i < object.buttons.length; ++i) { - if (typeof object.buttons[i] !== "object") - throw TypeError(".proto.FourRowTemplate.buttons: object expected"); - message.buttons[i] = $root.proto.TemplateButton.fromObject(object.buttons[i]); - } - } - if (object.documentMessage != null) { - if (typeof object.documentMessage !== "object") - throw TypeError(".proto.FourRowTemplate.documentMessage: object expected"); - message.documentMessage = $root.proto.DocumentMessage.fromObject(object.documentMessage); - } - if (object.highlyStructuredMessage != null) { - if (typeof object.highlyStructuredMessage !== "object") - throw TypeError(".proto.FourRowTemplate.highlyStructuredMessage: object expected"); - message.highlyStructuredMessage = $root.proto.HighlyStructuredMessage.fromObject(object.highlyStructuredMessage); - } - if (object.imageMessage != null) { - if (typeof object.imageMessage !== "object") - throw TypeError(".proto.FourRowTemplate.imageMessage: object expected"); - message.imageMessage = $root.proto.ImageMessage.fromObject(object.imageMessage); - } - if (object.videoMessage != null) { - if (typeof object.videoMessage !== "object") - throw TypeError(".proto.FourRowTemplate.videoMessage: object expected"); - message.videoMessage = $root.proto.VideoMessage.fromObject(object.videoMessage); - } - if (object.locationMessage != null) { - if (typeof object.locationMessage !== "object") - throw TypeError(".proto.FourRowTemplate.locationMessage: object expected"); - message.locationMessage = $root.proto.LocationMessage.fromObject(object.locationMessage); - } - return message; - }; - - /** - * Creates a plain object from a FourRowTemplate message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.FourRowTemplate - * @static - * @param {proto.FourRowTemplate} message FourRowTemplate - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FourRowTemplate.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.buttons = []; - if (options.defaults) { - object.content = null; - object.footer = null; - } - if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) { - object.documentMessage = $root.proto.DocumentMessage.toObject(message.documentMessage, options); - if (options.oneofs) - object.title = "documentMessage"; - } - if (message.highlyStructuredMessage != null && message.hasOwnProperty("highlyStructuredMessage")) { - object.highlyStructuredMessage = $root.proto.HighlyStructuredMessage.toObject(message.highlyStructuredMessage, options); - if (options.oneofs) - object.title = "highlyStructuredMessage"; - } - if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) { - object.imageMessage = $root.proto.ImageMessage.toObject(message.imageMessage, options); - if (options.oneofs) - object.title = "imageMessage"; - } - if (message.videoMessage != null && message.hasOwnProperty("videoMessage")) { - object.videoMessage = $root.proto.VideoMessage.toObject(message.videoMessage, options); - if (options.oneofs) - object.title = "videoMessage"; - } - if (message.locationMessage != null && message.hasOwnProperty("locationMessage")) { - object.locationMessage = $root.proto.LocationMessage.toObject(message.locationMessage, options); - if (options.oneofs) - object.title = "locationMessage"; - } - if (message.content != null && message.hasOwnProperty("content")) - object.content = $root.proto.HighlyStructuredMessage.toObject(message.content, options); - if (message.footer != null && message.hasOwnProperty("footer")) - object.footer = $root.proto.HighlyStructuredMessage.toObject(message.footer, options); - if (message.buttons && message.buttons.length) { - object.buttons = []; - for (var j = 0; j < message.buttons.length; ++j) - object.buttons[j] = $root.proto.TemplateButton.toObject(message.buttons[j], options); - } - return object; - }; - - /** - * Converts this FourRowTemplate to JSON. - * @function toJSON - * @memberof proto.FourRowTemplate - * @instance - * @returns {Object.} JSON object - */ - FourRowTemplate.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return FourRowTemplate; - })(); - - proto.FutureProofMessage = (function() { - - /** - * Properties of a FutureProofMessage. - * @memberof proto - * @interface IFutureProofMessage - * @property {proto.IMessage|null} [message] FutureProofMessage message - */ - - /** - * Constructs a new FutureProofMessage. - * @memberof proto - * @classdesc Represents a FutureProofMessage. - * @implements IFutureProofMessage - * @constructor - * @param {proto.IFutureProofMessage=} [properties] Properties to set - */ - function FutureProofMessage(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]]; - } - - /** - * FutureProofMessage message. - * @member {proto.IMessage|null|undefined} message - * @memberof proto.FutureProofMessage - * @instance - */ - FutureProofMessage.prototype.message = null; - - /** - * Creates a new FutureProofMessage instance using the specified properties. - * @function create - * @memberof proto.FutureProofMessage - * @static - * @param {proto.IFutureProofMessage=} [properties] Properties to set - * @returns {proto.FutureProofMessage} FutureProofMessage instance - */ - FutureProofMessage.create = function create(properties) { - return new FutureProofMessage(properties); - }; - - /** - * Encodes the specified FutureProofMessage message. Does not implicitly {@link proto.FutureProofMessage.verify|verify} messages. - * @function encode - * @memberof proto.FutureProofMessage - * @static - * @param {proto.IFutureProofMessage} message FutureProofMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FutureProofMessage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - $root.proto.Message.encode(message.message, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FutureProofMessage message, length delimited. Does not implicitly {@link proto.FutureProofMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.FutureProofMessage - * @static - * @param {proto.IFutureProofMessage} message FutureProofMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FutureProofMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FutureProofMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.FutureProofMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.FutureProofMessage} FutureProofMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FutureProofMessage.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.FutureProofMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message = $root.proto.Message.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FutureProofMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.FutureProofMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.FutureProofMessage} FutureProofMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FutureProofMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FutureProofMessage message. - * @function verify - * @memberof proto.FutureProofMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FutureProofMessage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.message != null && message.hasOwnProperty("message")) { - var error = $root.proto.Message.verify(message.message); - if (error) - return "message." + error; - } - return null; - }; - - /** - * Creates a FutureProofMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.FutureProofMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.FutureProofMessage} FutureProofMessage - */ - FutureProofMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.FutureProofMessage) - return object; - var message = new $root.proto.FutureProofMessage(); - if (object.message != null) { - if (typeof object.message !== "object") - throw TypeError(".proto.FutureProofMessage.message: object expected"); - message.message = $root.proto.Message.fromObject(object.message); - } - return message; - }; - - /** - * Creates a plain object from a FutureProofMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.FutureProofMessage - * @static - * @param {proto.FutureProofMessage} message FutureProofMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FutureProofMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.message = null; - if (message.message != null && message.hasOwnProperty("message")) - object.message = $root.proto.Message.toObject(message.message, options); - return object; - }; - - /** - * Converts this FutureProofMessage to JSON. - * @function toJSON - * @memberof proto.FutureProofMessage - * @instance - * @returns {Object.} JSON object - */ - FutureProofMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return FutureProofMessage; - })(); - proto.GlobalSettings = (function() { /** @@ -21474,403 +12777,6 @@ $root.proto = (function() { return GlobalSettings; })(); - proto.GroupInviteMessage = (function() { - - /** - * Properties of a GroupInviteMessage. - * @memberof proto - * @interface IGroupInviteMessage - * @property {string|null} [groupJid] GroupInviteMessage groupJid - * @property {string|null} [inviteCode] GroupInviteMessage inviteCode - * @property {number|Long|null} [inviteExpiration] GroupInviteMessage inviteExpiration - * @property {string|null} [groupName] GroupInviteMessage groupName - * @property {Uint8Array|null} [jpegThumbnail] GroupInviteMessage jpegThumbnail - * @property {string|null} [caption] GroupInviteMessage caption - * @property {proto.IContextInfo|null} [contextInfo] GroupInviteMessage contextInfo - * @property {proto.GroupInviteMessage.GroupInviteMessageGroupType|null} [groupType] GroupInviteMessage groupType - */ - - /** - * Constructs a new GroupInviteMessage. - * @memberof proto - * @classdesc Represents a GroupInviteMessage. - * @implements IGroupInviteMessage - * @constructor - * @param {proto.IGroupInviteMessage=} [properties] Properties to set - */ - function GroupInviteMessage(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]]; - } - - /** - * GroupInviteMessage groupJid. - * @member {string} groupJid - * @memberof proto.GroupInviteMessage - * @instance - */ - GroupInviteMessage.prototype.groupJid = ""; - - /** - * GroupInviteMessage inviteCode. - * @member {string} inviteCode - * @memberof proto.GroupInviteMessage - * @instance - */ - GroupInviteMessage.prototype.inviteCode = ""; - - /** - * GroupInviteMessage inviteExpiration. - * @member {number|Long} inviteExpiration - * @memberof proto.GroupInviteMessage - * @instance - */ - GroupInviteMessage.prototype.inviteExpiration = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * GroupInviteMessage groupName. - * @member {string} groupName - * @memberof proto.GroupInviteMessage - * @instance - */ - GroupInviteMessage.prototype.groupName = ""; - - /** - * GroupInviteMessage jpegThumbnail. - * @member {Uint8Array} jpegThumbnail - * @memberof proto.GroupInviteMessage - * @instance - */ - GroupInviteMessage.prototype.jpegThumbnail = $util.newBuffer([]); - - /** - * GroupInviteMessage caption. - * @member {string} caption - * @memberof proto.GroupInviteMessage - * @instance - */ - GroupInviteMessage.prototype.caption = ""; - - /** - * GroupInviteMessage contextInfo. - * @member {proto.IContextInfo|null|undefined} contextInfo - * @memberof proto.GroupInviteMessage - * @instance - */ - GroupInviteMessage.prototype.contextInfo = null; - - /** - * GroupInviteMessage groupType. - * @member {proto.GroupInviteMessage.GroupInviteMessageGroupType} groupType - * @memberof proto.GroupInviteMessage - * @instance - */ - GroupInviteMessage.prototype.groupType = 0; - - /** - * Creates a new GroupInviteMessage instance using the specified properties. - * @function create - * @memberof proto.GroupInviteMessage - * @static - * @param {proto.IGroupInviteMessage=} [properties] Properties to set - * @returns {proto.GroupInviteMessage} GroupInviteMessage instance - */ - GroupInviteMessage.create = function create(properties) { - return new GroupInviteMessage(properties); - }; - - /** - * Encodes the specified GroupInviteMessage message. Does not implicitly {@link proto.GroupInviteMessage.verify|verify} messages. - * @function encode - * @memberof proto.GroupInviteMessage - * @static - * @param {proto.IGroupInviteMessage} message GroupInviteMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GroupInviteMessage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.groupJid != null && Object.hasOwnProperty.call(message, "groupJid")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.groupJid); - if (message.inviteCode != null && Object.hasOwnProperty.call(message, "inviteCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.inviteCode); - if (message.inviteExpiration != null && Object.hasOwnProperty.call(message, "inviteExpiration")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.inviteExpiration); - if (message.groupName != null && Object.hasOwnProperty.call(message, "groupName")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.groupName); - if (message.jpegThumbnail != null && Object.hasOwnProperty.call(message, "jpegThumbnail")) - writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.jpegThumbnail); - if (message.caption != null && Object.hasOwnProperty.call(message, "caption")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.caption); - if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) - $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.groupType != null && Object.hasOwnProperty.call(message, "groupType")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.groupType); - return writer; - }; - - /** - * Encodes the specified GroupInviteMessage message, length delimited. Does not implicitly {@link proto.GroupInviteMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.GroupInviteMessage - * @static - * @param {proto.IGroupInviteMessage} message GroupInviteMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GroupInviteMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GroupInviteMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.GroupInviteMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.GroupInviteMessage} GroupInviteMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GroupInviteMessage.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.GroupInviteMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.groupJid = reader.string(); - break; - case 2: - message.inviteCode = reader.string(); - break; - case 3: - message.inviteExpiration = reader.int64(); - break; - case 4: - message.groupName = reader.string(); - break; - case 5: - message.jpegThumbnail = reader.bytes(); - break; - case 6: - message.caption = reader.string(); - break; - case 7: - message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); - break; - case 8: - message.groupType = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GroupInviteMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.GroupInviteMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.GroupInviteMessage} GroupInviteMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GroupInviteMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GroupInviteMessage message. - * @function verify - * @memberof proto.GroupInviteMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GroupInviteMessage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.groupJid != null && message.hasOwnProperty("groupJid")) - if (!$util.isString(message.groupJid)) - return "groupJid: string expected"; - if (message.inviteCode != null && message.hasOwnProperty("inviteCode")) - if (!$util.isString(message.inviteCode)) - return "inviteCode: string expected"; - if (message.inviteExpiration != null && message.hasOwnProperty("inviteExpiration")) - if (!$util.isInteger(message.inviteExpiration) && !(message.inviteExpiration && $util.isInteger(message.inviteExpiration.low) && $util.isInteger(message.inviteExpiration.high))) - return "inviteExpiration: integer|Long expected"; - if (message.groupName != null && message.hasOwnProperty("groupName")) - if (!$util.isString(message.groupName)) - return "groupName: string 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.caption != null && message.hasOwnProperty("caption")) - if (!$util.isString(message.caption)) - return "caption: string expected"; - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { - var error = $root.proto.ContextInfo.verify(message.contextInfo); - if (error) - return "contextInfo." + error; - } - if (message.groupType != null && message.hasOwnProperty("groupType")) - switch (message.groupType) { - default: - return "groupType: enum value expected"; - case 0: - case 1: - break; - } - return null; - }; - - /** - * Creates a GroupInviteMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.GroupInviteMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.GroupInviteMessage} GroupInviteMessage - */ - GroupInviteMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.GroupInviteMessage) - return object; - var message = new $root.proto.GroupInviteMessage(); - if (object.groupJid != null) - message.groupJid = String(object.groupJid); - if (object.inviteCode != null) - message.inviteCode = String(object.inviteCode); - if (object.inviteExpiration != null) - if ($util.Long) - (message.inviteExpiration = $util.Long.fromValue(object.inviteExpiration)).unsigned = false; - else if (typeof object.inviteExpiration === "string") - message.inviteExpiration = parseInt(object.inviteExpiration, 10); - else if (typeof object.inviteExpiration === "number") - message.inviteExpiration = object.inviteExpiration; - else if (typeof object.inviteExpiration === "object") - message.inviteExpiration = new $util.LongBits(object.inviteExpiration.low >>> 0, object.inviteExpiration.high >>> 0).toNumber(); - if (object.groupName != null) - message.groupName = String(object.groupName); - 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.caption != null) - message.caption = String(object.caption); - if (object.contextInfo != null) { - if (typeof object.contextInfo !== "object") - throw TypeError(".proto.GroupInviteMessage.contextInfo: object expected"); - message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); - } - switch (object.groupType) { - case "DEFAULT": - case 0: - message.groupType = 0; - break; - case "PARENT": - case 1: - message.groupType = 1; - break; - } - return message; - }; - - /** - * Creates a plain object from a GroupInviteMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.GroupInviteMessage - * @static - * @param {proto.GroupInviteMessage} message GroupInviteMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GroupInviteMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.groupJid = ""; - object.inviteCode = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.inviteExpiration = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.inviteExpiration = options.longs === String ? "0" : 0; - object.groupName = ""; - if (options.bytes === String) - object.jpegThumbnail = ""; - else { - object.jpegThumbnail = []; - if (options.bytes !== Array) - object.jpegThumbnail = $util.newBuffer(object.jpegThumbnail); - } - object.caption = ""; - object.contextInfo = null; - object.groupType = options.enums === String ? "DEFAULT" : 0; - } - if (message.groupJid != null && message.hasOwnProperty("groupJid")) - object.groupJid = message.groupJid; - if (message.inviteCode != null && message.hasOwnProperty("inviteCode")) - object.inviteCode = message.inviteCode; - if (message.inviteExpiration != null && message.hasOwnProperty("inviteExpiration")) - if (typeof message.inviteExpiration === "number") - object.inviteExpiration = options.longs === String ? String(message.inviteExpiration) : message.inviteExpiration; - else - object.inviteExpiration = options.longs === String ? $util.Long.prototype.toString.call(message.inviteExpiration) : options.longs === Number ? new $util.LongBits(message.inviteExpiration.low >>> 0, message.inviteExpiration.high >>> 0).toNumber() : message.inviteExpiration; - if (message.groupName != null && message.hasOwnProperty("groupName")) - object.groupName = message.groupName; - 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.caption != null && message.hasOwnProperty("caption")) - object.caption = message.caption; - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) - object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); - if (message.groupType != null && message.hasOwnProperty("groupType")) - object.groupType = options.enums === String ? $root.proto.GroupInviteMessage.GroupInviteMessageGroupType[message.groupType] : message.groupType; - return object; - }; - - /** - * Converts this GroupInviteMessage to JSON. - * @function toJSON - * @memberof proto.GroupInviteMessage - * @instance - * @returns {Object.} JSON object - */ - GroupInviteMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * GroupInviteMessageGroupType enum. - * @name proto.GroupInviteMessage.GroupInviteMessageGroupType - * @enum {number} - * @property {number} DEFAULT=0 DEFAULT value - * @property {number} PARENT=1 PARENT value - */ - GroupInviteMessage.GroupInviteMessageGroupType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DEFAULT"] = 0; - values[valuesById[1] = "PARENT"] = 1; - return values; - })(); - - return GroupInviteMessage; - })(); - proto.GroupParticipant = (function() { /** @@ -21878,7 +12784,7 @@ $root.proto = (function() { * @memberof proto * @interface IGroupParticipant * @property {string} userJid GroupParticipant userJid - * @property {proto.GroupParticipant.GroupParticipantRank|null} [rank] GroupParticipant rank + * @property {proto.GroupParticipant.Rank|null} [rank] GroupParticipant rank */ /** @@ -21906,7 +12812,7 @@ $root.proto = (function() { /** * GroupParticipant rank. - * @member {proto.GroupParticipant.GroupParticipantRank} rank + * @member {proto.GroupParticipant.Rank} rank * @memberof proto.GroupParticipant * @instance */ @@ -22081,7 +12987,7 @@ $root.proto = (function() { 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; + object.rank = options.enums === String ? $root.proto.GroupParticipant.Rank[message.rank] : message.rank; return object; }; @@ -22097,14 +13003,14 @@ $root.proto = (function() { }; /** - * GroupParticipantRank enum. - * @name proto.GroupParticipant.GroupParticipantRank + * Rank enum. + * @name proto.GroupParticipant.Rank * @enum {number} * @property {number} REGULAR=0 REGULAR value * @property {number} ADMIN=1 ADMIN value * @property {number} SUPERADMIN=2 SUPERADMIN value */ - GroupParticipant.GroupParticipantRank = (function() { + GroupParticipant.Rank = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "REGULAR"] = 0; values[valuesById[1] = "ADMIN"] = 1; @@ -22115,1362 +13021,15 @@ $root.proto = (function() { return GroupParticipant; })(); - proto.HSMCurrency = (function() { - - /** - * Properties of a HSMCurrency. - * @memberof proto - * @interface IHSMCurrency - * @property {string|null} [currencyCode] HSMCurrency currencyCode - * @property {number|Long|null} [amount1000] HSMCurrency amount1000 - */ - - /** - * Constructs a new HSMCurrency. - * @memberof proto - * @classdesc Represents a HSMCurrency. - * @implements IHSMCurrency - * @constructor - * @param {proto.IHSMCurrency=} [properties] Properties to set - */ - function HSMCurrency(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]]; - } - - /** - * HSMCurrency currencyCode. - * @member {string} currencyCode - * @memberof proto.HSMCurrency - * @instance - */ - HSMCurrency.prototype.currencyCode = ""; - - /** - * HSMCurrency amount1000. - * @member {number|Long} amount1000 - * @memberof proto.HSMCurrency - * @instance - */ - HSMCurrency.prototype.amount1000 = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new HSMCurrency instance using the specified properties. - * @function create - * @memberof proto.HSMCurrency - * @static - * @param {proto.IHSMCurrency=} [properties] Properties to set - * @returns {proto.HSMCurrency} HSMCurrency instance - */ - HSMCurrency.create = function create(properties) { - return new HSMCurrency(properties); - }; - - /** - * Encodes the specified HSMCurrency message. Does not implicitly {@link proto.HSMCurrency.verify|verify} messages. - * @function encode - * @memberof proto.HSMCurrency - * @static - * @param {proto.IHSMCurrency} message HSMCurrency message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HSMCurrency.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.currencyCode); - if (message.amount1000 != null && Object.hasOwnProperty.call(message, "amount1000")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.amount1000); - return writer; - }; - - /** - * Encodes the specified HSMCurrency message, length delimited. Does not implicitly {@link proto.HSMCurrency.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.HSMCurrency - * @static - * @param {proto.IHSMCurrency} message HSMCurrency message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HSMCurrency.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HSMCurrency message from the specified reader or buffer. - * @function decode - * @memberof proto.HSMCurrency - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.HSMCurrency} HSMCurrency - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HSMCurrency.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.HSMCurrency(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.currencyCode = reader.string(); - break; - case 2: - message.amount1000 = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HSMCurrency message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.HSMCurrency - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.HSMCurrency} HSMCurrency - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HSMCurrency.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HSMCurrency message. - * @function verify - * @memberof proto.HSMCurrency - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HSMCurrency.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) - if (!$util.isString(message.currencyCode)) - return "currencyCode: string expected"; - 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"; - return null; - }; - - /** - * Creates a HSMCurrency message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.HSMCurrency - * @static - * @param {Object.} object Plain object - * @returns {proto.HSMCurrency} HSMCurrency - */ - HSMCurrency.fromObject = function fromObject(object) { - if (object instanceof $root.proto.HSMCurrency) - return object; - var message = new $root.proto.HSMCurrency(); - if (object.currencyCode != null) - message.currencyCode = String(object.currencyCode); - if (object.amount1000 != null) - if ($util.Long) - (message.amount1000 = $util.Long.fromValue(object.amount1000)).unsigned = false; - 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(); - return message; - }; - - /** - * Creates a plain object from a HSMCurrency message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.HSMCurrency - * @static - * @param {proto.HSMCurrency} message HSMCurrency - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HSMCurrency.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.currencyCode = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.amount1000 = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.amount1000 = options.longs === String ? "0" : 0; - } - if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) - object.currencyCode = message.currencyCode; - 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() : message.amount1000; - return object; - }; - - /** - * Converts this HSMCurrency to JSON. - * @function toJSON - * @memberof proto.HSMCurrency - * @instance - * @returns {Object.} JSON object - */ - HSMCurrency.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return HSMCurrency; - })(); - - proto.HSMDateTime = (function() { - - /** - * Properties of a HSMDateTime. - * @memberof proto - * @interface IHSMDateTime - * @property {proto.IHSMDateTimeComponent|null} [component] HSMDateTime component - * @property {proto.IHSMDateTimeUnixEpoch|null} [unixEpoch] HSMDateTime unixEpoch - */ - - /** - * Constructs a new HSMDateTime. - * @memberof proto - * @classdesc Represents a HSMDateTime. - * @implements IHSMDateTime - * @constructor - * @param {proto.IHSMDateTime=} [properties] Properties to set - */ - function HSMDateTime(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]]; - } - - /** - * HSMDateTime component. - * @member {proto.IHSMDateTimeComponent|null|undefined} component - * @memberof proto.HSMDateTime - * @instance - */ - HSMDateTime.prototype.component = null; - - /** - * HSMDateTime unixEpoch. - * @member {proto.IHSMDateTimeUnixEpoch|null|undefined} unixEpoch - * @memberof proto.HSMDateTime - * @instance - */ - HSMDateTime.prototype.unixEpoch = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * HSMDateTime datetimeOneof. - * @member {"component"|"unixEpoch"|undefined} datetimeOneof - * @memberof proto.HSMDateTime - * @instance - */ - Object.defineProperty(HSMDateTime.prototype, "datetimeOneof", { - get: $util.oneOfGetter($oneOfFields = ["component", "unixEpoch"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new HSMDateTime instance using the specified properties. - * @function create - * @memberof proto.HSMDateTime - * @static - * @param {proto.IHSMDateTime=} [properties] Properties to set - * @returns {proto.HSMDateTime} HSMDateTime instance - */ - HSMDateTime.create = function create(properties) { - return new HSMDateTime(properties); - }; - - /** - * Encodes the specified HSMDateTime message. Does not implicitly {@link proto.HSMDateTime.verify|verify} messages. - * @function encode - * @memberof proto.HSMDateTime - * @static - * @param {proto.IHSMDateTime} message HSMDateTime message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HSMDateTime.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.component != null && Object.hasOwnProperty.call(message, "component")) - $root.proto.HSMDateTimeComponent.encode(message.component, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.unixEpoch != null && Object.hasOwnProperty.call(message, "unixEpoch")) - $root.proto.HSMDateTimeUnixEpoch.encode(message.unixEpoch, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified HSMDateTime message, length delimited. Does not implicitly {@link proto.HSMDateTime.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.HSMDateTime - * @static - * @param {proto.IHSMDateTime} message HSMDateTime message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HSMDateTime.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HSMDateTime message from the specified reader or buffer. - * @function decode - * @memberof proto.HSMDateTime - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.HSMDateTime} HSMDateTime - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HSMDateTime.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.HSMDateTime(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.component = $root.proto.HSMDateTimeComponent.decode(reader, reader.uint32()); - break; - case 2: - message.unixEpoch = $root.proto.HSMDateTimeUnixEpoch.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HSMDateTime message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.HSMDateTime - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.HSMDateTime} HSMDateTime - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HSMDateTime.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HSMDateTime message. - * @function verify - * @memberof proto.HSMDateTime - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HSMDateTime.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.component != null && message.hasOwnProperty("component")) { - properties.datetimeOneof = 1; - { - var error = $root.proto.HSMDateTimeComponent.verify(message.component); - if (error) - return "component." + error; - } - } - if (message.unixEpoch != null && message.hasOwnProperty("unixEpoch")) { - if (properties.datetimeOneof === 1) - return "datetimeOneof: multiple values"; - properties.datetimeOneof = 1; - { - var error = $root.proto.HSMDateTimeUnixEpoch.verify(message.unixEpoch); - if (error) - return "unixEpoch." + error; - } - } - return null; - }; - - /** - * Creates a HSMDateTime message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.HSMDateTime - * @static - * @param {Object.} object Plain object - * @returns {proto.HSMDateTime} HSMDateTime - */ - HSMDateTime.fromObject = function fromObject(object) { - if (object instanceof $root.proto.HSMDateTime) - return object; - var message = new $root.proto.HSMDateTime(); - if (object.component != null) { - if (typeof object.component !== "object") - throw TypeError(".proto.HSMDateTime.component: object expected"); - message.component = $root.proto.HSMDateTimeComponent.fromObject(object.component); - } - if (object.unixEpoch != null) { - if (typeof object.unixEpoch !== "object") - throw TypeError(".proto.HSMDateTime.unixEpoch: object expected"); - message.unixEpoch = $root.proto.HSMDateTimeUnixEpoch.fromObject(object.unixEpoch); - } - return message; - }; - - /** - * Creates a plain object from a HSMDateTime message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.HSMDateTime - * @static - * @param {proto.HSMDateTime} message HSMDateTime - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HSMDateTime.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.component != null && message.hasOwnProperty("component")) { - object.component = $root.proto.HSMDateTimeComponent.toObject(message.component, options); - if (options.oneofs) - object.datetimeOneof = "component"; - } - if (message.unixEpoch != null && message.hasOwnProperty("unixEpoch")) { - object.unixEpoch = $root.proto.HSMDateTimeUnixEpoch.toObject(message.unixEpoch, options); - if (options.oneofs) - object.datetimeOneof = "unixEpoch"; - } - return object; - }; - - /** - * Converts this HSMDateTime to JSON. - * @function toJSON - * @memberof proto.HSMDateTime - * @instance - * @returns {Object.} JSON object - */ - HSMDateTime.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return HSMDateTime; - })(); - - proto.HSMDateTimeComponent = (function() { - - /** - * Properties of a HSMDateTimeComponent. - * @memberof proto - * @interface IHSMDateTimeComponent - * @property {proto.HSMDateTimeComponent.HSMDateTimeComponentDayOfWeekType|null} [dayOfWeek] HSMDateTimeComponent dayOfWeek - * @property {number|null} [year] HSMDateTimeComponent year - * @property {number|null} [month] HSMDateTimeComponent month - * @property {number|null} [dayOfMonth] HSMDateTimeComponent dayOfMonth - * @property {number|null} [hour] HSMDateTimeComponent hour - * @property {number|null} [minute] HSMDateTimeComponent minute - * @property {proto.HSMDateTimeComponent.HSMDateTimeComponentCalendarType|null} [calendar] HSMDateTimeComponent calendar - */ - - /** - * Constructs a new HSMDateTimeComponent. - * @memberof proto - * @classdesc Represents a HSMDateTimeComponent. - * @implements IHSMDateTimeComponent - * @constructor - * @param {proto.IHSMDateTimeComponent=} [properties] Properties to set - */ - function HSMDateTimeComponent(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]]; - } - - /** - * HSMDateTimeComponent dayOfWeek. - * @member {proto.HSMDateTimeComponent.HSMDateTimeComponentDayOfWeekType} dayOfWeek - * @memberof proto.HSMDateTimeComponent - * @instance - */ - HSMDateTimeComponent.prototype.dayOfWeek = 1; - - /** - * HSMDateTimeComponent year. - * @member {number} year - * @memberof proto.HSMDateTimeComponent - * @instance - */ - HSMDateTimeComponent.prototype.year = 0; - - /** - * HSMDateTimeComponent month. - * @member {number} month - * @memberof proto.HSMDateTimeComponent - * @instance - */ - HSMDateTimeComponent.prototype.month = 0; - - /** - * HSMDateTimeComponent dayOfMonth. - * @member {number} dayOfMonth - * @memberof proto.HSMDateTimeComponent - * @instance - */ - HSMDateTimeComponent.prototype.dayOfMonth = 0; - - /** - * HSMDateTimeComponent hour. - * @member {number} hour - * @memberof proto.HSMDateTimeComponent - * @instance - */ - HSMDateTimeComponent.prototype.hour = 0; - - /** - * HSMDateTimeComponent minute. - * @member {number} minute - * @memberof proto.HSMDateTimeComponent - * @instance - */ - HSMDateTimeComponent.prototype.minute = 0; - - /** - * HSMDateTimeComponent calendar. - * @member {proto.HSMDateTimeComponent.HSMDateTimeComponentCalendarType} calendar - * @memberof proto.HSMDateTimeComponent - * @instance - */ - HSMDateTimeComponent.prototype.calendar = 1; - - /** - * Creates a new HSMDateTimeComponent instance using the specified properties. - * @function create - * @memberof proto.HSMDateTimeComponent - * @static - * @param {proto.IHSMDateTimeComponent=} [properties] Properties to set - * @returns {proto.HSMDateTimeComponent} HSMDateTimeComponent instance - */ - HSMDateTimeComponent.create = function create(properties) { - return new HSMDateTimeComponent(properties); - }; - - /** - * Encodes the specified HSMDateTimeComponent message. Does not implicitly {@link proto.HSMDateTimeComponent.verify|verify} messages. - * @function encode - * @memberof proto.HSMDateTimeComponent - * @static - * @param {proto.IHSMDateTimeComponent} message HSMDateTimeComponent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HSMDateTimeComponent.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dayOfWeek != null && Object.hasOwnProperty.call(message, "dayOfWeek")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.dayOfWeek); - if (message.year != null && Object.hasOwnProperty.call(message, "year")) - writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.year); - if (message.month != null && Object.hasOwnProperty.call(message, "month")) - writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.month); - if (message.dayOfMonth != null && Object.hasOwnProperty.call(message, "dayOfMonth")) - writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.dayOfMonth); - if (message.hour != null && Object.hasOwnProperty.call(message, "hour")) - writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.hour); - if (message.minute != null && Object.hasOwnProperty.call(message, "minute")) - writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.minute); - if (message.calendar != null && Object.hasOwnProperty.call(message, "calendar")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.calendar); - return writer; - }; - - /** - * Encodes the specified HSMDateTimeComponent message, length delimited. Does not implicitly {@link proto.HSMDateTimeComponent.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.HSMDateTimeComponent - * @static - * @param {proto.IHSMDateTimeComponent} message HSMDateTimeComponent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HSMDateTimeComponent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HSMDateTimeComponent message from the specified reader or buffer. - * @function decode - * @memberof proto.HSMDateTimeComponent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.HSMDateTimeComponent} HSMDateTimeComponent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HSMDateTimeComponent.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.HSMDateTimeComponent(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dayOfWeek = reader.int32(); - break; - case 2: - message.year = reader.uint32(); - break; - case 3: - message.month = reader.uint32(); - break; - case 4: - message.dayOfMonth = reader.uint32(); - break; - case 5: - message.hour = reader.uint32(); - break; - case 6: - message.minute = reader.uint32(); - break; - case 7: - message.calendar = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HSMDateTimeComponent message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.HSMDateTimeComponent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.HSMDateTimeComponent} HSMDateTimeComponent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HSMDateTimeComponent.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HSMDateTimeComponent message. - * @function verify - * @memberof proto.HSMDateTimeComponent - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HSMDateTimeComponent.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) - switch (message.dayOfWeek) { - default: - return "dayOfWeek: enum value expected"; - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.year != null && message.hasOwnProperty("year")) - if (!$util.isInteger(message.year)) - return "year: integer expected"; - if (message.month != null && message.hasOwnProperty("month")) - if (!$util.isInteger(message.month)) - return "month: integer expected"; - if (message.dayOfMonth != null && message.hasOwnProperty("dayOfMonth")) - if (!$util.isInteger(message.dayOfMonth)) - return "dayOfMonth: integer expected"; - if (message.hour != null && message.hasOwnProperty("hour")) - if (!$util.isInteger(message.hour)) - return "hour: integer expected"; - if (message.minute != null && message.hasOwnProperty("minute")) - if (!$util.isInteger(message.minute)) - return "minute: integer expected"; - if (message.calendar != null && message.hasOwnProperty("calendar")) - switch (message.calendar) { - default: - return "calendar: enum value expected"; - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a HSMDateTimeComponent message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.HSMDateTimeComponent - * @static - * @param {Object.} object Plain object - * @returns {proto.HSMDateTimeComponent} HSMDateTimeComponent - */ - HSMDateTimeComponent.fromObject = function fromObject(object) { - if (object instanceof $root.proto.HSMDateTimeComponent) - return object; - var message = new $root.proto.HSMDateTimeComponent(); - switch (object.dayOfWeek) { - case "MONDAY": - case 1: - message.dayOfWeek = 1; - break; - case "TUESDAY": - case 2: - message.dayOfWeek = 2; - break; - case "WEDNESDAY": - case 3: - message.dayOfWeek = 3; - break; - case "THURSDAY": - case 4: - message.dayOfWeek = 4; - break; - case "FRIDAY": - case 5: - message.dayOfWeek = 5; - break; - case "SATURDAY": - case 6: - message.dayOfWeek = 6; - break; - case "SUNDAY": - case 7: - message.dayOfWeek = 7; - break; - } - if (object.year != null) - message.year = object.year >>> 0; - if (object.month != null) - message.month = object.month >>> 0; - if (object.dayOfMonth != null) - message.dayOfMonth = object.dayOfMonth >>> 0; - if (object.hour != null) - message.hour = object.hour >>> 0; - if (object.minute != null) - message.minute = object.minute >>> 0; - switch (object.calendar) { - case "GREGORIAN": - case 1: - message.calendar = 1; - break; - case "SOLAR_HIJRI": - case 2: - message.calendar = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a HSMDateTimeComponent message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.HSMDateTimeComponent - * @static - * @param {proto.HSMDateTimeComponent} message HSMDateTimeComponent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HSMDateTimeComponent.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.dayOfWeek = options.enums === String ? "MONDAY" : 1; - object.year = 0; - object.month = 0; - object.dayOfMonth = 0; - object.hour = 0; - object.minute = 0; - object.calendar = options.enums === String ? "GREGORIAN" : 1; - } - if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) - object.dayOfWeek = options.enums === String ? $root.proto.HSMDateTimeComponent.HSMDateTimeComponentDayOfWeekType[message.dayOfWeek] : message.dayOfWeek; - if (message.year != null && message.hasOwnProperty("year")) - object.year = message.year; - if (message.month != null && message.hasOwnProperty("month")) - object.month = message.month; - if (message.dayOfMonth != null && message.hasOwnProperty("dayOfMonth")) - object.dayOfMonth = message.dayOfMonth; - if (message.hour != null && message.hasOwnProperty("hour")) - object.hour = message.hour; - if (message.minute != null && message.hasOwnProperty("minute")) - object.minute = message.minute; - if (message.calendar != null && message.hasOwnProperty("calendar")) - object.calendar = options.enums === String ? $root.proto.HSMDateTimeComponent.HSMDateTimeComponentCalendarType[message.calendar] : message.calendar; - return object; - }; - - /** - * Converts this HSMDateTimeComponent to JSON. - * @function toJSON - * @memberof proto.HSMDateTimeComponent - * @instance - * @returns {Object.} JSON object - */ - HSMDateTimeComponent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * HSMDateTimeComponentDayOfWeekType enum. - * @name proto.HSMDateTimeComponent.HSMDateTimeComponentDayOfWeekType - * @enum {number} - * @property {number} MONDAY=1 MONDAY value - * @property {number} TUESDAY=2 TUESDAY value - * @property {number} WEDNESDAY=3 WEDNESDAY value - * @property {number} THURSDAY=4 THURSDAY value - * @property {number} FRIDAY=5 FRIDAY value - * @property {number} SATURDAY=6 SATURDAY value - * @property {number} SUNDAY=7 SUNDAY value - */ - HSMDateTimeComponent.HSMDateTimeComponentDayOfWeekType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "MONDAY"] = 1; - values[valuesById[2] = "TUESDAY"] = 2; - values[valuesById[3] = "WEDNESDAY"] = 3; - values[valuesById[4] = "THURSDAY"] = 4; - values[valuesById[5] = "FRIDAY"] = 5; - values[valuesById[6] = "SATURDAY"] = 6; - values[valuesById[7] = "SUNDAY"] = 7; - return values; - })(); - - /** - * HSMDateTimeComponentCalendarType enum. - * @name proto.HSMDateTimeComponent.HSMDateTimeComponentCalendarType - * @enum {number} - * @property {number} GREGORIAN=1 GREGORIAN value - * @property {number} SOLAR_HIJRI=2 SOLAR_HIJRI value - */ - HSMDateTimeComponent.HSMDateTimeComponentCalendarType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "GREGORIAN"] = 1; - values[valuesById[2] = "SOLAR_HIJRI"] = 2; - return values; - })(); - - return HSMDateTimeComponent; - })(); - - proto.HSMDateTimeUnixEpoch = (function() { - - /** - * Properties of a HSMDateTimeUnixEpoch. - * @memberof proto - * @interface IHSMDateTimeUnixEpoch - * @property {number|Long|null} [timestamp] HSMDateTimeUnixEpoch timestamp - */ - - /** - * Constructs a new HSMDateTimeUnixEpoch. - * @memberof proto - * @classdesc Represents a HSMDateTimeUnixEpoch. - * @implements IHSMDateTimeUnixEpoch - * @constructor - * @param {proto.IHSMDateTimeUnixEpoch=} [properties] Properties to set - */ - function HSMDateTimeUnixEpoch(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]]; - } - - /** - * HSMDateTimeUnixEpoch timestamp. - * @member {number|Long} timestamp - * @memberof proto.HSMDateTimeUnixEpoch - * @instance - */ - HSMDateTimeUnixEpoch.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new HSMDateTimeUnixEpoch instance using the specified properties. - * @function create - * @memberof proto.HSMDateTimeUnixEpoch - * @static - * @param {proto.IHSMDateTimeUnixEpoch=} [properties] Properties to set - * @returns {proto.HSMDateTimeUnixEpoch} HSMDateTimeUnixEpoch instance - */ - HSMDateTimeUnixEpoch.create = function create(properties) { - return new HSMDateTimeUnixEpoch(properties); - }; - - /** - * Encodes the specified HSMDateTimeUnixEpoch message. Does not implicitly {@link proto.HSMDateTimeUnixEpoch.verify|verify} messages. - * @function encode - * @memberof proto.HSMDateTimeUnixEpoch - * @static - * @param {proto.IHSMDateTimeUnixEpoch} message HSMDateTimeUnixEpoch message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HSMDateTimeUnixEpoch.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); - return writer; - }; - - /** - * Encodes the specified HSMDateTimeUnixEpoch message, length delimited. Does not implicitly {@link proto.HSMDateTimeUnixEpoch.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.HSMDateTimeUnixEpoch - * @static - * @param {proto.IHSMDateTimeUnixEpoch} message HSMDateTimeUnixEpoch message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HSMDateTimeUnixEpoch.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HSMDateTimeUnixEpoch message from the specified reader or buffer. - * @function decode - * @memberof proto.HSMDateTimeUnixEpoch - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.HSMDateTimeUnixEpoch} HSMDateTimeUnixEpoch - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HSMDateTimeUnixEpoch.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.HSMDateTimeUnixEpoch(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.timestamp = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HSMDateTimeUnixEpoch message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.HSMDateTimeUnixEpoch - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.HSMDateTimeUnixEpoch} HSMDateTimeUnixEpoch - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HSMDateTimeUnixEpoch.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HSMDateTimeUnixEpoch message. - * @function verify - * @memberof proto.HSMDateTimeUnixEpoch - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HSMDateTimeUnixEpoch.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"; - return null; - }; - - /** - * Creates a HSMDateTimeUnixEpoch message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.HSMDateTimeUnixEpoch - * @static - * @param {Object.} object Plain object - * @returns {proto.HSMDateTimeUnixEpoch} HSMDateTimeUnixEpoch - */ - HSMDateTimeUnixEpoch.fromObject = function fromObject(object) { - if (object instanceof $root.proto.HSMDateTimeUnixEpoch) - return object; - var message = new $root.proto.HSMDateTimeUnixEpoch(); - 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 HSMDateTimeUnixEpoch message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.HSMDateTimeUnixEpoch - * @static - * @param {proto.HSMDateTimeUnixEpoch} message HSMDateTimeUnixEpoch - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HSMDateTimeUnixEpoch.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; - 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 HSMDateTimeUnixEpoch to JSON. - * @function toJSON - * @memberof proto.HSMDateTimeUnixEpoch - * @instance - * @returns {Object.} JSON object - */ - HSMDateTimeUnixEpoch.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return HSMDateTimeUnixEpoch; - })(); - - proto.HSMLocalizableParameter = (function() { - - /** - * Properties of a HSMLocalizableParameter. - * @memberof proto - * @interface IHSMLocalizableParameter - * @property {string|null} ["default"] HSMLocalizableParameter default - * @property {proto.IHSMCurrency|null} [currency] HSMLocalizableParameter currency - * @property {proto.IHSMDateTime|null} [dateTime] HSMLocalizableParameter dateTime - */ - - /** - * Constructs a new HSMLocalizableParameter. - * @memberof proto - * @classdesc Represents a HSMLocalizableParameter. - * @implements IHSMLocalizableParameter - * @constructor - * @param {proto.IHSMLocalizableParameter=} [properties] Properties to set - */ - function HSMLocalizableParameter(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]]; - } - - /** - * HSMLocalizableParameter default. - * @member {string} default - * @memberof proto.HSMLocalizableParameter - * @instance - */ - HSMLocalizableParameter.prototype["default"] = ""; - - /** - * HSMLocalizableParameter currency. - * @member {proto.IHSMCurrency|null|undefined} currency - * @memberof proto.HSMLocalizableParameter - * @instance - */ - HSMLocalizableParameter.prototype.currency = null; - - /** - * HSMLocalizableParameter dateTime. - * @member {proto.IHSMDateTime|null|undefined} dateTime - * @memberof proto.HSMLocalizableParameter - * @instance - */ - HSMLocalizableParameter.prototype.dateTime = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * HSMLocalizableParameter paramOneof. - * @member {"currency"|"dateTime"|undefined} paramOneof - * @memberof proto.HSMLocalizableParameter - * @instance - */ - Object.defineProperty(HSMLocalizableParameter.prototype, "paramOneof", { - get: $util.oneOfGetter($oneOfFields = ["currency", "dateTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new HSMLocalizableParameter instance using the specified properties. - * @function create - * @memberof proto.HSMLocalizableParameter - * @static - * @param {proto.IHSMLocalizableParameter=} [properties] Properties to set - * @returns {proto.HSMLocalizableParameter} HSMLocalizableParameter instance - */ - HSMLocalizableParameter.create = function create(properties) { - return new HSMLocalizableParameter(properties); - }; - - /** - * Encodes the specified HSMLocalizableParameter message. Does not implicitly {@link proto.HSMLocalizableParameter.verify|verify} messages. - * @function encode - * @memberof proto.HSMLocalizableParameter - * @static - * @param {proto.IHSMLocalizableParameter} message HSMLocalizableParameter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HSMLocalizableParameter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message["default"] != null && Object.hasOwnProperty.call(message, "default")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message["default"]); - if (message.currency != null && Object.hasOwnProperty.call(message, "currency")) - $root.proto.HSMCurrency.encode(message.currency, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.dateTime != null && Object.hasOwnProperty.call(message, "dateTime")) - $root.proto.HSMDateTime.encode(message.dateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified HSMLocalizableParameter message, length delimited. Does not implicitly {@link proto.HSMLocalizableParameter.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.HSMLocalizableParameter - * @static - * @param {proto.IHSMLocalizableParameter} message HSMLocalizableParameter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HSMLocalizableParameter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HSMLocalizableParameter message from the specified reader or buffer. - * @function decode - * @memberof proto.HSMLocalizableParameter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.HSMLocalizableParameter} HSMLocalizableParameter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HSMLocalizableParameter.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.HSMLocalizableParameter(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message["default"] = reader.string(); - break; - case 2: - message.currency = $root.proto.HSMCurrency.decode(reader, reader.uint32()); - break; - case 3: - message.dateTime = $root.proto.HSMDateTime.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HSMLocalizableParameter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.HSMLocalizableParameter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.HSMLocalizableParameter} HSMLocalizableParameter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HSMLocalizableParameter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HSMLocalizableParameter message. - * @function verify - * @memberof proto.HSMLocalizableParameter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HSMLocalizableParameter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message["default"] != null && message.hasOwnProperty("default")) - if (!$util.isString(message["default"])) - return "default: string expected"; - if (message.currency != null && message.hasOwnProperty("currency")) { - properties.paramOneof = 1; - { - var error = $root.proto.HSMCurrency.verify(message.currency); - if (error) - return "currency." + error; - } - } - if (message.dateTime != null && message.hasOwnProperty("dateTime")) { - if (properties.paramOneof === 1) - return "paramOneof: multiple values"; - properties.paramOneof = 1; - { - var error = $root.proto.HSMDateTime.verify(message.dateTime); - if (error) - return "dateTime." + error; - } - } - return null; - }; - - /** - * Creates a HSMLocalizableParameter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.HSMLocalizableParameter - * @static - * @param {Object.} object Plain object - * @returns {proto.HSMLocalizableParameter} HSMLocalizableParameter - */ - HSMLocalizableParameter.fromObject = function fromObject(object) { - if (object instanceof $root.proto.HSMLocalizableParameter) - return object; - var message = new $root.proto.HSMLocalizableParameter(); - if (object["default"] != null) - message["default"] = String(object["default"]); - if (object.currency != null) { - if (typeof object.currency !== "object") - throw TypeError(".proto.HSMLocalizableParameter.currency: object expected"); - message.currency = $root.proto.HSMCurrency.fromObject(object.currency); - } - if (object.dateTime != null) { - if (typeof object.dateTime !== "object") - throw TypeError(".proto.HSMLocalizableParameter.dateTime: object expected"); - message.dateTime = $root.proto.HSMDateTime.fromObject(object.dateTime); - } - return message; - }; - - /** - * Creates a plain object from a HSMLocalizableParameter message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.HSMLocalizableParameter - * @static - * @param {proto.HSMLocalizableParameter} message HSMLocalizableParameter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HSMLocalizableParameter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object["default"] = ""; - if (message["default"] != null && message.hasOwnProperty("default")) - object["default"] = message["default"]; - if (message.currency != null && message.hasOwnProperty("currency")) { - object.currency = $root.proto.HSMCurrency.toObject(message.currency, options); - if (options.oneofs) - object.paramOneof = "currency"; - } - if (message.dateTime != null && message.hasOwnProperty("dateTime")) { - object.dateTime = $root.proto.HSMDateTime.toObject(message.dateTime, options); - if (options.oneofs) - object.paramOneof = "dateTime"; - } - return object; - }; - - /** - * Converts this HSMLocalizableParameter to JSON. - * @function toJSON - * @memberof proto.HSMLocalizableParameter - * @instance - * @returns {Object.} JSON object - */ - HSMLocalizableParameter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - 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 + * @property {proto.HandshakeMessage.IClientHello|null} [clientHello] HandshakeMessage clientHello + * @property {proto.HandshakeMessage.IServerHello|null} [serverHello] HandshakeMessage serverHello + * @property {proto.HandshakeMessage.IClientFinish|null} [clientFinish] HandshakeMessage clientFinish */ /** @@ -23490,7 +13049,7 @@ $root.proto = (function() { /** * HandshakeMessage clientHello. - * @member {proto.IClientHello|null|undefined} clientHello + * @member {proto.HandshakeMessage.IClientHello|null|undefined} clientHello * @memberof proto.HandshakeMessage * @instance */ @@ -23498,7 +13057,7 @@ $root.proto = (function() { /** * HandshakeMessage serverHello. - * @member {proto.IServerHello|null|undefined} serverHello + * @member {proto.HandshakeMessage.IServerHello|null|undefined} serverHello * @memberof proto.HandshakeMessage * @instance */ @@ -23506,7 +13065,7 @@ $root.proto = (function() { /** * HandshakeMessage clientFinish. - * @member {proto.IClientFinish|null|undefined} clientFinish + * @member {proto.HandshakeMessage.IClientFinish|null|undefined} clientFinish * @memberof proto.HandshakeMessage * @instance */ @@ -23537,11 +13096,11 @@ $root.proto = (function() { 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(); + $root.proto.HandshakeMessage.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(); + $root.proto.HandshakeMessage.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(); + $root.proto.HandshakeMessage.ClientFinish.encode(message.clientFinish, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -23577,13 +13136,13 @@ $root.proto = (function() { var tag = reader.uint32(); switch (tag >>> 3) { case 2: - message.clientHello = $root.proto.ClientHello.decode(reader, reader.uint32()); + message.clientHello = $root.proto.HandshakeMessage.ClientHello.decode(reader, reader.uint32()); break; case 3: - message.serverHello = $root.proto.ServerHello.decode(reader, reader.uint32()); + message.serverHello = $root.proto.HandshakeMessage.ServerHello.decode(reader, reader.uint32()); break; case 4: - message.clientFinish = $root.proto.ClientFinish.decode(reader, reader.uint32()); + message.clientFinish = $root.proto.HandshakeMessage.ClientFinish.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -23621,17 +13180,17 @@ $root.proto = (function() { if (typeof message !== "object" || message === null) return "object expected"; if (message.clientHello != null && message.hasOwnProperty("clientHello")) { - var error = $root.proto.ClientHello.verify(message.clientHello); + var error = $root.proto.HandshakeMessage.ClientHello.verify(message.clientHello); if (error) return "clientHello." + error; } if (message.serverHello != null && message.hasOwnProperty("serverHello")) { - var error = $root.proto.ServerHello.verify(message.serverHello); + var error = $root.proto.HandshakeMessage.ServerHello.verify(message.serverHello); if (error) return "serverHello." + error; } if (message.clientFinish != null && message.hasOwnProperty("clientFinish")) { - var error = $root.proto.ClientFinish.verify(message.clientFinish); + var error = $root.proto.HandshakeMessage.ClientFinish.verify(message.clientFinish); if (error) return "clientFinish." + error; } @@ -23653,17 +13212,17 @@ $root.proto = (function() { if (object.clientHello != null) { if (typeof object.clientHello !== "object") throw TypeError(".proto.HandshakeMessage.clientHello: object expected"); - message.clientHello = $root.proto.ClientHello.fromObject(object.clientHello); + message.clientHello = $root.proto.HandshakeMessage.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); + message.serverHello = $root.proto.HandshakeMessage.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); + message.clientFinish = $root.proto.HandshakeMessage.ClientFinish.fromObject(object.clientFinish); } return message; }; @@ -23687,11 +13246,11 @@ $root.proto = (function() { object.clientFinish = null; } if (message.clientHello != null && message.hasOwnProperty("clientHello")) - object.clientHello = $root.proto.ClientHello.toObject(message.clientHello, options); + object.clientHello = $root.proto.HandshakeMessage.ClientHello.toObject(message.clientHello, options); if (message.serverHello != null && message.hasOwnProperty("serverHello")) - object.serverHello = $root.proto.ServerHello.toObject(message.serverHello, options); + object.serverHello = $root.proto.HandshakeMessage.ServerHello.toObject(message.serverHello, options); if (message.clientFinish != null && message.hasOwnProperty("clientFinish")) - object.clientFinish = $root.proto.ClientFinish.toObject(message.clientFinish, options); + object.clientFinish = $root.proto.HandshakeMessage.ClientFinish.toObject(message.clientFinish, options); return object; }; @@ -23706,802 +13265,762 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + HandshakeMessage.ClientFinish = (function() { + + /** + * Properties of a ClientFinish. + * @memberof proto.HandshakeMessage + * @interface IClientFinish + * @property {Uint8Array|null} ["static"] ClientFinish static + * @property {Uint8Array|null} [payload] ClientFinish payload + */ + + /** + * Constructs a new ClientFinish. + * @memberof proto.HandshakeMessage + * @classdesc Represents a ClientFinish. + * @implements IClientFinish + * @constructor + * @param {proto.HandshakeMessage.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.HandshakeMessage.ClientFinish + * @instance + */ + ClientFinish.prototype["static"] = $util.newBuffer([]); + + /** + * ClientFinish payload. + * @member {Uint8Array} payload + * @memberof proto.HandshakeMessage.ClientFinish + * @instance + */ + ClientFinish.prototype.payload = $util.newBuffer([]); + + /** + * Creates a new ClientFinish instance using the specified properties. + * @function create + * @memberof proto.HandshakeMessage.ClientFinish + * @static + * @param {proto.HandshakeMessage.IClientFinish=} [properties] Properties to set + * @returns {proto.HandshakeMessage.ClientFinish} ClientFinish instance + */ + ClientFinish.create = function create(properties) { + return new ClientFinish(properties); + }; + + /** + * Encodes the specified ClientFinish message. Does not implicitly {@link proto.HandshakeMessage.ClientFinish.verify|verify} messages. + * @function encode + * @memberof proto.HandshakeMessage.ClientFinish + * @static + * @param {proto.HandshakeMessage.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.HandshakeMessage.ClientFinish.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.HandshakeMessage.ClientFinish + * @static + * @param {proto.HandshakeMessage.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.HandshakeMessage.ClientFinish + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.HandshakeMessage.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.HandshakeMessage.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.HandshakeMessage.ClientFinish + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.HandshakeMessage.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.HandshakeMessage.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.HandshakeMessage.ClientFinish + * @static + * @param {Object.} object Plain object + * @returns {proto.HandshakeMessage.ClientFinish} ClientFinish + */ + ClientFinish.fromObject = function fromObject(object) { + if (object instanceof $root.proto.HandshakeMessage.ClientFinish) + return object; + var message = new $root.proto.HandshakeMessage.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.HandshakeMessage.ClientFinish + * @static + * @param {proto.HandshakeMessage.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.HandshakeMessage.ClientFinish + * @instance + * @returns {Object.} JSON object + */ + ClientFinish.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ClientFinish; + })(); + + HandshakeMessage.ClientHello = (function() { + + /** + * Properties of a ClientHello. + * @memberof proto.HandshakeMessage + * @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.HandshakeMessage + * @classdesc Represents a ClientHello. + * @implements IClientHello + * @constructor + * @param {proto.HandshakeMessage.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.HandshakeMessage.ClientHello + * @instance + */ + ClientHello.prototype.ephemeral = $util.newBuffer([]); + + /** + * ClientHello static. + * @member {Uint8Array} static + * @memberof proto.HandshakeMessage.ClientHello + * @instance + */ + ClientHello.prototype["static"] = $util.newBuffer([]); + + /** + * ClientHello payload. + * @member {Uint8Array} payload + * @memberof proto.HandshakeMessage.ClientHello + * @instance + */ + ClientHello.prototype.payload = $util.newBuffer([]); + + /** + * Creates a new ClientHello instance using the specified properties. + * @function create + * @memberof proto.HandshakeMessage.ClientHello + * @static + * @param {proto.HandshakeMessage.IClientHello=} [properties] Properties to set + * @returns {proto.HandshakeMessage.ClientHello} ClientHello instance + */ + ClientHello.create = function create(properties) { + return new ClientHello(properties); + }; + + /** + * Encodes the specified ClientHello message. Does not implicitly {@link proto.HandshakeMessage.ClientHello.verify|verify} messages. + * @function encode + * @memberof proto.HandshakeMessage.ClientHello + * @static + * @param {proto.HandshakeMessage.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.HandshakeMessage.ClientHello.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.HandshakeMessage.ClientHello + * @static + * @param {proto.HandshakeMessage.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.HandshakeMessage.ClientHello + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.HandshakeMessage.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.HandshakeMessage.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.HandshakeMessage.ClientHello + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.HandshakeMessage.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.HandshakeMessage.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.HandshakeMessage.ClientHello + * @static + * @param {Object.} object Plain object + * @returns {proto.HandshakeMessage.ClientHello} ClientHello + */ + ClientHello.fromObject = function fromObject(object) { + if (object instanceof $root.proto.HandshakeMessage.ClientHello) + return object; + var message = new $root.proto.HandshakeMessage.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.HandshakeMessage.ClientHello + * @static + * @param {proto.HandshakeMessage.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.HandshakeMessage.ClientHello + * @instance + * @returns {Object.} JSON object + */ + ClientHello.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ClientHello; + })(); + + HandshakeMessage.ServerHello = (function() { + + /** + * Properties of a ServerHello. + * @memberof proto.HandshakeMessage + * @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.HandshakeMessage + * @classdesc Represents a ServerHello. + * @implements IServerHello + * @constructor + * @param {proto.HandshakeMessage.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.HandshakeMessage.ServerHello + * @instance + */ + ServerHello.prototype.ephemeral = $util.newBuffer([]); + + /** + * ServerHello static. + * @member {Uint8Array} static + * @memberof proto.HandshakeMessage.ServerHello + * @instance + */ + ServerHello.prototype["static"] = $util.newBuffer([]); + + /** + * ServerHello payload. + * @member {Uint8Array} payload + * @memberof proto.HandshakeMessage.ServerHello + * @instance + */ + ServerHello.prototype.payload = $util.newBuffer([]); + + /** + * Creates a new ServerHello instance using the specified properties. + * @function create + * @memberof proto.HandshakeMessage.ServerHello + * @static + * @param {proto.HandshakeMessage.IServerHello=} [properties] Properties to set + * @returns {proto.HandshakeMessage.ServerHello} ServerHello instance + */ + ServerHello.create = function create(properties) { + return new ServerHello(properties); + }; + + /** + * Encodes the specified ServerHello message. Does not implicitly {@link proto.HandshakeMessage.ServerHello.verify|verify} messages. + * @function encode + * @memberof proto.HandshakeMessage.ServerHello + * @static + * @param {proto.HandshakeMessage.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.HandshakeMessage.ServerHello.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.HandshakeMessage.ServerHello + * @static + * @param {proto.HandshakeMessage.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.HandshakeMessage.ServerHello + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.HandshakeMessage.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.HandshakeMessage.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.HandshakeMessage.ServerHello + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.HandshakeMessage.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.HandshakeMessage.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.HandshakeMessage.ServerHello + * @static + * @param {Object.} object Plain object + * @returns {proto.HandshakeMessage.ServerHello} ServerHello + */ + ServerHello.fromObject = function fromObject(object) { + if (object instanceof $root.proto.HandshakeMessage.ServerHello) + return object; + var message = new $root.proto.HandshakeMessage.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.HandshakeMessage.ServerHello + * @static + * @param {proto.HandshakeMessage.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.HandshakeMessage.ServerHello + * @instance + * @returns {Object.} JSON object + */ + ServerHello.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ServerHello; + })(); + 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 {proto.HistorySync.HistorySyncType} syncType HistorySync syncType * @property {Array.|null} [conversations] HistorySync conversations * @property {Array.|null} [statusV3Messages] HistorySync statusV3Messages * @property {number|null} [chunkOrder] HistorySync chunkOrder @@ -24510,6 +14029,8 @@ $root.proto = (function() { * @property {proto.IGlobalSettings|null} [globalSettings] HistorySync globalSettings * @property {Uint8Array|null} [threadIdUserSecret] HistorySync threadIdUserSecret * @property {number|null} [threadDsTimeframeOffset] HistorySync threadDsTimeframeOffset + * @property {Array.|null} [recentStickers] HistorySync recentStickers + * @property {Array.|null} [pastParticipants] HistorySync pastParticipants */ /** @@ -24524,6 +14045,8 @@ $root.proto = (function() { this.conversations = []; this.statusV3Messages = []; this.pushnames = []; + this.recentStickers = []; + this.pastParticipants = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24532,7 +14055,7 @@ $root.proto = (function() { /** * HistorySync syncType. - * @member {proto.HistorySync.HistorySyncHistorySyncType} syncType + * @member {proto.HistorySync.HistorySyncType} syncType * @memberof proto.HistorySync * @instance */ @@ -24602,6 +14125,22 @@ $root.proto = (function() { */ HistorySync.prototype.threadDsTimeframeOffset = 0; + /** + * HistorySync recentStickers. + * @member {Array.} recentStickers + * @memberof proto.HistorySync + * @instance + */ + HistorySync.prototype.recentStickers = $util.emptyArray; + + /** + * HistorySync pastParticipants. + * @member {Array.} pastParticipants + * @memberof proto.HistorySync + * @instance + */ + HistorySync.prototype.pastParticipants = $util.emptyArray; + /** * Creates a new HistorySync instance using the specified properties. * @function create @@ -24646,6 +14185,12 @@ $root.proto = (function() { 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); + if (message.recentStickers != null && message.recentStickers.length) + for (var i = 0; i < message.recentStickers.length; ++i) + $root.proto.StickerMetadata.encode(message.recentStickers[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.pastParticipants != null && message.pastParticipants.length) + for (var i = 0; i < message.pastParticipants.length; ++i) + $root.proto.PastParticipants.encode(message.pastParticipants[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); return writer; }; @@ -24713,6 +14258,16 @@ $root.proto = (function() { case 10: message.threadDsTimeframeOffset = reader.uint32(); break; + case 11: + if (!(message.recentStickers && message.recentStickers.length)) + message.recentStickers = []; + message.recentStickers.push($root.proto.StickerMetadata.decode(reader, reader.uint32())); + break; + case 12: + if (!(message.pastParticipants && message.pastParticipants.length)) + message.pastParticipants = []; + message.pastParticipants.push($root.proto.PastParticipants.decode(reader, reader.uint32())); + break; default: reader.skipType(tag & 7); break; @@ -24758,6 +14313,7 @@ $root.proto = (function() { case 2: case 3: case 4: + case 5: break; } if (message.conversations != null && message.hasOwnProperty("conversations")) { @@ -24804,6 +14360,24 @@ $root.proto = (function() { if (message.threadDsTimeframeOffset != null && message.hasOwnProperty("threadDsTimeframeOffset")) if (!$util.isInteger(message.threadDsTimeframeOffset)) return "threadDsTimeframeOffset: integer expected"; + if (message.recentStickers != null && message.hasOwnProperty("recentStickers")) { + if (!Array.isArray(message.recentStickers)) + return "recentStickers: array expected"; + for (var i = 0; i < message.recentStickers.length; ++i) { + var error = $root.proto.StickerMetadata.verify(message.recentStickers[i]); + if (error) + return "recentStickers." + error; + } + } + if (message.pastParticipants != null && message.hasOwnProperty("pastParticipants")) { + if (!Array.isArray(message.pastParticipants)) + return "pastParticipants: array expected"; + for (var i = 0; i < message.pastParticipants.length; ++i) { + var error = $root.proto.PastParticipants.verify(message.pastParticipants[i]); + if (error) + return "pastParticipants." + error; + } + } return null; }; @@ -24840,6 +14414,10 @@ $root.proto = (function() { case 4: message.syncType = 4; break; + case "UNBLOCKING_DATA": + case 5: + message.syncType = 5; + break; } if (object.conversations) { if (!Array.isArray(object.conversations)) @@ -24887,6 +14465,26 @@ $root.proto = (function() { message.threadIdUserSecret = object.threadIdUserSecret; if (object.threadDsTimeframeOffset != null) message.threadDsTimeframeOffset = object.threadDsTimeframeOffset >>> 0; + if (object.recentStickers) { + if (!Array.isArray(object.recentStickers)) + throw TypeError(".proto.HistorySync.recentStickers: array expected"); + message.recentStickers = []; + for (var i = 0; i < object.recentStickers.length; ++i) { + if (typeof object.recentStickers[i] !== "object") + throw TypeError(".proto.HistorySync.recentStickers: object expected"); + message.recentStickers[i] = $root.proto.StickerMetadata.fromObject(object.recentStickers[i]); + } + } + if (object.pastParticipants) { + if (!Array.isArray(object.pastParticipants)) + throw TypeError(".proto.HistorySync.pastParticipants: array expected"); + message.pastParticipants = []; + for (var i = 0; i < object.pastParticipants.length; ++i) { + if (typeof object.pastParticipants[i] !== "object") + throw TypeError(".proto.HistorySync.pastParticipants: object expected"); + message.pastParticipants[i] = $root.proto.PastParticipants.fromObject(object.pastParticipants[i]); + } + } return message; }; @@ -24907,6 +14505,8 @@ $root.proto = (function() { object.conversations = []; object.statusV3Messages = []; object.pushnames = []; + object.recentStickers = []; + object.pastParticipants = []; } if (options.defaults) { object.syncType = options.enums === String ? "INITIAL_BOOTSTRAP" : 0; @@ -24923,7 +14523,7 @@ $root.proto = (function() { object.threadDsTimeframeOffset = 0; } if (message.syncType != null && message.hasOwnProperty("syncType")) - object.syncType = options.enums === String ? $root.proto.HistorySync.HistorySyncHistorySyncType[message.syncType] : message.syncType; + object.syncType = options.enums === String ? $root.proto.HistorySync.HistorySyncType[message.syncType] : message.syncType; if (message.conversations && message.conversations.length) { object.conversations = []; for (var j = 0; j < message.conversations.length; ++j) @@ -24949,6 +14549,16 @@ $root.proto = (function() { 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; + if (message.recentStickers && message.recentStickers.length) { + object.recentStickers = []; + for (var j = 0; j < message.recentStickers.length; ++j) + object.recentStickers[j] = $root.proto.StickerMetadata.toObject(message.recentStickers[j], options); + } + if (message.pastParticipants && message.pastParticipants.length) { + object.pastParticipants = []; + for (var j = 0; j < message.pastParticipants.length; ++j) + object.pastParticipants[j] = $root.proto.PastParticipants.toObject(message.pastParticipants[j], options); + } return object; }; @@ -24964,22 +14574,24 @@ $root.proto = (function() { }; /** - * HistorySyncHistorySyncType enum. - * @name proto.HistorySync.HistorySyncHistorySyncType + * HistorySyncType enum. + * @name proto.HistorySync.HistorySyncType * @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} UNBLOCKING_DATA=5 UNBLOCKING_DATA value */ - HistorySync.HistorySyncHistorySyncType = (function() { + HistorySync.HistorySyncType = (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[5] = "UNBLOCKING_DATA"] = 5; return values; })(); @@ -25215,1310 +14827,6 @@ $root.proto = (function() { 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() { - - /** - * Properties of a HydratedCallButton. - * @memberof proto - * @interface IHydratedCallButton - * @property {string|null} [displayText] HydratedCallButton displayText - * @property {string|null} [phoneNumber] HydratedCallButton phoneNumber - */ - - /** - * Constructs a new HydratedCallButton. - * @memberof proto - * @classdesc Represents a HydratedCallButton. - * @implements IHydratedCallButton - * @constructor - * @param {proto.IHydratedCallButton=} [properties] Properties to set - */ - function HydratedCallButton(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]]; - } - - /** - * HydratedCallButton displayText. - * @member {string} displayText - * @memberof proto.HydratedCallButton - * @instance - */ - HydratedCallButton.prototype.displayText = ""; - - /** - * HydratedCallButton phoneNumber. - * @member {string} phoneNumber - * @memberof proto.HydratedCallButton - * @instance - */ - HydratedCallButton.prototype.phoneNumber = ""; - - /** - * Creates a new HydratedCallButton instance using the specified properties. - * @function create - * @memberof proto.HydratedCallButton - * @static - * @param {proto.IHydratedCallButton=} [properties] Properties to set - * @returns {proto.HydratedCallButton} HydratedCallButton instance - */ - HydratedCallButton.create = function create(properties) { - return new HydratedCallButton(properties); - }; - - /** - * Encodes the specified HydratedCallButton message. Does not implicitly {@link proto.HydratedCallButton.verify|verify} messages. - * @function encode - * @memberof proto.HydratedCallButton - * @static - * @param {proto.IHydratedCallButton} message HydratedCallButton message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HydratedCallButton.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); - if (message.phoneNumber != null && Object.hasOwnProperty.call(message, "phoneNumber")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.phoneNumber); - return writer; - }; - - /** - * Encodes the specified HydratedCallButton message, length delimited. Does not implicitly {@link proto.HydratedCallButton.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.HydratedCallButton - * @static - * @param {proto.IHydratedCallButton} message HydratedCallButton message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HydratedCallButton.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HydratedCallButton message from the specified reader or buffer. - * @function decode - * @memberof proto.HydratedCallButton - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.HydratedCallButton} HydratedCallButton - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HydratedCallButton.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.HydratedCallButton(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.displayText = reader.string(); - break; - case 2: - message.phoneNumber = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HydratedCallButton message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.HydratedCallButton - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.HydratedCallButton} HydratedCallButton - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HydratedCallButton.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HydratedCallButton message. - * @function verify - * @memberof proto.HydratedCallButton - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HydratedCallButton.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"; - if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) - if (!$util.isString(message.phoneNumber)) - return "phoneNumber: string expected"; - return null; - }; - - /** - * Creates a HydratedCallButton message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.HydratedCallButton - * @static - * @param {Object.} object Plain object - * @returns {proto.HydratedCallButton} HydratedCallButton - */ - HydratedCallButton.fromObject = function fromObject(object) { - if (object instanceof $root.proto.HydratedCallButton) - return object; - var message = new $root.proto.HydratedCallButton(); - if (object.displayText != null) - message.displayText = String(object.displayText); - if (object.phoneNumber != null) - message.phoneNumber = String(object.phoneNumber); - return message; - }; - - /** - * Creates a plain object from a HydratedCallButton message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.HydratedCallButton - * @static - * @param {proto.HydratedCallButton} message HydratedCallButton - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HydratedCallButton.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayText = ""; - object.phoneNumber = ""; - } - if (message.displayText != null && message.hasOwnProperty("displayText")) - object.displayText = message.displayText; - if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) - object.phoneNumber = message.phoneNumber; - return object; - }; - - /** - * Converts this HydratedCallButton to JSON. - * @function toJSON - * @memberof proto.HydratedCallButton - * @instance - * @returns {Object.} JSON object - */ - HydratedCallButton.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return HydratedCallButton; - })(); - - proto.HydratedFourRowTemplate = (function() { - - /** - * Properties of a HydratedFourRowTemplate. - * @memberof proto - * @interface IHydratedFourRowTemplate - * @property {string|null} [hydratedContentText] HydratedFourRowTemplate hydratedContentText - * @property {string|null} [hydratedFooterText] HydratedFourRowTemplate hydratedFooterText - * @property {Array.|null} [hydratedButtons] HydratedFourRowTemplate hydratedButtons - * @property {string|null} [templateId] HydratedFourRowTemplate templateId - * @property {proto.IDocumentMessage|null} [documentMessage] HydratedFourRowTemplate documentMessage - * @property {string|null} [hydratedTitleText] HydratedFourRowTemplate hydratedTitleText - * @property {proto.IImageMessage|null} [imageMessage] HydratedFourRowTemplate imageMessage - * @property {proto.IVideoMessage|null} [videoMessage] HydratedFourRowTemplate videoMessage - * @property {proto.ILocationMessage|null} [locationMessage] HydratedFourRowTemplate locationMessage - */ - - /** - * Constructs a new HydratedFourRowTemplate. - * @memberof proto - * @classdesc Represents a HydratedFourRowTemplate. - * @implements IHydratedFourRowTemplate - * @constructor - * @param {proto.IHydratedFourRowTemplate=} [properties] Properties to set - */ - function HydratedFourRowTemplate(properties) { - this.hydratedButtons = []; - 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]]; - } - - /** - * HydratedFourRowTemplate hydratedContentText. - * @member {string} hydratedContentText - * @memberof proto.HydratedFourRowTemplate - * @instance - */ - HydratedFourRowTemplate.prototype.hydratedContentText = ""; - - /** - * HydratedFourRowTemplate hydratedFooterText. - * @member {string} hydratedFooterText - * @memberof proto.HydratedFourRowTemplate - * @instance - */ - HydratedFourRowTemplate.prototype.hydratedFooterText = ""; - - /** - * HydratedFourRowTemplate hydratedButtons. - * @member {Array.} hydratedButtons - * @memberof proto.HydratedFourRowTemplate - * @instance - */ - HydratedFourRowTemplate.prototype.hydratedButtons = $util.emptyArray; - - /** - * HydratedFourRowTemplate templateId. - * @member {string} templateId - * @memberof proto.HydratedFourRowTemplate - * @instance - */ - HydratedFourRowTemplate.prototype.templateId = ""; - - /** - * HydratedFourRowTemplate documentMessage. - * @member {proto.IDocumentMessage|null|undefined} documentMessage - * @memberof proto.HydratedFourRowTemplate - * @instance - */ - HydratedFourRowTemplate.prototype.documentMessage = null; - - /** - * HydratedFourRowTemplate hydratedTitleText. - * @member {string|null|undefined} hydratedTitleText - * @memberof proto.HydratedFourRowTemplate - * @instance - */ - HydratedFourRowTemplate.prototype.hydratedTitleText = null; - - /** - * HydratedFourRowTemplate imageMessage. - * @member {proto.IImageMessage|null|undefined} imageMessage - * @memberof proto.HydratedFourRowTemplate - * @instance - */ - HydratedFourRowTemplate.prototype.imageMessage = null; - - /** - * HydratedFourRowTemplate videoMessage. - * @member {proto.IVideoMessage|null|undefined} videoMessage - * @memberof proto.HydratedFourRowTemplate - * @instance - */ - HydratedFourRowTemplate.prototype.videoMessage = null; - - /** - * HydratedFourRowTemplate locationMessage. - * @member {proto.ILocationMessage|null|undefined} locationMessage - * @memberof proto.HydratedFourRowTemplate - * @instance - */ - HydratedFourRowTemplate.prototype.locationMessage = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * HydratedFourRowTemplate title. - * @member {"documentMessage"|"hydratedTitleText"|"imageMessage"|"videoMessage"|"locationMessage"|undefined} title - * @memberof proto.HydratedFourRowTemplate - * @instance - */ - Object.defineProperty(HydratedFourRowTemplate.prototype, "title", { - get: $util.oneOfGetter($oneOfFields = ["documentMessage", "hydratedTitleText", "imageMessage", "videoMessage", "locationMessage"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new HydratedFourRowTemplate instance using the specified properties. - * @function create - * @memberof proto.HydratedFourRowTemplate - * @static - * @param {proto.IHydratedFourRowTemplate=} [properties] Properties to set - * @returns {proto.HydratedFourRowTemplate} HydratedFourRowTemplate instance - */ - HydratedFourRowTemplate.create = function create(properties) { - return new HydratedFourRowTemplate(properties); - }; - - /** - * Encodes the specified HydratedFourRowTemplate message. Does not implicitly {@link proto.HydratedFourRowTemplate.verify|verify} messages. - * @function encode - * @memberof proto.HydratedFourRowTemplate - * @static - * @param {proto.IHydratedFourRowTemplate} message HydratedFourRowTemplate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HydratedFourRowTemplate.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.documentMessage != null && Object.hasOwnProperty.call(message, "documentMessage")) - $root.proto.DocumentMessage.encode(message.documentMessage, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.hydratedTitleText != null && Object.hasOwnProperty.call(message, "hydratedTitleText")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.hydratedTitleText); - if (message.imageMessage != null && Object.hasOwnProperty.call(message, "imageMessage")) - $root.proto.ImageMessage.encode(message.imageMessage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.videoMessage != null && Object.hasOwnProperty.call(message, "videoMessage")) - $root.proto.VideoMessage.encode(message.videoMessage, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.locationMessage != null && Object.hasOwnProperty.call(message, "locationMessage")) - $root.proto.LocationMessage.encode(message.locationMessage, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.hydratedContentText != null && Object.hasOwnProperty.call(message, "hydratedContentText")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.hydratedContentText); - if (message.hydratedFooterText != null && Object.hasOwnProperty.call(message, "hydratedFooterText")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.hydratedFooterText); - if (message.hydratedButtons != null && message.hydratedButtons.length) - for (var i = 0; i < message.hydratedButtons.length; ++i) - $root.proto.HydratedTemplateButton.encode(message.hydratedButtons[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.templateId != null && Object.hasOwnProperty.call(message, "templateId")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.templateId); - return writer; - }; - - /** - * Encodes the specified HydratedFourRowTemplate message, length delimited. Does not implicitly {@link proto.HydratedFourRowTemplate.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.HydratedFourRowTemplate - * @static - * @param {proto.IHydratedFourRowTemplate} message HydratedFourRowTemplate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HydratedFourRowTemplate.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HydratedFourRowTemplate message from the specified reader or buffer. - * @function decode - * @memberof proto.HydratedFourRowTemplate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.HydratedFourRowTemplate} HydratedFourRowTemplate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HydratedFourRowTemplate.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.HydratedFourRowTemplate(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 6: - message.hydratedContentText = reader.string(); - break; - case 7: - message.hydratedFooterText = reader.string(); - break; - case 8: - if (!(message.hydratedButtons && message.hydratedButtons.length)) - message.hydratedButtons = []; - message.hydratedButtons.push($root.proto.HydratedTemplateButton.decode(reader, reader.uint32())); - break; - case 9: - message.templateId = reader.string(); - break; - case 1: - message.documentMessage = $root.proto.DocumentMessage.decode(reader, reader.uint32()); - break; - case 2: - message.hydratedTitleText = reader.string(); - break; - case 3: - message.imageMessage = $root.proto.ImageMessage.decode(reader, reader.uint32()); - break; - case 4: - message.videoMessage = $root.proto.VideoMessage.decode(reader, reader.uint32()); - break; - case 5: - message.locationMessage = $root.proto.LocationMessage.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HydratedFourRowTemplate message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.HydratedFourRowTemplate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.HydratedFourRowTemplate} HydratedFourRowTemplate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HydratedFourRowTemplate.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HydratedFourRowTemplate message. - * @function verify - * @memberof proto.HydratedFourRowTemplate - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HydratedFourRowTemplate.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.hydratedContentText != null && message.hasOwnProperty("hydratedContentText")) - if (!$util.isString(message.hydratedContentText)) - return "hydratedContentText: string expected"; - if (message.hydratedFooterText != null && message.hasOwnProperty("hydratedFooterText")) - if (!$util.isString(message.hydratedFooterText)) - return "hydratedFooterText: string expected"; - if (message.hydratedButtons != null && message.hasOwnProperty("hydratedButtons")) { - if (!Array.isArray(message.hydratedButtons)) - return "hydratedButtons: array expected"; - for (var i = 0; i < message.hydratedButtons.length; ++i) { - var error = $root.proto.HydratedTemplateButton.verify(message.hydratedButtons[i]); - if (error) - return "hydratedButtons." + error; - } - } - if (message.templateId != null && message.hasOwnProperty("templateId")) - if (!$util.isString(message.templateId)) - return "templateId: string expected"; - if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) { - properties.title = 1; - { - var error = $root.proto.DocumentMessage.verify(message.documentMessage); - if (error) - return "documentMessage." + error; - } - } - if (message.hydratedTitleText != null && message.hasOwnProperty("hydratedTitleText")) { - if (properties.title === 1) - return "title: multiple values"; - properties.title = 1; - if (!$util.isString(message.hydratedTitleText)) - return "hydratedTitleText: string expected"; - } - if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) { - if (properties.title === 1) - return "title: multiple values"; - properties.title = 1; - { - var error = $root.proto.ImageMessage.verify(message.imageMessage); - if (error) - return "imageMessage." + error; - } - } - if (message.videoMessage != null && message.hasOwnProperty("videoMessage")) { - if (properties.title === 1) - return "title: multiple values"; - properties.title = 1; - { - var error = $root.proto.VideoMessage.verify(message.videoMessage); - if (error) - return "videoMessage." + error; - } - } - if (message.locationMessage != null && message.hasOwnProperty("locationMessage")) { - if (properties.title === 1) - return "title: multiple values"; - properties.title = 1; - { - var error = $root.proto.LocationMessage.verify(message.locationMessage); - if (error) - return "locationMessage." + error; - } - } - return null; - }; - - /** - * Creates a HydratedFourRowTemplate message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.HydratedFourRowTemplate - * @static - * @param {Object.} object Plain object - * @returns {proto.HydratedFourRowTemplate} HydratedFourRowTemplate - */ - HydratedFourRowTemplate.fromObject = function fromObject(object) { - if (object instanceof $root.proto.HydratedFourRowTemplate) - return object; - var message = new $root.proto.HydratedFourRowTemplate(); - if (object.hydratedContentText != null) - message.hydratedContentText = String(object.hydratedContentText); - if (object.hydratedFooterText != null) - message.hydratedFooterText = String(object.hydratedFooterText); - if (object.hydratedButtons) { - if (!Array.isArray(object.hydratedButtons)) - throw TypeError(".proto.HydratedFourRowTemplate.hydratedButtons: array expected"); - message.hydratedButtons = []; - for (var i = 0; i < object.hydratedButtons.length; ++i) { - if (typeof object.hydratedButtons[i] !== "object") - throw TypeError(".proto.HydratedFourRowTemplate.hydratedButtons: object expected"); - message.hydratedButtons[i] = $root.proto.HydratedTemplateButton.fromObject(object.hydratedButtons[i]); - } - } - if (object.templateId != null) - message.templateId = String(object.templateId); - if (object.documentMessage != null) { - if (typeof object.documentMessage !== "object") - throw TypeError(".proto.HydratedFourRowTemplate.documentMessage: object expected"); - message.documentMessage = $root.proto.DocumentMessage.fromObject(object.documentMessage); - } - if (object.hydratedTitleText != null) - message.hydratedTitleText = String(object.hydratedTitleText); - if (object.imageMessage != null) { - if (typeof object.imageMessage !== "object") - throw TypeError(".proto.HydratedFourRowTemplate.imageMessage: object expected"); - message.imageMessage = $root.proto.ImageMessage.fromObject(object.imageMessage); - } - if (object.videoMessage != null) { - if (typeof object.videoMessage !== "object") - throw TypeError(".proto.HydratedFourRowTemplate.videoMessage: object expected"); - message.videoMessage = $root.proto.VideoMessage.fromObject(object.videoMessage); - } - if (object.locationMessage != null) { - if (typeof object.locationMessage !== "object") - throw TypeError(".proto.HydratedFourRowTemplate.locationMessage: object expected"); - message.locationMessage = $root.proto.LocationMessage.fromObject(object.locationMessage); - } - return message; - }; - - /** - * Creates a plain object from a HydratedFourRowTemplate message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.HydratedFourRowTemplate - * @static - * @param {proto.HydratedFourRowTemplate} message HydratedFourRowTemplate - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HydratedFourRowTemplate.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.hydratedButtons = []; - if (options.defaults) { - object.hydratedContentText = ""; - object.hydratedFooterText = ""; - object.templateId = ""; - } - if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) { - object.documentMessage = $root.proto.DocumentMessage.toObject(message.documentMessage, options); - if (options.oneofs) - object.title = "documentMessage"; - } - if (message.hydratedTitleText != null && message.hasOwnProperty("hydratedTitleText")) { - object.hydratedTitleText = message.hydratedTitleText; - if (options.oneofs) - object.title = "hydratedTitleText"; - } - if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) { - object.imageMessage = $root.proto.ImageMessage.toObject(message.imageMessage, options); - if (options.oneofs) - object.title = "imageMessage"; - } - if (message.videoMessage != null && message.hasOwnProperty("videoMessage")) { - object.videoMessage = $root.proto.VideoMessage.toObject(message.videoMessage, options); - if (options.oneofs) - object.title = "videoMessage"; - } - if (message.locationMessage != null && message.hasOwnProperty("locationMessage")) { - object.locationMessage = $root.proto.LocationMessage.toObject(message.locationMessage, options); - if (options.oneofs) - object.title = "locationMessage"; - } - if (message.hydratedContentText != null && message.hasOwnProperty("hydratedContentText")) - object.hydratedContentText = message.hydratedContentText; - if (message.hydratedFooterText != null && message.hasOwnProperty("hydratedFooterText")) - object.hydratedFooterText = message.hydratedFooterText; - if (message.hydratedButtons && message.hydratedButtons.length) { - object.hydratedButtons = []; - for (var j = 0; j < message.hydratedButtons.length; ++j) - object.hydratedButtons[j] = $root.proto.HydratedTemplateButton.toObject(message.hydratedButtons[j], options); - } - if (message.templateId != null && message.hasOwnProperty("templateId")) - object.templateId = message.templateId; - return object; - }; - - /** - * Converts this HydratedFourRowTemplate to JSON. - * @function toJSON - * @memberof proto.HydratedFourRowTemplate - * @instance - * @returns {Object.} JSON object - */ - HydratedFourRowTemplate.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return HydratedFourRowTemplate; - })(); - - proto.HydratedQuickReplyButton = (function() { - - /** - * Properties of a HydratedQuickReplyButton. - * @memberof proto - * @interface IHydratedQuickReplyButton - * @property {string|null} [displayText] HydratedQuickReplyButton displayText - * @property {string|null} [id] HydratedQuickReplyButton id - */ - - /** - * Constructs a new HydratedQuickReplyButton. - * @memberof proto - * @classdesc Represents a HydratedQuickReplyButton. - * @implements IHydratedQuickReplyButton - * @constructor - * @param {proto.IHydratedQuickReplyButton=} [properties] Properties to set - */ - function HydratedQuickReplyButton(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]]; - } - - /** - * HydratedQuickReplyButton displayText. - * @member {string} displayText - * @memberof proto.HydratedQuickReplyButton - * @instance - */ - HydratedQuickReplyButton.prototype.displayText = ""; - - /** - * HydratedQuickReplyButton id. - * @member {string} id - * @memberof proto.HydratedQuickReplyButton - * @instance - */ - HydratedQuickReplyButton.prototype.id = ""; - - /** - * Creates a new HydratedQuickReplyButton instance using the specified properties. - * @function create - * @memberof proto.HydratedQuickReplyButton - * @static - * @param {proto.IHydratedQuickReplyButton=} [properties] Properties to set - * @returns {proto.HydratedQuickReplyButton} HydratedQuickReplyButton instance - */ - HydratedQuickReplyButton.create = function create(properties) { - return new HydratedQuickReplyButton(properties); - }; - - /** - * Encodes the specified HydratedQuickReplyButton message. Does not implicitly {@link proto.HydratedQuickReplyButton.verify|verify} messages. - * @function encode - * @memberof proto.HydratedQuickReplyButton - * @static - * @param {proto.IHydratedQuickReplyButton} message HydratedQuickReplyButton message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HydratedQuickReplyButton.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); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); - return writer; - }; - - /** - * Encodes the specified HydratedQuickReplyButton message, length delimited. Does not implicitly {@link proto.HydratedQuickReplyButton.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.HydratedQuickReplyButton - * @static - * @param {proto.IHydratedQuickReplyButton} message HydratedQuickReplyButton message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HydratedQuickReplyButton.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HydratedQuickReplyButton message from the specified reader or buffer. - * @function decode - * @memberof proto.HydratedQuickReplyButton - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.HydratedQuickReplyButton} HydratedQuickReplyButton - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HydratedQuickReplyButton.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.HydratedQuickReplyButton(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.displayText = reader.string(); - break; - case 2: - message.id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HydratedQuickReplyButton message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.HydratedQuickReplyButton - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.HydratedQuickReplyButton} HydratedQuickReplyButton - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HydratedQuickReplyButton.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HydratedQuickReplyButton message. - * @function verify - * @memberof proto.HydratedQuickReplyButton - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HydratedQuickReplyButton.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"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - return null; - }; - - /** - * Creates a HydratedQuickReplyButton message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.HydratedQuickReplyButton - * @static - * @param {Object.} object Plain object - * @returns {proto.HydratedQuickReplyButton} HydratedQuickReplyButton - */ - HydratedQuickReplyButton.fromObject = function fromObject(object) { - if (object instanceof $root.proto.HydratedQuickReplyButton) - return object; - var message = new $root.proto.HydratedQuickReplyButton(); - if (object.displayText != null) - message.displayText = String(object.displayText); - if (object.id != null) - message.id = String(object.id); - return message; - }; - - /** - * Creates a plain object from a HydratedQuickReplyButton message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.HydratedQuickReplyButton - * @static - * @param {proto.HydratedQuickReplyButton} message HydratedQuickReplyButton - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HydratedQuickReplyButton.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayText = ""; - object.id = ""; - } - if (message.displayText != null && message.hasOwnProperty("displayText")) - object.displayText = message.displayText; - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - return object; - }; - - /** - * Converts this HydratedQuickReplyButton to JSON. - * @function toJSON - * @memberof proto.HydratedQuickReplyButton - * @instance - * @returns {Object.} JSON object - */ - HydratedQuickReplyButton.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return HydratedQuickReplyButton; - })(); - proto.HydratedTemplateButton = (function() { /** @@ -26526,9 +14834,9 @@ $root.proto = (function() { * @memberof proto * @interface IHydratedTemplateButton * @property {number|null} [index] HydratedTemplateButton index - * @property {proto.IHydratedQuickReplyButton|null} [quickReplyButton] HydratedTemplateButton quickReplyButton - * @property {proto.IHydratedURLButton|null} [urlButton] HydratedTemplateButton urlButton - * @property {proto.IHydratedCallButton|null} [callButton] HydratedTemplateButton callButton + * @property {proto.HydratedTemplateButton.IHydratedQuickReplyButton|null} [quickReplyButton] HydratedTemplateButton quickReplyButton + * @property {proto.HydratedTemplateButton.IHydratedURLButton|null} [urlButton] HydratedTemplateButton urlButton + * @property {proto.HydratedTemplateButton.IHydratedCallButton|null} [callButton] HydratedTemplateButton callButton */ /** @@ -26556,7 +14864,7 @@ $root.proto = (function() { /** * HydratedTemplateButton quickReplyButton. - * @member {proto.IHydratedQuickReplyButton|null|undefined} quickReplyButton + * @member {proto.HydratedTemplateButton.IHydratedQuickReplyButton|null|undefined} quickReplyButton * @memberof proto.HydratedTemplateButton * @instance */ @@ -26564,7 +14872,7 @@ $root.proto = (function() { /** * HydratedTemplateButton urlButton. - * @member {proto.IHydratedURLButton|null|undefined} urlButton + * @member {proto.HydratedTemplateButton.IHydratedURLButton|null|undefined} urlButton * @memberof proto.HydratedTemplateButton * @instance */ @@ -26572,7 +14880,7 @@ $root.proto = (function() { /** * HydratedTemplateButton callButton. - * @member {proto.IHydratedCallButton|null|undefined} callButton + * @member {proto.HydratedTemplateButton.IHydratedCallButton|null|undefined} callButton * @memberof proto.HydratedTemplateButton * @instance */ @@ -26617,11 +14925,11 @@ $root.proto = (function() { if (!writer) writer = $Writer.create(); if (message.quickReplyButton != null && Object.hasOwnProperty.call(message, "quickReplyButton")) - $root.proto.HydratedQuickReplyButton.encode(message.quickReplyButton, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.proto.HydratedTemplateButton.HydratedQuickReplyButton.encode(message.quickReplyButton, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.urlButton != null && Object.hasOwnProperty.call(message, "urlButton")) - $root.proto.HydratedURLButton.encode(message.urlButton, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.proto.HydratedTemplateButton.HydratedURLButton.encode(message.urlButton, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.callButton != null && Object.hasOwnProperty.call(message, "callButton")) - $root.proto.HydratedCallButton.encode(message.callButton, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.proto.HydratedTemplateButton.HydratedCallButton.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); return writer; @@ -26662,13 +14970,13 @@ $root.proto = (function() { message.index = reader.uint32(); break; case 1: - message.quickReplyButton = $root.proto.HydratedQuickReplyButton.decode(reader, reader.uint32()); + message.quickReplyButton = $root.proto.HydratedTemplateButton.HydratedQuickReplyButton.decode(reader, reader.uint32()); break; case 2: - message.urlButton = $root.proto.HydratedURLButton.decode(reader, reader.uint32()); + message.urlButton = $root.proto.HydratedTemplateButton.HydratedURLButton.decode(reader, reader.uint32()); break; case 3: - message.callButton = $root.proto.HydratedCallButton.decode(reader, reader.uint32()); + message.callButton = $root.proto.HydratedTemplateButton.HydratedCallButton.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -26712,7 +15020,7 @@ $root.proto = (function() { if (message.quickReplyButton != null && message.hasOwnProperty("quickReplyButton")) { properties.hydratedButton = 1; { - var error = $root.proto.HydratedQuickReplyButton.verify(message.quickReplyButton); + var error = $root.proto.HydratedTemplateButton.HydratedQuickReplyButton.verify(message.quickReplyButton); if (error) return "quickReplyButton." + error; } @@ -26722,7 +15030,7 @@ $root.proto = (function() { return "hydratedButton: multiple values"; properties.hydratedButton = 1; { - var error = $root.proto.HydratedURLButton.verify(message.urlButton); + var error = $root.proto.HydratedTemplateButton.HydratedURLButton.verify(message.urlButton); if (error) return "urlButton." + error; } @@ -26732,7 +15040,7 @@ $root.proto = (function() { return "hydratedButton: multiple values"; properties.hydratedButton = 1; { - var error = $root.proto.HydratedCallButton.verify(message.callButton); + var error = $root.proto.HydratedTemplateButton.HydratedCallButton.verify(message.callButton); if (error) return "callButton." + error; } @@ -26757,17 +15065,17 @@ $root.proto = (function() { if (object.quickReplyButton != null) { if (typeof object.quickReplyButton !== "object") throw TypeError(".proto.HydratedTemplateButton.quickReplyButton: object expected"); - message.quickReplyButton = $root.proto.HydratedQuickReplyButton.fromObject(object.quickReplyButton); + message.quickReplyButton = $root.proto.HydratedTemplateButton.HydratedQuickReplyButton.fromObject(object.quickReplyButton); } if (object.urlButton != null) { if (typeof object.urlButton !== "object") throw TypeError(".proto.HydratedTemplateButton.urlButton: object expected"); - message.urlButton = $root.proto.HydratedURLButton.fromObject(object.urlButton); + message.urlButton = $root.proto.HydratedTemplateButton.HydratedURLButton.fromObject(object.urlButton); } if (object.callButton != null) { if (typeof object.callButton !== "object") throw TypeError(".proto.HydratedTemplateButton.callButton: object expected"); - message.callButton = $root.proto.HydratedCallButton.fromObject(object.callButton); + message.callButton = $root.proto.HydratedTemplateButton.HydratedCallButton.fromObject(object.callButton); } return message; }; @@ -26788,17 +15096,17 @@ $root.proto = (function() { if (options.defaults) object.index = 0; if (message.quickReplyButton != null && message.hasOwnProperty("quickReplyButton")) { - object.quickReplyButton = $root.proto.HydratedQuickReplyButton.toObject(message.quickReplyButton, options); + object.quickReplyButton = $root.proto.HydratedTemplateButton.HydratedQuickReplyButton.toObject(message.quickReplyButton, options); if (options.oneofs) object.hydratedButton = "quickReplyButton"; } if (message.urlButton != null && message.hasOwnProperty("urlButton")) { - object.urlButton = $root.proto.HydratedURLButton.toObject(message.urlButton, options); + object.urlButton = $root.proto.HydratedTemplateButton.HydratedURLButton.toObject(message.urlButton, options); if (options.oneofs) object.hydratedButton = "urlButton"; } if (message.callButton != null && message.hasOwnProperty("callButton")) { - object.callButton = $root.proto.HydratedCallButton.toObject(message.callButton, options); + object.callButton = $root.proto.HydratedTemplateButton.HydratedCallButton.toObject(message.callButton, options); if (options.oneofs) object.hydratedButton = "callButton"; } @@ -26818,217 +15126,637 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return HydratedTemplateButton; - })(); + HydratedTemplateButton.HydratedCallButton = (function() { - proto.HydratedURLButton = (function() { + /** + * Properties of a HydratedCallButton. + * @memberof proto.HydratedTemplateButton + * @interface IHydratedCallButton + * @property {string|null} [displayText] HydratedCallButton displayText + * @property {string|null} [phoneNumber] HydratedCallButton phoneNumber + */ - /** - * Properties of a HydratedURLButton. - * @memberof proto - * @interface IHydratedURLButton - * @property {string|null} [displayText] HydratedURLButton displayText - * @property {string|null} [url] HydratedURLButton url - */ + /** + * Constructs a new HydratedCallButton. + * @memberof proto.HydratedTemplateButton + * @classdesc Represents a HydratedCallButton. + * @implements IHydratedCallButton + * @constructor + * @param {proto.HydratedTemplateButton.IHydratedCallButton=} [properties] Properties to set + */ + function HydratedCallButton(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]]; + } - /** - * Constructs a new HydratedURLButton. - * @memberof proto - * @classdesc Represents a HydratedURLButton. - * @implements IHydratedURLButton - * @constructor - * @param {proto.IHydratedURLButton=} [properties] Properties to set - */ - function HydratedURLButton(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]]; - } + /** + * HydratedCallButton displayText. + * @member {string} displayText + * @memberof proto.HydratedTemplateButton.HydratedCallButton + * @instance + */ + HydratedCallButton.prototype.displayText = ""; - /** - * HydratedURLButton displayText. - * @member {string} displayText - * @memberof proto.HydratedURLButton - * @instance - */ - HydratedURLButton.prototype.displayText = ""; + /** + * HydratedCallButton phoneNumber. + * @member {string} phoneNumber + * @memberof proto.HydratedTemplateButton.HydratedCallButton + * @instance + */ + HydratedCallButton.prototype.phoneNumber = ""; - /** - * HydratedURLButton url. - * @member {string} url - * @memberof proto.HydratedURLButton - * @instance - */ - HydratedURLButton.prototype.url = ""; + /** + * Creates a new HydratedCallButton instance using the specified properties. + * @function create + * @memberof proto.HydratedTemplateButton.HydratedCallButton + * @static + * @param {proto.HydratedTemplateButton.IHydratedCallButton=} [properties] Properties to set + * @returns {proto.HydratedTemplateButton.HydratedCallButton} HydratedCallButton instance + */ + HydratedCallButton.create = function create(properties) { + return new HydratedCallButton(properties); + }; - /** - * Creates a new HydratedURLButton instance using the specified properties. - * @function create - * @memberof proto.HydratedURLButton - * @static - * @param {proto.IHydratedURLButton=} [properties] Properties to set - * @returns {proto.HydratedURLButton} HydratedURLButton instance - */ - HydratedURLButton.create = function create(properties) { - return new HydratedURLButton(properties); - }; + /** + * Encodes the specified HydratedCallButton message. Does not implicitly {@link proto.HydratedTemplateButton.HydratedCallButton.verify|verify} messages. + * @function encode + * @memberof proto.HydratedTemplateButton.HydratedCallButton + * @static + * @param {proto.HydratedTemplateButton.IHydratedCallButton} message HydratedCallButton message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HydratedCallButton.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); + if (message.phoneNumber != null && Object.hasOwnProperty.call(message, "phoneNumber")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.phoneNumber); + return writer; + }; - /** - * Encodes the specified HydratedURLButton message. Does not implicitly {@link proto.HydratedURLButton.verify|verify} messages. - * @function encode - * @memberof proto.HydratedURLButton - * @static - * @param {proto.IHydratedURLButton} message HydratedURLButton message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HydratedURLButton.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); - if (message.url != null && Object.hasOwnProperty.call(message, "url")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.url); - return writer; - }; + /** + * Encodes the specified HydratedCallButton message, length delimited. Does not implicitly {@link proto.HydratedTemplateButton.HydratedCallButton.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.HydratedTemplateButton.HydratedCallButton + * @static + * @param {proto.HydratedTemplateButton.IHydratedCallButton} message HydratedCallButton message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HydratedCallButton.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified HydratedURLButton message, length delimited. Does not implicitly {@link proto.HydratedURLButton.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.HydratedURLButton - * @static - * @param {proto.IHydratedURLButton} message HydratedURLButton message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HydratedURLButton.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HydratedURLButton message from the specified reader or buffer. - * @function decode - * @memberof proto.HydratedURLButton - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.HydratedURLButton} HydratedURLButton - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HydratedURLButton.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.HydratedURLButton(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.displayText = reader.string(); - break; - case 2: - message.url = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Decodes a HydratedCallButton message from the specified reader or buffer. + * @function decode + * @memberof proto.HydratedTemplateButton.HydratedCallButton + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.HydratedTemplateButton.HydratedCallButton} HydratedCallButton + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HydratedCallButton.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.HydratedTemplateButton.HydratedCallButton(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.displayText = reader.string(); + break; + case 2: + message.phoneNumber = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes a HydratedURLButton message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.HydratedURLButton - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.HydratedURLButton} HydratedURLButton - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HydratedURLButton.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a HydratedCallButton message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.HydratedTemplateButton.HydratedCallButton + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.HydratedTemplateButton.HydratedCallButton} HydratedCallButton + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HydratedCallButton.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a HydratedURLButton message. - * @function verify - * @memberof proto.HydratedURLButton - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HydratedURLButton.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"; - if (message.url != null && message.hasOwnProperty("url")) - if (!$util.isString(message.url)) - return "url: string expected"; - return null; - }; + /** + * Verifies a HydratedCallButton message. + * @function verify + * @memberof proto.HydratedTemplateButton.HydratedCallButton + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HydratedCallButton.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"; + if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) + if (!$util.isString(message.phoneNumber)) + return "phoneNumber: string expected"; + return null; + }; - /** - * Creates a HydratedURLButton message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.HydratedURLButton - * @static - * @param {Object.} object Plain object - * @returns {proto.HydratedURLButton} HydratedURLButton - */ - HydratedURLButton.fromObject = function fromObject(object) { - if (object instanceof $root.proto.HydratedURLButton) + /** + * Creates a HydratedCallButton message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.HydratedTemplateButton.HydratedCallButton + * @static + * @param {Object.} object Plain object + * @returns {proto.HydratedTemplateButton.HydratedCallButton} HydratedCallButton + */ + HydratedCallButton.fromObject = function fromObject(object) { + if (object instanceof $root.proto.HydratedTemplateButton.HydratedCallButton) + return object; + var message = new $root.proto.HydratedTemplateButton.HydratedCallButton(); + if (object.displayText != null) + message.displayText = String(object.displayText); + if (object.phoneNumber != null) + message.phoneNumber = String(object.phoneNumber); + return message; + }; + + /** + * Creates a plain object from a HydratedCallButton message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.HydratedTemplateButton.HydratedCallButton + * @static + * @param {proto.HydratedTemplateButton.HydratedCallButton} message HydratedCallButton + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HydratedCallButton.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayText = ""; + object.phoneNumber = ""; + } + if (message.displayText != null && message.hasOwnProperty("displayText")) + object.displayText = message.displayText; + if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) + object.phoneNumber = message.phoneNumber; return object; - var message = new $root.proto.HydratedURLButton(); - if (object.displayText != null) - message.displayText = String(object.displayText); - if (object.url != null) - message.url = String(object.url); - return message; - }; + }; - /** - * Creates a plain object from a HydratedURLButton message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.HydratedURLButton - * @static - * @param {proto.HydratedURLButton} message HydratedURLButton - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HydratedURLButton.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayText = ""; - object.url = ""; + /** + * Converts this HydratedCallButton to JSON. + * @function toJSON + * @memberof proto.HydratedTemplateButton.HydratedCallButton + * @instance + * @returns {Object.} JSON object + */ + HydratedCallButton.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HydratedCallButton; + })(); + + HydratedTemplateButton.HydratedQuickReplyButton = (function() { + + /** + * Properties of a HydratedQuickReplyButton. + * @memberof proto.HydratedTemplateButton + * @interface IHydratedQuickReplyButton + * @property {string|null} [displayText] HydratedQuickReplyButton displayText + * @property {string|null} [id] HydratedQuickReplyButton id + */ + + /** + * Constructs a new HydratedQuickReplyButton. + * @memberof proto.HydratedTemplateButton + * @classdesc Represents a HydratedQuickReplyButton. + * @implements IHydratedQuickReplyButton + * @constructor + * @param {proto.HydratedTemplateButton.IHydratedQuickReplyButton=} [properties] Properties to set + */ + function HydratedQuickReplyButton(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]]; } - if (message.displayText != null && message.hasOwnProperty("displayText")) - object.displayText = message.displayText; - if (message.url != null && message.hasOwnProperty("url")) - object.url = message.url; - return object; - }; - /** - * Converts this HydratedURLButton to JSON. - * @function toJSON - * @memberof proto.HydratedURLButton - * @instance - * @returns {Object.} JSON object - */ - HydratedURLButton.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * HydratedQuickReplyButton displayText. + * @member {string} displayText + * @memberof proto.HydratedTemplateButton.HydratedQuickReplyButton + * @instance + */ + HydratedQuickReplyButton.prototype.displayText = ""; - return HydratedURLButton; + /** + * HydratedQuickReplyButton id. + * @member {string} id + * @memberof proto.HydratedTemplateButton.HydratedQuickReplyButton + * @instance + */ + HydratedQuickReplyButton.prototype.id = ""; + + /** + * Creates a new HydratedQuickReplyButton instance using the specified properties. + * @function create + * @memberof proto.HydratedTemplateButton.HydratedQuickReplyButton + * @static + * @param {proto.HydratedTemplateButton.IHydratedQuickReplyButton=} [properties] Properties to set + * @returns {proto.HydratedTemplateButton.HydratedQuickReplyButton} HydratedQuickReplyButton instance + */ + HydratedQuickReplyButton.create = function create(properties) { + return new HydratedQuickReplyButton(properties); + }; + + /** + * Encodes the specified HydratedQuickReplyButton message. Does not implicitly {@link proto.HydratedTemplateButton.HydratedQuickReplyButton.verify|verify} messages. + * @function encode + * @memberof proto.HydratedTemplateButton.HydratedQuickReplyButton + * @static + * @param {proto.HydratedTemplateButton.IHydratedQuickReplyButton} message HydratedQuickReplyButton message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HydratedQuickReplyButton.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); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); + return writer; + }; + + /** + * Encodes the specified HydratedQuickReplyButton message, length delimited. Does not implicitly {@link proto.HydratedTemplateButton.HydratedQuickReplyButton.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.HydratedTemplateButton.HydratedQuickReplyButton + * @static + * @param {proto.HydratedTemplateButton.IHydratedQuickReplyButton} message HydratedQuickReplyButton message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HydratedQuickReplyButton.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HydratedQuickReplyButton message from the specified reader or buffer. + * @function decode + * @memberof proto.HydratedTemplateButton.HydratedQuickReplyButton + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.HydratedTemplateButton.HydratedQuickReplyButton} HydratedQuickReplyButton + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HydratedQuickReplyButton.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.HydratedTemplateButton.HydratedQuickReplyButton(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.displayText = reader.string(); + break; + case 2: + message.id = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HydratedQuickReplyButton message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.HydratedTemplateButton.HydratedQuickReplyButton + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.HydratedTemplateButton.HydratedQuickReplyButton} HydratedQuickReplyButton + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HydratedQuickReplyButton.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HydratedQuickReplyButton message. + * @function verify + * @memberof proto.HydratedTemplateButton.HydratedQuickReplyButton + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HydratedQuickReplyButton.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"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + return null; + }; + + /** + * Creates a HydratedQuickReplyButton message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.HydratedTemplateButton.HydratedQuickReplyButton + * @static + * @param {Object.} object Plain object + * @returns {proto.HydratedTemplateButton.HydratedQuickReplyButton} HydratedQuickReplyButton + */ + HydratedQuickReplyButton.fromObject = function fromObject(object) { + if (object instanceof $root.proto.HydratedTemplateButton.HydratedQuickReplyButton) + return object; + var message = new $root.proto.HydratedTemplateButton.HydratedQuickReplyButton(); + if (object.displayText != null) + message.displayText = String(object.displayText); + if (object.id != null) + message.id = String(object.id); + return message; + }; + + /** + * Creates a plain object from a HydratedQuickReplyButton message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.HydratedTemplateButton.HydratedQuickReplyButton + * @static + * @param {proto.HydratedTemplateButton.HydratedQuickReplyButton} message HydratedQuickReplyButton + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HydratedQuickReplyButton.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayText = ""; + object.id = ""; + } + if (message.displayText != null && message.hasOwnProperty("displayText")) + object.displayText = message.displayText; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + return object; + }; + + /** + * Converts this HydratedQuickReplyButton to JSON. + * @function toJSON + * @memberof proto.HydratedTemplateButton.HydratedQuickReplyButton + * @instance + * @returns {Object.} JSON object + */ + HydratedQuickReplyButton.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HydratedQuickReplyButton; + })(); + + HydratedTemplateButton.HydratedURLButton = (function() { + + /** + * Properties of a HydratedURLButton. + * @memberof proto.HydratedTemplateButton + * @interface IHydratedURLButton + * @property {string|null} [displayText] HydratedURLButton displayText + * @property {string|null} [url] HydratedURLButton url + */ + + /** + * Constructs a new HydratedURLButton. + * @memberof proto.HydratedTemplateButton + * @classdesc Represents a HydratedURLButton. + * @implements IHydratedURLButton + * @constructor + * @param {proto.HydratedTemplateButton.IHydratedURLButton=} [properties] Properties to set + */ + function HydratedURLButton(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]]; + } + + /** + * HydratedURLButton displayText. + * @member {string} displayText + * @memberof proto.HydratedTemplateButton.HydratedURLButton + * @instance + */ + HydratedURLButton.prototype.displayText = ""; + + /** + * HydratedURLButton url. + * @member {string} url + * @memberof proto.HydratedTemplateButton.HydratedURLButton + * @instance + */ + HydratedURLButton.prototype.url = ""; + + /** + * Creates a new HydratedURLButton instance using the specified properties. + * @function create + * @memberof proto.HydratedTemplateButton.HydratedURLButton + * @static + * @param {proto.HydratedTemplateButton.IHydratedURLButton=} [properties] Properties to set + * @returns {proto.HydratedTemplateButton.HydratedURLButton} HydratedURLButton instance + */ + HydratedURLButton.create = function create(properties) { + return new HydratedURLButton(properties); + }; + + /** + * Encodes the specified HydratedURLButton message. Does not implicitly {@link proto.HydratedTemplateButton.HydratedURLButton.verify|verify} messages. + * @function encode + * @memberof proto.HydratedTemplateButton.HydratedURLButton + * @static + * @param {proto.HydratedTemplateButton.IHydratedURLButton} message HydratedURLButton message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HydratedURLButton.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); + if (message.url != null && Object.hasOwnProperty.call(message, "url")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.url); + return writer; + }; + + /** + * Encodes the specified HydratedURLButton message, length delimited. Does not implicitly {@link proto.HydratedTemplateButton.HydratedURLButton.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.HydratedTemplateButton.HydratedURLButton + * @static + * @param {proto.HydratedTemplateButton.IHydratedURLButton} message HydratedURLButton message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HydratedURLButton.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HydratedURLButton message from the specified reader or buffer. + * @function decode + * @memberof proto.HydratedTemplateButton.HydratedURLButton + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.HydratedTemplateButton.HydratedURLButton} HydratedURLButton + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HydratedURLButton.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.HydratedTemplateButton.HydratedURLButton(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.displayText = reader.string(); + break; + case 2: + message.url = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HydratedURLButton message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.HydratedTemplateButton.HydratedURLButton + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.HydratedTemplateButton.HydratedURLButton} HydratedURLButton + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HydratedURLButton.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HydratedURLButton message. + * @function verify + * @memberof proto.HydratedTemplateButton.HydratedURLButton + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HydratedURLButton.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"; + if (message.url != null && message.hasOwnProperty("url")) + if (!$util.isString(message.url)) + return "url: string expected"; + return null; + }; + + /** + * Creates a HydratedURLButton message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.HydratedTemplateButton.HydratedURLButton + * @static + * @param {Object.} object Plain object + * @returns {proto.HydratedTemplateButton.HydratedURLButton} HydratedURLButton + */ + HydratedURLButton.fromObject = function fromObject(object) { + if (object instanceof $root.proto.HydratedTemplateButton.HydratedURLButton) + return object; + var message = new $root.proto.HydratedTemplateButton.HydratedURLButton(); + if (object.displayText != null) + message.displayText = String(object.displayText); + if (object.url != null) + message.url = String(object.url); + return message; + }; + + /** + * Creates a plain object from a HydratedURLButton message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.HydratedTemplateButton.HydratedURLButton + * @static + * @param {proto.HydratedTemplateButton.HydratedURLButton} message HydratedURLButton + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HydratedURLButton.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayText = ""; + object.url = ""; + } + if (message.displayText != null && message.hasOwnProperty("displayText")) + object.displayText = message.displayText; + if (message.url != null && message.hasOwnProperty("url")) + object.url = message.url; + return object; + }; + + /** + * Converts this HydratedURLButton to JSON. + * @function toJSON + * @memberof proto.HydratedTemplateButton.HydratedURLButton + * @instance + * @returns {Object.} JSON object + */ + HydratedURLButton.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HydratedURLButton; + })(); + + return HydratedTemplateButton; })(); proto.IdentityKeyPairStructure = (function() { @@ -27259,1098 +15987,6 @@ $root.proto = (function() { return IdentityKeyPairStructure; })(); - proto.ImageMessage = (function() { - - /** - * Properties of an ImageMessage. - * @memberof proto - * @interface IImageMessage - * @property {string|null} [url] ImageMessage url - * @property {string|null} [mimetype] ImageMessage mimetype - * @property {string|null} [caption] ImageMessage caption - * @property {Uint8Array|null} [fileSha256] ImageMessage fileSha256 - * @property {number|Long|null} [fileLength] ImageMessage fileLength - * @property {number|null} [height] ImageMessage height - * @property {number|null} [width] ImageMessage width - * @property {Uint8Array|null} [mediaKey] ImageMessage mediaKey - * @property {Uint8Array|null} [fileEncSha256] ImageMessage fileEncSha256 - * @property {Array.|null} [interactiveAnnotations] ImageMessage interactiveAnnotations - * @property {string|null} [directPath] ImageMessage directPath - * @property {number|Long|null} [mediaKeyTimestamp] ImageMessage mediaKeyTimestamp - * @property {Uint8Array|null} [jpegThumbnail] ImageMessage jpegThumbnail - * @property {proto.IContextInfo|null} [contextInfo] ImageMessage contextInfo - * @property {Uint8Array|null} [firstScanSidecar] ImageMessage firstScanSidecar - * @property {number|null} [firstScanLength] ImageMessage firstScanLength - * @property {number|null} [experimentGroupId] ImageMessage experimentGroupId - * @property {Uint8Array|null} [scansSidecar] ImageMessage scansSidecar - * @property {Array.|null} [scanLengths] ImageMessage scanLengths - * @property {Uint8Array|null} [midQualityFileSha256] ImageMessage midQualityFileSha256 - * @property {Uint8Array|null} [midQualityFileEncSha256] ImageMessage midQualityFileEncSha256 - * @property {boolean|null} [viewOnce] ImageMessage viewOnce - * @property {string|null} [thumbnailDirectPath] ImageMessage thumbnailDirectPath - * @property {Uint8Array|null} [thumbnailSha256] ImageMessage thumbnailSha256 - * @property {Uint8Array|null} [thumbnailEncSha256] ImageMessage thumbnailEncSha256 - * @property {string|null} [staticUrl] ImageMessage staticUrl - */ - - /** - * Constructs a new ImageMessage. - * @memberof proto - * @classdesc Represents an ImageMessage. - * @implements IImageMessage - * @constructor - * @param {proto.IImageMessage=} [properties] Properties to set - */ - function ImageMessage(properties) { - this.interactiveAnnotations = []; - this.scanLengths = []; - 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]]; - } - - /** - * ImageMessage url. - * @member {string} url - * @memberof proto.ImageMessage - * @instance - */ - ImageMessage.prototype.url = ""; - - /** - * ImageMessage mimetype. - * @member {string} mimetype - * @memberof proto.ImageMessage - * @instance - */ - ImageMessage.prototype.mimetype = ""; - - /** - * ImageMessage caption. - * @member {string} caption - * @memberof proto.ImageMessage - * @instance - */ - ImageMessage.prototype.caption = ""; - - /** - * ImageMessage fileSha256. - * @member {Uint8Array} fileSha256 - * @memberof proto.ImageMessage - * @instance - */ - ImageMessage.prototype.fileSha256 = $util.newBuffer([]); - - /** - * ImageMessage fileLength. - * @member {number|Long} fileLength - * @memberof proto.ImageMessage - * @instance - */ - ImageMessage.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * ImageMessage height. - * @member {number} height - * @memberof proto.ImageMessage - * @instance - */ - ImageMessage.prototype.height = 0; - - /** - * ImageMessage width. - * @member {number} width - * @memberof proto.ImageMessage - * @instance - */ - ImageMessage.prototype.width = 0; - - /** - * ImageMessage mediaKey. - * @member {Uint8Array} mediaKey - * @memberof proto.ImageMessage - * @instance - */ - ImageMessage.prototype.mediaKey = $util.newBuffer([]); - - /** - * ImageMessage fileEncSha256. - * @member {Uint8Array} fileEncSha256 - * @memberof proto.ImageMessage - * @instance - */ - ImageMessage.prototype.fileEncSha256 = $util.newBuffer([]); - - /** - * ImageMessage interactiveAnnotations. - * @member {Array.} interactiveAnnotations - * @memberof proto.ImageMessage - * @instance - */ - ImageMessage.prototype.interactiveAnnotations = $util.emptyArray; - - /** - * ImageMessage directPath. - * @member {string} directPath - * @memberof proto.ImageMessage - * @instance - */ - ImageMessage.prototype.directPath = ""; - - /** - * ImageMessage mediaKeyTimestamp. - * @member {number|Long} mediaKeyTimestamp - * @memberof proto.ImageMessage - * @instance - */ - ImageMessage.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ImageMessage jpegThumbnail. - * @member {Uint8Array} jpegThumbnail - * @memberof proto.ImageMessage - * @instance - */ - ImageMessage.prototype.jpegThumbnail = $util.newBuffer([]); - - /** - * ImageMessage contextInfo. - * @member {proto.IContextInfo|null|undefined} contextInfo - * @memberof proto.ImageMessage - * @instance - */ - ImageMessage.prototype.contextInfo = null; - - /** - * ImageMessage firstScanSidecar. - * @member {Uint8Array} firstScanSidecar - * @memberof proto.ImageMessage - * @instance - */ - ImageMessage.prototype.firstScanSidecar = $util.newBuffer([]); - - /** - * ImageMessage firstScanLength. - * @member {number} firstScanLength - * @memberof proto.ImageMessage - * @instance - */ - ImageMessage.prototype.firstScanLength = 0; - - /** - * ImageMessage experimentGroupId. - * @member {number} experimentGroupId - * @memberof proto.ImageMessage - * @instance - */ - ImageMessage.prototype.experimentGroupId = 0; - - /** - * ImageMessage scansSidecar. - * @member {Uint8Array} scansSidecar - * @memberof proto.ImageMessage - * @instance - */ - ImageMessage.prototype.scansSidecar = $util.newBuffer([]); - - /** - * ImageMessage scanLengths. - * @member {Array.} scanLengths - * @memberof proto.ImageMessage - * @instance - */ - ImageMessage.prototype.scanLengths = $util.emptyArray; - - /** - * ImageMessage midQualityFileSha256. - * @member {Uint8Array} midQualityFileSha256 - * @memberof proto.ImageMessage - * @instance - */ - ImageMessage.prototype.midQualityFileSha256 = $util.newBuffer([]); - - /** - * ImageMessage midQualityFileEncSha256. - * @member {Uint8Array} midQualityFileEncSha256 - * @memberof proto.ImageMessage - * @instance - */ - ImageMessage.prototype.midQualityFileEncSha256 = $util.newBuffer([]); - - /** - * ImageMessage viewOnce. - * @member {boolean} viewOnce - * @memberof proto.ImageMessage - * @instance - */ - ImageMessage.prototype.viewOnce = false; - - /** - * ImageMessage thumbnailDirectPath. - * @member {string} thumbnailDirectPath - * @memberof proto.ImageMessage - * @instance - */ - ImageMessage.prototype.thumbnailDirectPath = ""; - - /** - * ImageMessage thumbnailSha256. - * @member {Uint8Array} thumbnailSha256 - * @memberof proto.ImageMessage - * @instance - */ - ImageMessage.prototype.thumbnailSha256 = $util.newBuffer([]); - - /** - * ImageMessage thumbnailEncSha256. - * @member {Uint8Array} thumbnailEncSha256 - * @memberof proto.ImageMessage - * @instance - */ - ImageMessage.prototype.thumbnailEncSha256 = $util.newBuffer([]); - - /** - * ImageMessage staticUrl. - * @member {string} staticUrl - * @memberof proto.ImageMessage - * @instance - */ - ImageMessage.prototype.staticUrl = ""; - - /** - * Creates a new ImageMessage instance using the specified properties. - * @function create - * @memberof proto.ImageMessage - * @static - * @param {proto.IImageMessage=} [properties] Properties to set - * @returns {proto.ImageMessage} ImageMessage instance - */ - ImageMessage.create = function create(properties) { - return new ImageMessage(properties); - }; - - /** - * Encodes the specified ImageMessage message. Does not implicitly {@link proto.ImageMessage.verify|verify} messages. - * @function encode - * @memberof proto.ImageMessage - * @static - * @param {proto.IImageMessage} message ImageMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImageMessage.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.caption != null && Object.hasOwnProperty.call(message, "caption")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.caption); - if (message.fileSha256 != null && Object.hasOwnProperty.call(message, "fileSha256")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.fileSha256); - if (message.fileLength != null && Object.hasOwnProperty.call(message, "fileLength")) - writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.fileLength); - if (message.height != null && Object.hasOwnProperty.call(message, "height")) - writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.height); - if (message.width != null && Object.hasOwnProperty.call(message, "width")) - writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.width); - if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey")) - writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.mediaKey); - if (message.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256")) - writer.uint32(/* id 9, wireType 2 =*/74).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 10, wireType 2 =*/82).fork()).ldelim(); - if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.directPath); - if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp")) - writer.uint32(/* id 12, wireType 0 =*/96).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.firstScanSidecar != null && Object.hasOwnProperty.call(message, "firstScanSidecar")) - writer.uint32(/* id 18, wireType 2 =*/146).bytes(message.firstScanSidecar); - if (message.firstScanLength != null && Object.hasOwnProperty.call(message, "firstScanLength")) - writer.uint32(/* id 19, wireType 0 =*/152).uint32(message.firstScanLength); - if (message.experimentGroupId != null && Object.hasOwnProperty.call(message, "experimentGroupId")) - writer.uint32(/* id 20, wireType 0 =*/160).uint32(message.experimentGroupId); - if (message.scansSidecar != null && Object.hasOwnProperty.call(message, "scansSidecar")) - writer.uint32(/* id 21, wireType 2 =*/170).bytes(message.scansSidecar); - if (message.scanLengths != null && message.scanLengths.length) - for (var i = 0; i < message.scanLengths.length; ++i) - writer.uint32(/* id 22, wireType 0 =*/176).uint32(message.scanLengths[i]); - if (message.midQualityFileSha256 != null && Object.hasOwnProperty.call(message, "midQualityFileSha256")) - writer.uint32(/* id 23, wireType 2 =*/186).bytes(message.midQualityFileSha256); - if (message.midQualityFileEncSha256 != null && Object.hasOwnProperty.call(message, "midQualityFileEncSha256")) - writer.uint32(/* id 24, wireType 2 =*/194).bytes(message.midQualityFileEncSha256); - if (message.viewOnce != null && Object.hasOwnProperty.call(message, "viewOnce")) - writer.uint32(/* id 25, wireType 0 =*/200).bool(message.viewOnce); - if (message.thumbnailDirectPath != null && Object.hasOwnProperty.call(message, "thumbnailDirectPath")) - writer.uint32(/* id 26, wireType 2 =*/210).string(message.thumbnailDirectPath); - if (message.thumbnailSha256 != null && Object.hasOwnProperty.call(message, "thumbnailSha256")) - writer.uint32(/* id 27, wireType 2 =*/218).bytes(message.thumbnailSha256); - if (message.thumbnailEncSha256 != null && Object.hasOwnProperty.call(message, "thumbnailEncSha256")) - writer.uint32(/* id 28, wireType 2 =*/226).bytes(message.thumbnailEncSha256); - if (message.staticUrl != null && Object.hasOwnProperty.call(message, "staticUrl")) - writer.uint32(/* id 29, wireType 2 =*/234).string(message.staticUrl); - return writer; - }; - - /** - * Encodes the specified ImageMessage message, length delimited. Does not implicitly {@link proto.ImageMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.ImageMessage - * @static - * @param {proto.IImageMessage} message ImageMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImageMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ImageMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.ImageMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.ImageMessage} ImageMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImageMessage.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.ImageMessage(); - 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.caption = reader.string(); - break; - case 4: - message.fileSha256 = reader.bytes(); - break; - case 5: - message.fileLength = reader.uint64(); - break; - case 6: - message.height = reader.uint32(); - break; - case 7: - message.width = reader.uint32(); - break; - case 8: - message.mediaKey = reader.bytes(); - break; - case 9: - message.fileEncSha256 = reader.bytes(); - break; - case 10: - if (!(message.interactiveAnnotations && message.interactiveAnnotations.length)) - message.interactiveAnnotations = []; - message.interactiveAnnotations.push($root.proto.InteractiveAnnotation.decode(reader, reader.uint32())); - break; - case 11: - message.directPath = reader.string(); - break; - case 12: - 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.firstScanSidecar = reader.bytes(); - break; - case 19: - message.firstScanLength = reader.uint32(); - break; - case 20: - message.experimentGroupId = reader.uint32(); - break; - case 21: - message.scansSidecar = reader.bytes(); - break; - case 22: - if (!(message.scanLengths && message.scanLengths.length)) - message.scanLengths = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.scanLengths.push(reader.uint32()); - } else - message.scanLengths.push(reader.uint32()); - break; - case 23: - message.midQualityFileSha256 = reader.bytes(); - break; - case 24: - message.midQualityFileEncSha256 = reader.bytes(); - break; - case 25: - message.viewOnce = reader.bool(); - break; - case 26: - message.thumbnailDirectPath = reader.string(); - break; - case 27: - message.thumbnailSha256 = reader.bytes(); - break; - case 28: - message.thumbnailEncSha256 = reader.bytes(); - break; - case 29: - message.staticUrl = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ImageMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.ImageMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ImageMessage} ImageMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImageMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ImageMessage message. - * @function verify - * @memberof proto.ImageMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ImageMessage.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.caption != null && message.hasOwnProperty("caption")) - if (!$util.isString(message.caption)) - return "caption: 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.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.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.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.firstScanSidecar != null && message.hasOwnProperty("firstScanSidecar")) - if (!(message.firstScanSidecar && typeof message.firstScanSidecar.length === "number" || $util.isString(message.firstScanSidecar))) - return "firstScanSidecar: buffer expected"; - if (message.firstScanLength != null && message.hasOwnProperty("firstScanLength")) - if (!$util.isInteger(message.firstScanLength)) - return "firstScanLength: integer expected"; - if (message.experimentGroupId != null && message.hasOwnProperty("experimentGroupId")) - if (!$util.isInteger(message.experimentGroupId)) - return "experimentGroupId: integer expected"; - if (message.scansSidecar != null && message.hasOwnProperty("scansSidecar")) - if (!(message.scansSidecar && typeof message.scansSidecar.length === "number" || $util.isString(message.scansSidecar))) - return "scansSidecar: buffer expected"; - if (message.scanLengths != null && message.hasOwnProperty("scanLengths")) { - if (!Array.isArray(message.scanLengths)) - return "scanLengths: array expected"; - for (var i = 0; i < message.scanLengths.length; ++i) - if (!$util.isInteger(message.scanLengths[i])) - return "scanLengths: integer[] expected"; - } - if (message.midQualityFileSha256 != null && message.hasOwnProperty("midQualityFileSha256")) - if (!(message.midQualityFileSha256 && typeof message.midQualityFileSha256.length === "number" || $util.isString(message.midQualityFileSha256))) - return "midQualityFileSha256: buffer expected"; - if (message.midQualityFileEncSha256 != null && message.hasOwnProperty("midQualityFileEncSha256")) - if (!(message.midQualityFileEncSha256 && typeof message.midQualityFileEncSha256.length === "number" || $util.isString(message.midQualityFileEncSha256))) - return "midQualityFileEncSha256: buffer expected"; - 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 an ImageMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.ImageMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.ImageMessage} ImageMessage - */ - ImageMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ImageMessage) - return object; - var message = new $root.proto.ImageMessage(); - if (object.url != null) - message.url = String(object.url); - if (object.mimetype != null) - message.mimetype = String(object.mimetype); - if (object.caption != null) - message.caption = String(object.caption); - 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.height != null) - message.height = object.height >>> 0; - if (object.width != null) - message.width = object.width >>> 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.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.ImageMessage.interactiveAnnotations: array expected"); - message.interactiveAnnotations = []; - for (var i = 0; i < object.interactiveAnnotations.length; ++i) { - if (typeof object.interactiveAnnotations[i] !== "object") - throw TypeError(".proto.ImageMessage.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.ImageMessage.contextInfo: object expected"); - message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); - } - if (object.firstScanSidecar != null) - if (typeof object.firstScanSidecar === "string") - $util.base64.decode(object.firstScanSidecar, message.firstScanSidecar = $util.newBuffer($util.base64.length(object.firstScanSidecar)), 0); - else if (object.firstScanSidecar.length) - message.firstScanSidecar = object.firstScanSidecar; - if (object.firstScanLength != null) - message.firstScanLength = object.firstScanLength >>> 0; - if (object.experimentGroupId != null) - message.experimentGroupId = object.experimentGroupId >>> 0; - if (object.scansSidecar != null) - if (typeof object.scansSidecar === "string") - $util.base64.decode(object.scansSidecar, message.scansSidecar = $util.newBuffer($util.base64.length(object.scansSidecar)), 0); - else if (object.scansSidecar.length) - message.scansSidecar = object.scansSidecar; - if (object.scanLengths) { - if (!Array.isArray(object.scanLengths)) - throw TypeError(".proto.ImageMessage.scanLengths: array expected"); - message.scanLengths = []; - for (var i = 0; i < object.scanLengths.length; ++i) - message.scanLengths[i] = object.scanLengths[i] >>> 0; - } - if (object.midQualityFileSha256 != null) - if (typeof object.midQualityFileSha256 === "string") - $util.base64.decode(object.midQualityFileSha256, message.midQualityFileSha256 = $util.newBuffer($util.base64.length(object.midQualityFileSha256)), 0); - else if (object.midQualityFileSha256.length) - message.midQualityFileSha256 = object.midQualityFileSha256; - if (object.midQualityFileEncSha256 != null) - if (typeof object.midQualityFileEncSha256 === "string") - $util.base64.decode(object.midQualityFileEncSha256, message.midQualityFileEncSha256 = $util.newBuffer($util.base64.length(object.midQualityFileEncSha256)), 0); - else if (object.midQualityFileEncSha256.length) - message.midQualityFileEncSha256 = object.midQualityFileEncSha256; - 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 an ImageMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.ImageMessage - * @static - * @param {proto.ImageMessage} message ImageMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImageMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.interactiveAnnotations = []; - object.scanLengths = []; - } - if (options.defaults) { - object.url = ""; - object.mimetype = ""; - object.caption = ""; - 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.height = 0; - object.width = 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 = ""; - 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.firstScanSidecar = ""; - else { - object.firstScanSidecar = []; - if (options.bytes !== Array) - object.firstScanSidecar = $util.newBuffer(object.firstScanSidecar); - } - object.firstScanLength = 0; - object.experimentGroupId = 0; - if (options.bytes === String) - object.scansSidecar = ""; - else { - object.scansSidecar = []; - if (options.bytes !== Array) - object.scansSidecar = $util.newBuffer(object.scansSidecar); - } - if (options.bytes === String) - object.midQualityFileSha256 = ""; - else { - object.midQualityFileSha256 = []; - if (options.bytes !== Array) - object.midQualityFileSha256 = $util.newBuffer(object.midQualityFileSha256); - } - if (options.bytes === String) - object.midQualityFileEncSha256 = ""; - else { - object.midQualityFileEncSha256 = []; - if (options.bytes !== Array) - object.midQualityFileEncSha256 = $util.newBuffer(object.midQualityFileEncSha256); - } - 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.caption != null && message.hasOwnProperty("caption")) - object.caption = message.caption; - 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.height != null && message.hasOwnProperty("height")) - object.height = message.height; - if (message.width != null && message.hasOwnProperty("width")) - object.width = message.width; - 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.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.firstScanSidecar != null && message.hasOwnProperty("firstScanSidecar")) - object.firstScanSidecar = options.bytes === String ? $util.base64.encode(message.firstScanSidecar, 0, message.firstScanSidecar.length) : options.bytes === Array ? Array.prototype.slice.call(message.firstScanSidecar) : message.firstScanSidecar; - if (message.firstScanLength != null && message.hasOwnProperty("firstScanLength")) - object.firstScanLength = message.firstScanLength; - if (message.experimentGroupId != null && message.hasOwnProperty("experimentGroupId")) - object.experimentGroupId = message.experimentGroupId; - if (message.scansSidecar != null && message.hasOwnProperty("scansSidecar")) - object.scansSidecar = options.bytes === String ? $util.base64.encode(message.scansSidecar, 0, message.scansSidecar.length) : options.bytes === Array ? Array.prototype.slice.call(message.scansSidecar) : message.scansSidecar; - if (message.scanLengths && message.scanLengths.length) { - object.scanLengths = []; - for (var j = 0; j < message.scanLengths.length; ++j) - object.scanLengths[j] = message.scanLengths[j]; - } - if (message.midQualityFileSha256 != null && message.hasOwnProperty("midQualityFileSha256")) - object.midQualityFileSha256 = options.bytes === String ? $util.base64.encode(message.midQualityFileSha256, 0, message.midQualityFileSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.midQualityFileSha256) : message.midQualityFileSha256; - if (message.midQualityFileEncSha256 != null && message.hasOwnProperty("midQualityFileEncSha256")) - object.midQualityFileEncSha256 = options.bytes === String ? $util.base64.encode(message.midQualityFileEncSha256, 0, message.midQualityFileEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.midQualityFileEncSha256) : message.midQualityFileEncSha256; - 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 ImageMessage to JSON. - * @function toJSON - * @memberof proto.ImageMessage - * @instance - * @returns {Object.} JSON object - */ - ImageMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ImageMessage; - })(); - - proto.InitialSecurityNotificationSettingSync = (function() { - - /** - * Properties of an InitialSecurityNotificationSettingSync. - * @memberof proto - * @interface IInitialSecurityNotificationSettingSync - * @property {boolean|null} [securityNotificationEnabled] InitialSecurityNotificationSettingSync securityNotificationEnabled - */ - - /** - * Constructs a new InitialSecurityNotificationSettingSync. - * @memberof proto - * @classdesc Represents an InitialSecurityNotificationSettingSync. - * @implements IInitialSecurityNotificationSettingSync - * @constructor - * @param {proto.IInitialSecurityNotificationSettingSync=} [properties] Properties to set - */ - function InitialSecurityNotificationSettingSync(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]]; - } - - /** - * InitialSecurityNotificationSettingSync securityNotificationEnabled. - * @member {boolean} securityNotificationEnabled - * @memberof proto.InitialSecurityNotificationSettingSync - * @instance - */ - InitialSecurityNotificationSettingSync.prototype.securityNotificationEnabled = false; - - /** - * Creates a new InitialSecurityNotificationSettingSync instance using the specified properties. - * @function create - * @memberof proto.InitialSecurityNotificationSettingSync - * @static - * @param {proto.IInitialSecurityNotificationSettingSync=} [properties] Properties to set - * @returns {proto.InitialSecurityNotificationSettingSync} InitialSecurityNotificationSettingSync instance - */ - InitialSecurityNotificationSettingSync.create = function create(properties) { - return new InitialSecurityNotificationSettingSync(properties); - }; - - /** - * Encodes the specified InitialSecurityNotificationSettingSync message. Does not implicitly {@link proto.InitialSecurityNotificationSettingSync.verify|verify} messages. - * @function encode - * @memberof proto.InitialSecurityNotificationSettingSync - * @static - * @param {proto.IInitialSecurityNotificationSettingSync} message InitialSecurityNotificationSettingSync message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InitialSecurityNotificationSettingSync.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.securityNotificationEnabled != null && Object.hasOwnProperty.call(message, "securityNotificationEnabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.securityNotificationEnabled); - return writer; - }; - - /** - * Encodes the specified InitialSecurityNotificationSettingSync message, length delimited. Does not implicitly {@link proto.InitialSecurityNotificationSettingSync.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.InitialSecurityNotificationSettingSync - * @static - * @param {proto.IInitialSecurityNotificationSettingSync} message InitialSecurityNotificationSettingSync message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InitialSecurityNotificationSettingSync.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InitialSecurityNotificationSettingSync message from the specified reader or buffer. - * @function decode - * @memberof proto.InitialSecurityNotificationSettingSync - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.InitialSecurityNotificationSettingSync} InitialSecurityNotificationSettingSync - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InitialSecurityNotificationSettingSync.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.InitialSecurityNotificationSettingSync(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.securityNotificationEnabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InitialSecurityNotificationSettingSync message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.InitialSecurityNotificationSettingSync - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.InitialSecurityNotificationSettingSync} InitialSecurityNotificationSettingSync - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InitialSecurityNotificationSettingSync.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InitialSecurityNotificationSettingSync message. - * @function verify - * @memberof proto.InitialSecurityNotificationSettingSync - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InitialSecurityNotificationSettingSync.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.securityNotificationEnabled != null && message.hasOwnProperty("securityNotificationEnabled")) - if (typeof message.securityNotificationEnabled !== "boolean") - return "securityNotificationEnabled: boolean expected"; - return null; - }; - - /** - * Creates an InitialSecurityNotificationSettingSync message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.InitialSecurityNotificationSettingSync - * @static - * @param {Object.} object Plain object - * @returns {proto.InitialSecurityNotificationSettingSync} InitialSecurityNotificationSettingSync - */ - InitialSecurityNotificationSettingSync.fromObject = function fromObject(object) { - if (object instanceof $root.proto.InitialSecurityNotificationSettingSync) - return object; - var message = new $root.proto.InitialSecurityNotificationSettingSync(); - if (object.securityNotificationEnabled != null) - message.securityNotificationEnabled = Boolean(object.securityNotificationEnabled); - return message; - }; - - /** - * Creates a plain object from an InitialSecurityNotificationSettingSync message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.InitialSecurityNotificationSettingSync - * @static - * @param {proto.InitialSecurityNotificationSettingSync} message InitialSecurityNotificationSettingSync - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InitialSecurityNotificationSettingSync.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.securityNotificationEnabled = false; - if (message.securityNotificationEnabled != null && message.hasOwnProperty("securityNotificationEnabled")) - object.securityNotificationEnabled = message.securityNotificationEnabled; - return object; - }; - - /** - * Converts this InitialSecurityNotificationSettingSync to JSON. - * @function toJSON - * @memberof proto.InitialSecurityNotificationSettingSync - * @instance - * @returns {Object.} JSON object - */ - InitialSecurityNotificationSettingSync.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return InitialSecurityNotificationSettingSync; - })(); - proto.InteractiveAnnotation = (function() { /** @@ -28606,1499 +16242,6 @@ $root.proto = (function() { return InteractiveAnnotation; })(); - proto.InteractiveMessage = (function() { - - /** - * Properties of an InteractiveMessage. - * @memberof proto - * @interface IInteractiveMessage - * @property {proto.IHeader|null} [header] InteractiveMessage header - * @property {proto.IInteractiveMessageBody|null} [body] InteractiveMessage body - * @property {proto.IFooter|null} [footer] InteractiveMessage footer - * @property {proto.IContextInfo|null} [contextInfo] InteractiveMessage contextInfo - * @property {proto.IShopMessage|null} [shopStorefrontMessage] InteractiveMessage shopStorefrontMessage - * @property {proto.ICollectionMessage|null} [collectionMessage] InteractiveMessage collectionMessage - * @property {proto.INativeFlowMessage|null} [nativeFlowMessage] InteractiveMessage nativeFlowMessage - */ - - /** - * Constructs a new InteractiveMessage. - * @memberof proto - * @classdesc Represents an InteractiveMessage. - * @implements IInteractiveMessage - * @constructor - * @param {proto.IInteractiveMessage=} [properties] Properties to set - */ - function InteractiveMessage(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]]; - } - - /** - * InteractiveMessage header. - * @member {proto.IHeader|null|undefined} header - * @memberof proto.InteractiveMessage - * @instance - */ - InteractiveMessage.prototype.header = null; - - /** - * InteractiveMessage body. - * @member {proto.IInteractiveMessageBody|null|undefined} body - * @memberof proto.InteractiveMessage - * @instance - */ - InteractiveMessage.prototype.body = null; - - /** - * InteractiveMessage footer. - * @member {proto.IFooter|null|undefined} footer - * @memberof proto.InteractiveMessage - * @instance - */ - InteractiveMessage.prototype.footer = null; - - /** - * InteractiveMessage contextInfo. - * @member {proto.IContextInfo|null|undefined} contextInfo - * @memberof proto.InteractiveMessage - * @instance - */ - InteractiveMessage.prototype.contextInfo = null; - - /** - * InteractiveMessage shopStorefrontMessage. - * @member {proto.IShopMessage|null|undefined} shopStorefrontMessage - * @memberof proto.InteractiveMessage - * @instance - */ - InteractiveMessage.prototype.shopStorefrontMessage = null; - - /** - * InteractiveMessage collectionMessage. - * @member {proto.ICollectionMessage|null|undefined} collectionMessage - * @memberof proto.InteractiveMessage - * @instance - */ - InteractiveMessage.prototype.collectionMessage = null; - - /** - * InteractiveMessage nativeFlowMessage. - * @member {proto.INativeFlowMessage|null|undefined} nativeFlowMessage - * @memberof proto.InteractiveMessage - * @instance - */ - InteractiveMessage.prototype.nativeFlowMessage = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * InteractiveMessage interactiveMessage. - * @member {"shopStorefrontMessage"|"collectionMessage"|"nativeFlowMessage"|undefined} interactiveMessage - * @memberof proto.InteractiveMessage - * @instance - */ - Object.defineProperty(InteractiveMessage.prototype, "interactiveMessage", { - get: $util.oneOfGetter($oneOfFields = ["shopStorefrontMessage", "collectionMessage", "nativeFlowMessage"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new InteractiveMessage instance using the specified properties. - * @function create - * @memberof proto.InteractiveMessage - * @static - * @param {proto.IInteractiveMessage=} [properties] Properties to set - * @returns {proto.InteractiveMessage} InteractiveMessage instance - */ - InteractiveMessage.create = function create(properties) { - return new InteractiveMessage(properties); - }; - - /** - * Encodes the specified InteractiveMessage message. Does not implicitly {@link proto.InteractiveMessage.verify|verify} messages. - * @function encode - * @memberof proto.InteractiveMessage - * @static - * @param {proto.IInteractiveMessage} message InteractiveMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InteractiveMessage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.header != null && Object.hasOwnProperty.call(message, "header")) - $root.proto.Header.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - $root.proto.InteractiveMessageBody.encode(message.body, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.footer != null && Object.hasOwnProperty.call(message, "footer")) - $root.proto.Footer.encode(message.footer, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.shopStorefrontMessage != null && Object.hasOwnProperty.call(message, "shopStorefrontMessage")) - $root.proto.ShopMessage.encode(message.shopStorefrontMessage, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.collectionMessage != null && Object.hasOwnProperty.call(message, "collectionMessage")) - $root.proto.CollectionMessage.encode(message.collectionMessage, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.nativeFlowMessage != null && Object.hasOwnProperty.call(message, "nativeFlowMessage")) - $root.proto.NativeFlowMessage.encode(message.nativeFlowMessage, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) - $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified InteractiveMessage message, length delimited. Does not implicitly {@link proto.InteractiveMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.InteractiveMessage - * @static - * @param {proto.IInteractiveMessage} message InteractiveMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InteractiveMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InteractiveMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.InteractiveMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.InteractiveMessage} InteractiveMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InteractiveMessage.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.InteractiveMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.header = $root.proto.Header.decode(reader, reader.uint32()); - break; - case 2: - message.body = $root.proto.InteractiveMessageBody.decode(reader, reader.uint32()); - break; - case 3: - message.footer = $root.proto.Footer.decode(reader, reader.uint32()); - break; - case 15: - message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); - break; - case 4: - message.shopStorefrontMessage = $root.proto.ShopMessage.decode(reader, reader.uint32()); - break; - case 5: - message.collectionMessage = $root.proto.CollectionMessage.decode(reader, reader.uint32()); - break; - case 6: - message.nativeFlowMessage = $root.proto.NativeFlowMessage.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InteractiveMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.InteractiveMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.InteractiveMessage} InteractiveMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InteractiveMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InteractiveMessage message. - * @function verify - * @memberof proto.InteractiveMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InteractiveMessage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.header != null && message.hasOwnProperty("header")) { - var error = $root.proto.Header.verify(message.header); - if (error) - return "header." + error; - } - if (message.body != null && message.hasOwnProperty("body")) { - var error = $root.proto.InteractiveMessageBody.verify(message.body); - if (error) - return "body." + error; - } - if (message.footer != null && message.hasOwnProperty("footer")) { - var error = $root.proto.Footer.verify(message.footer); - if (error) - return "footer." + error; - } - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { - var error = $root.proto.ContextInfo.verify(message.contextInfo); - if (error) - return "contextInfo." + error; - } - if (message.shopStorefrontMessage != null && message.hasOwnProperty("shopStorefrontMessage")) { - properties.interactiveMessage = 1; - { - var error = $root.proto.ShopMessage.verify(message.shopStorefrontMessage); - if (error) - return "shopStorefrontMessage." + error; - } - } - if (message.collectionMessage != null && message.hasOwnProperty("collectionMessage")) { - if (properties.interactiveMessage === 1) - return "interactiveMessage: multiple values"; - properties.interactiveMessage = 1; - { - var error = $root.proto.CollectionMessage.verify(message.collectionMessage); - if (error) - return "collectionMessage." + error; - } - } - if (message.nativeFlowMessage != null && message.hasOwnProperty("nativeFlowMessage")) { - if (properties.interactiveMessage === 1) - return "interactiveMessage: multiple values"; - properties.interactiveMessage = 1; - { - var error = $root.proto.NativeFlowMessage.verify(message.nativeFlowMessage); - if (error) - return "nativeFlowMessage." + error; - } - } - return null; - }; - - /** - * Creates an InteractiveMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.InteractiveMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.InteractiveMessage} InteractiveMessage - */ - InteractiveMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.InteractiveMessage) - return object; - var message = new $root.proto.InteractiveMessage(); - if (object.header != null) { - if (typeof object.header !== "object") - throw TypeError(".proto.InteractiveMessage.header: object expected"); - message.header = $root.proto.Header.fromObject(object.header); - } - if (object.body != null) { - if (typeof object.body !== "object") - throw TypeError(".proto.InteractiveMessage.body: object expected"); - message.body = $root.proto.InteractiveMessageBody.fromObject(object.body); - } - if (object.footer != null) { - if (typeof object.footer !== "object") - throw TypeError(".proto.InteractiveMessage.footer: object expected"); - message.footer = $root.proto.Footer.fromObject(object.footer); - } - if (object.contextInfo != null) { - if (typeof object.contextInfo !== "object") - throw TypeError(".proto.InteractiveMessage.contextInfo: object expected"); - message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); - } - if (object.shopStorefrontMessage != null) { - if (typeof object.shopStorefrontMessage !== "object") - throw TypeError(".proto.InteractiveMessage.shopStorefrontMessage: object expected"); - message.shopStorefrontMessage = $root.proto.ShopMessage.fromObject(object.shopStorefrontMessage); - } - if (object.collectionMessage != null) { - if (typeof object.collectionMessage !== "object") - throw TypeError(".proto.InteractiveMessage.collectionMessage: object expected"); - message.collectionMessage = $root.proto.CollectionMessage.fromObject(object.collectionMessage); - } - if (object.nativeFlowMessage != null) { - if (typeof object.nativeFlowMessage !== "object") - throw TypeError(".proto.InteractiveMessage.nativeFlowMessage: object expected"); - message.nativeFlowMessage = $root.proto.NativeFlowMessage.fromObject(object.nativeFlowMessage); - } - return message; - }; - - /** - * Creates a plain object from an InteractiveMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.InteractiveMessage - * @static - * @param {proto.InteractiveMessage} message InteractiveMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InteractiveMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.header = null; - object.body = null; - object.footer = null; - object.contextInfo = null; - } - if (message.header != null && message.hasOwnProperty("header")) - object.header = $root.proto.Header.toObject(message.header, options); - if (message.body != null && message.hasOwnProperty("body")) - object.body = $root.proto.InteractiveMessageBody.toObject(message.body, options); - if (message.footer != null && message.hasOwnProperty("footer")) - object.footer = $root.proto.Footer.toObject(message.footer, options); - if (message.shopStorefrontMessage != null && message.hasOwnProperty("shopStorefrontMessage")) { - object.shopStorefrontMessage = $root.proto.ShopMessage.toObject(message.shopStorefrontMessage, options); - if (options.oneofs) - object.interactiveMessage = "shopStorefrontMessage"; - } - if (message.collectionMessage != null && message.hasOwnProperty("collectionMessage")) { - object.collectionMessage = $root.proto.CollectionMessage.toObject(message.collectionMessage, options); - if (options.oneofs) - object.interactiveMessage = "collectionMessage"; - } - if (message.nativeFlowMessage != null && message.hasOwnProperty("nativeFlowMessage")) { - object.nativeFlowMessage = $root.proto.NativeFlowMessage.toObject(message.nativeFlowMessage, options); - if (options.oneofs) - object.interactiveMessage = "nativeFlowMessage"; - } - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) - object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); - return object; - }; - - /** - * Converts this InteractiveMessage to JSON. - * @function toJSON - * @memberof proto.InteractiveMessage - * @instance - * @returns {Object.} JSON object - */ - InteractiveMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return InteractiveMessage; - })(); - - proto.InteractiveMessageBody = (function() { - - /** - * Properties of an InteractiveMessageBody. - * @memberof proto - * @interface IInteractiveMessageBody - * @property {string|null} [text] InteractiveMessageBody text - */ - - /** - * Constructs a new InteractiveMessageBody. - * @memberof proto - * @classdesc Represents an InteractiveMessageBody. - * @implements IInteractiveMessageBody - * @constructor - * @param {proto.IInteractiveMessageBody=} [properties] Properties to set - */ - function InteractiveMessageBody(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]]; - } - - /** - * InteractiveMessageBody text. - * @member {string} text - * @memberof proto.InteractiveMessageBody - * @instance - */ - InteractiveMessageBody.prototype.text = ""; - - /** - * Creates a new InteractiveMessageBody instance using the specified properties. - * @function create - * @memberof proto.InteractiveMessageBody - * @static - * @param {proto.IInteractiveMessageBody=} [properties] Properties to set - * @returns {proto.InteractiveMessageBody} InteractiveMessageBody instance - */ - InteractiveMessageBody.create = function create(properties) { - return new InteractiveMessageBody(properties); - }; - - /** - * Encodes the specified InteractiveMessageBody message. Does not implicitly {@link proto.InteractiveMessageBody.verify|verify} messages. - * @function encode - * @memberof proto.InteractiveMessageBody - * @static - * @param {proto.IInteractiveMessageBody} message InteractiveMessageBody message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InteractiveMessageBody.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); - return writer; - }; - - /** - * Encodes the specified InteractiveMessageBody message, length delimited. Does not implicitly {@link proto.InteractiveMessageBody.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.InteractiveMessageBody - * @static - * @param {proto.IInteractiveMessageBody} message InteractiveMessageBody message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InteractiveMessageBody.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InteractiveMessageBody message from the specified reader or buffer. - * @function decode - * @memberof proto.InteractiveMessageBody - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.InteractiveMessageBody} InteractiveMessageBody - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InteractiveMessageBody.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.InteractiveMessageBody(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.text = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InteractiveMessageBody message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.InteractiveMessageBody - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.InteractiveMessageBody} InteractiveMessageBody - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InteractiveMessageBody.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InteractiveMessageBody message. - * @function verify - * @memberof proto.InteractiveMessageBody - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InteractiveMessageBody.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.text != null && message.hasOwnProperty("text")) - if (!$util.isString(message.text)) - return "text: string expected"; - return null; - }; - - /** - * Creates an InteractiveMessageBody message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.InteractiveMessageBody - * @static - * @param {Object.} object Plain object - * @returns {proto.InteractiveMessageBody} InteractiveMessageBody - */ - InteractiveMessageBody.fromObject = function fromObject(object) { - if (object instanceof $root.proto.InteractiveMessageBody) - return object; - var message = new $root.proto.InteractiveMessageBody(); - if (object.text != null) - message.text = String(object.text); - return message; - }; - - /** - * Creates a plain object from an InteractiveMessageBody message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.InteractiveMessageBody - * @static - * @param {proto.InteractiveMessageBody} message InteractiveMessageBody - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InteractiveMessageBody.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.text = ""; - if (message.text != null && message.hasOwnProperty("text")) - object.text = message.text; - return object; - }; - - /** - * Converts this InteractiveMessageBody to JSON. - * @function toJSON - * @memberof proto.InteractiveMessageBody - * @instance - * @returns {Object.} JSON object - */ - InteractiveMessageBody.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return InteractiveMessageBody; - })(); - - proto.InteractiveResponseMessage = (function() { - - /** - * Properties of an InteractiveResponseMessage. - * @memberof proto - * @interface IInteractiveResponseMessage - * @property {proto.IInteractiveResponseMessageBody|null} [body] InteractiveResponseMessage body - * @property {proto.IContextInfo|null} [contextInfo] InteractiveResponseMessage contextInfo - * @property {proto.INativeFlowResponseMessage|null} [nativeFlowResponseMessage] InteractiveResponseMessage nativeFlowResponseMessage - */ - - /** - * Constructs a new InteractiveResponseMessage. - * @memberof proto - * @classdesc Represents an InteractiveResponseMessage. - * @implements IInteractiveResponseMessage - * @constructor - * @param {proto.IInteractiveResponseMessage=} [properties] Properties to set - */ - function InteractiveResponseMessage(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]]; - } - - /** - * InteractiveResponseMessage body. - * @member {proto.IInteractiveResponseMessageBody|null|undefined} body - * @memberof proto.InteractiveResponseMessage - * @instance - */ - InteractiveResponseMessage.prototype.body = null; - - /** - * InteractiveResponseMessage contextInfo. - * @member {proto.IContextInfo|null|undefined} contextInfo - * @memberof proto.InteractiveResponseMessage - * @instance - */ - InteractiveResponseMessage.prototype.contextInfo = null; - - /** - * InteractiveResponseMessage nativeFlowResponseMessage. - * @member {proto.INativeFlowResponseMessage|null|undefined} nativeFlowResponseMessage - * @memberof proto.InteractiveResponseMessage - * @instance - */ - InteractiveResponseMessage.prototype.nativeFlowResponseMessage = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * InteractiveResponseMessage interactiveResponseMessage. - * @member {"nativeFlowResponseMessage"|undefined} interactiveResponseMessage - * @memberof proto.InteractiveResponseMessage - * @instance - */ - Object.defineProperty(InteractiveResponseMessage.prototype, "interactiveResponseMessage", { - get: $util.oneOfGetter($oneOfFields = ["nativeFlowResponseMessage"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new InteractiveResponseMessage instance using the specified properties. - * @function create - * @memberof proto.InteractiveResponseMessage - * @static - * @param {proto.IInteractiveResponseMessage=} [properties] Properties to set - * @returns {proto.InteractiveResponseMessage} InteractiveResponseMessage instance - */ - InteractiveResponseMessage.create = function create(properties) { - return new InteractiveResponseMessage(properties); - }; - - /** - * Encodes the specified InteractiveResponseMessage message. Does not implicitly {@link proto.InteractiveResponseMessage.verify|verify} messages. - * @function encode - * @memberof proto.InteractiveResponseMessage - * @static - * @param {proto.IInteractiveResponseMessage} message InteractiveResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InteractiveResponseMessage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - $root.proto.InteractiveResponseMessageBody.encode(message.body, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nativeFlowResponseMessage != null && Object.hasOwnProperty.call(message, "nativeFlowResponseMessage")) - $root.proto.NativeFlowResponseMessage.encode(message.nativeFlowResponseMessage, 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 15, wireType 2 =*/122).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified InteractiveResponseMessage message, length delimited. Does not implicitly {@link proto.InteractiveResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.InteractiveResponseMessage - * @static - * @param {proto.IInteractiveResponseMessage} message InteractiveResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InteractiveResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InteractiveResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.InteractiveResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.InteractiveResponseMessage} InteractiveResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InteractiveResponseMessage.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.InteractiveResponseMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.body = $root.proto.InteractiveResponseMessageBody.decode(reader, reader.uint32()); - break; - case 15: - message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); - break; - case 2: - message.nativeFlowResponseMessage = $root.proto.NativeFlowResponseMessage.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InteractiveResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.InteractiveResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.InteractiveResponseMessage} InteractiveResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InteractiveResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InteractiveResponseMessage message. - * @function verify - * @memberof proto.InteractiveResponseMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InteractiveResponseMessage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.body != null && message.hasOwnProperty("body")) { - var error = $root.proto.InteractiveResponseMessageBody.verify(message.body); - if (error) - return "body." + error; - } - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { - var error = $root.proto.ContextInfo.verify(message.contextInfo); - if (error) - return "contextInfo." + error; - } - if (message.nativeFlowResponseMessage != null && message.hasOwnProperty("nativeFlowResponseMessage")) { - properties.interactiveResponseMessage = 1; - { - var error = $root.proto.NativeFlowResponseMessage.verify(message.nativeFlowResponseMessage); - if (error) - return "nativeFlowResponseMessage." + error; - } - } - return null; - }; - - /** - * Creates an InteractiveResponseMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.InteractiveResponseMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.InteractiveResponseMessage} InteractiveResponseMessage - */ - InteractiveResponseMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.InteractiveResponseMessage) - return object; - var message = new $root.proto.InteractiveResponseMessage(); - if (object.body != null) { - if (typeof object.body !== "object") - throw TypeError(".proto.InteractiveResponseMessage.body: object expected"); - message.body = $root.proto.InteractiveResponseMessageBody.fromObject(object.body); - } - if (object.contextInfo != null) { - if (typeof object.contextInfo !== "object") - throw TypeError(".proto.InteractiveResponseMessage.contextInfo: object expected"); - message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); - } - if (object.nativeFlowResponseMessage != null) { - if (typeof object.nativeFlowResponseMessage !== "object") - throw TypeError(".proto.InteractiveResponseMessage.nativeFlowResponseMessage: object expected"); - message.nativeFlowResponseMessage = $root.proto.NativeFlowResponseMessage.fromObject(object.nativeFlowResponseMessage); - } - return message; - }; - - /** - * Creates a plain object from an InteractiveResponseMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.InteractiveResponseMessage - * @static - * @param {proto.InteractiveResponseMessage} message InteractiveResponseMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InteractiveResponseMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.body = null; - object.contextInfo = null; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = $root.proto.InteractiveResponseMessageBody.toObject(message.body, options); - if (message.nativeFlowResponseMessage != null && message.hasOwnProperty("nativeFlowResponseMessage")) { - object.nativeFlowResponseMessage = $root.proto.NativeFlowResponseMessage.toObject(message.nativeFlowResponseMessage, options); - if (options.oneofs) - object.interactiveResponseMessage = "nativeFlowResponseMessage"; - } - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) - object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); - return object; - }; - - /** - * Converts this InteractiveResponseMessage to JSON. - * @function toJSON - * @memberof proto.InteractiveResponseMessage - * @instance - * @returns {Object.} JSON object - */ - InteractiveResponseMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return InteractiveResponseMessage; - })(); - - proto.InteractiveResponseMessageBody = (function() { - - /** - * Properties of an InteractiveResponseMessageBody. - * @memberof proto - * @interface IInteractiveResponseMessageBody - * @property {string|null} [text] InteractiveResponseMessageBody text - */ - - /** - * Constructs a new InteractiveResponseMessageBody. - * @memberof proto - * @classdesc Represents an InteractiveResponseMessageBody. - * @implements IInteractiveResponseMessageBody - * @constructor - * @param {proto.IInteractiveResponseMessageBody=} [properties] Properties to set - */ - function InteractiveResponseMessageBody(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]]; - } - - /** - * InteractiveResponseMessageBody text. - * @member {string} text - * @memberof proto.InteractiveResponseMessageBody - * @instance - */ - InteractiveResponseMessageBody.prototype.text = ""; - - /** - * Creates a new InteractiveResponseMessageBody instance using the specified properties. - * @function create - * @memberof proto.InteractiveResponseMessageBody - * @static - * @param {proto.IInteractiveResponseMessageBody=} [properties] Properties to set - * @returns {proto.InteractiveResponseMessageBody} InteractiveResponseMessageBody instance - */ - InteractiveResponseMessageBody.create = function create(properties) { - return new InteractiveResponseMessageBody(properties); - }; - - /** - * Encodes the specified InteractiveResponseMessageBody message. Does not implicitly {@link proto.InteractiveResponseMessageBody.verify|verify} messages. - * @function encode - * @memberof proto.InteractiveResponseMessageBody - * @static - * @param {proto.IInteractiveResponseMessageBody} message InteractiveResponseMessageBody message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InteractiveResponseMessageBody.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); - return writer; - }; - - /** - * Encodes the specified InteractiveResponseMessageBody message, length delimited. Does not implicitly {@link proto.InteractiveResponseMessageBody.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.InteractiveResponseMessageBody - * @static - * @param {proto.IInteractiveResponseMessageBody} message InteractiveResponseMessageBody message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InteractiveResponseMessageBody.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InteractiveResponseMessageBody message from the specified reader or buffer. - * @function decode - * @memberof proto.InteractiveResponseMessageBody - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.InteractiveResponseMessageBody} InteractiveResponseMessageBody - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InteractiveResponseMessageBody.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.InteractiveResponseMessageBody(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.text = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InteractiveResponseMessageBody message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.InteractiveResponseMessageBody - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.InteractiveResponseMessageBody} InteractiveResponseMessageBody - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InteractiveResponseMessageBody.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InteractiveResponseMessageBody message. - * @function verify - * @memberof proto.InteractiveResponseMessageBody - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InteractiveResponseMessageBody.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.text != null && message.hasOwnProperty("text")) - if (!$util.isString(message.text)) - return "text: string expected"; - return null; - }; - - /** - * Creates an InteractiveResponseMessageBody message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.InteractiveResponseMessageBody - * @static - * @param {Object.} object Plain object - * @returns {proto.InteractiveResponseMessageBody} InteractiveResponseMessageBody - */ - InteractiveResponseMessageBody.fromObject = function fromObject(object) { - if (object instanceof $root.proto.InteractiveResponseMessageBody) - return object; - var message = new $root.proto.InteractiveResponseMessageBody(); - if (object.text != null) - message.text = String(object.text); - return message; - }; - - /** - * Creates a plain object from an InteractiveResponseMessageBody message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.InteractiveResponseMessageBody - * @static - * @param {proto.InteractiveResponseMessageBody} message InteractiveResponseMessageBody - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InteractiveResponseMessageBody.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.text = ""; - if (message.text != null && message.hasOwnProperty("text")) - object.text = message.text; - return object; - }; - - /** - * Converts this InteractiveResponseMessageBody to JSON. - * @function toJSON - * @memberof proto.InteractiveResponseMessageBody - * @instance - * @returns {Object.} JSON object - */ - InteractiveResponseMessageBody.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return InteractiveResponseMessageBody; - })(); - - proto.InvoiceMessage = (function() { - - /** - * Properties of an InvoiceMessage. - * @memberof proto - * @interface IInvoiceMessage - * @property {string|null} [note] InvoiceMessage note - * @property {string|null} [token] InvoiceMessage token - * @property {proto.InvoiceMessage.InvoiceMessageAttachmentType|null} [attachmentType] InvoiceMessage attachmentType - * @property {string|null} [attachmentMimetype] InvoiceMessage attachmentMimetype - * @property {Uint8Array|null} [attachmentMediaKey] InvoiceMessage attachmentMediaKey - * @property {number|Long|null} [attachmentMediaKeyTimestamp] InvoiceMessage attachmentMediaKeyTimestamp - * @property {Uint8Array|null} [attachmentFileSha256] InvoiceMessage attachmentFileSha256 - * @property {Uint8Array|null} [attachmentFileEncSha256] InvoiceMessage attachmentFileEncSha256 - * @property {string|null} [attachmentDirectPath] InvoiceMessage attachmentDirectPath - * @property {Uint8Array|null} [attachmentJpegThumbnail] InvoiceMessage attachmentJpegThumbnail - */ - - /** - * Constructs a new InvoiceMessage. - * @memberof proto - * @classdesc Represents an InvoiceMessage. - * @implements IInvoiceMessage - * @constructor - * @param {proto.IInvoiceMessage=} [properties] Properties to set - */ - function InvoiceMessage(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]]; - } - - /** - * InvoiceMessage note. - * @member {string} note - * @memberof proto.InvoiceMessage - * @instance - */ - InvoiceMessage.prototype.note = ""; - - /** - * InvoiceMessage token. - * @member {string} token - * @memberof proto.InvoiceMessage - * @instance - */ - InvoiceMessage.prototype.token = ""; - - /** - * InvoiceMessage attachmentType. - * @member {proto.InvoiceMessage.InvoiceMessageAttachmentType} attachmentType - * @memberof proto.InvoiceMessage - * @instance - */ - InvoiceMessage.prototype.attachmentType = 0; - - /** - * InvoiceMessage attachmentMimetype. - * @member {string} attachmentMimetype - * @memberof proto.InvoiceMessage - * @instance - */ - InvoiceMessage.prototype.attachmentMimetype = ""; - - /** - * InvoiceMessage attachmentMediaKey. - * @member {Uint8Array} attachmentMediaKey - * @memberof proto.InvoiceMessage - * @instance - */ - InvoiceMessage.prototype.attachmentMediaKey = $util.newBuffer([]); - - /** - * InvoiceMessage attachmentMediaKeyTimestamp. - * @member {number|Long} attachmentMediaKeyTimestamp - * @memberof proto.InvoiceMessage - * @instance - */ - InvoiceMessage.prototype.attachmentMediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * InvoiceMessage attachmentFileSha256. - * @member {Uint8Array} attachmentFileSha256 - * @memberof proto.InvoiceMessage - * @instance - */ - InvoiceMessage.prototype.attachmentFileSha256 = $util.newBuffer([]); - - /** - * InvoiceMessage attachmentFileEncSha256. - * @member {Uint8Array} attachmentFileEncSha256 - * @memberof proto.InvoiceMessage - * @instance - */ - InvoiceMessage.prototype.attachmentFileEncSha256 = $util.newBuffer([]); - - /** - * InvoiceMessage attachmentDirectPath. - * @member {string} attachmentDirectPath - * @memberof proto.InvoiceMessage - * @instance - */ - InvoiceMessage.prototype.attachmentDirectPath = ""; - - /** - * InvoiceMessage attachmentJpegThumbnail. - * @member {Uint8Array} attachmentJpegThumbnail - * @memberof proto.InvoiceMessage - * @instance - */ - InvoiceMessage.prototype.attachmentJpegThumbnail = $util.newBuffer([]); - - /** - * Creates a new InvoiceMessage instance using the specified properties. - * @function create - * @memberof proto.InvoiceMessage - * @static - * @param {proto.IInvoiceMessage=} [properties] Properties to set - * @returns {proto.InvoiceMessage} InvoiceMessage instance - */ - InvoiceMessage.create = function create(properties) { - return new InvoiceMessage(properties); - }; - - /** - * Encodes the specified InvoiceMessage message. Does not implicitly {@link proto.InvoiceMessage.verify|verify} messages. - * @function encode - * @memberof proto.InvoiceMessage - * @static - * @param {proto.IInvoiceMessage} message InvoiceMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InvoiceMessage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.note != null && Object.hasOwnProperty.call(message, "note")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.note); - if (message.token != null && Object.hasOwnProperty.call(message, "token")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.token); - if (message.attachmentType != null && Object.hasOwnProperty.call(message, "attachmentType")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.attachmentType); - if (message.attachmentMimetype != null && Object.hasOwnProperty.call(message, "attachmentMimetype")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.attachmentMimetype); - if (message.attachmentMediaKey != null && Object.hasOwnProperty.call(message, "attachmentMediaKey")) - writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.attachmentMediaKey); - if (message.attachmentMediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "attachmentMediaKeyTimestamp")) - writer.uint32(/* id 6, wireType 0 =*/48).int64(message.attachmentMediaKeyTimestamp); - if (message.attachmentFileSha256 != null && Object.hasOwnProperty.call(message, "attachmentFileSha256")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.attachmentFileSha256); - if (message.attachmentFileEncSha256 != null && Object.hasOwnProperty.call(message, "attachmentFileEncSha256")) - writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.attachmentFileEncSha256); - if (message.attachmentDirectPath != null && Object.hasOwnProperty.call(message, "attachmentDirectPath")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.attachmentDirectPath); - if (message.attachmentJpegThumbnail != null && Object.hasOwnProperty.call(message, "attachmentJpegThumbnail")) - writer.uint32(/* id 10, wireType 2 =*/82).bytes(message.attachmentJpegThumbnail); - return writer; - }; - - /** - * Encodes the specified InvoiceMessage message, length delimited. Does not implicitly {@link proto.InvoiceMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.InvoiceMessage - * @static - * @param {proto.IInvoiceMessage} message InvoiceMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InvoiceMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InvoiceMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.InvoiceMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.InvoiceMessage} InvoiceMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InvoiceMessage.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.InvoiceMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.note = reader.string(); - break; - case 2: - message.token = reader.string(); - break; - case 3: - message.attachmentType = reader.int32(); - break; - case 4: - message.attachmentMimetype = reader.string(); - break; - case 5: - message.attachmentMediaKey = reader.bytes(); - break; - case 6: - message.attachmentMediaKeyTimestamp = reader.int64(); - break; - case 7: - message.attachmentFileSha256 = reader.bytes(); - break; - case 8: - message.attachmentFileEncSha256 = reader.bytes(); - break; - case 9: - message.attachmentDirectPath = reader.string(); - break; - case 10: - message.attachmentJpegThumbnail = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InvoiceMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.InvoiceMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.InvoiceMessage} InvoiceMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InvoiceMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InvoiceMessage message. - * @function verify - * @memberof proto.InvoiceMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InvoiceMessage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.note != null && message.hasOwnProperty("note")) - if (!$util.isString(message.note)) - return "note: string expected"; - if (message.token != null && message.hasOwnProperty("token")) - if (!$util.isString(message.token)) - return "token: string expected"; - if (message.attachmentType != null && message.hasOwnProperty("attachmentType")) - switch (message.attachmentType) { - default: - return "attachmentType: enum value expected"; - case 0: - case 1: - break; - } - if (message.attachmentMimetype != null && message.hasOwnProperty("attachmentMimetype")) - if (!$util.isString(message.attachmentMimetype)) - return "attachmentMimetype: string expected"; - if (message.attachmentMediaKey != null && message.hasOwnProperty("attachmentMediaKey")) - if (!(message.attachmentMediaKey && typeof message.attachmentMediaKey.length === "number" || $util.isString(message.attachmentMediaKey))) - return "attachmentMediaKey: buffer expected"; - if (message.attachmentMediaKeyTimestamp != null && message.hasOwnProperty("attachmentMediaKeyTimestamp")) - if (!$util.isInteger(message.attachmentMediaKeyTimestamp) && !(message.attachmentMediaKeyTimestamp && $util.isInteger(message.attachmentMediaKeyTimestamp.low) && $util.isInteger(message.attachmentMediaKeyTimestamp.high))) - return "attachmentMediaKeyTimestamp: integer|Long expected"; - if (message.attachmentFileSha256 != null && message.hasOwnProperty("attachmentFileSha256")) - if (!(message.attachmentFileSha256 && typeof message.attachmentFileSha256.length === "number" || $util.isString(message.attachmentFileSha256))) - return "attachmentFileSha256: buffer expected"; - if (message.attachmentFileEncSha256 != null && message.hasOwnProperty("attachmentFileEncSha256")) - if (!(message.attachmentFileEncSha256 && typeof message.attachmentFileEncSha256.length === "number" || $util.isString(message.attachmentFileEncSha256))) - return "attachmentFileEncSha256: buffer expected"; - if (message.attachmentDirectPath != null && message.hasOwnProperty("attachmentDirectPath")) - if (!$util.isString(message.attachmentDirectPath)) - return "attachmentDirectPath: string expected"; - if (message.attachmentJpegThumbnail != null && message.hasOwnProperty("attachmentJpegThumbnail")) - if (!(message.attachmentJpegThumbnail && typeof message.attachmentJpegThumbnail.length === "number" || $util.isString(message.attachmentJpegThumbnail))) - return "attachmentJpegThumbnail: buffer expected"; - return null; - }; - - /** - * Creates an InvoiceMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.InvoiceMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.InvoiceMessage} InvoiceMessage - */ - InvoiceMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.InvoiceMessage) - return object; - var message = new $root.proto.InvoiceMessage(); - if (object.note != null) - message.note = String(object.note); - if (object.token != null) - message.token = String(object.token); - switch (object.attachmentType) { - case "IMAGE": - case 0: - message.attachmentType = 0; - break; - case "PDF": - case 1: - message.attachmentType = 1; - break; - } - if (object.attachmentMimetype != null) - message.attachmentMimetype = String(object.attachmentMimetype); - if (object.attachmentMediaKey != null) - if (typeof object.attachmentMediaKey === "string") - $util.base64.decode(object.attachmentMediaKey, message.attachmentMediaKey = $util.newBuffer($util.base64.length(object.attachmentMediaKey)), 0); - else if (object.attachmentMediaKey.length) - message.attachmentMediaKey = object.attachmentMediaKey; - if (object.attachmentMediaKeyTimestamp != null) - if ($util.Long) - (message.attachmentMediaKeyTimestamp = $util.Long.fromValue(object.attachmentMediaKeyTimestamp)).unsigned = false; - else if (typeof object.attachmentMediaKeyTimestamp === "string") - message.attachmentMediaKeyTimestamp = parseInt(object.attachmentMediaKeyTimestamp, 10); - else if (typeof object.attachmentMediaKeyTimestamp === "number") - message.attachmentMediaKeyTimestamp = object.attachmentMediaKeyTimestamp; - else if (typeof object.attachmentMediaKeyTimestamp === "object") - message.attachmentMediaKeyTimestamp = new $util.LongBits(object.attachmentMediaKeyTimestamp.low >>> 0, object.attachmentMediaKeyTimestamp.high >>> 0).toNumber(); - if (object.attachmentFileSha256 != null) - if (typeof object.attachmentFileSha256 === "string") - $util.base64.decode(object.attachmentFileSha256, message.attachmentFileSha256 = $util.newBuffer($util.base64.length(object.attachmentFileSha256)), 0); - else if (object.attachmentFileSha256.length) - message.attachmentFileSha256 = object.attachmentFileSha256; - if (object.attachmentFileEncSha256 != null) - if (typeof object.attachmentFileEncSha256 === "string") - $util.base64.decode(object.attachmentFileEncSha256, message.attachmentFileEncSha256 = $util.newBuffer($util.base64.length(object.attachmentFileEncSha256)), 0); - else if (object.attachmentFileEncSha256.length) - message.attachmentFileEncSha256 = object.attachmentFileEncSha256; - if (object.attachmentDirectPath != null) - message.attachmentDirectPath = String(object.attachmentDirectPath); - if (object.attachmentJpegThumbnail != null) - if (typeof object.attachmentJpegThumbnail === "string") - $util.base64.decode(object.attachmentJpegThumbnail, message.attachmentJpegThumbnail = $util.newBuffer($util.base64.length(object.attachmentJpegThumbnail)), 0); - else if (object.attachmentJpegThumbnail.length) - message.attachmentJpegThumbnail = object.attachmentJpegThumbnail; - return message; - }; - - /** - * Creates a plain object from an InvoiceMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.InvoiceMessage - * @static - * @param {proto.InvoiceMessage} message InvoiceMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InvoiceMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.note = ""; - object.token = ""; - object.attachmentType = options.enums === String ? "IMAGE" : 0; - object.attachmentMimetype = ""; - if (options.bytes === String) - object.attachmentMediaKey = ""; - else { - object.attachmentMediaKey = []; - if (options.bytes !== Array) - object.attachmentMediaKey = $util.newBuffer(object.attachmentMediaKey); - } - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.attachmentMediaKeyTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.attachmentMediaKeyTimestamp = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.attachmentFileSha256 = ""; - else { - object.attachmentFileSha256 = []; - if (options.bytes !== Array) - object.attachmentFileSha256 = $util.newBuffer(object.attachmentFileSha256); - } - if (options.bytes === String) - object.attachmentFileEncSha256 = ""; - else { - object.attachmentFileEncSha256 = []; - if (options.bytes !== Array) - object.attachmentFileEncSha256 = $util.newBuffer(object.attachmentFileEncSha256); - } - object.attachmentDirectPath = ""; - if (options.bytes === String) - object.attachmentJpegThumbnail = ""; - else { - object.attachmentJpegThumbnail = []; - if (options.bytes !== Array) - object.attachmentJpegThumbnail = $util.newBuffer(object.attachmentJpegThumbnail); - } - } - if (message.note != null && message.hasOwnProperty("note")) - object.note = message.note; - if (message.token != null && message.hasOwnProperty("token")) - object.token = message.token; - if (message.attachmentType != null && message.hasOwnProperty("attachmentType")) - object.attachmentType = options.enums === String ? $root.proto.InvoiceMessage.InvoiceMessageAttachmentType[message.attachmentType] : message.attachmentType; - if (message.attachmentMimetype != null && message.hasOwnProperty("attachmentMimetype")) - object.attachmentMimetype = message.attachmentMimetype; - if (message.attachmentMediaKey != null && message.hasOwnProperty("attachmentMediaKey")) - object.attachmentMediaKey = options.bytes === String ? $util.base64.encode(message.attachmentMediaKey, 0, message.attachmentMediaKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.attachmentMediaKey) : message.attachmentMediaKey; - if (message.attachmentMediaKeyTimestamp != null && message.hasOwnProperty("attachmentMediaKeyTimestamp")) - if (typeof message.attachmentMediaKeyTimestamp === "number") - object.attachmentMediaKeyTimestamp = options.longs === String ? String(message.attachmentMediaKeyTimestamp) : message.attachmentMediaKeyTimestamp; - else - object.attachmentMediaKeyTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.attachmentMediaKeyTimestamp) : options.longs === Number ? new $util.LongBits(message.attachmentMediaKeyTimestamp.low >>> 0, message.attachmentMediaKeyTimestamp.high >>> 0).toNumber() : message.attachmentMediaKeyTimestamp; - if (message.attachmentFileSha256 != null && message.hasOwnProperty("attachmentFileSha256")) - object.attachmentFileSha256 = options.bytes === String ? $util.base64.encode(message.attachmentFileSha256, 0, message.attachmentFileSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.attachmentFileSha256) : message.attachmentFileSha256; - if (message.attachmentFileEncSha256 != null && message.hasOwnProperty("attachmentFileEncSha256")) - object.attachmentFileEncSha256 = options.bytes === String ? $util.base64.encode(message.attachmentFileEncSha256, 0, message.attachmentFileEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.attachmentFileEncSha256) : message.attachmentFileEncSha256; - if (message.attachmentDirectPath != null && message.hasOwnProperty("attachmentDirectPath")) - object.attachmentDirectPath = message.attachmentDirectPath; - if (message.attachmentJpegThumbnail != null && message.hasOwnProperty("attachmentJpegThumbnail")) - object.attachmentJpegThumbnail = options.bytes === String ? $util.base64.encode(message.attachmentJpegThumbnail, 0, message.attachmentJpegThumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.attachmentJpegThumbnail) : message.attachmentJpegThumbnail; - return object; - }; - - /** - * Converts this InvoiceMessage to JSON. - * @function toJSON - * @memberof proto.InvoiceMessage - * @instance - * @returns {Object.} JSON object - */ - InvoiceMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * InvoiceMessageAttachmentType enum. - * @name proto.InvoiceMessage.InvoiceMessageAttachmentType - * @enum {number} - * @property {number} IMAGE=0 IMAGE value - * @property {number} PDF=1 PDF value - */ - InvoiceMessage.InvoiceMessageAttachmentType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IMAGE"] = 0; - values[valuesById[1] = "PDF"] = 1; - return values; - })(); - - return InvoiceMessage; - })(); - proto.KeepInChat = (function() { /** @@ -30107,6 +16250,7 @@ $root.proto = (function() { * @interface IKeepInChat * @property {proto.KeepType|null} [keepType] KeepInChat keepType * @property {number|Long|null} [serverTimestamp] KeepInChat serverTimestamp + * @property {proto.IMessageKey|null} [key] KeepInChat key * @property {string|null} [deviceJid] KeepInChat deviceJid */ @@ -30141,6 +16285,14 @@ $root.proto = (function() { */ KeepInChat.prototype.serverTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * KeepInChat key. + * @member {proto.IMessageKey|null|undefined} key + * @memberof proto.KeepInChat + * @instance + */ + KeepInChat.prototype.key = null; + /** * KeepInChat deviceJid. * @member {string} deviceJid @@ -30177,8 +16329,10 @@ $root.proto = (function() { 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.key != null && Object.hasOwnProperty.call(message, "key")) + $root.proto.MessageKey.encode(message.key, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.deviceJid != null && Object.hasOwnProperty.call(message, "deviceJid")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.deviceJid); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.deviceJid); return writer; }; @@ -30220,6 +16374,9 @@ $root.proto = (function() { message.serverTimestamp = reader.int64(); break; case 3: + message.key = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + case 4: message.deviceJid = reader.string(); break; default: @@ -30269,6 +16426,11 @@ $root.proto = (function() { 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.key != null && message.hasOwnProperty("key")) { + var error = $root.proto.MessageKey.verify(message.key); + if (error) + return "key." + error; + } if (message.deviceJid != null && message.hasOwnProperty("deviceJid")) if (!$util.isString(message.deviceJid)) return "deviceJid: string expected"; @@ -30310,6 +16472,11 @@ $root.proto = (function() { 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.key != null) { + if (typeof object.key !== "object") + throw TypeError(".proto.KeepInChat.key: object expected"); + message.key = $root.proto.MessageKey.fromObject(object.key); + } if (object.deviceJid != null) message.deviceJid = String(object.deviceJid); return message; @@ -30335,6 +16502,7 @@ $root.proto = (function() { object.serverTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.serverTimestamp = options.longs === String ? "0" : 0; + object.key = null; object.deviceJid = ""; } if (message.keepType != null && message.hasOwnProperty("keepType")) @@ -30344,6 +16512,8 @@ $root.proto = (function() { 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.key != null && message.hasOwnProperty("key")) + object.key = $root.proto.MessageKey.toObject(message.key, options); if (message.deviceJid != null && message.hasOwnProperty("deviceJid")) object.deviceJid = message.deviceJid; return object; @@ -30363,275 +16533,6 @@ $root.proto = (function() { 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 @@ -30648,193 +16549,6 @@ $root.proto = (function() { 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() { /** @@ -31031,1769 +16745,6 @@ $root.proto = (function() { 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() { - - /** - * Properties of a ListMessage. - * @memberof proto - * @interface IListMessage - * @property {string|null} [title] ListMessage title - * @property {string|null} [description] ListMessage description - * @property {string|null} [buttonText] ListMessage buttonText - * @property {proto.ListMessage.ListMessageListType|null} [listType] ListMessage listType - * @property {Array.|null} [sections] ListMessage sections - * @property {proto.IProductListInfo|null} [productListInfo] ListMessage productListInfo - * @property {string|null} [footerText] ListMessage footerText - * @property {proto.IContextInfo|null} [contextInfo] ListMessage contextInfo - */ - - /** - * Constructs a new ListMessage. - * @memberof proto - * @classdesc Represents a ListMessage. - * @implements IListMessage - * @constructor - * @param {proto.IListMessage=} [properties] Properties to set - */ - function ListMessage(properties) { - this.sections = []; - 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]]; - } - - /** - * ListMessage title. - * @member {string} title - * @memberof proto.ListMessage - * @instance - */ - ListMessage.prototype.title = ""; - - /** - * ListMessage description. - * @member {string} description - * @memberof proto.ListMessage - * @instance - */ - ListMessage.prototype.description = ""; - - /** - * ListMessage buttonText. - * @member {string} buttonText - * @memberof proto.ListMessage - * @instance - */ - ListMessage.prototype.buttonText = ""; - - /** - * ListMessage listType. - * @member {proto.ListMessage.ListMessageListType} listType - * @memberof proto.ListMessage - * @instance - */ - ListMessage.prototype.listType = 0; - - /** - * ListMessage sections. - * @member {Array.} sections - * @memberof proto.ListMessage - * @instance - */ - ListMessage.prototype.sections = $util.emptyArray; - - /** - * ListMessage productListInfo. - * @member {proto.IProductListInfo|null|undefined} productListInfo - * @memberof proto.ListMessage - * @instance - */ - ListMessage.prototype.productListInfo = null; - - /** - * ListMessage footerText. - * @member {string} footerText - * @memberof proto.ListMessage - * @instance - */ - ListMessage.prototype.footerText = ""; - - /** - * ListMessage contextInfo. - * @member {proto.IContextInfo|null|undefined} contextInfo - * @memberof proto.ListMessage - * @instance - */ - ListMessage.prototype.contextInfo = null; - - /** - * Creates a new ListMessage instance using the specified properties. - * @function create - * @memberof proto.ListMessage - * @static - * @param {proto.IListMessage=} [properties] Properties to set - * @returns {proto.ListMessage} ListMessage instance - */ - ListMessage.create = function create(properties) { - return new ListMessage(properties); - }; - - /** - * Encodes the specified ListMessage message. Does not implicitly {@link proto.ListMessage.verify|verify} messages. - * @function encode - * @memberof proto.ListMessage - * @static - * @param {proto.IListMessage} message ListMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListMessage.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.buttonText != null && Object.hasOwnProperty.call(message, "buttonText")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.buttonText); - if (message.listType != null && Object.hasOwnProperty.call(message, "listType")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.listType); - if (message.sections != null && message.sections.length) - for (var i = 0; i < message.sections.length; ++i) - $root.proto.Section.encode(message.sections[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.productListInfo != null && Object.hasOwnProperty.call(message, "productListInfo")) - $root.proto.ProductListInfo.encode(message.productListInfo, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.footerText != null && Object.hasOwnProperty.call(message, "footerText")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.footerText); - if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) - $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ListMessage message, length delimited. Does not implicitly {@link proto.ListMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.ListMessage - * @static - * @param {proto.IListMessage} message ListMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.ListMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.ListMessage} ListMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListMessage.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.ListMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.buttonText = reader.string(); - break; - case 4: - message.listType = reader.int32(); - break; - case 5: - if (!(message.sections && message.sections.length)) - message.sections = []; - message.sections.push($root.proto.Section.decode(reader, reader.uint32())); - break; - case 6: - message.productListInfo = $root.proto.ProductListInfo.decode(reader, reader.uint32()); - break; - case 7: - message.footerText = reader.string(); - break; - case 8: - message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.ListMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ListMessage} ListMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListMessage message. - * @function verify - * @memberof proto.ListMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListMessage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object 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.buttonText != null && message.hasOwnProperty("buttonText")) - if (!$util.isString(message.buttonText)) - return "buttonText: string expected"; - if (message.listType != null && message.hasOwnProperty("listType")) - switch (message.listType) { - default: - return "listType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.sections != null && message.hasOwnProperty("sections")) { - if (!Array.isArray(message.sections)) - return "sections: array expected"; - for (var i = 0; i < message.sections.length; ++i) { - var error = $root.proto.Section.verify(message.sections[i]); - if (error) - return "sections." + error; - } - } - if (message.productListInfo != null && message.hasOwnProperty("productListInfo")) { - var error = $root.proto.ProductListInfo.verify(message.productListInfo); - if (error) - return "productListInfo." + error; - } - if (message.footerText != null && message.hasOwnProperty("footerText")) - if (!$util.isString(message.footerText)) - return "footerText: string expected"; - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { - var error = $root.proto.ContextInfo.verify(message.contextInfo); - if (error) - return "contextInfo." + error; - } - return null; - }; - - /** - * Creates a ListMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.ListMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.ListMessage} ListMessage - */ - ListMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ListMessage) - return object; - var message = new $root.proto.ListMessage(); - if (object.title != null) - message.title = String(object.title); - if (object.description != null) - message.description = String(object.description); - if (object.buttonText != null) - message.buttonText = String(object.buttonText); - switch (object.listType) { - case "UNKNOWN": - case 0: - message.listType = 0; - break; - case "SINGLE_SELECT": - case 1: - message.listType = 1; - break; - case "PRODUCT_LIST": - case 2: - message.listType = 2; - break; - } - if (object.sections) { - if (!Array.isArray(object.sections)) - throw TypeError(".proto.ListMessage.sections: array expected"); - message.sections = []; - for (var i = 0; i < object.sections.length; ++i) { - if (typeof object.sections[i] !== "object") - throw TypeError(".proto.ListMessage.sections: object expected"); - message.sections[i] = $root.proto.Section.fromObject(object.sections[i]); - } - } - if (object.productListInfo != null) { - if (typeof object.productListInfo !== "object") - throw TypeError(".proto.ListMessage.productListInfo: object expected"); - message.productListInfo = $root.proto.ProductListInfo.fromObject(object.productListInfo); - } - if (object.footerText != null) - message.footerText = String(object.footerText); - if (object.contextInfo != null) { - if (typeof object.contextInfo !== "object") - throw TypeError(".proto.ListMessage.contextInfo: object expected"); - message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); - } - return message; - }; - - /** - * Creates a plain object from a ListMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.ListMessage - * @static - * @param {proto.ListMessage} message ListMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.sections = []; - if (options.defaults) { - object.title = ""; - object.description = ""; - object.buttonText = ""; - object.listType = options.enums === String ? "UNKNOWN" : 0; - object.productListInfo = null; - object.footerText = ""; - object.contextInfo = null; - } - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.buttonText != null && message.hasOwnProperty("buttonText")) - object.buttonText = message.buttonText; - if (message.listType != null && message.hasOwnProperty("listType")) - object.listType = options.enums === String ? $root.proto.ListMessage.ListMessageListType[message.listType] : message.listType; - if (message.sections && message.sections.length) { - object.sections = []; - for (var j = 0; j < message.sections.length; ++j) - object.sections[j] = $root.proto.Section.toObject(message.sections[j], options); - } - if (message.productListInfo != null && message.hasOwnProperty("productListInfo")) - object.productListInfo = $root.proto.ProductListInfo.toObject(message.productListInfo, options); - if (message.footerText != null && message.hasOwnProperty("footerText")) - object.footerText = message.footerText; - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) - object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); - return object; - }; - - /** - * Converts this ListMessage to JSON. - * @function toJSON - * @memberof proto.ListMessage - * @instance - * @returns {Object.} JSON object - */ - ListMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * ListMessageListType enum. - * @name proto.ListMessage.ListMessageListType - * @enum {number} - * @property {number} UNKNOWN=0 UNKNOWN value - * @property {number} SINGLE_SELECT=1 SINGLE_SELECT value - * @property {number} PRODUCT_LIST=2 PRODUCT_LIST value - */ - ListMessage.ListMessageListType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN"] = 0; - values[valuesById[1] = "SINGLE_SELECT"] = 1; - values[valuesById[2] = "PRODUCT_LIST"] = 2; - return values; - })(); - - return ListMessage; - })(); - - proto.ListResponseMessage = (function() { - - /** - * Properties of a ListResponseMessage. - * @memberof proto - * @interface IListResponseMessage - * @property {string|null} [title] ListResponseMessage title - * @property {proto.ListResponseMessage.ListResponseMessageListType|null} [listType] ListResponseMessage listType - * @property {proto.ISingleSelectReply|null} [singleSelectReply] ListResponseMessage singleSelectReply - * @property {proto.IContextInfo|null} [contextInfo] ListResponseMessage contextInfo - * @property {string|null} [description] ListResponseMessage description - */ - - /** - * Constructs a new ListResponseMessage. - * @memberof proto - * @classdesc Represents a ListResponseMessage. - * @implements IListResponseMessage - * @constructor - * @param {proto.IListResponseMessage=} [properties] Properties to set - */ - function ListResponseMessage(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]]; - } - - /** - * ListResponseMessage title. - * @member {string} title - * @memberof proto.ListResponseMessage - * @instance - */ - ListResponseMessage.prototype.title = ""; - - /** - * ListResponseMessage listType. - * @member {proto.ListResponseMessage.ListResponseMessageListType} listType - * @memberof proto.ListResponseMessage - * @instance - */ - ListResponseMessage.prototype.listType = 0; - - /** - * ListResponseMessage singleSelectReply. - * @member {proto.ISingleSelectReply|null|undefined} singleSelectReply - * @memberof proto.ListResponseMessage - * @instance - */ - ListResponseMessage.prototype.singleSelectReply = null; - - /** - * ListResponseMessage contextInfo. - * @member {proto.IContextInfo|null|undefined} contextInfo - * @memberof proto.ListResponseMessage - * @instance - */ - ListResponseMessage.prototype.contextInfo = null; - - /** - * ListResponseMessage description. - * @member {string} description - * @memberof proto.ListResponseMessage - * @instance - */ - ListResponseMessage.prototype.description = ""; - - /** - * Creates a new ListResponseMessage instance using the specified properties. - * @function create - * @memberof proto.ListResponseMessage - * @static - * @param {proto.IListResponseMessage=} [properties] Properties to set - * @returns {proto.ListResponseMessage} ListResponseMessage instance - */ - ListResponseMessage.create = function create(properties) { - return new ListResponseMessage(properties); - }; - - /** - * Encodes the specified ListResponseMessage message. Does not implicitly {@link proto.ListResponseMessage.verify|verify} messages. - * @function encode - * @memberof proto.ListResponseMessage - * @static - * @param {proto.IListResponseMessage} message ListResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListResponseMessage.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.listType != null && Object.hasOwnProperty.call(message, "listType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.listType); - if (message.singleSelectReply != null && Object.hasOwnProperty.call(message, "singleSelectReply")) - $root.proto.SingleSelectReply.encode(message.singleSelectReply, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) - $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); - return writer; - }; - - /** - * Encodes the specified ListResponseMessage message, length delimited. Does not implicitly {@link proto.ListResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.ListResponseMessage - * @static - * @param {proto.IListResponseMessage} message ListResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.ListResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.ListResponseMessage} ListResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListResponseMessage.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.ListResponseMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.listType = reader.int32(); - break; - case 3: - message.singleSelectReply = $root.proto.SingleSelectReply.decode(reader, reader.uint32()); - break; - case 4: - message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); - break; - case 5: - message.description = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.ListResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ListResponseMessage} ListResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListResponseMessage message. - * @function verify - * @memberof proto.ListResponseMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListResponseMessage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.listType != null && message.hasOwnProperty("listType")) - switch (message.listType) { - default: - return "listType: enum value expected"; - case 0: - case 1: - break; - } - if (message.singleSelectReply != null && message.hasOwnProperty("singleSelectReply")) { - var error = $root.proto.SingleSelectReply.verify(message.singleSelectReply); - if (error) - return "singleSelectReply." + error; - } - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { - var error = $root.proto.ContextInfo.verify(message.contextInfo); - if (error) - return "contextInfo." + error; - } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - return null; - }; - - /** - * Creates a ListResponseMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.ListResponseMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.ListResponseMessage} ListResponseMessage - */ - ListResponseMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ListResponseMessage) - return object; - var message = new $root.proto.ListResponseMessage(); - if (object.title != null) - message.title = String(object.title); - switch (object.listType) { - case "UNKNOWN": - case 0: - message.listType = 0; - break; - case "SINGLE_SELECT": - case 1: - message.listType = 1; - break; - } - if (object.singleSelectReply != null) { - if (typeof object.singleSelectReply !== "object") - throw TypeError(".proto.ListResponseMessage.singleSelectReply: object expected"); - message.singleSelectReply = $root.proto.SingleSelectReply.fromObject(object.singleSelectReply); - } - if (object.contextInfo != null) { - if (typeof object.contextInfo !== "object") - throw TypeError(".proto.ListResponseMessage.contextInfo: object expected"); - message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); - } - if (object.description != null) - message.description = String(object.description); - return message; - }; - - /** - * Creates a plain object from a ListResponseMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.ListResponseMessage - * @static - * @param {proto.ListResponseMessage} message ListResponseMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListResponseMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.title = ""; - object.listType = options.enums === String ? "UNKNOWN" : 0; - object.singleSelectReply = null; - object.contextInfo = null; - object.description = ""; - } - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.listType != null && message.hasOwnProperty("listType")) - object.listType = options.enums === String ? $root.proto.ListResponseMessage.ListResponseMessageListType[message.listType] : message.listType; - if (message.singleSelectReply != null && message.hasOwnProperty("singleSelectReply")) - object.singleSelectReply = $root.proto.SingleSelectReply.toObject(message.singleSelectReply, options); - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) - object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - return object; - }; - - /** - * Converts this ListResponseMessage to JSON. - * @function toJSON - * @memberof proto.ListResponseMessage - * @instance - * @returns {Object.} JSON object - */ - ListResponseMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * ListResponseMessageListType enum. - * @name proto.ListResponseMessage.ListResponseMessageListType - * @enum {number} - * @property {number} UNKNOWN=0 UNKNOWN value - * @property {number} SINGLE_SELECT=1 SINGLE_SELECT value - */ - ListResponseMessage.ListResponseMessageListType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN"] = 0; - values[valuesById[1] = "SINGLE_SELECT"] = 1; - return values; - })(); - - return ListResponseMessage; - })(); - - proto.LiveLocationMessage = (function() { - - /** - * Properties of a LiveLocationMessage. - * @memberof proto - * @interface ILiveLocationMessage - * @property {number|null} [degreesLatitude] LiveLocationMessage degreesLatitude - * @property {number|null} [degreesLongitude] LiveLocationMessage degreesLongitude - * @property {number|null} [accuracyInMeters] LiveLocationMessage accuracyInMeters - * @property {number|null} [speedInMps] LiveLocationMessage speedInMps - * @property {number|null} [degreesClockwiseFromMagneticNorth] LiveLocationMessage degreesClockwiseFromMagneticNorth - * @property {string|null} [caption] LiveLocationMessage caption - * @property {number|Long|null} [sequenceNumber] LiveLocationMessage sequenceNumber - * @property {number|null} [timeOffset] LiveLocationMessage timeOffset - * @property {Uint8Array|null} [jpegThumbnail] LiveLocationMessage jpegThumbnail - * @property {proto.IContextInfo|null} [contextInfo] LiveLocationMessage contextInfo - */ - - /** - * Constructs a new LiveLocationMessage. - * @memberof proto - * @classdesc Represents a LiveLocationMessage. - * @implements ILiveLocationMessage - * @constructor - * @param {proto.ILiveLocationMessage=} [properties] Properties to set - */ - function LiveLocationMessage(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]]; - } - - /** - * LiveLocationMessage degreesLatitude. - * @member {number} degreesLatitude - * @memberof proto.LiveLocationMessage - * @instance - */ - LiveLocationMessage.prototype.degreesLatitude = 0; - - /** - * LiveLocationMessage degreesLongitude. - * @member {number} degreesLongitude - * @memberof proto.LiveLocationMessage - * @instance - */ - LiveLocationMessage.prototype.degreesLongitude = 0; - - /** - * LiveLocationMessage accuracyInMeters. - * @member {number} accuracyInMeters - * @memberof proto.LiveLocationMessage - * @instance - */ - LiveLocationMessage.prototype.accuracyInMeters = 0; - - /** - * LiveLocationMessage speedInMps. - * @member {number} speedInMps - * @memberof proto.LiveLocationMessage - * @instance - */ - LiveLocationMessage.prototype.speedInMps = 0; - - /** - * LiveLocationMessage degreesClockwiseFromMagneticNorth. - * @member {number} degreesClockwiseFromMagneticNorth - * @memberof proto.LiveLocationMessage - * @instance - */ - LiveLocationMessage.prototype.degreesClockwiseFromMagneticNorth = 0; - - /** - * LiveLocationMessage caption. - * @member {string} caption - * @memberof proto.LiveLocationMessage - * @instance - */ - LiveLocationMessage.prototype.caption = ""; - - /** - * LiveLocationMessage sequenceNumber. - * @member {number|Long} sequenceNumber - * @memberof proto.LiveLocationMessage - * @instance - */ - LiveLocationMessage.prototype.sequenceNumber = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * LiveLocationMessage timeOffset. - * @member {number} timeOffset - * @memberof proto.LiveLocationMessage - * @instance - */ - LiveLocationMessage.prototype.timeOffset = 0; - - /** - * LiveLocationMessage jpegThumbnail. - * @member {Uint8Array} jpegThumbnail - * @memberof proto.LiveLocationMessage - * @instance - */ - LiveLocationMessage.prototype.jpegThumbnail = $util.newBuffer([]); - - /** - * LiveLocationMessage contextInfo. - * @member {proto.IContextInfo|null|undefined} contextInfo - * @memberof proto.LiveLocationMessage - * @instance - */ - LiveLocationMessage.prototype.contextInfo = null; - - /** - * Creates a new LiveLocationMessage instance using the specified properties. - * @function create - * @memberof proto.LiveLocationMessage - * @static - * @param {proto.ILiveLocationMessage=} [properties] Properties to set - * @returns {proto.LiveLocationMessage} LiveLocationMessage instance - */ - LiveLocationMessage.create = function create(properties) { - return new LiveLocationMessage(properties); - }; - - /** - * Encodes the specified LiveLocationMessage message. Does not implicitly {@link proto.LiveLocationMessage.verify|verify} messages. - * @function encode - * @memberof proto.LiveLocationMessage - * @static - * @param {proto.ILiveLocationMessage} message LiveLocationMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LiveLocationMessage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.degreesLatitude != null && Object.hasOwnProperty.call(message, "degreesLatitude")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.degreesLatitude); - if (message.degreesLongitude != null && Object.hasOwnProperty.call(message, "degreesLongitude")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.degreesLongitude); - if (message.accuracyInMeters != null && Object.hasOwnProperty.call(message, "accuracyInMeters")) - writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.accuracyInMeters); - if (message.speedInMps != null && Object.hasOwnProperty.call(message, "speedInMps")) - writer.uint32(/* id 4, wireType 5 =*/37).float(message.speedInMps); - if (message.degreesClockwiseFromMagneticNorth != null && Object.hasOwnProperty.call(message, "degreesClockwiseFromMagneticNorth")) - writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.degreesClockwiseFromMagneticNorth); - if (message.caption != null && Object.hasOwnProperty.call(message, "caption")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.caption); - if (message.sequenceNumber != null && Object.hasOwnProperty.call(message, "sequenceNumber")) - writer.uint32(/* id 7, wireType 0 =*/56).int64(message.sequenceNumber); - if (message.timeOffset != null && Object.hasOwnProperty.call(message, "timeOffset")) - writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.timeOffset); - 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(); - return writer; - }; - - /** - * Encodes the specified LiveLocationMessage message, length delimited. Does not implicitly {@link proto.LiveLocationMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.LiveLocationMessage - * @static - * @param {proto.ILiveLocationMessage} message LiveLocationMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LiveLocationMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LiveLocationMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.LiveLocationMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.LiveLocationMessage} LiveLocationMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LiveLocationMessage.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.LiveLocationMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.degreesLatitude = reader.double(); - break; - case 2: - message.degreesLongitude = reader.double(); - break; - case 3: - message.accuracyInMeters = reader.uint32(); - break; - case 4: - message.speedInMps = reader.float(); - break; - case 5: - message.degreesClockwiseFromMagneticNorth = reader.uint32(); - break; - case 6: - message.caption = reader.string(); - break; - case 7: - message.sequenceNumber = reader.int64(); - break; - case 8: - message.timeOffset = reader.uint32(); - break; - case 16: - message.jpegThumbnail = reader.bytes(); - break; - case 17: - message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LiveLocationMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.LiveLocationMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.LiveLocationMessage} LiveLocationMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LiveLocationMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LiveLocationMessage message. - * @function verify - * @memberof proto.LiveLocationMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LiveLocationMessage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.degreesLatitude != null && message.hasOwnProperty("degreesLatitude")) - if (typeof message.degreesLatitude !== "number") - return "degreesLatitude: number expected"; - if (message.degreesLongitude != null && message.hasOwnProperty("degreesLongitude")) - if (typeof message.degreesLongitude !== "number") - return "degreesLongitude: number expected"; - if (message.accuracyInMeters != null && message.hasOwnProperty("accuracyInMeters")) - if (!$util.isInteger(message.accuracyInMeters)) - return "accuracyInMeters: integer expected"; - if (message.speedInMps != null && message.hasOwnProperty("speedInMps")) - if (typeof message.speedInMps !== "number") - return "speedInMps: number expected"; - if (message.degreesClockwiseFromMagneticNorth != null && message.hasOwnProperty("degreesClockwiseFromMagneticNorth")) - if (!$util.isInteger(message.degreesClockwiseFromMagneticNorth)) - return "degreesClockwiseFromMagneticNorth: integer expected"; - if (message.caption != null && message.hasOwnProperty("caption")) - if (!$util.isString(message.caption)) - return "caption: string expected"; - if (message.sequenceNumber != null && message.hasOwnProperty("sequenceNumber")) - if (!$util.isInteger(message.sequenceNumber) && !(message.sequenceNumber && $util.isInteger(message.sequenceNumber.low) && $util.isInteger(message.sequenceNumber.high))) - return "sequenceNumber: integer|Long expected"; - if (message.timeOffset != null && message.hasOwnProperty("timeOffset")) - if (!$util.isInteger(message.timeOffset)) - return "timeOffset: integer 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; - } - return null; - }; - - /** - * Creates a LiveLocationMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.LiveLocationMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.LiveLocationMessage} LiveLocationMessage - */ - LiveLocationMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.LiveLocationMessage) - return object; - var message = new $root.proto.LiveLocationMessage(); - if (object.degreesLatitude != null) - message.degreesLatitude = Number(object.degreesLatitude); - if (object.degreesLongitude != null) - message.degreesLongitude = Number(object.degreesLongitude); - if (object.accuracyInMeters != null) - message.accuracyInMeters = object.accuracyInMeters >>> 0; - if (object.speedInMps != null) - message.speedInMps = Number(object.speedInMps); - if (object.degreesClockwiseFromMagneticNorth != null) - message.degreesClockwiseFromMagneticNorth = object.degreesClockwiseFromMagneticNorth >>> 0; - if (object.caption != null) - message.caption = String(object.caption); - if (object.sequenceNumber != null) - if ($util.Long) - (message.sequenceNumber = $util.Long.fromValue(object.sequenceNumber)).unsigned = false; - else if (typeof object.sequenceNumber === "string") - message.sequenceNumber = parseInt(object.sequenceNumber, 10); - else if (typeof object.sequenceNumber === "number") - message.sequenceNumber = object.sequenceNumber; - else if (typeof object.sequenceNumber === "object") - message.sequenceNumber = new $util.LongBits(object.sequenceNumber.low >>> 0, object.sequenceNumber.high >>> 0).toNumber(); - if (object.timeOffset != null) - message.timeOffset = object.timeOffset >>> 0; - 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.LiveLocationMessage.contextInfo: object expected"); - message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); - } - return message; - }; - - /** - * Creates a plain object from a LiveLocationMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.LiveLocationMessage - * @static - * @param {proto.LiveLocationMessage} message LiveLocationMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LiveLocationMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.degreesLatitude = 0; - object.degreesLongitude = 0; - object.accuracyInMeters = 0; - object.speedInMps = 0; - object.degreesClockwiseFromMagneticNorth = 0; - object.caption = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.sequenceNumber = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.sequenceNumber = options.longs === String ? "0" : 0; - object.timeOffset = 0; - if (options.bytes === String) - object.jpegThumbnail = ""; - else { - object.jpegThumbnail = []; - if (options.bytes !== Array) - object.jpegThumbnail = $util.newBuffer(object.jpegThumbnail); - } - object.contextInfo = null; - } - if (message.degreesLatitude != null && message.hasOwnProperty("degreesLatitude")) - object.degreesLatitude = options.json && !isFinite(message.degreesLatitude) ? String(message.degreesLatitude) : message.degreesLatitude; - if (message.degreesLongitude != null && message.hasOwnProperty("degreesLongitude")) - object.degreesLongitude = options.json && !isFinite(message.degreesLongitude) ? String(message.degreesLongitude) : message.degreesLongitude; - if (message.accuracyInMeters != null && message.hasOwnProperty("accuracyInMeters")) - object.accuracyInMeters = message.accuracyInMeters; - if (message.speedInMps != null && message.hasOwnProperty("speedInMps")) - object.speedInMps = options.json && !isFinite(message.speedInMps) ? String(message.speedInMps) : message.speedInMps; - if (message.degreesClockwiseFromMagneticNorth != null && message.hasOwnProperty("degreesClockwiseFromMagneticNorth")) - object.degreesClockwiseFromMagneticNorth = message.degreesClockwiseFromMagneticNorth; - if (message.caption != null && message.hasOwnProperty("caption")) - object.caption = message.caption; - if (message.sequenceNumber != null && message.hasOwnProperty("sequenceNumber")) - if (typeof message.sequenceNumber === "number") - object.sequenceNumber = options.longs === String ? String(message.sequenceNumber) : message.sequenceNumber; - else - object.sequenceNumber = options.longs === String ? $util.Long.prototype.toString.call(message.sequenceNumber) : options.longs === Number ? new $util.LongBits(message.sequenceNumber.low >>> 0, message.sequenceNumber.high >>> 0).toNumber() : message.sequenceNumber; - if (message.timeOffset != null && message.hasOwnProperty("timeOffset")) - object.timeOffset = message.timeOffset; - 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); - return object; - }; - - /** - * Converts this LiveLocationMessage to JSON. - * @function toJSON - * @memberof proto.LiveLocationMessage - * @instance - * @returns {Object.} JSON object - */ - LiveLocationMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - 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() { /** @@ -33258,665 +17209,6 @@ $root.proto = (function() { return Location; })(); - proto.LocationMessage = (function() { - - /** - * Properties of a LocationMessage. - * @memberof proto - * @interface ILocationMessage - * @property {number|null} [degreesLatitude] LocationMessage degreesLatitude - * @property {number|null} [degreesLongitude] LocationMessage degreesLongitude - * @property {string|null} [name] LocationMessage name - * @property {string|null} [address] LocationMessage address - * @property {string|null} [url] LocationMessage url - * @property {boolean|null} [isLive] LocationMessage isLive - * @property {number|null} [accuracyInMeters] LocationMessage accuracyInMeters - * @property {number|null} [speedInMps] LocationMessage speedInMps - * @property {number|null} [degreesClockwiseFromMagneticNorth] LocationMessage degreesClockwiseFromMagneticNorth - * @property {string|null} [comment] LocationMessage comment - * @property {Uint8Array|null} [jpegThumbnail] LocationMessage jpegThumbnail - * @property {proto.IContextInfo|null} [contextInfo] LocationMessage contextInfo - */ - - /** - * Constructs a new LocationMessage. - * @memberof proto - * @classdesc Represents a LocationMessage. - * @implements ILocationMessage - * @constructor - * @param {proto.ILocationMessage=} [properties] Properties to set - */ - function LocationMessage(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]]; - } - - /** - * LocationMessage degreesLatitude. - * @member {number} degreesLatitude - * @memberof proto.LocationMessage - * @instance - */ - LocationMessage.prototype.degreesLatitude = 0; - - /** - * LocationMessage degreesLongitude. - * @member {number} degreesLongitude - * @memberof proto.LocationMessage - * @instance - */ - LocationMessage.prototype.degreesLongitude = 0; - - /** - * LocationMessage name. - * @member {string} name - * @memberof proto.LocationMessage - * @instance - */ - LocationMessage.prototype.name = ""; - - /** - * LocationMessage address. - * @member {string} address - * @memberof proto.LocationMessage - * @instance - */ - LocationMessage.prototype.address = ""; - - /** - * LocationMessage url. - * @member {string} url - * @memberof proto.LocationMessage - * @instance - */ - LocationMessage.prototype.url = ""; - - /** - * LocationMessage isLive. - * @member {boolean} isLive - * @memberof proto.LocationMessage - * @instance - */ - LocationMessage.prototype.isLive = false; - - /** - * LocationMessage accuracyInMeters. - * @member {number} accuracyInMeters - * @memberof proto.LocationMessage - * @instance - */ - LocationMessage.prototype.accuracyInMeters = 0; - - /** - * LocationMessage speedInMps. - * @member {number} speedInMps - * @memberof proto.LocationMessage - * @instance - */ - LocationMessage.prototype.speedInMps = 0; - - /** - * LocationMessage degreesClockwiseFromMagneticNorth. - * @member {number} degreesClockwiseFromMagneticNorth - * @memberof proto.LocationMessage - * @instance - */ - LocationMessage.prototype.degreesClockwiseFromMagneticNorth = 0; - - /** - * LocationMessage comment. - * @member {string} comment - * @memberof proto.LocationMessage - * @instance - */ - LocationMessage.prototype.comment = ""; - - /** - * LocationMessage jpegThumbnail. - * @member {Uint8Array} jpegThumbnail - * @memberof proto.LocationMessage - * @instance - */ - LocationMessage.prototype.jpegThumbnail = $util.newBuffer([]); - - /** - * LocationMessage contextInfo. - * @member {proto.IContextInfo|null|undefined} contextInfo - * @memberof proto.LocationMessage - * @instance - */ - LocationMessage.prototype.contextInfo = null; - - /** - * Creates a new LocationMessage instance using the specified properties. - * @function create - * @memberof proto.LocationMessage - * @static - * @param {proto.ILocationMessage=} [properties] Properties to set - * @returns {proto.LocationMessage} LocationMessage instance - */ - LocationMessage.create = function create(properties) { - return new LocationMessage(properties); - }; - - /** - * Encodes the specified LocationMessage message. Does not implicitly {@link proto.LocationMessage.verify|verify} messages. - * @function encode - * @memberof proto.LocationMessage - * @static - * @param {proto.ILocationMessage} message LocationMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LocationMessage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.degreesLatitude != null && Object.hasOwnProperty.call(message, "degreesLatitude")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.degreesLatitude); - if (message.degreesLongitude != null && Object.hasOwnProperty.call(message, "degreesLongitude")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.degreesLongitude); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); - if (message.address != null && Object.hasOwnProperty.call(message, "address")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.address); - if (message.url != null && Object.hasOwnProperty.call(message, "url")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.url); - if (message.isLive != null && Object.hasOwnProperty.call(message, "isLive")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.isLive); - if (message.accuracyInMeters != null && Object.hasOwnProperty.call(message, "accuracyInMeters")) - writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.accuracyInMeters); - if (message.speedInMps != null && Object.hasOwnProperty.call(message, "speedInMps")) - writer.uint32(/* id 8, wireType 5 =*/69).float(message.speedInMps); - if (message.degreesClockwiseFromMagneticNorth != null && Object.hasOwnProperty.call(message, "degreesClockwiseFromMagneticNorth")) - writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.degreesClockwiseFromMagneticNorth); - if (message.comment != null && Object.hasOwnProperty.call(message, "comment")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.comment); - 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(); - return writer; - }; - - /** - * Encodes the specified LocationMessage message, length delimited. Does not implicitly {@link proto.LocationMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.LocationMessage - * @static - * @param {proto.ILocationMessage} message LocationMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LocationMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LocationMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.LocationMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.LocationMessage} LocationMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LocationMessage.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.LocationMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.degreesLatitude = reader.double(); - break; - case 2: - message.degreesLongitude = reader.double(); - break; - case 3: - message.name = reader.string(); - break; - case 4: - message.address = reader.string(); - break; - case 5: - message.url = reader.string(); - break; - case 6: - message.isLive = reader.bool(); - break; - case 7: - message.accuracyInMeters = reader.uint32(); - break; - case 8: - message.speedInMps = reader.float(); - break; - case 9: - message.degreesClockwiseFromMagneticNorth = reader.uint32(); - break; - case 11: - message.comment = reader.string(); - break; - case 16: - message.jpegThumbnail = reader.bytes(); - break; - case 17: - message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LocationMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.LocationMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.LocationMessage} LocationMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LocationMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LocationMessage message. - * @function verify - * @memberof proto.LocationMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LocationMessage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.degreesLatitude != null && message.hasOwnProperty("degreesLatitude")) - if (typeof message.degreesLatitude !== "number") - return "degreesLatitude: number expected"; - if (message.degreesLongitude != null && message.hasOwnProperty("degreesLongitude")) - if (typeof message.degreesLongitude !== "number") - return "degreesLongitude: number expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.address != null && message.hasOwnProperty("address")) - if (!$util.isString(message.address)) - return "address: string expected"; - if (message.url != null && message.hasOwnProperty("url")) - if (!$util.isString(message.url)) - return "url: string expected"; - if (message.isLive != null && message.hasOwnProperty("isLive")) - if (typeof message.isLive !== "boolean") - return "isLive: boolean expected"; - if (message.accuracyInMeters != null && message.hasOwnProperty("accuracyInMeters")) - if (!$util.isInteger(message.accuracyInMeters)) - return "accuracyInMeters: integer expected"; - if (message.speedInMps != null && message.hasOwnProperty("speedInMps")) - if (typeof message.speedInMps !== "number") - return "speedInMps: number expected"; - if (message.degreesClockwiseFromMagneticNorth != null && message.hasOwnProperty("degreesClockwiseFromMagneticNorth")) - if (!$util.isInteger(message.degreesClockwiseFromMagneticNorth)) - return "degreesClockwiseFromMagneticNorth: integer expected"; - if (message.comment != null && message.hasOwnProperty("comment")) - if (!$util.isString(message.comment)) - return "comment: string 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; - } - return null; - }; - - /** - * Creates a LocationMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.LocationMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.LocationMessage} LocationMessage - */ - LocationMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.LocationMessage) - return object; - var message = new $root.proto.LocationMessage(); - if (object.degreesLatitude != null) - message.degreesLatitude = Number(object.degreesLatitude); - if (object.degreesLongitude != null) - message.degreesLongitude = Number(object.degreesLongitude); - if (object.name != null) - message.name = String(object.name); - if (object.address != null) - message.address = String(object.address); - if (object.url != null) - message.url = String(object.url); - if (object.isLive != null) - message.isLive = Boolean(object.isLive); - if (object.accuracyInMeters != null) - message.accuracyInMeters = object.accuracyInMeters >>> 0; - if (object.speedInMps != null) - message.speedInMps = Number(object.speedInMps); - if (object.degreesClockwiseFromMagneticNorth != null) - message.degreesClockwiseFromMagneticNorth = object.degreesClockwiseFromMagneticNorth >>> 0; - if (object.comment != null) - message.comment = String(object.comment); - 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.LocationMessage.contextInfo: object expected"); - message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); - } - return message; - }; - - /** - * Creates a plain object from a LocationMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.LocationMessage - * @static - * @param {proto.LocationMessage} message LocationMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LocationMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.degreesLatitude = 0; - object.degreesLongitude = 0; - object.name = ""; - object.address = ""; - object.url = ""; - object.isLive = false; - object.accuracyInMeters = 0; - object.speedInMps = 0; - object.degreesClockwiseFromMagneticNorth = 0; - object.comment = ""; - if (options.bytes === String) - object.jpegThumbnail = ""; - else { - object.jpegThumbnail = []; - if (options.bytes !== Array) - object.jpegThumbnail = $util.newBuffer(object.jpegThumbnail); - } - object.contextInfo = null; - } - if (message.degreesLatitude != null && message.hasOwnProperty("degreesLatitude")) - object.degreesLatitude = options.json && !isFinite(message.degreesLatitude) ? String(message.degreesLatitude) : message.degreesLatitude; - if (message.degreesLongitude != null && message.hasOwnProperty("degreesLongitude")) - object.degreesLongitude = options.json && !isFinite(message.degreesLongitude) ? String(message.degreesLongitude) : message.degreesLongitude; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.address != null && message.hasOwnProperty("address")) - object.address = message.address; - if (message.url != null && message.hasOwnProperty("url")) - object.url = message.url; - if (message.isLive != null && message.hasOwnProperty("isLive")) - object.isLive = message.isLive; - if (message.accuracyInMeters != null && message.hasOwnProperty("accuracyInMeters")) - object.accuracyInMeters = message.accuracyInMeters; - if (message.speedInMps != null && message.hasOwnProperty("speedInMps")) - object.speedInMps = options.json && !isFinite(message.speedInMps) ? String(message.speedInMps) : message.speedInMps; - if (message.degreesClockwiseFromMagneticNorth != null && message.hasOwnProperty("degreesClockwiseFromMagneticNorth")) - object.degreesClockwiseFromMagneticNorth = message.degreesClockwiseFromMagneticNorth; - if (message.comment != null && message.hasOwnProperty("comment")) - object.comment = message.comment; - 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); - return object; - }; - - /** - * Converts this LocationMessage to JSON. - * @function toJSON - * @memberof proto.LocationMessage - * @instance - * @returns {Object.} JSON object - */ - LocationMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - 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() { /** @@ -34112,7 +17404,7 @@ $root.proto = (function() { * @interface IMediaRetryNotification * @property {string|null} [stanzaId] MediaRetryNotification stanzaId * @property {string|null} [directPath] MediaRetryNotification directPath - * @property {proto.MediaRetryNotification.MediaRetryNotificationResultType|null} [result] MediaRetryNotification result + * @property {proto.MediaRetryNotification.ResultType|null} [result] MediaRetryNotification result */ /** @@ -34148,7 +17440,7 @@ $root.proto = (function() { /** * MediaRetryNotification result. - * @member {proto.MediaRetryNotification.MediaRetryNotificationResultType} result + * @member {proto.MediaRetryNotification.ResultType} result * @memberof proto.MediaRetryNotification * @instance */ @@ -34341,7 +17633,7 @@ $root.proto = (function() { 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; + object.result = options.enums === String ? $root.proto.MediaRetryNotification.ResultType[message.result] : message.result; return object; }; @@ -34357,15 +17649,15 @@ $root.proto = (function() { }; /** - * MediaRetryNotificationResultType enum. - * @name proto.MediaRetryNotification.MediaRetryNotificationResultType + * ResultType enum. + * @name proto.MediaRetryNotification.ResultType * @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() { + MediaRetryNotification.ResultType = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "GENERAL_ERROR"] = 0; values[valuesById[1] = "SUCCESS"] = 1; @@ -34400,49 +17692,51 @@ $root.proto = (function() { * @memberof proto * @interface IMessage * @property {string|null} [conversation] Message conversation - * @property {proto.ISenderKeyDistributionMessage|null} [senderKeyDistributionMessage] Message senderKeyDistributionMessage - * @property {proto.IImageMessage|null} [imageMessage] Message imageMessage - * @property {proto.IContactMessage|null} [contactMessage] Message contactMessage - * @property {proto.ILocationMessage|null} [locationMessage] Message locationMessage - * @property {proto.IExtendedTextMessage|null} [extendedTextMessage] Message extendedTextMessage - * @property {proto.IDocumentMessage|null} [documentMessage] Message documentMessage - * @property {proto.IAudioMessage|null} [audioMessage] Message audioMessage - * @property {proto.IVideoMessage|null} [videoMessage] Message videoMessage - * @property {proto.ICall|null} [call] Message call - * @property {proto.IChat|null} [chat] Message chat - * @property {proto.IProtocolMessage|null} [protocolMessage] Message protocolMessage - * @property {proto.IContactsArrayMessage|null} [contactsArrayMessage] Message contactsArrayMessage - * @property {proto.IHighlyStructuredMessage|null} [highlyStructuredMessage] Message highlyStructuredMessage - * @property {proto.ISenderKeyDistributionMessage|null} [fastRatchetKeySenderKeyDistributionMessage] Message fastRatchetKeySenderKeyDistributionMessage - * @property {proto.ISendPaymentMessage|null} [sendPaymentMessage] Message sendPaymentMessage - * @property {proto.ILiveLocationMessage|null} [liveLocationMessage] Message liveLocationMessage - * @property {proto.IRequestPaymentMessage|null} [requestPaymentMessage] Message requestPaymentMessage - * @property {proto.IDeclinePaymentRequestMessage|null} [declinePaymentRequestMessage] Message declinePaymentRequestMessage - * @property {proto.ICancelPaymentRequestMessage|null} [cancelPaymentRequestMessage] Message cancelPaymentRequestMessage - * @property {proto.ITemplateMessage|null} [templateMessage] Message templateMessage - * @property {proto.IStickerMessage|null} [stickerMessage] Message stickerMessage - * @property {proto.IGroupInviteMessage|null} [groupInviteMessage] Message groupInviteMessage - * @property {proto.ITemplateButtonReplyMessage|null} [templateButtonReplyMessage] Message templateButtonReplyMessage - * @property {proto.IProductMessage|null} [productMessage] Message productMessage - * @property {proto.IDeviceSentMessage|null} [deviceSentMessage] Message deviceSentMessage + * @property {proto.Message.ISenderKeyDistributionMessage|null} [senderKeyDistributionMessage] Message senderKeyDistributionMessage + * @property {proto.Message.IImageMessage|null} [imageMessage] Message imageMessage + * @property {proto.Message.IContactMessage|null} [contactMessage] Message contactMessage + * @property {proto.Message.ILocationMessage|null} [locationMessage] Message locationMessage + * @property {proto.Message.IExtendedTextMessage|null} [extendedTextMessage] Message extendedTextMessage + * @property {proto.Message.IDocumentMessage|null} [documentMessage] Message documentMessage + * @property {proto.Message.IAudioMessage|null} [audioMessage] Message audioMessage + * @property {proto.Message.IVideoMessage|null} [videoMessage] Message videoMessage + * @property {proto.Message.ICall|null} [call] Message call + * @property {proto.Message.IChat|null} [chat] Message chat + * @property {proto.Message.IProtocolMessage|null} [protocolMessage] Message protocolMessage + * @property {proto.Message.IContactsArrayMessage|null} [contactsArrayMessage] Message contactsArrayMessage + * @property {proto.Message.IHighlyStructuredMessage|null} [highlyStructuredMessage] Message highlyStructuredMessage + * @property {proto.Message.ISenderKeyDistributionMessage|null} [fastRatchetKeySenderKeyDistributionMessage] Message fastRatchetKeySenderKeyDistributionMessage + * @property {proto.Message.ISendPaymentMessage|null} [sendPaymentMessage] Message sendPaymentMessage + * @property {proto.Message.ILiveLocationMessage|null} [liveLocationMessage] Message liveLocationMessage + * @property {proto.Message.IRequestPaymentMessage|null} [requestPaymentMessage] Message requestPaymentMessage + * @property {proto.Message.IDeclinePaymentRequestMessage|null} [declinePaymentRequestMessage] Message declinePaymentRequestMessage + * @property {proto.Message.ICancelPaymentRequestMessage|null} [cancelPaymentRequestMessage] Message cancelPaymentRequestMessage + * @property {proto.Message.ITemplateMessage|null} [templateMessage] Message templateMessage + * @property {proto.Message.IStickerMessage|null} [stickerMessage] Message stickerMessage + * @property {proto.Message.IGroupInviteMessage|null} [groupInviteMessage] Message groupInviteMessage + * @property {proto.Message.ITemplateButtonReplyMessage|null} [templateButtonReplyMessage] Message templateButtonReplyMessage + * @property {proto.Message.IProductMessage|null} [productMessage] Message productMessage + * @property {proto.Message.IDeviceSentMessage|null} [deviceSentMessage] Message deviceSentMessage * @property {proto.IMessageContextInfo|null} [messageContextInfo] Message messageContextInfo - * @property {proto.IListMessage|null} [listMessage] Message listMessage - * @property {proto.IFutureProofMessage|null} [viewOnceMessage] Message viewOnceMessage - * @property {proto.IOrderMessage|null} [orderMessage] Message orderMessage - * @property {proto.IListResponseMessage|null} [listResponseMessage] Message listResponseMessage - * @property {proto.IFutureProofMessage|null} [ephemeralMessage] Message ephemeralMessage - * @property {proto.IInvoiceMessage|null} [invoiceMessage] Message invoiceMessage - * @property {proto.IButtonsMessage|null} [buttonsMessage] Message buttonsMessage - * @property {proto.IButtonsResponseMessage|null} [buttonsResponseMessage] Message buttonsResponseMessage - * @property {proto.IPaymentInviteMessage|null} [paymentInviteMessage] Message paymentInviteMessage - * @property {proto.IInteractiveMessage|null} [interactiveMessage] Message interactiveMessage - * @property {proto.IReactionMessage|null} [reactionMessage] Message reactionMessage - * @property {proto.IStickerSyncRMRMessage|null} [stickerSyncRmrMessage] Message stickerSyncRmrMessage - * @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 - * @property {proto.IFutureProofMessage|null} [documentWithCaptionMessage] Message documentWithCaptionMessage + * @property {proto.Message.IListMessage|null} [listMessage] Message listMessage + * @property {proto.Message.IFutureProofMessage|null} [viewOnceMessage] Message viewOnceMessage + * @property {proto.Message.IOrderMessage|null} [orderMessage] Message orderMessage + * @property {proto.Message.IListResponseMessage|null} [listResponseMessage] Message listResponseMessage + * @property {proto.Message.IFutureProofMessage|null} [ephemeralMessage] Message ephemeralMessage + * @property {proto.Message.IInvoiceMessage|null} [invoiceMessage] Message invoiceMessage + * @property {proto.Message.IButtonsMessage|null} [buttonsMessage] Message buttonsMessage + * @property {proto.Message.IButtonsResponseMessage|null} [buttonsResponseMessage] Message buttonsResponseMessage + * @property {proto.Message.IPaymentInviteMessage|null} [paymentInviteMessage] Message paymentInviteMessage + * @property {proto.Message.IInteractiveMessage|null} [interactiveMessage] Message interactiveMessage + * @property {proto.Message.IReactionMessage|null} [reactionMessage] Message reactionMessage + * @property {proto.Message.IStickerSyncRMRMessage|null} [stickerSyncRmrMessage] Message stickerSyncRmrMessage + * @property {proto.Message.IInteractiveResponseMessage|null} [interactiveResponseMessage] Message interactiveResponseMessage + * @property {proto.Message.IPollCreationMessage|null} [pollCreationMessage] Message pollCreationMessage + * @property {proto.Message.IPollUpdateMessage|null} [pollUpdateMessage] Message pollUpdateMessage + * @property {proto.Message.IKeepInChatMessage|null} [keepInChatMessage] Message keepInChatMessage + * @property {proto.Message.IFutureProofMessage|null} [documentWithCaptionMessage] Message documentWithCaptionMessage + * @property {proto.Message.IRequestPhoneNumberMessage|null} [requestPhoneNumberMessage] Message requestPhoneNumberMessage + * @property {proto.Message.IFutureProofMessage|null} [viewOnceMessageV2] Message viewOnceMessageV2 */ /** @@ -34470,7 +17764,7 @@ $root.proto = (function() { /** * Message senderKeyDistributionMessage. - * @member {proto.ISenderKeyDistributionMessage|null|undefined} senderKeyDistributionMessage + * @member {proto.Message.ISenderKeyDistributionMessage|null|undefined} senderKeyDistributionMessage * @memberof proto.Message * @instance */ @@ -34478,7 +17772,7 @@ $root.proto = (function() { /** * Message imageMessage. - * @member {proto.IImageMessage|null|undefined} imageMessage + * @member {proto.Message.IImageMessage|null|undefined} imageMessage * @memberof proto.Message * @instance */ @@ -34486,7 +17780,7 @@ $root.proto = (function() { /** * Message contactMessage. - * @member {proto.IContactMessage|null|undefined} contactMessage + * @member {proto.Message.IContactMessage|null|undefined} contactMessage * @memberof proto.Message * @instance */ @@ -34494,7 +17788,7 @@ $root.proto = (function() { /** * Message locationMessage. - * @member {proto.ILocationMessage|null|undefined} locationMessage + * @member {proto.Message.ILocationMessage|null|undefined} locationMessage * @memberof proto.Message * @instance */ @@ -34502,7 +17796,7 @@ $root.proto = (function() { /** * Message extendedTextMessage. - * @member {proto.IExtendedTextMessage|null|undefined} extendedTextMessage + * @member {proto.Message.IExtendedTextMessage|null|undefined} extendedTextMessage * @memberof proto.Message * @instance */ @@ -34510,7 +17804,7 @@ $root.proto = (function() { /** * Message documentMessage. - * @member {proto.IDocumentMessage|null|undefined} documentMessage + * @member {proto.Message.IDocumentMessage|null|undefined} documentMessage * @memberof proto.Message * @instance */ @@ -34518,7 +17812,7 @@ $root.proto = (function() { /** * Message audioMessage. - * @member {proto.IAudioMessage|null|undefined} audioMessage + * @member {proto.Message.IAudioMessage|null|undefined} audioMessage * @memberof proto.Message * @instance */ @@ -34526,7 +17820,7 @@ $root.proto = (function() { /** * Message videoMessage. - * @member {proto.IVideoMessage|null|undefined} videoMessage + * @member {proto.Message.IVideoMessage|null|undefined} videoMessage * @memberof proto.Message * @instance */ @@ -34534,7 +17828,7 @@ $root.proto = (function() { /** * Message call. - * @member {proto.ICall|null|undefined} call + * @member {proto.Message.ICall|null|undefined} call * @memberof proto.Message * @instance */ @@ -34542,7 +17836,7 @@ $root.proto = (function() { /** * Message chat. - * @member {proto.IChat|null|undefined} chat + * @member {proto.Message.IChat|null|undefined} chat * @memberof proto.Message * @instance */ @@ -34550,7 +17844,7 @@ $root.proto = (function() { /** * Message protocolMessage. - * @member {proto.IProtocolMessage|null|undefined} protocolMessage + * @member {proto.Message.IProtocolMessage|null|undefined} protocolMessage * @memberof proto.Message * @instance */ @@ -34558,7 +17852,7 @@ $root.proto = (function() { /** * Message contactsArrayMessage. - * @member {proto.IContactsArrayMessage|null|undefined} contactsArrayMessage + * @member {proto.Message.IContactsArrayMessage|null|undefined} contactsArrayMessage * @memberof proto.Message * @instance */ @@ -34566,7 +17860,7 @@ $root.proto = (function() { /** * Message highlyStructuredMessage. - * @member {proto.IHighlyStructuredMessage|null|undefined} highlyStructuredMessage + * @member {proto.Message.IHighlyStructuredMessage|null|undefined} highlyStructuredMessage * @memberof proto.Message * @instance */ @@ -34574,7 +17868,7 @@ $root.proto = (function() { /** * Message fastRatchetKeySenderKeyDistributionMessage. - * @member {proto.ISenderKeyDistributionMessage|null|undefined} fastRatchetKeySenderKeyDistributionMessage + * @member {proto.Message.ISenderKeyDistributionMessage|null|undefined} fastRatchetKeySenderKeyDistributionMessage * @memberof proto.Message * @instance */ @@ -34582,7 +17876,7 @@ $root.proto = (function() { /** * Message sendPaymentMessage. - * @member {proto.ISendPaymentMessage|null|undefined} sendPaymentMessage + * @member {proto.Message.ISendPaymentMessage|null|undefined} sendPaymentMessage * @memberof proto.Message * @instance */ @@ -34590,7 +17884,7 @@ $root.proto = (function() { /** * Message liveLocationMessage. - * @member {proto.ILiveLocationMessage|null|undefined} liveLocationMessage + * @member {proto.Message.ILiveLocationMessage|null|undefined} liveLocationMessage * @memberof proto.Message * @instance */ @@ -34598,7 +17892,7 @@ $root.proto = (function() { /** * Message requestPaymentMessage. - * @member {proto.IRequestPaymentMessage|null|undefined} requestPaymentMessage + * @member {proto.Message.IRequestPaymentMessage|null|undefined} requestPaymentMessage * @memberof proto.Message * @instance */ @@ -34606,7 +17900,7 @@ $root.proto = (function() { /** * Message declinePaymentRequestMessage. - * @member {proto.IDeclinePaymentRequestMessage|null|undefined} declinePaymentRequestMessage + * @member {proto.Message.IDeclinePaymentRequestMessage|null|undefined} declinePaymentRequestMessage * @memberof proto.Message * @instance */ @@ -34614,7 +17908,7 @@ $root.proto = (function() { /** * Message cancelPaymentRequestMessage. - * @member {proto.ICancelPaymentRequestMessage|null|undefined} cancelPaymentRequestMessage + * @member {proto.Message.ICancelPaymentRequestMessage|null|undefined} cancelPaymentRequestMessage * @memberof proto.Message * @instance */ @@ -34622,7 +17916,7 @@ $root.proto = (function() { /** * Message templateMessage. - * @member {proto.ITemplateMessage|null|undefined} templateMessage + * @member {proto.Message.ITemplateMessage|null|undefined} templateMessage * @memberof proto.Message * @instance */ @@ -34630,7 +17924,7 @@ $root.proto = (function() { /** * Message stickerMessage. - * @member {proto.IStickerMessage|null|undefined} stickerMessage + * @member {proto.Message.IStickerMessage|null|undefined} stickerMessage * @memberof proto.Message * @instance */ @@ -34638,7 +17932,7 @@ $root.proto = (function() { /** * Message groupInviteMessage. - * @member {proto.IGroupInviteMessage|null|undefined} groupInviteMessage + * @member {proto.Message.IGroupInviteMessage|null|undefined} groupInviteMessage * @memberof proto.Message * @instance */ @@ -34646,7 +17940,7 @@ $root.proto = (function() { /** * Message templateButtonReplyMessage. - * @member {proto.ITemplateButtonReplyMessage|null|undefined} templateButtonReplyMessage + * @member {proto.Message.ITemplateButtonReplyMessage|null|undefined} templateButtonReplyMessage * @memberof proto.Message * @instance */ @@ -34654,7 +17948,7 @@ $root.proto = (function() { /** * Message productMessage. - * @member {proto.IProductMessage|null|undefined} productMessage + * @member {proto.Message.IProductMessage|null|undefined} productMessage * @memberof proto.Message * @instance */ @@ -34662,7 +17956,7 @@ $root.proto = (function() { /** * Message deviceSentMessage. - * @member {proto.IDeviceSentMessage|null|undefined} deviceSentMessage + * @member {proto.Message.IDeviceSentMessage|null|undefined} deviceSentMessage * @memberof proto.Message * @instance */ @@ -34678,7 +17972,7 @@ $root.proto = (function() { /** * Message listMessage. - * @member {proto.IListMessage|null|undefined} listMessage + * @member {proto.Message.IListMessage|null|undefined} listMessage * @memberof proto.Message * @instance */ @@ -34686,7 +17980,7 @@ $root.proto = (function() { /** * Message viewOnceMessage. - * @member {proto.IFutureProofMessage|null|undefined} viewOnceMessage + * @member {proto.Message.IFutureProofMessage|null|undefined} viewOnceMessage * @memberof proto.Message * @instance */ @@ -34694,7 +17988,7 @@ $root.proto = (function() { /** * Message orderMessage. - * @member {proto.IOrderMessage|null|undefined} orderMessage + * @member {proto.Message.IOrderMessage|null|undefined} orderMessage * @memberof proto.Message * @instance */ @@ -34702,7 +17996,7 @@ $root.proto = (function() { /** * Message listResponseMessage. - * @member {proto.IListResponseMessage|null|undefined} listResponseMessage + * @member {proto.Message.IListResponseMessage|null|undefined} listResponseMessage * @memberof proto.Message * @instance */ @@ -34710,7 +18004,7 @@ $root.proto = (function() { /** * Message ephemeralMessage. - * @member {proto.IFutureProofMessage|null|undefined} ephemeralMessage + * @member {proto.Message.IFutureProofMessage|null|undefined} ephemeralMessage * @memberof proto.Message * @instance */ @@ -34718,7 +18012,7 @@ $root.proto = (function() { /** * Message invoiceMessage. - * @member {proto.IInvoiceMessage|null|undefined} invoiceMessage + * @member {proto.Message.IInvoiceMessage|null|undefined} invoiceMessage * @memberof proto.Message * @instance */ @@ -34726,7 +18020,7 @@ $root.proto = (function() { /** * Message buttonsMessage. - * @member {proto.IButtonsMessage|null|undefined} buttonsMessage + * @member {proto.Message.IButtonsMessage|null|undefined} buttonsMessage * @memberof proto.Message * @instance */ @@ -34734,7 +18028,7 @@ $root.proto = (function() { /** * Message buttonsResponseMessage. - * @member {proto.IButtonsResponseMessage|null|undefined} buttonsResponseMessage + * @member {proto.Message.IButtonsResponseMessage|null|undefined} buttonsResponseMessage * @memberof proto.Message * @instance */ @@ -34742,7 +18036,7 @@ $root.proto = (function() { /** * Message paymentInviteMessage. - * @member {proto.IPaymentInviteMessage|null|undefined} paymentInviteMessage + * @member {proto.Message.IPaymentInviteMessage|null|undefined} paymentInviteMessage * @memberof proto.Message * @instance */ @@ -34750,7 +18044,7 @@ $root.proto = (function() { /** * Message interactiveMessage. - * @member {proto.IInteractiveMessage|null|undefined} interactiveMessage + * @member {proto.Message.IInteractiveMessage|null|undefined} interactiveMessage * @memberof proto.Message * @instance */ @@ -34758,7 +18052,7 @@ $root.proto = (function() { /** * Message reactionMessage. - * @member {proto.IReactionMessage|null|undefined} reactionMessage + * @member {proto.Message.IReactionMessage|null|undefined} reactionMessage * @memberof proto.Message * @instance */ @@ -34766,7 +18060,7 @@ $root.proto = (function() { /** * Message stickerSyncRmrMessage. - * @member {proto.IStickerSyncRMRMessage|null|undefined} stickerSyncRmrMessage + * @member {proto.Message.IStickerSyncRMRMessage|null|undefined} stickerSyncRmrMessage * @memberof proto.Message * @instance */ @@ -34774,7 +18068,7 @@ $root.proto = (function() { /** * Message interactiveResponseMessage. - * @member {proto.IInteractiveResponseMessage|null|undefined} interactiveResponseMessage + * @member {proto.Message.IInteractiveResponseMessage|null|undefined} interactiveResponseMessage * @memberof proto.Message * @instance */ @@ -34782,7 +18076,7 @@ $root.proto = (function() { /** * Message pollCreationMessage. - * @member {proto.IPollCreationMessage|null|undefined} pollCreationMessage + * @member {proto.Message.IPollCreationMessage|null|undefined} pollCreationMessage * @memberof proto.Message * @instance */ @@ -34790,7 +18084,7 @@ $root.proto = (function() { /** * Message pollUpdateMessage. - * @member {proto.IPollUpdateMessage|null|undefined} pollUpdateMessage + * @member {proto.Message.IPollUpdateMessage|null|undefined} pollUpdateMessage * @memberof proto.Message * @instance */ @@ -34798,7 +18092,7 @@ $root.proto = (function() { /** * Message keepInChatMessage. - * @member {proto.IKeepInChatMessage|null|undefined} keepInChatMessage + * @member {proto.Message.IKeepInChatMessage|null|undefined} keepInChatMessage * @memberof proto.Message * @instance */ @@ -34806,12 +18100,28 @@ $root.proto = (function() { /** * Message documentWithCaptionMessage. - * @member {proto.IFutureProofMessage|null|undefined} documentWithCaptionMessage + * @member {proto.Message.IFutureProofMessage|null|undefined} documentWithCaptionMessage * @memberof proto.Message * @instance */ Message.prototype.documentWithCaptionMessage = null; + /** + * Message requestPhoneNumberMessage. + * @member {proto.Message.IRequestPhoneNumberMessage|null|undefined} requestPhoneNumberMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.requestPhoneNumberMessage = null; + + /** + * Message viewOnceMessageV2. + * @member {proto.Message.IFutureProofMessage|null|undefined} viewOnceMessageV2 + * @memberof proto.Message + * @instance + */ + Message.prototype.viewOnceMessageV2 = null; + /** * Creates a new Message instance using the specified properties. * @function create @@ -34839,91 +18149,95 @@ $root.proto = (function() { if (message.conversation != null && Object.hasOwnProperty.call(message, "conversation")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversation); if (message.senderKeyDistributionMessage != null && Object.hasOwnProperty.call(message, "senderKeyDistributionMessage")) - $root.proto.SenderKeyDistributionMessage.encode(message.senderKeyDistributionMessage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.proto.Message.SenderKeyDistributionMessage.encode(message.senderKeyDistributionMessage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.imageMessage != null && Object.hasOwnProperty.call(message, "imageMessage")) - $root.proto.ImageMessage.encode(message.imageMessage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.proto.Message.ImageMessage.encode(message.imageMessage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.contactMessage != null && Object.hasOwnProperty.call(message, "contactMessage")) - $root.proto.ContactMessage.encode(message.contactMessage, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.proto.Message.ContactMessage.encode(message.contactMessage, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.locationMessage != null && Object.hasOwnProperty.call(message, "locationMessage")) - $root.proto.LocationMessage.encode(message.locationMessage, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.proto.Message.LocationMessage.encode(message.locationMessage, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.extendedTextMessage != null && Object.hasOwnProperty.call(message, "extendedTextMessage")) - $root.proto.ExtendedTextMessage.encode(message.extendedTextMessage, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.proto.Message.ExtendedTextMessage.encode(message.extendedTextMessage, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.documentMessage != null && Object.hasOwnProperty.call(message, "documentMessage")) - $root.proto.DocumentMessage.encode(message.documentMessage, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.proto.Message.DocumentMessage.encode(message.documentMessage, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.audioMessage != null && Object.hasOwnProperty.call(message, "audioMessage")) - $root.proto.AudioMessage.encode(message.audioMessage, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + $root.proto.Message.AudioMessage.encode(message.audioMessage, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.videoMessage != null && Object.hasOwnProperty.call(message, "videoMessage")) - $root.proto.VideoMessage.encode(message.videoMessage, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + $root.proto.Message.VideoMessage.encode(message.videoMessage, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); if (message.call != null && Object.hasOwnProperty.call(message, "call")) - $root.proto.Call.encode(message.call, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + $root.proto.Message.Call.encode(message.call, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); if (message.chat != null && Object.hasOwnProperty.call(message, "chat")) - $root.proto.Chat.encode(message.chat, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + $root.proto.Message.Chat.encode(message.chat, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); if (message.protocolMessage != null && Object.hasOwnProperty.call(message, "protocolMessage")) - $root.proto.ProtocolMessage.encode(message.protocolMessage, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + $root.proto.Message.ProtocolMessage.encode(message.protocolMessage, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); if (message.contactsArrayMessage != null && Object.hasOwnProperty.call(message, "contactsArrayMessage")) - $root.proto.ContactsArrayMessage.encode(message.contactsArrayMessage, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + $root.proto.Message.ContactsArrayMessage.encode(message.contactsArrayMessage, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); if (message.highlyStructuredMessage != null && Object.hasOwnProperty.call(message, "highlyStructuredMessage")) - $root.proto.HighlyStructuredMessage.encode(message.highlyStructuredMessage, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + $root.proto.Message.HighlyStructuredMessage.encode(message.highlyStructuredMessage, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); if (message.fastRatchetKeySenderKeyDistributionMessage != null && Object.hasOwnProperty.call(message, "fastRatchetKeySenderKeyDistributionMessage")) - $root.proto.SenderKeyDistributionMessage.encode(message.fastRatchetKeySenderKeyDistributionMessage, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + $root.proto.Message.SenderKeyDistributionMessage.encode(message.fastRatchetKeySenderKeyDistributionMessage, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); if (message.sendPaymentMessage != null && Object.hasOwnProperty.call(message, "sendPaymentMessage")) - $root.proto.SendPaymentMessage.encode(message.sendPaymentMessage, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + $root.proto.Message.SendPaymentMessage.encode(message.sendPaymentMessage, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); if (message.liveLocationMessage != null && Object.hasOwnProperty.call(message, "liveLocationMessage")) - $root.proto.LiveLocationMessage.encode(message.liveLocationMessage, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + $root.proto.Message.LiveLocationMessage.encode(message.liveLocationMessage, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); if (message.requestPaymentMessage != null && Object.hasOwnProperty.call(message, "requestPaymentMessage")) - $root.proto.RequestPaymentMessage.encode(message.requestPaymentMessage, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + $root.proto.Message.RequestPaymentMessage.encode(message.requestPaymentMessage, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); if (message.declinePaymentRequestMessage != null && Object.hasOwnProperty.call(message, "declinePaymentRequestMessage")) - $root.proto.DeclinePaymentRequestMessage.encode(message.declinePaymentRequestMessage, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + $root.proto.Message.DeclinePaymentRequestMessage.encode(message.declinePaymentRequestMessage, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); if (message.cancelPaymentRequestMessage != null && Object.hasOwnProperty.call(message, "cancelPaymentRequestMessage")) - $root.proto.CancelPaymentRequestMessage.encode(message.cancelPaymentRequestMessage, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + $root.proto.Message.CancelPaymentRequestMessage.encode(message.cancelPaymentRequestMessage, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); if (message.templateMessage != null && Object.hasOwnProperty.call(message, "templateMessage")) - $root.proto.TemplateMessage.encode(message.templateMessage, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + $root.proto.Message.TemplateMessage.encode(message.templateMessage, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); if (message.stickerMessage != null && Object.hasOwnProperty.call(message, "stickerMessage")) - $root.proto.StickerMessage.encode(message.stickerMessage, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + $root.proto.Message.StickerMessage.encode(message.stickerMessage, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); if (message.groupInviteMessage != null && Object.hasOwnProperty.call(message, "groupInviteMessage")) - $root.proto.GroupInviteMessage.encode(message.groupInviteMessage, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + $root.proto.Message.GroupInviteMessage.encode(message.groupInviteMessage, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); if (message.templateButtonReplyMessage != null && Object.hasOwnProperty.call(message, "templateButtonReplyMessage")) - $root.proto.TemplateButtonReplyMessage.encode(message.templateButtonReplyMessage, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); + $root.proto.Message.TemplateButtonReplyMessage.encode(message.templateButtonReplyMessage, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); if (message.productMessage != null && Object.hasOwnProperty.call(message, "productMessage")) - $root.proto.ProductMessage.encode(message.productMessage, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); + $root.proto.Message.ProductMessage.encode(message.productMessage, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); if (message.deviceSentMessage != null && Object.hasOwnProperty.call(message, "deviceSentMessage")) - $root.proto.DeviceSentMessage.encode(message.deviceSentMessage, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); + $root.proto.Message.DeviceSentMessage.encode(message.deviceSentMessage, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); if (message.messageContextInfo != null && Object.hasOwnProperty.call(message, "messageContextInfo")) $root.proto.MessageContextInfo.encode(message.messageContextInfo, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); if (message.listMessage != null && Object.hasOwnProperty.call(message, "listMessage")) - $root.proto.ListMessage.encode(message.listMessage, writer.uint32(/* id 36, wireType 2 =*/290).fork()).ldelim(); + $root.proto.Message.ListMessage.encode(message.listMessage, writer.uint32(/* id 36, wireType 2 =*/290).fork()).ldelim(); if (message.viewOnceMessage != null && Object.hasOwnProperty.call(message, "viewOnceMessage")) - $root.proto.FutureProofMessage.encode(message.viewOnceMessage, writer.uint32(/* id 37, wireType 2 =*/298).fork()).ldelim(); + $root.proto.Message.FutureProofMessage.encode(message.viewOnceMessage, writer.uint32(/* id 37, wireType 2 =*/298).fork()).ldelim(); if (message.orderMessage != null && Object.hasOwnProperty.call(message, "orderMessage")) - $root.proto.OrderMessage.encode(message.orderMessage, writer.uint32(/* id 38, wireType 2 =*/306).fork()).ldelim(); + $root.proto.Message.OrderMessage.encode(message.orderMessage, writer.uint32(/* id 38, wireType 2 =*/306).fork()).ldelim(); if (message.listResponseMessage != null && Object.hasOwnProperty.call(message, "listResponseMessage")) - $root.proto.ListResponseMessage.encode(message.listResponseMessage, writer.uint32(/* id 39, wireType 2 =*/314).fork()).ldelim(); + $root.proto.Message.ListResponseMessage.encode(message.listResponseMessage, writer.uint32(/* id 39, wireType 2 =*/314).fork()).ldelim(); if (message.ephemeralMessage != null && Object.hasOwnProperty.call(message, "ephemeralMessage")) - $root.proto.FutureProofMessage.encode(message.ephemeralMessage, writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim(); + $root.proto.Message.FutureProofMessage.encode(message.ephemeralMessage, writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim(); if (message.invoiceMessage != null && Object.hasOwnProperty.call(message, "invoiceMessage")) - $root.proto.InvoiceMessage.encode(message.invoiceMessage, writer.uint32(/* id 41, wireType 2 =*/330).fork()).ldelim(); + $root.proto.Message.InvoiceMessage.encode(message.invoiceMessage, writer.uint32(/* id 41, wireType 2 =*/330).fork()).ldelim(); if (message.buttonsMessage != null && Object.hasOwnProperty.call(message, "buttonsMessage")) - $root.proto.ButtonsMessage.encode(message.buttonsMessage, writer.uint32(/* id 42, wireType 2 =*/338).fork()).ldelim(); + $root.proto.Message.ButtonsMessage.encode(message.buttonsMessage, writer.uint32(/* id 42, wireType 2 =*/338).fork()).ldelim(); if (message.buttonsResponseMessage != null && Object.hasOwnProperty.call(message, "buttonsResponseMessage")) - $root.proto.ButtonsResponseMessage.encode(message.buttonsResponseMessage, writer.uint32(/* id 43, wireType 2 =*/346).fork()).ldelim(); + $root.proto.Message.ButtonsResponseMessage.encode(message.buttonsResponseMessage, writer.uint32(/* id 43, wireType 2 =*/346).fork()).ldelim(); if (message.paymentInviteMessage != null && Object.hasOwnProperty.call(message, "paymentInviteMessage")) - $root.proto.PaymentInviteMessage.encode(message.paymentInviteMessage, writer.uint32(/* id 44, wireType 2 =*/354).fork()).ldelim(); + $root.proto.Message.PaymentInviteMessage.encode(message.paymentInviteMessage, writer.uint32(/* id 44, wireType 2 =*/354).fork()).ldelim(); if (message.interactiveMessage != null && Object.hasOwnProperty.call(message, "interactiveMessage")) - $root.proto.InteractiveMessage.encode(message.interactiveMessage, writer.uint32(/* id 45, wireType 2 =*/362).fork()).ldelim(); + $root.proto.Message.InteractiveMessage.encode(message.interactiveMessage, writer.uint32(/* id 45, wireType 2 =*/362).fork()).ldelim(); if (message.reactionMessage != null && Object.hasOwnProperty.call(message, "reactionMessage")) - $root.proto.ReactionMessage.encode(message.reactionMessage, writer.uint32(/* id 46, wireType 2 =*/370).fork()).ldelim(); + $root.proto.Message.ReactionMessage.encode(message.reactionMessage, writer.uint32(/* id 46, wireType 2 =*/370).fork()).ldelim(); if (message.stickerSyncRmrMessage != null && Object.hasOwnProperty.call(message, "stickerSyncRmrMessage")) - $root.proto.StickerSyncRMRMessage.encode(message.stickerSyncRmrMessage, writer.uint32(/* id 47, wireType 2 =*/378).fork()).ldelim(); + $root.proto.Message.StickerSyncRMRMessage.encode(message.stickerSyncRmrMessage, writer.uint32(/* id 47, wireType 2 =*/378).fork()).ldelim(); if (message.interactiveResponseMessage != null && Object.hasOwnProperty.call(message, "interactiveResponseMessage")) - $root.proto.InteractiveResponseMessage.encode(message.interactiveResponseMessage, writer.uint32(/* id 48, wireType 2 =*/386).fork()).ldelim(); + $root.proto.Message.InteractiveResponseMessage.encode(message.interactiveResponseMessage, writer.uint32(/* id 48, wireType 2 =*/386).fork()).ldelim(); if (message.pollCreationMessage != null && Object.hasOwnProperty.call(message, "pollCreationMessage")) - $root.proto.PollCreationMessage.encode(message.pollCreationMessage, writer.uint32(/* id 49, wireType 2 =*/394).fork()).ldelim(); + $root.proto.Message.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(); + $root.proto.Message.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(); + $root.proto.Message.KeepInChatMessage.encode(message.keepInChatMessage, writer.uint32(/* id 51, wireType 2 =*/410).fork()).ldelim(); if (message.documentWithCaptionMessage != null && Object.hasOwnProperty.call(message, "documentWithCaptionMessage")) - $root.proto.FutureProofMessage.encode(message.documentWithCaptionMessage, writer.uint32(/* id 52, wireType 2 =*/418).fork()).ldelim(); + $root.proto.Message.FutureProofMessage.encode(message.documentWithCaptionMessage, writer.uint32(/* id 53, wireType 2 =*/426).fork()).ldelim(); + if (message.requestPhoneNumberMessage != null && Object.hasOwnProperty.call(message, "requestPhoneNumberMessage")) + $root.proto.Message.RequestPhoneNumberMessage.encode(message.requestPhoneNumberMessage, writer.uint32(/* id 54, wireType 2 =*/434).fork()).ldelim(); + if (message.viewOnceMessageV2 != null && Object.hasOwnProperty.call(message, "viewOnceMessageV2")) + $root.proto.Message.FutureProofMessage.encode(message.viewOnceMessageV2, writer.uint32(/* id 55, wireType 2 =*/442).fork()).ldelim(); return writer; }; @@ -34962,133 +18276,139 @@ $root.proto = (function() { message.conversation = reader.string(); break; case 2: - message.senderKeyDistributionMessage = $root.proto.SenderKeyDistributionMessage.decode(reader, reader.uint32()); + message.senderKeyDistributionMessage = $root.proto.Message.SenderKeyDistributionMessage.decode(reader, reader.uint32()); break; case 3: - message.imageMessage = $root.proto.ImageMessage.decode(reader, reader.uint32()); + message.imageMessage = $root.proto.Message.ImageMessage.decode(reader, reader.uint32()); break; case 4: - message.contactMessage = $root.proto.ContactMessage.decode(reader, reader.uint32()); + message.contactMessage = $root.proto.Message.ContactMessage.decode(reader, reader.uint32()); break; case 5: - message.locationMessage = $root.proto.LocationMessage.decode(reader, reader.uint32()); + message.locationMessage = $root.proto.Message.LocationMessage.decode(reader, reader.uint32()); break; case 6: - message.extendedTextMessage = $root.proto.ExtendedTextMessage.decode(reader, reader.uint32()); + message.extendedTextMessage = $root.proto.Message.ExtendedTextMessage.decode(reader, reader.uint32()); break; case 7: - message.documentMessage = $root.proto.DocumentMessage.decode(reader, reader.uint32()); + message.documentMessage = $root.proto.Message.DocumentMessage.decode(reader, reader.uint32()); break; case 8: - message.audioMessage = $root.proto.AudioMessage.decode(reader, reader.uint32()); + message.audioMessage = $root.proto.Message.AudioMessage.decode(reader, reader.uint32()); break; case 9: - message.videoMessage = $root.proto.VideoMessage.decode(reader, reader.uint32()); + message.videoMessage = $root.proto.Message.VideoMessage.decode(reader, reader.uint32()); break; case 10: - message.call = $root.proto.Call.decode(reader, reader.uint32()); + message.call = $root.proto.Message.Call.decode(reader, reader.uint32()); break; case 11: - message.chat = $root.proto.Chat.decode(reader, reader.uint32()); + message.chat = $root.proto.Message.Chat.decode(reader, reader.uint32()); break; case 12: - message.protocolMessage = $root.proto.ProtocolMessage.decode(reader, reader.uint32()); + message.protocolMessage = $root.proto.Message.ProtocolMessage.decode(reader, reader.uint32()); break; case 13: - message.contactsArrayMessage = $root.proto.ContactsArrayMessage.decode(reader, reader.uint32()); + message.contactsArrayMessage = $root.proto.Message.ContactsArrayMessage.decode(reader, reader.uint32()); break; case 14: - message.highlyStructuredMessage = $root.proto.HighlyStructuredMessage.decode(reader, reader.uint32()); + message.highlyStructuredMessage = $root.proto.Message.HighlyStructuredMessage.decode(reader, reader.uint32()); break; case 15: - message.fastRatchetKeySenderKeyDistributionMessage = $root.proto.SenderKeyDistributionMessage.decode(reader, reader.uint32()); + message.fastRatchetKeySenderKeyDistributionMessage = $root.proto.Message.SenderKeyDistributionMessage.decode(reader, reader.uint32()); break; case 16: - message.sendPaymentMessage = $root.proto.SendPaymentMessage.decode(reader, reader.uint32()); + message.sendPaymentMessage = $root.proto.Message.SendPaymentMessage.decode(reader, reader.uint32()); break; case 18: - message.liveLocationMessage = $root.proto.LiveLocationMessage.decode(reader, reader.uint32()); + message.liveLocationMessage = $root.proto.Message.LiveLocationMessage.decode(reader, reader.uint32()); break; case 22: - message.requestPaymentMessage = $root.proto.RequestPaymentMessage.decode(reader, reader.uint32()); + message.requestPaymentMessage = $root.proto.Message.RequestPaymentMessage.decode(reader, reader.uint32()); break; case 23: - message.declinePaymentRequestMessage = $root.proto.DeclinePaymentRequestMessage.decode(reader, reader.uint32()); + message.declinePaymentRequestMessage = $root.proto.Message.DeclinePaymentRequestMessage.decode(reader, reader.uint32()); break; case 24: - message.cancelPaymentRequestMessage = $root.proto.CancelPaymentRequestMessage.decode(reader, reader.uint32()); + message.cancelPaymentRequestMessage = $root.proto.Message.CancelPaymentRequestMessage.decode(reader, reader.uint32()); break; case 25: - message.templateMessage = $root.proto.TemplateMessage.decode(reader, reader.uint32()); + message.templateMessage = $root.proto.Message.TemplateMessage.decode(reader, reader.uint32()); break; case 26: - message.stickerMessage = $root.proto.StickerMessage.decode(reader, reader.uint32()); + message.stickerMessage = $root.proto.Message.StickerMessage.decode(reader, reader.uint32()); break; case 28: - message.groupInviteMessage = $root.proto.GroupInviteMessage.decode(reader, reader.uint32()); + message.groupInviteMessage = $root.proto.Message.GroupInviteMessage.decode(reader, reader.uint32()); break; case 29: - message.templateButtonReplyMessage = $root.proto.TemplateButtonReplyMessage.decode(reader, reader.uint32()); + message.templateButtonReplyMessage = $root.proto.Message.TemplateButtonReplyMessage.decode(reader, reader.uint32()); break; case 30: - message.productMessage = $root.proto.ProductMessage.decode(reader, reader.uint32()); + message.productMessage = $root.proto.Message.ProductMessage.decode(reader, reader.uint32()); break; case 31: - message.deviceSentMessage = $root.proto.DeviceSentMessage.decode(reader, reader.uint32()); + message.deviceSentMessage = $root.proto.Message.DeviceSentMessage.decode(reader, reader.uint32()); break; case 35: message.messageContextInfo = $root.proto.MessageContextInfo.decode(reader, reader.uint32()); break; case 36: - message.listMessage = $root.proto.ListMessage.decode(reader, reader.uint32()); + message.listMessage = $root.proto.Message.ListMessage.decode(reader, reader.uint32()); break; case 37: - message.viewOnceMessage = $root.proto.FutureProofMessage.decode(reader, reader.uint32()); + message.viewOnceMessage = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); break; case 38: - message.orderMessage = $root.proto.OrderMessage.decode(reader, reader.uint32()); + message.orderMessage = $root.proto.Message.OrderMessage.decode(reader, reader.uint32()); break; case 39: - message.listResponseMessage = $root.proto.ListResponseMessage.decode(reader, reader.uint32()); + message.listResponseMessage = $root.proto.Message.ListResponseMessage.decode(reader, reader.uint32()); break; case 40: - message.ephemeralMessage = $root.proto.FutureProofMessage.decode(reader, reader.uint32()); + message.ephemeralMessage = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); break; case 41: - message.invoiceMessage = $root.proto.InvoiceMessage.decode(reader, reader.uint32()); + message.invoiceMessage = $root.proto.Message.InvoiceMessage.decode(reader, reader.uint32()); break; case 42: - message.buttonsMessage = $root.proto.ButtonsMessage.decode(reader, reader.uint32()); + message.buttonsMessage = $root.proto.Message.ButtonsMessage.decode(reader, reader.uint32()); break; case 43: - message.buttonsResponseMessage = $root.proto.ButtonsResponseMessage.decode(reader, reader.uint32()); + message.buttonsResponseMessage = $root.proto.Message.ButtonsResponseMessage.decode(reader, reader.uint32()); break; case 44: - message.paymentInviteMessage = $root.proto.PaymentInviteMessage.decode(reader, reader.uint32()); + message.paymentInviteMessage = $root.proto.Message.PaymentInviteMessage.decode(reader, reader.uint32()); break; case 45: - message.interactiveMessage = $root.proto.InteractiveMessage.decode(reader, reader.uint32()); + message.interactiveMessage = $root.proto.Message.InteractiveMessage.decode(reader, reader.uint32()); break; case 46: - message.reactionMessage = $root.proto.ReactionMessage.decode(reader, reader.uint32()); + message.reactionMessage = $root.proto.Message.ReactionMessage.decode(reader, reader.uint32()); break; case 47: - message.stickerSyncRmrMessage = $root.proto.StickerSyncRMRMessage.decode(reader, reader.uint32()); + message.stickerSyncRmrMessage = $root.proto.Message.StickerSyncRMRMessage.decode(reader, reader.uint32()); break; case 48: - message.interactiveResponseMessage = $root.proto.InteractiveResponseMessage.decode(reader, reader.uint32()); + message.interactiveResponseMessage = $root.proto.Message.InteractiveResponseMessage.decode(reader, reader.uint32()); break; case 49: - message.pollCreationMessage = $root.proto.PollCreationMessage.decode(reader, reader.uint32()); + message.pollCreationMessage = $root.proto.Message.PollCreationMessage.decode(reader, reader.uint32()); break; case 50: - message.pollUpdateMessage = $root.proto.PollUpdateMessage.decode(reader, reader.uint32()); + message.pollUpdateMessage = $root.proto.Message.PollUpdateMessage.decode(reader, reader.uint32()); break; case 51: - message.keepInChatMessage = $root.proto.KeepInChatMessage.decode(reader, reader.uint32()); + message.keepInChatMessage = $root.proto.Message.KeepInChatMessage.decode(reader, reader.uint32()); break; - case 52: - message.documentWithCaptionMessage = $root.proto.FutureProofMessage.decode(reader, reader.uint32()); + case 53: + message.documentWithCaptionMessage = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); + break; + case 54: + message.requestPhoneNumberMessage = $root.proto.Message.RequestPhoneNumberMessage.decode(reader, reader.uint32()); + break; + case 55: + message.viewOnceMessageV2 = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -35129,127 +18449,127 @@ $root.proto = (function() { if (!$util.isString(message.conversation)) return "conversation: string expected"; if (message.senderKeyDistributionMessage != null && message.hasOwnProperty("senderKeyDistributionMessage")) { - var error = $root.proto.SenderKeyDistributionMessage.verify(message.senderKeyDistributionMessage); + var error = $root.proto.Message.SenderKeyDistributionMessage.verify(message.senderKeyDistributionMessage); if (error) return "senderKeyDistributionMessage." + error; } if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) { - var error = $root.proto.ImageMessage.verify(message.imageMessage); + var error = $root.proto.Message.ImageMessage.verify(message.imageMessage); if (error) return "imageMessage." + error; } if (message.contactMessage != null && message.hasOwnProperty("contactMessage")) { - var error = $root.proto.ContactMessage.verify(message.contactMessage); + var error = $root.proto.Message.ContactMessage.verify(message.contactMessage); if (error) return "contactMessage." + error; } if (message.locationMessage != null && message.hasOwnProperty("locationMessage")) { - var error = $root.proto.LocationMessage.verify(message.locationMessage); + var error = $root.proto.Message.LocationMessage.verify(message.locationMessage); if (error) return "locationMessage." + error; } if (message.extendedTextMessage != null && message.hasOwnProperty("extendedTextMessage")) { - var error = $root.proto.ExtendedTextMessage.verify(message.extendedTextMessage); + var error = $root.proto.Message.ExtendedTextMessage.verify(message.extendedTextMessage); if (error) return "extendedTextMessage." + error; } if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) { - var error = $root.proto.DocumentMessage.verify(message.documentMessage); + var error = $root.proto.Message.DocumentMessage.verify(message.documentMessage); if (error) return "documentMessage." + error; } if (message.audioMessage != null && message.hasOwnProperty("audioMessage")) { - var error = $root.proto.AudioMessage.verify(message.audioMessage); + var error = $root.proto.Message.AudioMessage.verify(message.audioMessage); if (error) return "audioMessage." + error; } if (message.videoMessage != null && message.hasOwnProperty("videoMessage")) { - var error = $root.proto.VideoMessage.verify(message.videoMessage); + var error = $root.proto.Message.VideoMessage.verify(message.videoMessage); if (error) return "videoMessage." + error; } if (message.call != null && message.hasOwnProperty("call")) { - var error = $root.proto.Call.verify(message.call); + var error = $root.proto.Message.Call.verify(message.call); if (error) return "call." + error; } if (message.chat != null && message.hasOwnProperty("chat")) { - var error = $root.proto.Chat.verify(message.chat); + var error = $root.proto.Message.Chat.verify(message.chat); if (error) return "chat." + error; } if (message.protocolMessage != null && message.hasOwnProperty("protocolMessage")) { - var error = $root.proto.ProtocolMessage.verify(message.protocolMessage); + var error = $root.proto.Message.ProtocolMessage.verify(message.protocolMessage); if (error) return "protocolMessage." + error; } if (message.contactsArrayMessage != null && message.hasOwnProperty("contactsArrayMessage")) { - var error = $root.proto.ContactsArrayMessage.verify(message.contactsArrayMessage); + var error = $root.proto.Message.ContactsArrayMessage.verify(message.contactsArrayMessage); if (error) return "contactsArrayMessage." + error; } if (message.highlyStructuredMessage != null && message.hasOwnProperty("highlyStructuredMessage")) { - var error = $root.proto.HighlyStructuredMessage.verify(message.highlyStructuredMessage); + var error = $root.proto.Message.HighlyStructuredMessage.verify(message.highlyStructuredMessage); if (error) return "highlyStructuredMessage." + error; } if (message.fastRatchetKeySenderKeyDistributionMessage != null && message.hasOwnProperty("fastRatchetKeySenderKeyDistributionMessage")) { - var error = $root.proto.SenderKeyDistributionMessage.verify(message.fastRatchetKeySenderKeyDistributionMessage); + var error = $root.proto.Message.SenderKeyDistributionMessage.verify(message.fastRatchetKeySenderKeyDistributionMessage); if (error) return "fastRatchetKeySenderKeyDistributionMessage." + error; } if (message.sendPaymentMessage != null && message.hasOwnProperty("sendPaymentMessage")) { - var error = $root.proto.SendPaymentMessage.verify(message.sendPaymentMessage); + var error = $root.proto.Message.SendPaymentMessage.verify(message.sendPaymentMessage); if (error) return "sendPaymentMessage." + error; } if (message.liveLocationMessage != null && message.hasOwnProperty("liveLocationMessage")) { - var error = $root.proto.LiveLocationMessage.verify(message.liveLocationMessage); + var error = $root.proto.Message.LiveLocationMessage.verify(message.liveLocationMessage); if (error) return "liveLocationMessage." + error; } if (message.requestPaymentMessage != null && message.hasOwnProperty("requestPaymentMessage")) { - var error = $root.proto.RequestPaymentMessage.verify(message.requestPaymentMessage); + var error = $root.proto.Message.RequestPaymentMessage.verify(message.requestPaymentMessage); if (error) return "requestPaymentMessage." + error; } if (message.declinePaymentRequestMessage != null && message.hasOwnProperty("declinePaymentRequestMessage")) { - var error = $root.proto.DeclinePaymentRequestMessage.verify(message.declinePaymentRequestMessage); + var error = $root.proto.Message.DeclinePaymentRequestMessage.verify(message.declinePaymentRequestMessage); if (error) return "declinePaymentRequestMessage." + error; } if (message.cancelPaymentRequestMessage != null && message.hasOwnProperty("cancelPaymentRequestMessage")) { - var error = $root.proto.CancelPaymentRequestMessage.verify(message.cancelPaymentRequestMessage); + var error = $root.proto.Message.CancelPaymentRequestMessage.verify(message.cancelPaymentRequestMessage); if (error) return "cancelPaymentRequestMessage." + error; } if (message.templateMessage != null && message.hasOwnProperty("templateMessage")) { - var error = $root.proto.TemplateMessage.verify(message.templateMessage); + var error = $root.proto.Message.TemplateMessage.verify(message.templateMessage); if (error) return "templateMessage." + error; } if (message.stickerMessage != null && message.hasOwnProperty("stickerMessage")) { - var error = $root.proto.StickerMessage.verify(message.stickerMessage); + var error = $root.proto.Message.StickerMessage.verify(message.stickerMessage); if (error) return "stickerMessage." + error; } if (message.groupInviteMessage != null && message.hasOwnProperty("groupInviteMessage")) { - var error = $root.proto.GroupInviteMessage.verify(message.groupInviteMessage); + var error = $root.proto.Message.GroupInviteMessage.verify(message.groupInviteMessage); if (error) return "groupInviteMessage." + error; } if (message.templateButtonReplyMessage != null && message.hasOwnProperty("templateButtonReplyMessage")) { - var error = $root.proto.TemplateButtonReplyMessage.verify(message.templateButtonReplyMessage); + var error = $root.proto.Message.TemplateButtonReplyMessage.verify(message.templateButtonReplyMessage); if (error) return "templateButtonReplyMessage." + error; } if (message.productMessage != null && message.hasOwnProperty("productMessage")) { - var error = $root.proto.ProductMessage.verify(message.productMessage); + var error = $root.proto.Message.ProductMessage.verify(message.productMessage); if (error) return "productMessage." + error; } if (message.deviceSentMessage != null && message.hasOwnProperty("deviceSentMessage")) { - var error = $root.proto.DeviceSentMessage.verify(message.deviceSentMessage); + var error = $root.proto.Message.DeviceSentMessage.verify(message.deviceSentMessage); if (error) return "deviceSentMessage." + error; } @@ -35259,90 +18579,100 @@ $root.proto = (function() { return "messageContextInfo." + error; } if (message.listMessage != null && message.hasOwnProperty("listMessage")) { - var error = $root.proto.ListMessage.verify(message.listMessage); + var error = $root.proto.Message.ListMessage.verify(message.listMessage); if (error) return "listMessage." + error; } if (message.viewOnceMessage != null && message.hasOwnProperty("viewOnceMessage")) { - var error = $root.proto.FutureProofMessage.verify(message.viewOnceMessage); + var error = $root.proto.Message.FutureProofMessage.verify(message.viewOnceMessage); if (error) return "viewOnceMessage." + error; } if (message.orderMessage != null && message.hasOwnProperty("orderMessage")) { - var error = $root.proto.OrderMessage.verify(message.orderMessage); + var error = $root.proto.Message.OrderMessage.verify(message.orderMessage); if (error) return "orderMessage." + error; } if (message.listResponseMessage != null && message.hasOwnProperty("listResponseMessage")) { - var error = $root.proto.ListResponseMessage.verify(message.listResponseMessage); + var error = $root.proto.Message.ListResponseMessage.verify(message.listResponseMessage); if (error) return "listResponseMessage." + error; } if (message.ephemeralMessage != null && message.hasOwnProperty("ephemeralMessage")) { - var error = $root.proto.FutureProofMessage.verify(message.ephemeralMessage); + var error = $root.proto.Message.FutureProofMessage.verify(message.ephemeralMessage); if (error) return "ephemeralMessage." + error; } if (message.invoiceMessage != null && message.hasOwnProperty("invoiceMessage")) { - var error = $root.proto.InvoiceMessage.verify(message.invoiceMessage); + var error = $root.proto.Message.InvoiceMessage.verify(message.invoiceMessage); if (error) return "invoiceMessage." + error; } if (message.buttonsMessage != null && message.hasOwnProperty("buttonsMessage")) { - var error = $root.proto.ButtonsMessage.verify(message.buttonsMessage); + var error = $root.proto.Message.ButtonsMessage.verify(message.buttonsMessage); if (error) return "buttonsMessage." + error; } if (message.buttonsResponseMessage != null && message.hasOwnProperty("buttonsResponseMessage")) { - var error = $root.proto.ButtonsResponseMessage.verify(message.buttonsResponseMessage); + var error = $root.proto.Message.ButtonsResponseMessage.verify(message.buttonsResponseMessage); if (error) return "buttonsResponseMessage." + error; } if (message.paymentInviteMessage != null && message.hasOwnProperty("paymentInviteMessage")) { - var error = $root.proto.PaymentInviteMessage.verify(message.paymentInviteMessage); + var error = $root.proto.Message.PaymentInviteMessage.verify(message.paymentInviteMessage); if (error) return "paymentInviteMessage." + error; } if (message.interactiveMessage != null && message.hasOwnProperty("interactiveMessage")) { - var error = $root.proto.InteractiveMessage.verify(message.interactiveMessage); + var error = $root.proto.Message.InteractiveMessage.verify(message.interactiveMessage); if (error) return "interactiveMessage." + error; } if (message.reactionMessage != null && message.hasOwnProperty("reactionMessage")) { - var error = $root.proto.ReactionMessage.verify(message.reactionMessage); + var error = $root.proto.Message.ReactionMessage.verify(message.reactionMessage); if (error) return "reactionMessage." + error; } if (message.stickerSyncRmrMessage != null && message.hasOwnProperty("stickerSyncRmrMessage")) { - var error = $root.proto.StickerSyncRMRMessage.verify(message.stickerSyncRmrMessage); + var error = $root.proto.Message.StickerSyncRMRMessage.verify(message.stickerSyncRmrMessage); if (error) return "stickerSyncRmrMessage." + error; } if (message.interactiveResponseMessage != null && message.hasOwnProperty("interactiveResponseMessage")) { - var error = $root.proto.InteractiveResponseMessage.verify(message.interactiveResponseMessage); + var error = $root.proto.Message.InteractiveResponseMessage.verify(message.interactiveResponseMessage); if (error) return "interactiveResponseMessage." + error; } if (message.pollCreationMessage != null && message.hasOwnProperty("pollCreationMessage")) { - var error = $root.proto.PollCreationMessage.verify(message.pollCreationMessage); + var error = $root.proto.Message.PollCreationMessage.verify(message.pollCreationMessage); if (error) return "pollCreationMessage." + error; } if (message.pollUpdateMessage != null && message.hasOwnProperty("pollUpdateMessage")) { - var error = $root.proto.PollUpdateMessage.verify(message.pollUpdateMessage); + var error = $root.proto.Message.PollUpdateMessage.verify(message.pollUpdateMessage); if (error) return "pollUpdateMessage." + error; } if (message.keepInChatMessage != null && message.hasOwnProperty("keepInChatMessage")) { - var error = $root.proto.KeepInChatMessage.verify(message.keepInChatMessage); + var error = $root.proto.Message.KeepInChatMessage.verify(message.keepInChatMessage); if (error) return "keepInChatMessage." + error; } if (message.documentWithCaptionMessage != null && message.hasOwnProperty("documentWithCaptionMessage")) { - var error = $root.proto.FutureProofMessage.verify(message.documentWithCaptionMessage); + var error = $root.proto.Message.FutureProofMessage.verify(message.documentWithCaptionMessage); if (error) return "documentWithCaptionMessage." + error; } + if (message.requestPhoneNumberMessage != null && message.hasOwnProperty("requestPhoneNumberMessage")) { + var error = $root.proto.Message.RequestPhoneNumberMessage.verify(message.requestPhoneNumberMessage); + if (error) + return "requestPhoneNumberMessage." + error; + } + if (message.viewOnceMessageV2 != null && message.hasOwnProperty("viewOnceMessageV2")) { + var error = $root.proto.Message.FutureProofMessage.verify(message.viewOnceMessageV2); + if (error) + return "viewOnceMessageV2." + error; + } return null; }; @@ -35363,127 +18693,127 @@ $root.proto = (function() { if (object.senderKeyDistributionMessage != null) { if (typeof object.senderKeyDistributionMessage !== "object") throw TypeError(".proto.Message.senderKeyDistributionMessage: object expected"); - message.senderKeyDistributionMessage = $root.proto.SenderKeyDistributionMessage.fromObject(object.senderKeyDistributionMessage); + message.senderKeyDistributionMessage = $root.proto.Message.SenderKeyDistributionMessage.fromObject(object.senderKeyDistributionMessage); } if (object.imageMessage != null) { if (typeof object.imageMessage !== "object") throw TypeError(".proto.Message.imageMessage: object expected"); - message.imageMessage = $root.proto.ImageMessage.fromObject(object.imageMessage); + message.imageMessage = $root.proto.Message.ImageMessage.fromObject(object.imageMessage); } if (object.contactMessage != null) { if (typeof object.contactMessage !== "object") throw TypeError(".proto.Message.contactMessage: object expected"); - message.contactMessage = $root.proto.ContactMessage.fromObject(object.contactMessage); + message.contactMessage = $root.proto.Message.ContactMessage.fromObject(object.contactMessage); } if (object.locationMessage != null) { if (typeof object.locationMessage !== "object") throw TypeError(".proto.Message.locationMessage: object expected"); - message.locationMessage = $root.proto.LocationMessage.fromObject(object.locationMessage); + message.locationMessage = $root.proto.Message.LocationMessage.fromObject(object.locationMessage); } if (object.extendedTextMessage != null) { if (typeof object.extendedTextMessage !== "object") throw TypeError(".proto.Message.extendedTextMessage: object expected"); - message.extendedTextMessage = $root.proto.ExtendedTextMessage.fromObject(object.extendedTextMessage); + message.extendedTextMessage = $root.proto.Message.ExtendedTextMessage.fromObject(object.extendedTextMessage); } if (object.documentMessage != null) { if (typeof object.documentMessage !== "object") throw TypeError(".proto.Message.documentMessage: object expected"); - message.documentMessage = $root.proto.DocumentMessage.fromObject(object.documentMessage); + message.documentMessage = $root.proto.Message.DocumentMessage.fromObject(object.documentMessage); } if (object.audioMessage != null) { if (typeof object.audioMessage !== "object") throw TypeError(".proto.Message.audioMessage: object expected"); - message.audioMessage = $root.proto.AudioMessage.fromObject(object.audioMessage); + message.audioMessage = $root.proto.Message.AudioMessage.fromObject(object.audioMessage); } if (object.videoMessage != null) { if (typeof object.videoMessage !== "object") throw TypeError(".proto.Message.videoMessage: object expected"); - message.videoMessage = $root.proto.VideoMessage.fromObject(object.videoMessage); + message.videoMessage = $root.proto.Message.VideoMessage.fromObject(object.videoMessage); } if (object.call != null) { if (typeof object.call !== "object") throw TypeError(".proto.Message.call: object expected"); - message.call = $root.proto.Call.fromObject(object.call); + message.call = $root.proto.Message.Call.fromObject(object.call); } if (object.chat != null) { if (typeof object.chat !== "object") throw TypeError(".proto.Message.chat: object expected"); - message.chat = $root.proto.Chat.fromObject(object.chat); + message.chat = $root.proto.Message.Chat.fromObject(object.chat); } if (object.protocolMessage != null) { if (typeof object.protocolMessage !== "object") throw TypeError(".proto.Message.protocolMessage: object expected"); - message.protocolMessage = $root.proto.ProtocolMessage.fromObject(object.protocolMessage); + message.protocolMessage = $root.proto.Message.ProtocolMessage.fromObject(object.protocolMessage); } if (object.contactsArrayMessage != null) { if (typeof object.contactsArrayMessage !== "object") throw TypeError(".proto.Message.contactsArrayMessage: object expected"); - message.contactsArrayMessage = $root.proto.ContactsArrayMessage.fromObject(object.contactsArrayMessage); + message.contactsArrayMessage = $root.proto.Message.ContactsArrayMessage.fromObject(object.contactsArrayMessage); } if (object.highlyStructuredMessage != null) { if (typeof object.highlyStructuredMessage !== "object") throw TypeError(".proto.Message.highlyStructuredMessage: object expected"); - message.highlyStructuredMessage = $root.proto.HighlyStructuredMessage.fromObject(object.highlyStructuredMessage); + message.highlyStructuredMessage = $root.proto.Message.HighlyStructuredMessage.fromObject(object.highlyStructuredMessage); } if (object.fastRatchetKeySenderKeyDistributionMessage != null) { if (typeof object.fastRatchetKeySenderKeyDistributionMessage !== "object") throw TypeError(".proto.Message.fastRatchetKeySenderKeyDistributionMessage: object expected"); - message.fastRatchetKeySenderKeyDistributionMessage = $root.proto.SenderKeyDistributionMessage.fromObject(object.fastRatchetKeySenderKeyDistributionMessage); + message.fastRatchetKeySenderKeyDistributionMessage = $root.proto.Message.SenderKeyDistributionMessage.fromObject(object.fastRatchetKeySenderKeyDistributionMessage); } if (object.sendPaymentMessage != null) { if (typeof object.sendPaymentMessage !== "object") throw TypeError(".proto.Message.sendPaymentMessage: object expected"); - message.sendPaymentMessage = $root.proto.SendPaymentMessage.fromObject(object.sendPaymentMessage); + message.sendPaymentMessage = $root.proto.Message.SendPaymentMessage.fromObject(object.sendPaymentMessage); } if (object.liveLocationMessage != null) { if (typeof object.liveLocationMessage !== "object") throw TypeError(".proto.Message.liveLocationMessage: object expected"); - message.liveLocationMessage = $root.proto.LiveLocationMessage.fromObject(object.liveLocationMessage); + message.liveLocationMessage = $root.proto.Message.LiveLocationMessage.fromObject(object.liveLocationMessage); } if (object.requestPaymentMessage != null) { if (typeof object.requestPaymentMessage !== "object") throw TypeError(".proto.Message.requestPaymentMessage: object expected"); - message.requestPaymentMessage = $root.proto.RequestPaymentMessage.fromObject(object.requestPaymentMessage); + message.requestPaymentMessage = $root.proto.Message.RequestPaymentMessage.fromObject(object.requestPaymentMessage); } if (object.declinePaymentRequestMessage != null) { if (typeof object.declinePaymentRequestMessage !== "object") throw TypeError(".proto.Message.declinePaymentRequestMessage: object expected"); - message.declinePaymentRequestMessage = $root.proto.DeclinePaymentRequestMessage.fromObject(object.declinePaymentRequestMessage); + message.declinePaymentRequestMessage = $root.proto.Message.DeclinePaymentRequestMessage.fromObject(object.declinePaymentRequestMessage); } if (object.cancelPaymentRequestMessage != null) { if (typeof object.cancelPaymentRequestMessage !== "object") throw TypeError(".proto.Message.cancelPaymentRequestMessage: object expected"); - message.cancelPaymentRequestMessage = $root.proto.CancelPaymentRequestMessage.fromObject(object.cancelPaymentRequestMessage); + message.cancelPaymentRequestMessage = $root.proto.Message.CancelPaymentRequestMessage.fromObject(object.cancelPaymentRequestMessage); } if (object.templateMessage != null) { if (typeof object.templateMessage !== "object") throw TypeError(".proto.Message.templateMessage: object expected"); - message.templateMessage = $root.proto.TemplateMessage.fromObject(object.templateMessage); + message.templateMessage = $root.proto.Message.TemplateMessage.fromObject(object.templateMessage); } if (object.stickerMessage != null) { if (typeof object.stickerMessage !== "object") throw TypeError(".proto.Message.stickerMessage: object expected"); - message.stickerMessage = $root.proto.StickerMessage.fromObject(object.stickerMessage); + message.stickerMessage = $root.proto.Message.StickerMessage.fromObject(object.stickerMessage); } if (object.groupInviteMessage != null) { if (typeof object.groupInviteMessage !== "object") throw TypeError(".proto.Message.groupInviteMessage: object expected"); - message.groupInviteMessage = $root.proto.GroupInviteMessage.fromObject(object.groupInviteMessage); + message.groupInviteMessage = $root.proto.Message.GroupInviteMessage.fromObject(object.groupInviteMessage); } if (object.templateButtonReplyMessage != null) { if (typeof object.templateButtonReplyMessage !== "object") throw TypeError(".proto.Message.templateButtonReplyMessage: object expected"); - message.templateButtonReplyMessage = $root.proto.TemplateButtonReplyMessage.fromObject(object.templateButtonReplyMessage); + message.templateButtonReplyMessage = $root.proto.Message.TemplateButtonReplyMessage.fromObject(object.templateButtonReplyMessage); } if (object.productMessage != null) { if (typeof object.productMessage !== "object") throw TypeError(".proto.Message.productMessage: object expected"); - message.productMessage = $root.proto.ProductMessage.fromObject(object.productMessage); + message.productMessage = $root.proto.Message.ProductMessage.fromObject(object.productMessage); } if (object.deviceSentMessage != null) { if (typeof object.deviceSentMessage !== "object") throw TypeError(".proto.Message.deviceSentMessage: object expected"); - message.deviceSentMessage = $root.proto.DeviceSentMessage.fromObject(object.deviceSentMessage); + message.deviceSentMessage = $root.proto.Message.DeviceSentMessage.fromObject(object.deviceSentMessage); } if (object.messageContextInfo != null) { if (typeof object.messageContextInfo !== "object") @@ -35493,87 +18823,97 @@ $root.proto = (function() { if (object.listMessage != null) { if (typeof object.listMessage !== "object") throw TypeError(".proto.Message.listMessage: object expected"); - message.listMessage = $root.proto.ListMessage.fromObject(object.listMessage); + message.listMessage = $root.proto.Message.ListMessage.fromObject(object.listMessage); } if (object.viewOnceMessage != null) { if (typeof object.viewOnceMessage !== "object") throw TypeError(".proto.Message.viewOnceMessage: object expected"); - message.viewOnceMessage = $root.proto.FutureProofMessage.fromObject(object.viewOnceMessage); + message.viewOnceMessage = $root.proto.Message.FutureProofMessage.fromObject(object.viewOnceMessage); } if (object.orderMessage != null) { if (typeof object.orderMessage !== "object") throw TypeError(".proto.Message.orderMessage: object expected"); - message.orderMessage = $root.proto.OrderMessage.fromObject(object.orderMessage); + message.orderMessage = $root.proto.Message.OrderMessage.fromObject(object.orderMessage); } if (object.listResponseMessage != null) { if (typeof object.listResponseMessage !== "object") throw TypeError(".proto.Message.listResponseMessage: object expected"); - message.listResponseMessage = $root.proto.ListResponseMessage.fromObject(object.listResponseMessage); + message.listResponseMessage = $root.proto.Message.ListResponseMessage.fromObject(object.listResponseMessage); } if (object.ephemeralMessage != null) { if (typeof object.ephemeralMessage !== "object") throw TypeError(".proto.Message.ephemeralMessage: object expected"); - message.ephemeralMessage = $root.proto.FutureProofMessage.fromObject(object.ephemeralMessage); + message.ephemeralMessage = $root.proto.Message.FutureProofMessage.fromObject(object.ephemeralMessage); } if (object.invoiceMessage != null) { if (typeof object.invoiceMessage !== "object") throw TypeError(".proto.Message.invoiceMessage: object expected"); - message.invoiceMessage = $root.proto.InvoiceMessage.fromObject(object.invoiceMessage); + message.invoiceMessage = $root.proto.Message.InvoiceMessage.fromObject(object.invoiceMessage); } if (object.buttonsMessage != null) { if (typeof object.buttonsMessage !== "object") throw TypeError(".proto.Message.buttonsMessage: object expected"); - message.buttonsMessage = $root.proto.ButtonsMessage.fromObject(object.buttonsMessage); + message.buttonsMessage = $root.proto.Message.ButtonsMessage.fromObject(object.buttonsMessage); } if (object.buttonsResponseMessage != null) { if (typeof object.buttonsResponseMessage !== "object") throw TypeError(".proto.Message.buttonsResponseMessage: object expected"); - message.buttonsResponseMessage = $root.proto.ButtonsResponseMessage.fromObject(object.buttonsResponseMessage); + message.buttonsResponseMessage = $root.proto.Message.ButtonsResponseMessage.fromObject(object.buttonsResponseMessage); } if (object.paymentInviteMessage != null) { if (typeof object.paymentInviteMessage !== "object") throw TypeError(".proto.Message.paymentInviteMessage: object expected"); - message.paymentInviteMessage = $root.proto.PaymentInviteMessage.fromObject(object.paymentInviteMessage); + message.paymentInviteMessage = $root.proto.Message.PaymentInviteMessage.fromObject(object.paymentInviteMessage); } if (object.interactiveMessage != null) { if (typeof object.interactiveMessage !== "object") throw TypeError(".proto.Message.interactiveMessage: object expected"); - message.interactiveMessage = $root.proto.InteractiveMessage.fromObject(object.interactiveMessage); + message.interactiveMessage = $root.proto.Message.InteractiveMessage.fromObject(object.interactiveMessage); } if (object.reactionMessage != null) { if (typeof object.reactionMessage !== "object") throw TypeError(".proto.Message.reactionMessage: object expected"); - message.reactionMessage = $root.proto.ReactionMessage.fromObject(object.reactionMessage); + message.reactionMessage = $root.proto.Message.ReactionMessage.fromObject(object.reactionMessage); } if (object.stickerSyncRmrMessage != null) { if (typeof object.stickerSyncRmrMessage !== "object") throw TypeError(".proto.Message.stickerSyncRmrMessage: object expected"); - message.stickerSyncRmrMessage = $root.proto.StickerSyncRMRMessage.fromObject(object.stickerSyncRmrMessage); + message.stickerSyncRmrMessage = $root.proto.Message.StickerSyncRMRMessage.fromObject(object.stickerSyncRmrMessage); } if (object.interactiveResponseMessage != null) { if (typeof object.interactiveResponseMessage !== "object") throw TypeError(".proto.Message.interactiveResponseMessage: object expected"); - message.interactiveResponseMessage = $root.proto.InteractiveResponseMessage.fromObject(object.interactiveResponseMessage); + message.interactiveResponseMessage = $root.proto.Message.InteractiveResponseMessage.fromObject(object.interactiveResponseMessage); } if (object.pollCreationMessage != null) { if (typeof object.pollCreationMessage !== "object") throw TypeError(".proto.Message.pollCreationMessage: object expected"); - message.pollCreationMessage = $root.proto.PollCreationMessage.fromObject(object.pollCreationMessage); + message.pollCreationMessage = $root.proto.Message.PollCreationMessage.fromObject(object.pollCreationMessage); } if (object.pollUpdateMessage != null) { if (typeof object.pollUpdateMessage !== "object") throw TypeError(".proto.Message.pollUpdateMessage: object expected"); - message.pollUpdateMessage = $root.proto.PollUpdateMessage.fromObject(object.pollUpdateMessage); + message.pollUpdateMessage = $root.proto.Message.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); + message.keepInChatMessage = $root.proto.Message.KeepInChatMessage.fromObject(object.keepInChatMessage); } if (object.documentWithCaptionMessage != null) { if (typeof object.documentWithCaptionMessage !== "object") throw TypeError(".proto.Message.documentWithCaptionMessage: object expected"); - message.documentWithCaptionMessage = $root.proto.FutureProofMessage.fromObject(object.documentWithCaptionMessage); + message.documentWithCaptionMessage = $root.proto.Message.FutureProofMessage.fromObject(object.documentWithCaptionMessage); + } + if (object.requestPhoneNumberMessage != null) { + if (typeof object.requestPhoneNumberMessage !== "object") + throw TypeError(".proto.Message.requestPhoneNumberMessage: object expected"); + message.requestPhoneNumberMessage = $root.proto.Message.RequestPhoneNumberMessage.fromObject(object.requestPhoneNumberMessage); + } + if (object.viewOnceMessageV2 != null) { + if (typeof object.viewOnceMessageV2 !== "object") + throw TypeError(".proto.Message.viewOnceMessageV2: object expected"); + message.viewOnceMessageV2 = $root.proto.Message.FutureProofMessage.fromObject(object.viewOnceMessageV2); } return message; }; @@ -35636,95 +18976,101 @@ $root.proto = (function() { object.pollUpdateMessage = null; object.keepInChatMessage = null; object.documentWithCaptionMessage = null; + object.requestPhoneNumberMessage = null; + object.viewOnceMessageV2 = null; } if (message.conversation != null && message.hasOwnProperty("conversation")) object.conversation = message.conversation; if (message.senderKeyDistributionMessage != null && message.hasOwnProperty("senderKeyDistributionMessage")) - object.senderKeyDistributionMessage = $root.proto.SenderKeyDistributionMessage.toObject(message.senderKeyDistributionMessage, options); + object.senderKeyDistributionMessage = $root.proto.Message.SenderKeyDistributionMessage.toObject(message.senderKeyDistributionMessage, options); if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) - object.imageMessage = $root.proto.ImageMessage.toObject(message.imageMessage, options); + object.imageMessage = $root.proto.Message.ImageMessage.toObject(message.imageMessage, options); if (message.contactMessage != null && message.hasOwnProperty("contactMessage")) - object.contactMessage = $root.proto.ContactMessage.toObject(message.contactMessage, options); + object.contactMessage = $root.proto.Message.ContactMessage.toObject(message.contactMessage, options); if (message.locationMessage != null && message.hasOwnProperty("locationMessage")) - object.locationMessage = $root.proto.LocationMessage.toObject(message.locationMessage, options); + object.locationMessage = $root.proto.Message.LocationMessage.toObject(message.locationMessage, options); if (message.extendedTextMessage != null && message.hasOwnProperty("extendedTextMessage")) - object.extendedTextMessage = $root.proto.ExtendedTextMessage.toObject(message.extendedTextMessage, options); + object.extendedTextMessage = $root.proto.Message.ExtendedTextMessage.toObject(message.extendedTextMessage, options); if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) - object.documentMessage = $root.proto.DocumentMessage.toObject(message.documentMessage, options); + object.documentMessage = $root.proto.Message.DocumentMessage.toObject(message.documentMessage, options); if (message.audioMessage != null && message.hasOwnProperty("audioMessage")) - object.audioMessage = $root.proto.AudioMessage.toObject(message.audioMessage, options); + object.audioMessage = $root.proto.Message.AudioMessage.toObject(message.audioMessage, options); if (message.videoMessage != null && message.hasOwnProperty("videoMessage")) - object.videoMessage = $root.proto.VideoMessage.toObject(message.videoMessage, options); + object.videoMessage = $root.proto.Message.VideoMessage.toObject(message.videoMessage, options); if (message.call != null && message.hasOwnProperty("call")) - object.call = $root.proto.Call.toObject(message.call, options); + object.call = $root.proto.Message.Call.toObject(message.call, options); if (message.chat != null && message.hasOwnProperty("chat")) - object.chat = $root.proto.Chat.toObject(message.chat, options); + object.chat = $root.proto.Message.Chat.toObject(message.chat, options); if (message.protocolMessage != null && message.hasOwnProperty("protocolMessage")) - object.protocolMessage = $root.proto.ProtocolMessage.toObject(message.protocolMessage, options); + object.protocolMessage = $root.proto.Message.ProtocolMessage.toObject(message.protocolMessage, options); if (message.contactsArrayMessage != null && message.hasOwnProperty("contactsArrayMessage")) - object.contactsArrayMessage = $root.proto.ContactsArrayMessage.toObject(message.contactsArrayMessage, options); + object.contactsArrayMessage = $root.proto.Message.ContactsArrayMessage.toObject(message.contactsArrayMessage, options); if (message.highlyStructuredMessage != null && message.hasOwnProperty("highlyStructuredMessage")) - object.highlyStructuredMessage = $root.proto.HighlyStructuredMessage.toObject(message.highlyStructuredMessage, options); + object.highlyStructuredMessage = $root.proto.Message.HighlyStructuredMessage.toObject(message.highlyStructuredMessage, options); if (message.fastRatchetKeySenderKeyDistributionMessage != null && message.hasOwnProperty("fastRatchetKeySenderKeyDistributionMessage")) - object.fastRatchetKeySenderKeyDistributionMessage = $root.proto.SenderKeyDistributionMessage.toObject(message.fastRatchetKeySenderKeyDistributionMessage, options); + object.fastRatchetKeySenderKeyDistributionMessage = $root.proto.Message.SenderKeyDistributionMessage.toObject(message.fastRatchetKeySenderKeyDistributionMessage, options); if (message.sendPaymentMessage != null && message.hasOwnProperty("sendPaymentMessage")) - object.sendPaymentMessage = $root.proto.SendPaymentMessage.toObject(message.sendPaymentMessage, options); + object.sendPaymentMessage = $root.proto.Message.SendPaymentMessage.toObject(message.sendPaymentMessage, options); if (message.liveLocationMessage != null && message.hasOwnProperty("liveLocationMessage")) - object.liveLocationMessage = $root.proto.LiveLocationMessage.toObject(message.liveLocationMessage, options); + object.liveLocationMessage = $root.proto.Message.LiveLocationMessage.toObject(message.liveLocationMessage, options); if (message.requestPaymentMessage != null && message.hasOwnProperty("requestPaymentMessage")) - object.requestPaymentMessage = $root.proto.RequestPaymentMessage.toObject(message.requestPaymentMessage, options); + object.requestPaymentMessage = $root.proto.Message.RequestPaymentMessage.toObject(message.requestPaymentMessage, options); if (message.declinePaymentRequestMessage != null && message.hasOwnProperty("declinePaymentRequestMessage")) - object.declinePaymentRequestMessage = $root.proto.DeclinePaymentRequestMessage.toObject(message.declinePaymentRequestMessage, options); + object.declinePaymentRequestMessage = $root.proto.Message.DeclinePaymentRequestMessage.toObject(message.declinePaymentRequestMessage, options); if (message.cancelPaymentRequestMessage != null && message.hasOwnProperty("cancelPaymentRequestMessage")) - object.cancelPaymentRequestMessage = $root.proto.CancelPaymentRequestMessage.toObject(message.cancelPaymentRequestMessage, options); + object.cancelPaymentRequestMessage = $root.proto.Message.CancelPaymentRequestMessage.toObject(message.cancelPaymentRequestMessage, options); if (message.templateMessage != null && message.hasOwnProperty("templateMessage")) - object.templateMessage = $root.proto.TemplateMessage.toObject(message.templateMessage, options); + object.templateMessage = $root.proto.Message.TemplateMessage.toObject(message.templateMessage, options); if (message.stickerMessage != null && message.hasOwnProperty("stickerMessage")) - object.stickerMessage = $root.proto.StickerMessage.toObject(message.stickerMessage, options); + object.stickerMessage = $root.proto.Message.StickerMessage.toObject(message.stickerMessage, options); if (message.groupInviteMessage != null && message.hasOwnProperty("groupInviteMessage")) - object.groupInviteMessage = $root.proto.GroupInviteMessage.toObject(message.groupInviteMessage, options); + object.groupInviteMessage = $root.proto.Message.GroupInviteMessage.toObject(message.groupInviteMessage, options); if (message.templateButtonReplyMessage != null && message.hasOwnProperty("templateButtonReplyMessage")) - object.templateButtonReplyMessage = $root.proto.TemplateButtonReplyMessage.toObject(message.templateButtonReplyMessage, options); + object.templateButtonReplyMessage = $root.proto.Message.TemplateButtonReplyMessage.toObject(message.templateButtonReplyMessage, options); if (message.productMessage != null && message.hasOwnProperty("productMessage")) - object.productMessage = $root.proto.ProductMessage.toObject(message.productMessage, options); + object.productMessage = $root.proto.Message.ProductMessage.toObject(message.productMessage, options); if (message.deviceSentMessage != null && message.hasOwnProperty("deviceSentMessage")) - object.deviceSentMessage = $root.proto.DeviceSentMessage.toObject(message.deviceSentMessage, options); + object.deviceSentMessage = $root.proto.Message.DeviceSentMessage.toObject(message.deviceSentMessage, options); if (message.messageContextInfo != null && message.hasOwnProperty("messageContextInfo")) object.messageContextInfo = $root.proto.MessageContextInfo.toObject(message.messageContextInfo, options); if (message.listMessage != null && message.hasOwnProperty("listMessage")) - object.listMessage = $root.proto.ListMessage.toObject(message.listMessage, options); + object.listMessage = $root.proto.Message.ListMessage.toObject(message.listMessage, options); if (message.viewOnceMessage != null && message.hasOwnProperty("viewOnceMessage")) - object.viewOnceMessage = $root.proto.FutureProofMessage.toObject(message.viewOnceMessage, options); + object.viewOnceMessage = $root.proto.Message.FutureProofMessage.toObject(message.viewOnceMessage, options); if (message.orderMessage != null && message.hasOwnProperty("orderMessage")) - object.orderMessage = $root.proto.OrderMessage.toObject(message.orderMessage, options); + object.orderMessage = $root.proto.Message.OrderMessage.toObject(message.orderMessage, options); if (message.listResponseMessage != null && message.hasOwnProperty("listResponseMessage")) - object.listResponseMessage = $root.proto.ListResponseMessage.toObject(message.listResponseMessage, options); + object.listResponseMessage = $root.proto.Message.ListResponseMessage.toObject(message.listResponseMessage, options); if (message.ephemeralMessage != null && message.hasOwnProperty("ephemeralMessage")) - object.ephemeralMessage = $root.proto.FutureProofMessage.toObject(message.ephemeralMessage, options); + object.ephemeralMessage = $root.proto.Message.FutureProofMessage.toObject(message.ephemeralMessage, options); if (message.invoiceMessage != null && message.hasOwnProperty("invoiceMessage")) - object.invoiceMessage = $root.proto.InvoiceMessage.toObject(message.invoiceMessage, options); + object.invoiceMessage = $root.proto.Message.InvoiceMessage.toObject(message.invoiceMessage, options); if (message.buttonsMessage != null && message.hasOwnProperty("buttonsMessage")) - object.buttonsMessage = $root.proto.ButtonsMessage.toObject(message.buttonsMessage, options); + object.buttonsMessage = $root.proto.Message.ButtonsMessage.toObject(message.buttonsMessage, options); if (message.buttonsResponseMessage != null && message.hasOwnProperty("buttonsResponseMessage")) - object.buttonsResponseMessage = $root.proto.ButtonsResponseMessage.toObject(message.buttonsResponseMessage, options); + object.buttonsResponseMessage = $root.proto.Message.ButtonsResponseMessage.toObject(message.buttonsResponseMessage, options); if (message.paymentInviteMessage != null && message.hasOwnProperty("paymentInviteMessage")) - object.paymentInviteMessage = $root.proto.PaymentInviteMessage.toObject(message.paymentInviteMessage, options); + object.paymentInviteMessage = $root.proto.Message.PaymentInviteMessage.toObject(message.paymentInviteMessage, options); if (message.interactiveMessage != null && message.hasOwnProperty("interactiveMessage")) - object.interactiveMessage = $root.proto.InteractiveMessage.toObject(message.interactiveMessage, options); + object.interactiveMessage = $root.proto.Message.InteractiveMessage.toObject(message.interactiveMessage, options); if (message.reactionMessage != null && message.hasOwnProperty("reactionMessage")) - object.reactionMessage = $root.proto.ReactionMessage.toObject(message.reactionMessage, options); + object.reactionMessage = $root.proto.Message.ReactionMessage.toObject(message.reactionMessage, options); if (message.stickerSyncRmrMessage != null && message.hasOwnProperty("stickerSyncRmrMessage")) - object.stickerSyncRmrMessage = $root.proto.StickerSyncRMRMessage.toObject(message.stickerSyncRmrMessage, options); + object.stickerSyncRmrMessage = $root.proto.Message.StickerSyncRMRMessage.toObject(message.stickerSyncRmrMessage, options); if (message.interactiveResponseMessage != null && message.hasOwnProperty("interactiveResponseMessage")) - object.interactiveResponseMessage = $root.proto.InteractiveResponseMessage.toObject(message.interactiveResponseMessage, options); + object.interactiveResponseMessage = $root.proto.Message.InteractiveResponseMessage.toObject(message.interactiveResponseMessage, options); if (message.pollCreationMessage != null && message.hasOwnProperty("pollCreationMessage")) - object.pollCreationMessage = $root.proto.PollCreationMessage.toObject(message.pollCreationMessage, options); + object.pollCreationMessage = $root.proto.Message.PollCreationMessage.toObject(message.pollCreationMessage, options); if (message.pollUpdateMessage != null && message.hasOwnProperty("pollUpdateMessage")) - object.pollUpdateMessage = $root.proto.PollUpdateMessage.toObject(message.pollUpdateMessage, options); + object.pollUpdateMessage = $root.proto.Message.PollUpdateMessage.toObject(message.pollUpdateMessage, options); if (message.keepInChatMessage != null && message.hasOwnProperty("keepInChatMessage")) - object.keepInChatMessage = $root.proto.KeepInChatMessage.toObject(message.keepInChatMessage, options); + object.keepInChatMessage = $root.proto.Message.KeepInChatMessage.toObject(message.keepInChatMessage, options); if (message.documentWithCaptionMessage != null && message.hasOwnProperty("documentWithCaptionMessage")) - object.documentWithCaptionMessage = $root.proto.FutureProofMessage.toObject(message.documentWithCaptionMessage, options); + object.documentWithCaptionMessage = $root.proto.Message.FutureProofMessage.toObject(message.documentWithCaptionMessage, options); + if (message.requestPhoneNumberMessage != null && message.hasOwnProperty("requestPhoneNumberMessage")) + object.requestPhoneNumberMessage = $root.proto.Message.RequestPhoneNumberMessage.toObject(message.requestPhoneNumberMessage, options); + if (message.viewOnceMessageV2 != null && message.hasOwnProperty("viewOnceMessageV2")) + object.viewOnceMessageV2 = $root.proto.Message.FutureProofMessage.toObject(message.viewOnceMessageV2, options); return object; }; @@ -35739,6 +19085,26294 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + Message.AppStateFatalExceptionNotification = (function() { + + /** + * Properties of an AppStateFatalExceptionNotification. + * @memberof proto.Message + * @interface IAppStateFatalExceptionNotification + * @property {Array.|null} [collectionNames] AppStateFatalExceptionNotification collectionNames + * @property {number|Long|null} [timestamp] AppStateFatalExceptionNotification timestamp + */ + + /** + * Constructs a new AppStateFatalExceptionNotification. + * @memberof proto.Message + * @classdesc Represents an AppStateFatalExceptionNotification. + * @implements IAppStateFatalExceptionNotification + * @constructor + * @param {proto.Message.IAppStateFatalExceptionNotification=} [properties] Properties to set + */ + function AppStateFatalExceptionNotification(properties) { + this.collectionNames = []; + 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]]; + } + + /** + * AppStateFatalExceptionNotification collectionNames. + * @member {Array.} collectionNames + * @memberof proto.Message.AppStateFatalExceptionNotification + * @instance + */ + AppStateFatalExceptionNotification.prototype.collectionNames = $util.emptyArray; + + /** + * AppStateFatalExceptionNotification timestamp. + * @member {number|Long} timestamp + * @memberof proto.Message.AppStateFatalExceptionNotification + * @instance + */ + AppStateFatalExceptionNotification.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new AppStateFatalExceptionNotification instance using the specified properties. + * @function create + * @memberof proto.Message.AppStateFatalExceptionNotification + * @static + * @param {proto.Message.IAppStateFatalExceptionNotification=} [properties] Properties to set + * @returns {proto.Message.AppStateFatalExceptionNotification} AppStateFatalExceptionNotification instance + */ + AppStateFatalExceptionNotification.create = function create(properties) { + return new AppStateFatalExceptionNotification(properties); + }; + + /** + * Encodes the specified AppStateFatalExceptionNotification message. Does not implicitly {@link proto.Message.AppStateFatalExceptionNotification.verify|verify} messages. + * @function encode + * @memberof proto.Message.AppStateFatalExceptionNotification + * @static + * @param {proto.Message.IAppStateFatalExceptionNotification} message AppStateFatalExceptionNotification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppStateFatalExceptionNotification.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.collectionNames != null && message.collectionNames.length) + for (var i = 0; i < message.collectionNames.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.collectionNames[i]); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.timestamp); + return writer; + }; + + /** + * Encodes the specified AppStateFatalExceptionNotification message, length delimited. Does not implicitly {@link proto.Message.AppStateFatalExceptionNotification.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.AppStateFatalExceptionNotification + * @static + * @param {proto.Message.IAppStateFatalExceptionNotification} message AppStateFatalExceptionNotification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppStateFatalExceptionNotification.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AppStateFatalExceptionNotification message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.AppStateFatalExceptionNotification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.AppStateFatalExceptionNotification} AppStateFatalExceptionNotification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppStateFatalExceptionNotification.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.Message.AppStateFatalExceptionNotification(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.collectionNames && message.collectionNames.length)) + message.collectionNames = []; + message.collectionNames.push(reader.string()); + break; + case 2: + message.timestamp = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AppStateFatalExceptionNotification message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.AppStateFatalExceptionNotification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.AppStateFatalExceptionNotification} AppStateFatalExceptionNotification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppStateFatalExceptionNotification.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AppStateFatalExceptionNotification message. + * @function verify + * @memberof proto.Message.AppStateFatalExceptionNotification + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AppStateFatalExceptionNotification.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.collectionNames != null && message.hasOwnProperty("collectionNames")) { + if (!Array.isArray(message.collectionNames)) + return "collectionNames: array expected"; + for (var i = 0; i < message.collectionNames.length; ++i) + if (!$util.isString(message.collectionNames[i])) + return "collectionNames: string[] 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 AppStateFatalExceptionNotification message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.AppStateFatalExceptionNotification + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.AppStateFatalExceptionNotification} AppStateFatalExceptionNotification + */ + AppStateFatalExceptionNotification.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.AppStateFatalExceptionNotification) + return object; + var message = new $root.proto.Message.AppStateFatalExceptionNotification(); + if (object.collectionNames) { + if (!Array.isArray(object.collectionNames)) + throw TypeError(".proto.Message.AppStateFatalExceptionNotification.collectionNames: array expected"); + message.collectionNames = []; + for (var i = 0; i < object.collectionNames.length; ++i) + message.collectionNames[i] = String(object.collectionNames[i]); + } + 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 AppStateFatalExceptionNotification message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.AppStateFatalExceptionNotification + * @static + * @param {proto.Message.AppStateFatalExceptionNotification} message AppStateFatalExceptionNotification + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AppStateFatalExceptionNotification.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.collectionNames = []; + 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; + if (message.collectionNames && message.collectionNames.length) { + object.collectionNames = []; + for (var j = 0; j < message.collectionNames.length; ++j) + object.collectionNames[j] = message.collectionNames[j]; + } + 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 AppStateFatalExceptionNotification to JSON. + * @function toJSON + * @memberof proto.Message.AppStateFatalExceptionNotification + * @instance + * @returns {Object.} JSON object + */ + AppStateFatalExceptionNotification.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AppStateFatalExceptionNotification; + })(); + + Message.AppStateSyncKeyData = (function() { + + /** + * Properties of an AppStateSyncKeyData. + * @memberof proto.Message + * @interface IAppStateSyncKeyData + * @property {Uint8Array|null} [keyData] AppStateSyncKeyData keyData + * @property {proto.Message.IAppStateSyncKeyFingerprint|null} [fingerprint] AppStateSyncKeyData fingerprint + * @property {number|Long|null} [timestamp] AppStateSyncKeyData timestamp + */ + + /** + * Constructs a new AppStateSyncKeyData. + * @memberof proto.Message + * @classdesc Represents an AppStateSyncKeyData. + * @implements IAppStateSyncKeyData + * @constructor + * @param {proto.Message.IAppStateSyncKeyData=} [properties] Properties to set + */ + function AppStateSyncKeyData(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]]; + } + + /** + * AppStateSyncKeyData keyData. + * @member {Uint8Array} keyData + * @memberof proto.Message.AppStateSyncKeyData + * @instance + */ + AppStateSyncKeyData.prototype.keyData = $util.newBuffer([]); + + /** + * AppStateSyncKeyData fingerprint. + * @member {proto.Message.IAppStateSyncKeyFingerprint|null|undefined} fingerprint + * @memberof proto.Message.AppStateSyncKeyData + * @instance + */ + AppStateSyncKeyData.prototype.fingerprint = null; + + /** + * AppStateSyncKeyData timestamp. + * @member {number|Long} timestamp + * @memberof proto.Message.AppStateSyncKeyData + * @instance + */ + AppStateSyncKeyData.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new AppStateSyncKeyData instance using the specified properties. + * @function create + * @memberof proto.Message.AppStateSyncKeyData + * @static + * @param {proto.Message.IAppStateSyncKeyData=} [properties] Properties to set + * @returns {proto.Message.AppStateSyncKeyData} AppStateSyncKeyData instance + */ + AppStateSyncKeyData.create = function create(properties) { + return new AppStateSyncKeyData(properties); + }; + + /** + * Encodes the specified AppStateSyncKeyData message. Does not implicitly {@link proto.Message.AppStateSyncKeyData.verify|verify} messages. + * @function encode + * @memberof proto.Message.AppStateSyncKeyData + * @static + * @param {proto.Message.IAppStateSyncKeyData} message AppStateSyncKeyData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppStateSyncKeyData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.keyData != null && Object.hasOwnProperty.call(message, "keyData")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.keyData); + if (message.fingerprint != null && Object.hasOwnProperty.call(message, "fingerprint")) + $root.proto.Message.AppStateSyncKeyFingerprint.encode(message.fingerprint, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.timestamp); + return writer; + }; + + /** + * Encodes the specified AppStateSyncKeyData message, length delimited. Does not implicitly {@link proto.Message.AppStateSyncKeyData.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.AppStateSyncKeyData + * @static + * @param {proto.Message.IAppStateSyncKeyData} message AppStateSyncKeyData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppStateSyncKeyData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AppStateSyncKeyData message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.AppStateSyncKeyData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.AppStateSyncKeyData} AppStateSyncKeyData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppStateSyncKeyData.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.Message.AppStateSyncKeyData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.keyData = reader.bytes(); + break; + case 2: + message.fingerprint = $root.proto.Message.AppStateSyncKeyFingerprint.decode(reader, reader.uint32()); + break; + case 3: + message.timestamp = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AppStateSyncKeyData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.AppStateSyncKeyData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.AppStateSyncKeyData} AppStateSyncKeyData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppStateSyncKeyData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AppStateSyncKeyData message. + * @function verify + * @memberof proto.Message.AppStateSyncKeyData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AppStateSyncKeyData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.keyData != null && message.hasOwnProperty("keyData")) + if (!(message.keyData && typeof message.keyData.length === "number" || $util.isString(message.keyData))) + return "keyData: buffer expected"; + if (message.fingerprint != null && message.hasOwnProperty("fingerprint")) { + var error = $root.proto.Message.AppStateSyncKeyFingerprint.verify(message.fingerprint); + if (error) + return "fingerprint." + 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 an AppStateSyncKeyData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.AppStateSyncKeyData + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.AppStateSyncKeyData} AppStateSyncKeyData + */ + AppStateSyncKeyData.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.AppStateSyncKeyData) + return object; + var message = new $root.proto.Message.AppStateSyncKeyData(); + if (object.keyData != null) + if (typeof object.keyData === "string") + $util.base64.decode(object.keyData, message.keyData = $util.newBuffer($util.base64.length(object.keyData)), 0); + else if (object.keyData.length) + message.keyData = object.keyData; + if (object.fingerprint != null) { + if (typeof object.fingerprint !== "object") + throw TypeError(".proto.Message.AppStateSyncKeyData.fingerprint: object expected"); + message.fingerprint = $root.proto.Message.AppStateSyncKeyFingerprint.fromObject(object.fingerprint); + } + 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 AppStateSyncKeyData message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.AppStateSyncKeyData + * @static + * @param {proto.Message.AppStateSyncKeyData} message AppStateSyncKeyData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AppStateSyncKeyData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.keyData = ""; + else { + object.keyData = []; + if (options.bytes !== Array) + object.keyData = $util.newBuffer(object.keyData); + } + object.fingerprint = 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.keyData != null && message.hasOwnProperty("keyData")) + object.keyData = options.bytes === String ? $util.base64.encode(message.keyData, 0, message.keyData.length) : options.bytes === Array ? Array.prototype.slice.call(message.keyData) : message.keyData; + if (message.fingerprint != null && message.hasOwnProperty("fingerprint")) + object.fingerprint = $root.proto.Message.AppStateSyncKeyFingerprint.toObject(message.fingerprint, 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 AppStateSyncKeyData to JSON. + * @function toJSON + * @memberof proto.Message.AppStateSyncKeyData + * @instance + * @returns {Object.} JSON object + */ + AppStateSyncKeyData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AppStateSyncKeyData; + })(); + + Message.AppStateSyncKeyFingerprint = (function() { + + /** + * Properties of an AppStateSyncKeyFingerprint. + * @memberof proto.Message + * @interface IAppStateSyncKeyFingerprint + * @property {number|null} [rawId] AppStateSyncKeyFingerprint rawId + * @property {number|null} [currentIndex] AppStateSyncKeyFingerprint currentIndex + * @property {Array.|null} [deviceIndexes] AppStateSyncKeyFingerprint deviceIndexes + */ + + /** + * Constructs a new AppStateSyncKeyFingerprint. + * @memberof proto.Message + * @classdesc Represents an AppStateSyncKeyFingerprint. + * @implements IAppStateSyncKeyFingerprint + * @constructor + * @param {proto.Message.IAppStateSyncKeyFingerprint=} [properties] Properties to set + */ + function AppStateSyncKeyFingerprint(properties) { + this.deviceIndexes = []; + 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]]; + } + + /** + * AppStateSyncKeyFingerprint rawId. + * @member {number} rawId + * @memberof proto.Message.AppStateSyncKeyFingerprint + * @instance + */ + AppStateSyncKeyFingerprint.prototype.rawId = 0; + + /** + * AppStateSyncKeyFingerprint currentIndex. + * @member {number} currentIndex + * @memberof proto.Message.AppStateSyncKeyFingerprint + * @instance + */ + AppStateSyncKeyFingerprint.prototype.currentIndex = 0; + + /** + * AppStateSyncKeyFingerprint deviceIndexes. + * @member {Array.} deviceIndexes + * @memberof proto.Message.AppStateSyncKeyFingerprint + * @instance + */ + AppStateSyncKeyFingerprint.prototype.deviceIndexes = $util.emptyArray; + + /** + * Creates a new AppStateSyncKeyFingerprint instance using the specified properties. + * @function create + * @memberof proto.Message.AppStateSyncKeyFingerprint + * @static + * @param {proto.Message.IAppStateSyncKeyFingerprint=} [properties] Properties to set + * @returns {proto.Message.AppStateSyncKeyFingerprint} AppStateSyncKeyFingerprint instance + */ + AppStateSyncKeyFingerprint.create = function create(properties) { + return new AppStateSyncKeyFingerprint(properties); + }; + + /** + * Encodes the specified AppStateSyncKeyFingerprint message. Does not implicitly {@link proto.Message.AppStateSyncKeyFingerprint.verify|verify} messages. + * @function encode + * @memberof proto.Message.AppStateSyncKeyFingerprint + * @static + * @param {proto.Message.IAppStateSyncKeyFingerprint} message AppStateSyncKeyFingerprint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppStateSyncKeyFingerprint.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rawId != null && Object.hasOwnProperty.call(message, "rawId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.rawId); + if (message.currentIndex != null && Object.hasOwnProperty.call(message, "currentIndex")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.currentIndex); + if (message.deviceIndexes != null && message.deviceIndexes.length) { + writer.uint32(/* id 3, wireType 2 =*/26).fork(); + for (var i = 0; i < message.deviceIndexes.length; ++i) + writer.uint32(message.deviceIndexes[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified AppStateSyncKeyFingerprint message, length delimited. Does not implicitly {@link proto.Message.AppStateSyncKeyFingerprint.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.AppStateSyncKeyFingerprint + * @static + * @param {proto.Message.IAppStateSyncKeyFingerprint} message AppStateSyncKeyFingerprint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppStateSyncKeyFingerprint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AppStateSyncKeyFingerprint message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.AppStateSyncKeyFingerprint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.AppStateSyncKeyFingerprint} AppStateSyncKeyFingerprint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppStateSyncKeyFingerprint.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.Message.AppStateSyncKeyFingerprint(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.rawId = reader.uint32(); + break; + case 2: + message.currentIndex = reader.uint32(); + break; + case 3: + if (!(message.deviceIndexes && message.deviceIndexes.length)) + message.deviceIndexes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.deviceIndexes.push(reader.uint32()); + } else + message.deviceIndexes.push(reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AppStateSyncKeyFingerprint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.AppStateSyncKeyFingerprint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.AppStateSyncKeyFingerprint} AppStateSyncKeyFingerprint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppStateSyncKeyFingerprint.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AppStateSyncKeyFingerprint message. + * @function verify + * @memberof proto.Message.AppStateSyncKeyFingerprint + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AppStateSyncKeyFingerprint.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rawId != null && message.hasOwnProperty("rawId")) + if (!$util.isInteger(message.rawId)) + return "rawId: integer expected"; + if (message.currentIndex != null && message.hasOwnProperty("currentIndex")) + if (!$util.isInteger(message.currentIndex)) + return "currentIndex: integer expected"; + if (message.deviceIndexes != null && message.hasOwnProperty("deviceIndexes")) { + if (!Array.isArray(message.deviceIndexes)) + return "deviceIndexes: array expected"; + for (var i = 0; i < message.deviceIndexes.length; ++i) + if (!$util.isInteger(message.deviceIndexes[i])) + return "deviceIndexes: integer[] expected"; + } + return null; + }; + + /** + * Creates an AppStateSyncKeyFingerprint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.AppStateSyncKeyFingerprint + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.AppStateSyncKeyFingerprint} AppStateSyncKeyFingerprint + */ + AppStateSyncKeyFingerprint.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.AppStateSyncKeyFingerprint) + return object; + var message = new $root.proto.Message.AppStateSyncKeyFingerprint(); + if (object.rawId != null) + message.rawId = object.rawId >>> 0; + if (object.currentIndex != null) + message.currentIndex = object.currentIndex >>> 0; + if (object.deviceIndexes) { + if (!Array.isArray(object.deviceIndexes)) + throw TypeError(".proto.Message.AppStateSyncKeyFingerprint.deviceIndexes: array expected"); + message.deviceIndexes = []; + for (var i = 0; i < object.deviceIndexes.length; ++i) + message.deviceIndexes[i] = object.deviceIndexes[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from an AppStateSyncKeyFingerprint message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.AppStateSyncKeyFingerprint + * @static + * @param {proto.Message.AppStateSyncKeyFingerprint} message AppStateSyncKeyFingerprint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AppStateSyncKeyFingerprint.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.deviceIndexes = []; + if (options.defaults) { + object.rawId = 0; + object.currentIndex = 0; + } + if (message.rawId != null && message.hasOwnProperty("rawId")) + object.rawId = message.rawId; + if (message.currentIndex != null && message.hasOwnProperty("currentIndex")) + object.currentIndex = message.currentIndex; + if (message.deviceIndexes && message.deviceIndexes.length) { + object.deviceIndexes = []; + for (var j = 0; j < message.deviceIndexes.length; ++j) + object.deviceIndexes[j] = message.deviceIndexes[j]; + } + return object; + }; + + /** + * Converts this AppStateSyncKeyFingerprint to JSON. + * @function toJSON + * @memberof proto.Message.AppStateSyncKeyFingerprint + * @instance + * @returns {Object.} JSON object + */ + AppStateSyncKeyFingerprint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AppStateSyncKeyFingerprint; + })(); + + Message.AppStateSyncKeyId = (function() { + + /** + * Properties of an AppStateSyncKeyId. + * @memberof proto.Message + * @interface IAppStateSyncKeyId + * @property {Uint8Array|null} [keyId] AppStateSyncKeyId keyId + */ + + /** + * Constructs a new AppStateSyncKeyId. + * @memberof proto.Message + * @classdesc Represents an AppStateSyncKeyId. + * @implements IAppStateSyncKeyId + * @constructor + * @param {proto.Message.IAppStateSyncKeyId=} [properties] Properties to set + */ + function AppStateSyncKeyId(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]]; + } + + /** + * AppStateSyncKeyId keyId. + * @member {Uint8Array} keyId + * @memberof proto.Message.AppStateSyncKeyId + * @instance + */ + AppStateSyncKeyId.prototype.keyId = $util.newBuffer([]); + + /** + * Creates a new AppStateSyncKeyId instance using the specified properties. + * @function create + * @memberof proto.Message.AppStateSyncKeyId + * @static + * @param {proto.Message.IAppStateSyncKeyId=} [properties] Properties to set + * @returns {proto.Message.AppStateSyncKeyId} AppStateSyncKeyId instance + */ + AppStateSyncKeyId.create = function create(properties) { + return new AppStateSyncKeyId(properties); + }; + + /** + * Encodes the specified AppStateSyncKeyId message. Does not implicitly {@link proto.Message.AppStateSyncKeyId.verify|verify} messages. + * @function encode + * @memberof proto.Message.AppStateSyncKeyId + * @static + * @param {proto.Message.IAppStateSyncKeyId} message AppStateSyncKeyId message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppStateSyncKeyId.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.keyId != null && Object.hasOwnProperty.call(message, "keyId")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.keyId); + return writer; + }; + + /** + * Encodes the specified AppStateSyncKeyId message, length delimited. Does not implicitly {@link proto.Message.AppStateSyncKeyId.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.AppStateSyncKeyId + * @static + * @param {proto.Message.IAppStateSyncKeyId} message AppStateSyncKeyId message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppStateSyncKeyId.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AppStateSyncKeyId message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.AppStateSyncKeyId + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.AppStateSyncKeyId} AppStateSyncKeyId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppStateSyncKeyId.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.Message.AppStateSyncKeyId(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.keyId = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AppStateSyncKeyId message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.AppStateSyncKeyId + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.AppStateSyncKeyId} AppStateSyncKeyId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppStateSyncKeyId.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AppStateSyncKeyId message. + * @function verify + * @memberof proto.Message.AppStateSyncKeyId + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AppStateSyncKeyId.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.keyId != null && message.hasOwnProperty("keyId")) + if (!(message.keyId && typeof message.keyId.length === "number" || $util.isString(message.keyId))) + return "keyId: buffer expected"; + return null; + }; + + /** + * Creates an AppStateSyncKeyId message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.AppStateSyncKeyId + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.AppStateSyncKeyId} AppStateSyncKeyId + */ + AppStateSyncKeyId.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.AppStateSyncKeyId) + return object; + var message = new $root.proto.Message.AppStateSyncKeyId(); + if (object.keyId != null) + if (typeof object.keyId === "string") + $util.base64.decode(object.keyId, message.keyId = $util.newBuffer($util.base64.length(object.keyId)), 0); + else if (object.keyId.length) + message.keyId = object.keyId; + return message; + }; + + /** + * Creates a plain object from an AppStateSyncKeyId message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.AppStateSyncKeyId + * @static + * @param {proto.Message.AppStateSyncKeyId} message AppStateSyncKeyId + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AppStateSyncKeyId.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.keyId = ""; + else { + object.keyId = []; + if (options.bytes !== Array) + object.keyId = $util.newBuffer(object.keyId); + } + if (message.keyId != null && message.hasOwnProperty("keyId")) + object.keyId = options.bytes === String ? $util.base64.encode(message.keyId, 0, message.keyId.length) : options.bytes === Array ? Array.prototype.slice.call(message.keyId) : message.keyId; + return object; + }; + + /** + * Converts this AppStateSyncKeyId to JSON. + * @function toJSON + * @memberof proto.Message.AppStateSyncKeyId + * @instance + * @returns {Object.} JSON object + */ + AppStateSyncKeyId.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AppStateSyncKeyId; + })(); + + Message.AppStateSyncKeyRequest = (function() { + + /** + * Properties of an AppStateSyncKeyRequest. + * @memberof proto.Message + * @interface IAppStateSyncKeyRequest + * @property {Array.|null} [keyIds] AppStateSyncKeyRequest keyIds + */ + + /** + * Constructs a new AppStateSyncKeyRequest. + * @memberof proto.Message + * @classdesc Represents an AppStateSyncKeyRequest. + * @implements IAppStateSyncKeyRequest + * @constructor + * @param {proto.Message.IAppStateSyncKeyRequest=} [properties] Properties to set + */ + function AppStateSyncKeyRequest(properties) { + this.keyIds = []; + 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]]; + } + + /** + * AppStateSyncKeyRequest keyIds. + * @member {Array.} keyIds + * @memberof proto.Message.AppStateSyncKeyRequest + * @instance + */ + AppStateSyncKeyRequest.prototype.keyIds = $util.emptyArray; + + /** + * Creates a new AppStateSyncKeyRequest instance using the specified properties. + * @function create + * @memberof proto.Message.AppStateSyncKeyRequest + * @static + * @param {proto.Message.IAppStateSyncKeyRequest=} [properties] Properties to set + * @returns {proto.Message.AppStateSyncKeyRequest} AppStateSyncKeyRequest instance + */ + AppStateSyncKeyRequest.create = function create(properties) { + return new AppStateSyncKeyRequest(properties); + }; + + /** + * Encodes the specified AppStateSyncKeyRequest message. Does not implicitly {@link proto.Message.AppStateSyncKeyRequest.verify|verify} messages. + * @function encode + * @memberof proto.Message.AppStateSyncKeyRequest + * @static + * @param {proto.Message.IAppStateSyncKeyRequest} message AppStateSyncKeyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppStateSyncKeyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.keyIds != null && message.keyIds.length) + for (var i = 0; i < message.keyIds.length; ++i) + $root.proto.Message.AppStateSyncKeyId.encode(message.keyIds[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AppStateSyncKeyRequest message, length delimited. Does not implicitly {@link proto.Message.AppStateSyncKeyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.AppStateSyncKeyRequest + * @static + * @param {proto.Message.IAppStateSyncKeyRequest} message AppStateSyncKeyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppStateSyncKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AppStateSyncKeyRequest message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.AppStateSyncKeyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.AppStateSyncKeyRequest} AppStateSyncKeyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppStateSyncKeyRequest.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.Message.AppStateSyncKeyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.keyIds && message.keyIds.length)) + message.keyIds = []; + message.keyIds.push($root.proto.Message.AppStateSyncKeyId.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AppStateSyncKeyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.AppStateSyncKeyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.AppStateSyncKeyRequest} AppStateSyncKeyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppStateSyncKeyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AppStateSyncKeyRequest message. + * @function verify + * @memberof proto.Message.AppStateSyncKeyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AppStateSyncKeyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.keyIds != null && message.hasOwnProperty("keyIds")) { + if (!Array.isArray(message.keyIds)) + return "keyIds: array expected"; + for (var i = 0; i < message.keyIds.length; ++i) { + var error = $root.proto.Message.AppStateSyncKeyId.verify(message.keyIds[i]); + if (error) + return "keyIds." + error; + } + } + return null; + }; + + /** + * Creates an AppStateSyncKeyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.AppStateSyncKeyRequest + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.AppStateSyncKeyRequest} AppStateSyncKeyRequest + */ + AppStateSyncKeyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.AppStateSyncKeyRequest) + return object; + var message = new $root.proto.Message.AppStateSyncKeyRequest(); + if (object.keyIds) { + if (!Array.isArray(object.keyIds)) + throw TypeError(".proto.Message.AppStateSyncKeyRequest.keyIds: array expected"); + message.keyIds = []; + for (var i = 0; i < object.keyIds.length; ++i) { + if (typeof object.keyIds[i] !== "object") + throw TypeError(".proto.Message.AppStateSyncKeyRequest.keyIds: object expected"); + message.keyIds[i] = $root.proto.Message.AppStateSyncKeyId.fromObject(object.keyIds[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AppStateSyncKeyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.AppStateSyncKeyRequest + * @static + * @param {proto.Message.AppStateSyncKeyRequest} message AppStateSyncKeyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AppStateSyncKeyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.keyIds = []; + if (message.keyIds && message.keyIds.length) { + object.keyIds = []; + for (var j = 0; j < message.keyIds.length; ++j) + object.keyIds[j] = $root.proto.Message.AppStateSyncKeyId.toObject(message.keyIds[j], options); + } + return object; + }; + + /** + * Converts this AppStateSyncKeyRequest to JSON. + * @function toJSON + * @memberof proto.Message.AppStateSyncKeyRequest + * @instance + * @returns {Object.} JSON object + */ + AppStateSyncKeyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AppStateSyncKeyRequest; + })(); + + Message.AppStateSyncKeyShare = (function() { + + /** + * Properties of an AppStateSyncKeyShare. + * @memberof proto.Message + * @interface IAppStateSyncKeyShare + * @property {Array.|null} [keys] AppStateSyncKeyShare keys + */ + + /** + * Constructs a new AppStateSyncKeyShare. + * @memberof proto.Message + * @classdesc Represents an AppStateSyncKeyShare. + * @implements IAppStateSyncKeyShare + * @constructor + * @param {proto.Message.IAppStateSyncKeyShare=} [properties] Properties to set + */ + function AppStateSyncKeyShare(properties) { + this.keys = []; + 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]]; + } + + /** + * AppStateSyncKeyShare keys. + * @member {Array.} keys + * @memberof proto.Message.AppStateSyncKeyShare + * @instance + */ + AppStateSyncKeyShare.prototype.keys = $util.emptyArray; + + /** + * Creates a new AppStateSyncKeyShare instance using the specified properties. + * @function create + * @memberof proto.Message.AppStateSyncKeyShare + * @static + * @param {proto.Message.IAppStateSyncKeyShare=} [properties] Properties to set + * @returns {proto.Message.AppStateSyncKeyShare} AppStateSyncKeyShare instance + */ + AppStateSyncKeyShare.create = function create(properties) { + return new AppStateSyncKeyShare(properties); + }; + + /** + * Encodes the specified AppStateSyncKeyShare message. Does not implicitly {@link proto.Message.AppStateSyncKeyShare.verify|verify} messages. + * @function encode + * @memberof proto.Message.AppStateSyncKeyShare + * @static + * @param {proto.Message.IAppStateSyncKeyShare} message AppStateSyncKeyShare message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppStateSyncKeyShare.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.keys != null && message.keys.length) + for (var i = 0; i < message.keys.length; ++i) + $root.proto.Message.AppStateSyncKey.encode(message.keys[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AppStateSyncKeyShare message, length delimited. Does not implicitly {@link proto.Message.AppStateSyncKeyShare.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.AppStateSyncKeyShare + * @static + * @param {proto.Message.IAppStateSyncKeyShare} message AppStateSyncKeyShare message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppStateSyncKeyShare.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AppStateSyncKeyShare message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.AppStateSyncKeyShare + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.AppStateSyncKeyShare} AppStateSyncKeyShare + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppStateSyncKeyShare.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.Message.AppStateSyncKeyShare(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.keys && message.keys.length)) + message.keys = []; + message.keys.push($root.proto.Message.AppStateSyncKey.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AppStateSyncKeyShare message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.AppStateSyncKeyShare + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.AppStateSyncKeyShare} AppStateSyncKeyShare + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppStateSyncKeyShare.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AppStateSyncKeyShare message. + * @function verify + * @memberof proto.Message.AppStateSyncKeyShare + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AppStateSyncKeyShare.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.keys != null && message.hasOwnProperty("keys")) { + if (!Array.isArray(message.keys)) + return "keys: array expected"; + for (var i = 0; i < message.keys.length; ++i) { + var error = $root.proto.Message.AppStateSyncKey.verify(message.keys[i]); + if (error) + return "keys." + error; + } + } + return null; + }; + + /** + * Creates an AppStateSyncKeyShare message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.AppStateSyncKeyShare + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.AppStateSyncKeyShare} AppStateSyncKeyShare + */ + AppStateSyncKeyShare.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.AppStateSyncKeyShare) + return object; + var message = new $root.proto.Message.AppStateSyncKeyShare(); + if (object.keys) { + if (!Array.isArray(object.keys)) + throw TypeError(".proto.Message.AppStateSyncKeyShare.keys: array expected"); + message.keys = []; + for (var i = 0; i < object.keys.length; ++i) { + if (typeof object.keys[i] !== "object") + throw TypeError(".proto.Message.AppStateSyncKeyShare.keys: object expected"); + message.keys[i] = $root.proto.Message.AppStateSyncKey.fromObject(object.keys[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AppStateSyncKeyShare message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.AppStateSyncKeyShare + * @static + * @param {proto.Message.AppStateSyncKeyShare} message AppStateSyncKeyShare + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AppStateSyncKeyShare.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.keys = []; + if (message.keys && message.keys.length) { + object.keys = []; + for (var j = 0; j < message.keys.length; ++j) + object.keys[j] = $root.proto.Message.AppStateSyncKey.toObject(message.keys[j], options); + } + return object; + }; + + /** + * Converts this AppStateSyncKeyShare to JSON. + * @function toJSON + * @memberof proto.Message.AppStateSyncKeyShare + * @instance + * @returns {Object.} JSON object + */ + AppStateSyncKeyShare.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AppStateSyncKeyShare; + })(); + + Message.AppStateSyncKey = (function() { + + /** + * Properties of an AppStateSyncKey. + * @memberof proto.Message + * @interface IAppStateSyncKey + * @property {proto.Message.IAppStateSyncKeyId|null} [keyId] AppStateSyncKey keyId + * @property {proto.Message.IAppStateSyncKeyData|null} [keyData] AppStateSyncKey keyData + */ + + /** + * Constructs a new AppStateSyncKey. + * @memberof proto.Message + * @classdesc Represents an AppStateSyncKey. + * @implements IAppStateSyncKey + * @constructor + * @param {proto.Message.IAppStateSyncKey=} [properties] Properties to set + */ + function AppStateSyncKey(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]]; + } + + /** + * AppStateSyncKey keyId. + * @member {proto.Message.IAppStateSyncKeyId|null|undefined} keyId + * @memberof proto.Message.AppStateSyncKey + * @instance + */ + AppStateSyncKey.prototype.keyId = null; + + /** + * AppStateSyncKey keyData. + * @member {proto.Message.IAppStateSyncKeyData|null|undefined} keyData + * @memberof proto.Message.AppStateSyncKey + * @instance + */ + AppStateSyncKey.prototype.keyData = null; + + /** + * Creates a new AppStateSyncKey instance using the specified properties. + * @function create + * @memberof proto.Message.AppStateSyncKey + * @static + * @param {proto.Message.IAppStateSyncKey=} [properties] Properties to set + * @returns {proto.Message.AppStateSyncKey} AppStateSyncKey instance + */ + AppStateSyncKey.create = function create(properties) { + return new AppStateSyncKey(properties); + }; + + /** + * Encodes the specified AppStateSyncKey message. Does not implicitly {@link proto.Message.AppStateSyncKey.verify|verify} messages. + * @function encode + * @memberof proto.Message.AppStateSyncKey + * @static + * @param {proto.Message.IAppStateSyncKey} message AppStateSyncKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppStateSyncKey.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.keyId != null && Object.hasOwnProperty.call(message, "keyId")) + $root.proto.Message.AppStateSyncKeyId.encode(message.keyId, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.keyData != null && Object.hasOwnProperty.call(message, "keyData")) + $root.proto.Message.AppStateSyncKeyData.encode(message.keyData, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AppStateSyncKey message, length delimited. Does not implicitly {@link proto.Message.AppStateSyncKey.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.AppStateSyncKey + * @static + * @param {proto.Message.IAppStateSyncKey} message AppStateSyncKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppStateSyncKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AppStateSyncKey message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.AppStateSyncKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.AppStateSyncKey} AppStateSyncKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppStateSyncKey.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.Message.AppStateSyncKey(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.keyId = $root.proto.Message.AppStateSyncKeyId.decode(reader, reader.uint32()); + break; + case 2: + message.keyData = $root.proto.Message.AppStateSyncKeyData.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AppStateSyncKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.AppStateSyncKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.AppStateSyncKey} AppStateSyncKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppStateSyncKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AppStateSyncKey message. + * @function verify + * @memberof proto.Message.AppStateSyncKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AppStateSyncKey.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.keyId != null && message.hasOwnProperty("keyId")) { + var error = $root.proto.Message.AppStateSyncKeyId.verify(message.keyId); + if (error) + return "keyId." + error; + } + if (message.keyData != null && message.hasOwnProperty("keyData")) { + var error = $root.proto.Message.AppStateSyncKeyData.verify(message.keyData); + if (error) + return "keyData." + error; + } + return null; + }; + + /** + * Creates an AppStateSyncKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.AppStateSyncKey + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.AppStateSyncKey} AppStateSyncKey + */ + AppStateSyncKey.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.AppStateSyncKey) + return object; + var message = new $root.proto.Message.AppStateSyncKey(); + if (object.keyId != null) { + if (typeof object.keyId !== "object") + throw TypeError(".proto.Message.AppStateSyncKey.keyId: object expected"); + message.keyId = $root.proto.Message.AppStateSyncKeyId.fromObject(object.keyId); + } + if (object.keyData != null) { + if (typeof object.keyData !== "object") + throw TypeError(".proto.Message.AppStateSyncKey.keyData: object expected"); + message.keyData = $root.proto.Message.AppStateSyncKeyData.fromObject(object.keyData); + } + return message; + }; + + /** + * Creates a plain object from an AppStateSyncKey message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.AppStateSyncKey + * @static + * @param {proto.Message.AppStateSyncKey} message AppStateSyncKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AppStateSyncKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.keyId = null; + object.keyData = null; + } + if (message.keyId != null && message.hasOwnProperty("keyId")) + object.keyId = $root.proto.Message.AppStateSyncKeyId.toObject(message.keyId, options); + if (message.keyData != null && message.hasOwnProperty("keyData")) + object.keyData = $root.proto.Message.AppStateSyncKeyData.toObject(message.keyData, options); + return object; + }; + + /** + * Converts this AppStateSyncKey to JSON. + * @function toJSON + * @memberof proto.Message.AppStateSyncKey + * @instance + * @returns {Object.} JSON object + */ + AppStateSyncKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AppStateSyncKey; + })(); + + Message.AudioMessage = (function() { + + /** + * Properties of an AudioMessage. + * @memberof proto.Message + * @interface IAudioMessage + * @property {string|null} [url] AudioMessage url + * @property {string|null} [mimetype] AudioMessage mimetype + * @property {Uint8Array|null} [fileSha256] AudioMessage fileSha256 + * @property {number|Long|null} [fileLength] AudioMessage fileLength + * @property {number|null} [seconds] AudioMessage seconds + * @property {boolean|null} [ptt] AudioMessage ptt + * @property {Uint8Array|null} [mediaKey] AudioMessage mediaKey + * @property {Uint8Array|null} [fileEncSha256] AudioMessage fileEncSha256 + * @property {string|null} [directPath] AudioMessage directPath + * @property {number|Long|null} [mediaKeyTimestamp] AudioMessage mediaKeyTimestamp + * @property {proto.IContextInfo|null} [contextInfo] AudioMessage contextInfo + * @property {Uint8Array|null} [streamingSidecar] AudioMessage streamingSidecar + * @property {Uint8Array|null} [waveform] AudioMessage waveform + */ + + /** + * Constructs a new AudioMessage. + * @memberof proto.Message + * @classdesc Represents an AudioMessage. + * @implements IAudioMessage + * @constructor + * @param {proto.Message.IAudioMessage=} [properties] Properties to set + */ + function AudioMessage(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]]; + } + + /** + * AudioMessage url. + * @member {string} url + * @memberof proto.Message.AudioMessage + * @instance + */ + AudioMessage.prototype.url = ""; + + /** + * AudioMessage mimetype. + * @member {string} mimetype + * @memberof proto.Message.AudioMessage + * @instance + */ + AudioMessage.prototype.mimetype = ""; + + /** + * AudioMessage fileSha256. + * @member {Uint8Array} fileSha256 + * @memberof proto.Message.AudioMessage + * @instance + */ + AudioMessage.prototype.fileSha256 = $util.newBuffer([]); + + /** + * AudioMessage fileLength. + * @member {number|Long} fileLength + * @memberof proto.Message.AudioMessage + * @instance + */ + AudioMessage.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * AudioMessage seconds. + * @member {number} seconds + * @memberof proto.Message.AudioMessage + * @instance + */ + AudioMessage.prototype.seconds = 0; + + /** + * AudioMessage ptt. + * @member {boolean} ptt + * @memberof proto.Message.AudioMessage + * @instance + */ + AudioMessage.prototype.ptt = false; + + /** + * AudioMessage mediaKey. + * @member {Uint8Array} mediaKey + * @memberof proto.Message.AudioMessage + * @instance + */ + AudioMessage.prototype.mediaKey = $util.newBuffer([]); + + /** + * AudioMessage fileEncSha256. + * @member {Uint8Array} fileEncSha256 + * @memberof proto.Message.AudioMessage + * @instance + */ + AudioMessage.prototype.fileEncSha256 = $util.newBuffer([]); + + /** + * AudioMessage directPath. + * @member {string} directPath + * @memberof proto.Message.AudioMessage + * @instance + */ + AudioMessage.prototype.directPath = ""; + + /** + * AudioMessage mediaKeyTimestamp. + * @member {number|Long} mediaKeyTimestamp + * @memberof proto.Message.AudioMessage + * @instance + */ + AudioMessage.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * AudioMessage contextInfo. + * @member {proto.IContextInfo|null|undefined} contextInfo + * @memberof proto.Message.AudioMessage + * @instance + */ + AudioMessage.prototype.contextInfo = null; + + /** + * AudioMessage streamingSidecar. + * @member {Uint8Array} streamingSidecar + * @memberof proto.Message.AudioMessage + * @instance + */ + AudioMessage.prototype.streamingSidecar = $util.newBuffer([]); + + /** + * AudioMessage waveform. + * @member {Uint8Array} waveform + * @memberof proto.Message.AudioMessage + * @instance + */ + AudioMessage.prototype.waveform = $util.newBuffer([]); + + /** + * Creates a new AudioMessage instance using the specified properties. + * @function create + * @memberof proto.Message.AudioMessage + * @static + * @param {proto.Message.IAudioMessage=} [properties] Properties to set + * @returns {proto.Message.AudioMessage} AudioMessage instance + */ + AudioMessage.create = function create(properties) { + return new AudioMessage(properties); + }; + + /** + * Encodes the specified AudioMessage message. Does not implicitly {@link proto.Message.AudioMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.AudioMessage + * @static + * @param {proto.Message.IAudioMessage} message AudioMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudioMessage.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.ptt != null && Object.hasOwnProperty.call(message, "ptt")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.ptt); + if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.mediaKey); + if (message.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256")) + writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.fileEncSha256); + if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.directPath); + if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp")) + writer.uint32(/* id 10, wireType 0 =*/80).int64(message.mediaKeyTimestamp); + 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.waveform != null && Object.hasOwnProperty.call(message, "waveform")) + writer.uint32(/* id 19, wireType 2 =*/154).bytes(message.waveform); + return writer; + }; + + /** + * Encodes the specified AudioMessage message, length delimited. Does not implicitly {@link proto.Message.AudioMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.AudioMessage + * @static + * @param {proto.Message.IAudioMessage} message AudioMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudioMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudioMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.AudioMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.AudioMessage} AudioMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudioMessage.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.Message.AudioMessage(); + 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.ptt = reader.bool(); + break; + case 7: + message.mediaKey = reader.bytes(); + break; + case 8: + message.fileEncSha256 = reader.bytes(); + break; + case 9: + message.directPath = reader.string(); + break; + case 10: + message.mediaKeyTimestamp = reader.int64(); + break; + case 17: + message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); + break; + case 18: + message.streamingSidecar = reader.bytes(); + break; + case 19: + message.waveform = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudioMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.AudioMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.AudioMessage} AudioMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudioMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudioMessage message. + * @function verify + * @memberof proto.Message.AudioMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudioMessage.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.ptt != null && message.hasOwnProperty("ptt")) + if (typeof message.ptt !== "boolean") + return "ptt: boolean 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.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.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.waveform != null && message.hasOwnProperty("waveform")) + if (!(message.waveform && typeof message.waveform.length === "number" || $util.isString(message.waveform))) + return "waveform: buffer expected"; + return null; + }; + + /** + * Creates an AudioMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.AudioMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.AudioMessage} AudioMessage + */ + AudioMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.AudioMessage) + return object; + var message = new $root.proto.Message.AudioMessage(); + 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.ptt != null) + message.ptt = Boolean(object.ptt); + 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); + 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.contextInfo != null) { + if (typeof object.contextInfo !== "object") + throw TypeError(".proto.Message.AudioMessage.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; + if (object.waveform != null) + if (typeof object.waveform === "string") + $util.base64.decode(object.waveform, message.waveform = $util.newBuffer($util.base64.length(object.waveform)), 0); + else if (object.waveform.length) + message.waveform = object.waveform; + return message; + }; + + /** + * Creates a plain object from an AudioMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.AudioMessage + * @static + * @param {proto.Message.AudioMessage} message AudioMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudioMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + 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; + object.ptt = false; + 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 = ""; + 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.contextInfo = null; + if (options.bytes === String) + object.streamingSidecar = ""; + else { + object.streamingSidecar = []; + if (options.bytes !== Array) + object.streamingSidecar = $util.newBuffer(object.streamingSidecar); + } + if (options.bytes === String) + object.waveform = ""; + else { + object.waveform = []; + if (options.bytes !== Array) + object.waveform = $util.newBuffer(object.waveform); + } + } + 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.ptt != null && message.hasOwnProperty("ptt")) + object.ptt = message.ptt; + 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.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.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.waveform != null && message.hasOwnProperty("waveform")) + object.waveform = options.bytes === String ? $util.base64.encode(message.waveform, 0, message.waveform.length) : options.bytes === Array ? Array.prototype.slice.call(message.waveform) : message.waveform; + return object; + }; + + /** + * Converts this AudioMessage to JSON. + * @function toJSON + * @memberof proto.Message.AudioMessage + * @instance + * @returns {Object.} JSON object + */ + AudioMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AudioMessage; + })(); + + Message.ButtonsMessage = (function() { + + /** + * Properties of a ButtonsMessage. + * @memberof proto.Message + * @interface IButtonsMessage + * @property {string|null} [contentText] ButtonsMessage contentText + * @property {string|null} [footerText] ButtonsMessage footerText + * @property {proto.IContextInfo|null} [contextInfo] ButtonsMessage contextInfo + * @property {Array.|null} [buttons] ButtonsMessage buttons + * @property {proto.Message.ButtonsMessage.HeaderType|null} [headerType] ButtonsMessage headerType + * @property {string|null} [text] ButtonsMessage text + * @property {proto.Message.IDocumentMessage|null} [documentMessage] ButtonsMessage documentMessage + * @property {proto.Message.IImageMessage|null} [imageMessage] ButtonsMessage imageMessage + * @property {proto.Message.IVideoMessage|null} [videoMessage] ButtonsMessage videoMessage + * @property {proto.Message.ILocationMessage|null} [locationMessage] ButtonsMessage locationMessage + */ + + /** + * Constructs a new ButtonsMessage. + * @memberof proto.Message + * @classdesc Represents a ButtonsMessage. + * @implements IButtonsMessage + * @constructor + * @param {proto.Message.IButtonsMessage=} [properties] Properties to set + */ + function ButtonsMessage(properties) { + this.buttons = []; + 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]]; + } + + /** + * ButtonsMessage contentText. + * @member {string} contentText + * @memberof proto.Message.ButtonsMessage + * @instance + */ + ButtonsMessage.prototype.contentText = ""; + + /** + * ButtonsMessage footerText. + * @member {string} footerText + * @memberof proto.Message.ButtonsMessage + * @instance + */ + ButtonsMessage.prototype.footerText = ""; + + /** + * ButtonsMessage contextInfo. + * @member {proto.IContextInfo|null|undefined} contextInfo + * @memberof proto.Message.ButtonsMessage + * @instance + */ + ButtonsMessage.prototype.contextInfo = null; + + /** + * ButtonsMessage buttons. + * @member {Array.} buttons + * @memberof proto.Message.ButtonsMessage + * @instance + */ + ButtonsMessage.prototype.buttons = $util.emptyArray; + + /** + * ButtonsMessage headerType. + * @member {proto.Message.ButtonsMessage.HeaderType} headerType + * @memberof proto.Message.ButtonsMessage + * @instance + */ + ButtonsMessage.prototype.headerType = 0; + + /** + * ButtonsMessage text. + * @member {string|null|undefined} text + * @memberof proto.Message.ButtonsMessage + * @instance + */ + ButtonsMessage.prototype.text = null; + + /** + * ButtonsMessage documentMessage. + * @member {proto.Message.IDocumentMessage|null|undefined} documentMessage + * @memberof proto.Message.ButtonsMessage + * @instance + */ + ButtonsMessage.prototype.documentMessage = null; + + /** + * ButtonsMessage imageMessage. + * @member {proto.Message.IImageMessage|null|undefined} imageMessage + * @memberof proto.Message.ButtonsMessage + * @instance + */ + ButtonsMessage.prototype.imageMessage = null; + + /** + * ButtonsMessage videoMessage. + * @member {proto.Message.IVideoMessage|null|undefined} videoMessage + * @memberof proto.Message.ButtonsMessage + * @instance + */ + ButtonsMessage.prototype.videoMessage = null; + + /** + * ButtonsMessage locationMessage. + * @member {proto.Message.ILocationMessage|null|undefined} locationMessage + * @memberof proto.Message.ButtonsMessage + * @instance + */ + ButtonsMessage.prototype.locationMessage = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ButtonsMessage header. + * @member {"text"|"documentMessage"|"imageMessage"|"videoMessage"|"locationMessage"|undefined} header + * @memberof proto.Message.ButtonsMessage + * @instance + */ + Object.defineProperty(ButtonsMessage.prototype, "header", { + get: $util.oneOfGetter($oneOfFields = ["text", "documentMessage", "imageMessage", "videoMessage", "locationMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ButtonsMessage instance using the specified properties. + * @function create + * @memberof proto.Message.ButtonsMessage + * @static + * @param {proto.Message.IButtonsMessage=} [properties] Properties to set + * @returns {proto.Message.ButtonsMessage} ButtonsMessage instance + */ + ButtonsMessage.create = function create(properties) { + return new ButtonsMessage(properties); + }; + + /** + * Encodes the specified ButtonsMessage message. Does not implicitly {@link proto.Message.ButtonsMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.ButtonsMessage + * @static + * @param {proto.Message.IButtonsMessage} message ButtonsMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ButtonsMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + if (message.documentMessage != null && Object.hasOwnProperty.call(message, "documentMessage")) + $root.proto.Message.DocumentMessage.encode(message.documentMessage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.imageMessage != null && Object.hasOwnProperty.call(message, "imageMessage")) + $root.proto.Message.ImageMessage.encode(message.imageMessage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.videoMessage != null && Object.hasOwnProperty.call(message, "videoMessage")) + $root.proto.Message.VideoMessage.encode(message.videoMessage, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.locationMessage != null && Object.hasOwnProperty.call(message, "locationMessage")) + $root.proto.Message.LocationMessage.encode(message.locationMessage, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.contentText != null && Object.hasOwnProperty.call(message, "contentText")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.contentText); + if (message.footerText != null && Object.hasOwnProperty.call(message, "footerText")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.footerText); + if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) + $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.buttons != null && message.buttons.length) + for (var i = 0; i < message.buttons.length; ++i) + $root.proto.Message.ButtonsMessage.Button.encode(message.buttons[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.headerType != null && Object.hasOwnProperty.call(message, "headerType")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.headerType); + return writer; + }; + + /** + * Encodes the specified ButtonsMessage message, length delimited. Does not implicitly {@link proto.Message.ButtonsMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.ButtonsMessage + * @static + * @param {proto.Message.IButtonsMessage} message ButtonsMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ButtonsMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ButtonsMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.ButtonsMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.ButtonsMessage} ButtonsMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ButtonsMessage.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.Message.ButtonsMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 6: + message.contentText = reader.string(); + break; + case 7: + message.footerText = reader.string(); + break; + case 8: + message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); + break; + case 9: + if (!(message.buttons && message.buttons.length)) + message.buttons = []; + message.buttons.push($root.proto.Message.ButtonsMessage.Button.decode(reader, reader.uint32())); + break; + case 10: + message.headerType = reader.int32(); + break; + case 1: + message.text = reader.string(); + break; + case 2: + message.documentMessage = $root.proto.Message.DocumentMessage.decode(reader, reader.uint32()); + break; + case 3: + message.imageMessage = $root.proto.Message.ImageMessage.decode(reader, reader.uint32()); + break; + case 4: + message.videoMessage = $root.proto.Message.VideoMessage.decode(reader, reader.uint32()); + break; + case 5: + message.locationMessage = $root.proto.Message.LocationMessage.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ButtonsMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.ButtonsMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.ButtonsMessage} ButtonsMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ButtonsMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ButtonsMessage message. + * @function verify + * @memberof proto.Message.ButtonsMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ButtonsMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.contentText != null && message.hasOwnProperty("contentText")) + if (!$util.isString(message.contentText)) + return "contentText: string expected"; + if (message.footerText != null && message.hasOwnProperty("footerText")) + if (!$util.isString(message.footerText)) + return "footerText: string expected"; + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } + if (message.buttons != null && message.hasOwnProperty("buttons")) { + if (!Array.isArray(message.buttons)) + return "buttons: array expected"; + for (var i = 0; i < message.buttons.length; ++i) { + var error = $root.proto.Message.ButtonsMessage.Button.verify(message.buttons[i]); + if (error) + return "buttons." + error; + } + } + if (message.headerType != null && message.hasOwnProperty("headerType")) + switch (message.headerType) { + default: + return "headerType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.text != null && message.hasOwnProperty("text")) { + properties.header = 1; + if (!$util.isString(message.text)) + return "text: string expected"; + } + if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) { + if (properties.header === 1) + return "header: multiple values"; + properties.header = 1; + { + var error = $root.proto.Message.DocumentMessage.verify(message.documentMessage); + if (error) + return "documentMessage." + error; + } + } + if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) { + if (properties.header === 1) + return "header: multiple values"; + properties.header = 1; + { + var error = $root.proto.Message.ImageMessage.verify(message.imageMessage); + if (error) + return "imageMessage." + error; + } + } + if (message.videoMessage != null && message.hasOwnProperty("videoMessage")) { + if (properties.header === 1) + return "header: multiple values"; + properties.header = 1; + { + var error = $root.proto.Message.VideoMessage.verify(message.videoMessage); + if (error) + return "videoMessage." + error; + } + } + if (message.locationMessage != null && message.hasOwnProperty("locationMessage")) { + if (properties.header === 1) + return "header: multiple values"; + properties.header = 1; + { + var error = $root.proto.Message.LocationMessage.verify(message.locationMessage); + if (error) + return "locationMessage." + error; + } + } + return null; + }; + + /** + * Creates a ButtonsMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.ButtonsMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.ButtonsMessage} ButtonsMessage + */ + ButtonsMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.ButtonsMessage) + return object; + var message = new $root.proto.Message.ButtonsMessage(); + if (object.contentText != null) + message.contentText = String(object.contentText); + if (object.footerText != null) + message.footerText = String(object.footerText); + if (object.contextInfo != null) { + if (typeof object.contextInfo !== "object") + throw TypeError(".proto.Message.ButtonsMessage.contextInfo: object expected"); + message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); + } + if (object.buttons) { + if (!Array.isArray(object.buttons)) + throw TypeError(".proto.Message.ButtonsMessage.buttons: array expected"); + message.buttons = []; + for (var i = 0; i < object.buttons.length; ++i) { + if (typeof object.buttons[i] !== "object") + throw TypeError(".proto.Message.ButtonsMessage.buttons: object expected"); + message.buttons[i] = $root.proto.Message.ButtonsMessage.Button.fromObject(object.buttons[i]); + } + } + switch (object.headerType) { + case "UNKNOWN": + case 0: + message.headerType = 0; + break; + case "EMPTY": + case 1: + message.headerType = 1; + break; + case "TEXT": + case 2: + message.headerType = 2; + break; + case "DOCUMENT": + case 3: + message.headerType = 3; + break; + case "IMAGE": + case 4: + message.headerType = 4; + break; + case "VIDEO": + case 5: + message.headerType = 5; + break; + case "LOCATION": + case 6: + message.headerType = 6; + break; + } + if (object.text != null) + message.text = String(object.text); + if (object.documentMessage != null) { + if (typeof object.documentMessage !== "object") + throw TypeError(".proto.Message.ButtonsMessage.documentMessage: object expected"); + message.documentMessage = $root.proto.Message.DocumentMessage.fromObject(object.documentMessage); + } + if (object.imageMessage != null) { + if (typeof object.imageMessage !== "object") + throw TypeError(".proto.Message.ButtonsMessage.imageMessage: object expected"); + message.imageMessage = $root.proto.Message.ImageMessage.fromObject(object.imageMessage); + } + if (object.videoMessage != null) { + if (typeof object.videoMessage !== "object") + throw TypeError(".proto.Message.ButtonsMessage.videoMessage: object expected"); + message.videoMessage = $root.proto.Message.VideoMessage.fromObject(object.videoMessage); + } + if (object.locationMessage != null) { + if (typeof object.locationMessage !== "object") + throw TypeError(".proto.Message.ButtonsMessage.locationMessage: object expected"); + message.locationMessage = $root.proto.Message.LocationMessage.fromObject(object.locationMessage); + } + return message; + }; + + /** + * Creates a plain object from a ButtonsMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.ButtonsMessage + * @static + * @param {proto.Message.ButtonsMessage} message ButtonsMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ButtonsMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.buttons = []; + if (options.defaults) { + object.contentText = ""; + object.footerText = ""; + object.contextInfo = null; + object.headerType = options.enums === String ? "UNKNOWN" : 0; + } + if (message.text != null && message.hasOwnProperty("text")) { + object.text = message.text; + if (options.oneofs) + object.header = "text"; + } + if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) { + object.documentMessage = $root.proto.Message.DocumentMessage.toObject(message.documentMessage, options); + if (options.oneofs) + object.header = "documentMessage"; + } + if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) { + object.imageMessage = $root.proto.Message.ImageMessage.toObject(message.imageMessage, options); + if (options.oneofs) + object.header = "imageMessage"; + } + if (message.videoMessage != null && message.hasOwnProperty("videoMessage")) { + object.videoMessage = $root.proto.Message.VideoMessage.toObject(message.videoMessage, options); + if (options.oneofs) + object.header = "videoMessage"; + } + if (message.locationMessage != null && message.hasOwnProperty("locationMessage")) { + object.locationMessage = $root.proto.Message.LocationMessage.toObject(message.locationMessage, options); + if (options.oneofs) + object.header = "locationMessage"; + } + if (message.contentText != null && message.hasOwnProperty("contentText")) + object.contentText = message.contentText; + if (message.footerText != null && message.hasOwnProperty("footerText")) + object.footerText = message.footerText; + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) + object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + if (message.buttons && message.buttons.length) { + object.buttons = []; + for (var j = 0; j < message.buttons.length; ++j) + object.buttons[j] = $root.proto.Message.ButtonsMessage.Button.toObject(message.buttons[j], options); + } + if (message.headerType != null && message.hasOwnProperty("headerType")) + object.headerType = options.enums === String ? $root.proto.Message.ButtonsMessage.HeaderType[message.headerType] : message.headerType; + return object; + }; + + /** + * Converts this ButtonsMessage to JSON. + * @function toJSON + * @memberof proto.Message.ButtonsMessage + * @instance + * @returns {Object.} JSON object + */ + ButtonsMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + ButtonsMessage.Button = (function() { + + /** + * Properties of a Button. + * @memberof proto.Message.ButtonsMessage + * @interface IButton + * @property {string|null} [buttonId] Button buttonId + * @property {proto.Message.ButtonsMessage.Button.IButtonText|null} [buttonText] Button buttonText + * @property {proto.Message.ButtonsMessage.Button.Type|null} [type] Button type + * @property {proto.Message.ButtonsMessage.Button.INativeFlowInfo|null} [nativeFlowInfo] Button nativeFlowInfo + */ + + /** + * Constructs a new Button. + * @memberof proto.Message.ButtonsMessage + * @classdesc Represents a Button. + * @implements IButton + * @constructor + * @param {proto.Message.ButtonsMessage.IButton=} [properties] Properties to set + */ + function Button(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]]; + } + + /** + * Button buttonId. + * @member {string} buttonId + * @memberof proto.Message.ButtonsMessage.Button + * @instance + */ + Button.prototype.buttonId = ""; + + /** + * Button buttonText. + * @member {proto.Message.ButtonsMessage.Button.IButtonText|null|undefined} buttonText + * @memberof proto.Message.ButtonsMessage.Button + * @instance + */ + Button.prototype.buttonText = null; + + /** + * Button type. + * @member {proto.Message.ButtonsMessage.Button.Type} type + * @memberof proto.Message.ButtonsMessage.Button + * @instance + */ + Button.prototype.type = 0; + + /** + * Button nativeFlowInfo. + * @member {proto.Message.ButtonsMessage.Button.INativeFlowInfo|null|undefined} nativeFlowInfo + * @memberof proto.Message.ButtonsMessage.Button + * @instance + */ + Button.prototype.nativeFlowInfo = null; + + /** + * Creates a new Button instance using the specified properties. + * @function create + * @memberof proto.Message.ButtonsMessage.Button + * @static + * @param {proto.Message.ButtonsMessage.IButton=} [properties] Properties to set + * @returns {proto.Message.ButtonsMessage.Button} Button instance + */ + Button.create = function create(properties) { + return new Button(properties); + }; + + /** + * Encodes the specified Button message. Does not implicitly {@link proto.Message.ButtonsMessage.Button.verify|verify} messages. + * @function encode + * @memberof proto.Message.ButtonsMessage.Button + * @static + * @param {proto.Message.ButtonsMessage.IButton} message Button message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Button.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.buttonId != null && Object.hasOwnProperty.call(message, "buttonId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.buttonId); + if (message.buttonText != null && Object.hasOwnProperty.call(message, "buttonText")) + $root.proto.Message.ButtonsMessage.Button.ButtonText.encode(message.buttonText, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type); + if (message.nativeFlowInfo != null && Object.hasOwnProperty.call(message, "nativeFlowInfo")) + $root.proto.Message.ButtonsMessage.Button.NativeFlowInfo.encode(message.nativeFlowInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Button message, length delimited. Does not implicitly {@link proto.Message.ButtonsMessage.Button.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.ButtonsMessage.Button + * @static + * @param {proto.Message.ButtonsMessage.IButton} message Button message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Button.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Button message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.ButtonsMessage.Button + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.ButtonsMessage.Button} Button + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Button.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.Message.ButtonsMessage.Button(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.buttonId = reader.string(); + break; + case 2: + message.buttonText = $root.proto.Message.ButtonsMessage.Button.ButtonText.decode(reader, reader.uint32()); + break; + case 3: + message.type = reader.int32(); + break; + case 4: + message.nativeFlowInfo = $root.proto.Message.ButtonsMessage.Button.NativeFlowInfo.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Button message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.ButtonsMessage.Button + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.ButtonsMessage.Button} Button + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Button.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Button message. + * @function verify + * @memberof proto.Message.ButtonsMessage.Button + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Button.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.buttonId != null && message.hasOwnProperty("buttonId")) + if (!$util.isString(message.buttonId)) + return "buttonId: string expected"; + if (message.buttonText != null && message.hasOwnProperty("buttonText")) { + var error = $root.proto.Message.ButtonsMessage.Button.ButtonText.verify(message.buttonText); + if (error) + return "buttonText." + error; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.nativeFlowInfo != null && message.hasOwnProperty("nativeFlowInfo")) { + var error = $root.proto.Message.ButtonsMessage.Button.NativeFlowInfo.verify(message.nativeFlowInfo); + if (error) + return "nativeFlowInfo." + error; + } + return null; + }; + + /** + * Creates a Button message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.ButtonsMessage.Button + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.ButtonsMessage.Button} Button + */ + Button.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.ButtonsMessage.Button) + return object; + var message = new $root.proto.Message.ButtonsMessage.Button(); + if (object.buttonId != null) + message.buttonId = String(object.buttonId); + if (object.buttonText != null) { + if (typeof object.buttonText !== "object") + throw TypeError(".proto.Message.ButtonsMessage.Button.buttonText: object expected"); + message.buttonText = $root.proto.Message.ButtonsMessage.Button.ButtonText.fromObject(object.buttonText); + } + switch (object.type) { + case "UNKNOWN": + case 0: + message.type = 0; + break; + case "RESPONSE": + case 1: + message.type = 1; + break; + case "NATIVE_FLOW": + case 2: + message.type = 2; + break; + } + if (object.nativeFlowInfo != null) { + if (typeof object.nativeFlowInfo !== "object") + throw TypeError(".proto.Message.ButtonsMessage.Button.nativeFlowInfo: object expected"); + message.nativeFlowInfo = $root.proto.Message.ButtonsMessage.Button.NativeFlowInfo.fromObject(object.nativeFlowInfo); + } + return message; + }; + + /** + * Creates a plain object from a Button message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.ButtonsMessage.Button + * @static + * @param {proto.Message.ButtonsMessage.Button} message Button + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Button.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.buttonId = ""; + object.buttonText = null; + object.type = options.enums === String ? "UNKNOWN" : 0; + object.nativeFlowInfo = null; + } + if (message.buttonId != null && message.hasOwnProperty("buttonId")) + object.buttonId = message.buttonId; + if (message.buttonText != null && message.hasOwnProperty("buttonText")) + object.buttonText = $root.proto.Message.ButtonsMessage.Button.ButtonText.toObject(message.buttonText, options); + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.proto.Message.ButtonsMessage.Button.Type[message.type] : message.type; + if (message.nativeFlowInfo != null && message.hasOwnProperty("nativeFlowInfo")) + object.nativeFlowInfo = $root.proto.Message.ButtonsMessage.Button.NativeFlowInfo.toObject(message.nativeFlowInfo, options); + return object; + }; + + /** + * Converts this Button to JSON. + * @function toJSON + * @memberof proto.Message.ButtonsMessage.Button + * @instance + * @returns {Object.} JSON object + */ + Button.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Button.ButtonText = (function() { + + /** + * Properties of a ButtonText. + * @memberof proto.Message.ButtonsMessage.Button + * @interface IButtonText + * @property {string|null} [displayText] ButtonText displayText + */ + + /** + * Constructs a new ButtonText. + * @memberof proto.Message.ButtonsMessage.Button + * @classdesc Represents a ButtonText. + * @implements IButtonText + * @constructor + * @param {proto.Message.ButtonsMessage.Button.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.Message.ButtonsMessage.Button.ButtonText + * @instance + */ + ButtonText.prototype.displayText = ""; + + /** + * Creates a new ButtonText instance using the specified properties. + * @function create + * @memberof proto.Message.ButtonsMessage.Button.ButtonText + * @static + * @param {proto.Message.ButtonsMessage.Button.IButtonText=} [properties] Properties to set + * @returns {proto.Message.ButtonsMessage.Button.ButtonText} ButtonText instance + */ + ButtonText.create = function create(properties) { + return new ButtonText(properties); + }; + + /** + * Encodes the specified ButtonText message. Does not implicitly {@link proto.Message.ButtonsMessage.Button.ButtonText.verify|verify} messages. + * @function encode + * @memberof proto.Message.ButtonsMessage.Button.ButtonText + * @static + * @param {proto.Message.ButtonsMessage.Button.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.Message.ButtonsMessage.Button.ButtonText.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.ButtonsMessage.Button.ButtonText + * @static + * @param {proto.Message.ButtonsMessage.Button.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.Message.ButtonsMessage.Button.ButtonText + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.ButtonsMessage.Button.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.Message.ButtonsMessage.Button.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.Message.ButtonsMessage.Button.ButtonText + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.ButtonsMessage.Button.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.Message.ButtonsMessage.Button.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.Message.ButtonsMessage.Button.ButtonText + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.ButtonsMessage.Button.ButtonText} ButtonText + */ + ButtonText.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.ButtonsMessage.Button.ButtonText) + return object; + var message = new $root.proto.Message.ButtonsMessage.Button.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.Message.ButtonsMessage.Button.ButtonText + * @static + * @param {proto.Message.ButtonsMessage.Button.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.Message.ButtonsMessage.Button.ButtonText + * @instance + * @returns {Object.} JSON object + */ + ButtonText.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ButtonText; + })(); + + Button.NativeFlowInfo = (function() { + + /** + * Properties of a NativeFlowInfo. + * @memberof proto.Message.ButtonsMessage.Button + * @interface INativeFlowInfo + * @property {string|null} [name] NativeFlowInfo name + * @property {string|null} [paramsJson] NativeFlowInfo paramsJson + */ + + /** + * Constructs a new NativeFlowInfo. + * @memberof proto.Message.ButtonsMessage.Button + * @classdesc Represents a NativeFlowInfo. + * @implements INativeFlowInfo + * @constructor + * @param {proto.Message.ButtonsMessage.Button.INativeFlowInfo=} [properties] Properties to set + */ + function NativeFlowInfo(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]]; + } + + /** + * NativeFlowInfo name. + * @member {string} name + * @memberof proto.Message.ButtonsMessage.Button.NativeFlowInfo + * @instance + */ + NativeFlowInfo.prototype.name = ""; + + /** + * NativeFlowInfo paramsJson. + * @member {string} paramsJson + * @memberof proto.Message.ButtonsMessage.Button.NativeFlowInfo + * @instance + */ + NativeFlowInfo.prototype.paramsJson = ""; + + /** + * Creates a new NativeFlowInfo instance using the specified properties. + * @function create + * @memberof proto.Message.ButtonsMessage.Button.NativeFlowInfo + * @static + * @param {proto.Message.ButtonsMessage.Button.INativeFlowInfo=} [properties] Properties to set + * @returns {proto.Message.ButtonsMessage.Button.NativeFlowInfo} NativeFlowInfo instance + */ + NativeFlowInfo.create = function create(properties) { + return new NativeFlowInfo(properties); + }; + + /** + * Encodes the specified NativeFlowInfo message. Does not implicitly {@link proto.Message.ButtonsMessage.Button.NativeFlowInfo.verify|verify} messages. + * @function encode + * @memberof proto.Message.ButtonsMessage.Button.NativeFlowInfo + * @static + * @param {proto.Message.ButtonsMessage.Button.INativeFlowInfo} message NativeFlowInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NativeFlowInfo.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.paramsJson != null && Object.hasOwnProperty.call(message, "paramsJson")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.paramsJson); + return writer; + }; + + /** + * Encodes the specified NativeFlowInfo message, length delimited. Does not implicitly {@link proto.Message.ButtonsMessage.Button.NativeFlowInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.ButtonsMessage.Button.NativeFlowInfo + * @static + * @param {proto.Message.ButtonsMessage.Button.INativeFlowInfo} message NativeFlowInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NativeFlowInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NativeFlowInfo message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.ButtonsMessage.Button.NativeFlowInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.ButtonsMessage.Button.NativeFlowInfo} NativeFlowInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NativeFlowInfo.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.Message.ButtonsMessage.Button.NativeFlowInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.paramsJson = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NativeFlowInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.ButtonsMessage.Button.NativeFlowInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.ButtonsMessage.Button.NativeFlowInfo} NativeFlowInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NativeFlowInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NativeFlowInfo message. + * @function verify + * @memberof proto.Message.ButtonsMessage.Button.NativeFlowInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NativeFlowInfo.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.paramsJson != null && message.hasOwnProperty("paramsJson")) + if (!$util.isString(message.paramsJson)) + return "paramsJson: string expected"; + return null; + }; + + /** + * Creates a NativeFlowInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.ButtonsMessage.Button.NativeFlowInfo + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.ButtonsMessage.Button.NativeFlowInfo} NativeFlowInfo + */ + NativeFlowInfo.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.ButtonsMessage.Button.NativeFlowInfo) + return object; + var message = new $root.proto.Message.ButtonsMessage.Button.NativeFlowInfo(); + if (object.name != null) + message.name = String(object.name); + if (object.paramsJson != null) + message.paramsJson = String(object.paramsJson); + return message; + }; + + /** + * Creates a plain object from a NativeFlowInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.ButtonsMessage.Button.NativeFlowInfo + * @static + * @param {proto.Message.ButtonsMessage.Button.NativeFlowInfo} message NativeFlowInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NativeFlowInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.paramsJson = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.paramsJson != null && message.hasOwnProperty("paramsJson")) + object.paramsJson = message.paramsJson; + return object; + }; + + /** + * Converts this NativeFlowInfo to JSON. + * @function toJSON + * @memberof proto.Message.ButtonsMessage.Button.NativeFlowInfo + * @instance + * @returns {Object.} JSON object + */ + NativeFlowInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return NativeFlowInfo; + })(); + + /** + * Type enum. + * @name proto.Message.ButtonsMessage.Button.Type + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} RESPONSE=1 RESPONSE value + * @property {number} NATIVE_FLOW=2 NATIVE_FLOW value + */ + Button.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "RESPONSE"] = 1; + values[valuesById[2] = "NATIVE_FLOW"] = 2; + return values; + })(); + + return Button; + })(); + + /** + * HeaderType enum. + * @name proto.Message.ButtonsMessage.HeaderType + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} EMPTY=1 EMPTY value + * @property {number} TEXT=2 TEXT value + * @property {number} DOCUMENT=3 DOCUMENT value + * @property {number} IMAGE=4 IMAGE value + * @property {number} VIDEO=5 VIDEO value + * @property {number} LOCATION=6 LOCATION value + */ + ButtonsMessage.HeaderType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "EMPTY"] = 1; + values[valuesById[2] = "TEXT"] = 2; + values[valuesById[3] = "DOCUMENT"] = 3; + values[valuesById[4] = "IMAGE"] = 4; + values[valuesById[5] = "VIDEO"] = 5; + values[valuesById[6] = "LOCATION"] = 6; + return values; + })(); + + return ButtonsMessage; + })(); + + Message.ButtonsResponseMessage = (function() { + + /** + * Properties of a ButtonsResponseMessage. + * @memberof proto.Message + * @interface IButtonsResponseMessage + * @property {string|null} [selectedButtonId] ButtonsResponseMessage selectedButtonId + * @property {proto.IContextInfo|null} [contextInfo] ButtonsResponseMessage contextInfo + * @property {proto.Message.ButtonsResponseMessage.Type|null} [type] ButtonsResponseMessage type + * @property {string|null} [selectedDisplayText] ButtonsResponseMessage selectedDisplayText + */ + + /** + * Constructs a new ButtonsResponseMessage. + * @memberof proto.Message + * @classdesc Represents a ButtonsResponseMessage. + * @implements IButtonsResponseMessage + * @constructor + * @param {proto.Message.IButtonsResponseMessage=} [properties] Properties to set + */ + function ButtonsResponseMessage(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]]; + } + + /** + * ButtonsResponseMessage selectedButtonId. + * @member {string} selectedButtonId + * @memberof proto.Message.ButtonsResponseMessage + * @instance + */ + ButtonsResponseMessage.prototype.selectedButtonId = ""; + + /** + * ButtonsResponseMessage contextInfo. + * @member {proto.IContextInfo|null|undefined} contextInfo + * @memberof proto.Message.ButtonsResponseMessage + * @instance + */ + ButtonsResponseMessage.prototype.contextInfo = null; + + /** + * ButtonsResponseMessage type. + * @member {proto.Message.ButtonsResponseMessage.Type} type + * @memberof proto.Message.ButtonsResponseMessage + * @instance + */ + ButtonsResponseMessage.prototype.type = 0; + + /** + * ButtonsResponseMessage selectedDisplayText. + * @member {string|null|undefined} selectedDisplayText + * @memberof proto.Message.ButtonsResponseMessage + * @instance + */ + ButtonsResponseMessage.prototype.selectedDisplayText = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ButtonsResponseMessage response. + * @member {"selectedDisplayText"|undefined} response + * @memberof proto.Message.ButtonsResponseMessage + * @instance + */ + Object.defineProperty(ButtonsResponseMessage.prototype, "response", { + get: $util.oneOfGetter($oneOfFields = ["selectedDisplayText"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ButtonsResponseMessage instance using the specified properties. + * @function create + * @memberof proto.Message.ButtonsResponseMessage + * @static + * @param {proto.Message.IButtonsResponseMessage=} [properties] Properties to set + * @returns {proto.Message.ButtonsResponseMessage} ButtonsResponseMessage instance + */ + ButtonsResponseMessage.create = function create(properties) { + return new ButtonsResponseMessage(properties); + }; + + /** + * Encodes the specified ButtonsResponseMessage message. Does not implicitly {@link proto.Message.ButtonsResponseMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.ButtonsResponseMessage + * @static + * @param {proto.Message.IButtonsResponseMessage} message ButtonsResponseMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ButtonsResponseMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selectedButtonId != null && Object.hasOwnProperty.call(message, "selectedButtonId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selectedButtonId); + 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.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.type); + return writer; + }; + + /** + * Encodes the specified ButtonsResponseMessage message, length delimited. Does not implicitly {@link proto.Message.ButtonsResponseMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.ButtonsResponseMessage + * @static + * @param {proto.Message.IButtonsResponseMessage} message ButtonsResponseMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ButtonsResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ButtonsResponseMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.ButtonsResponseMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.ButtonsResponseMessage} ButtonsResponseMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ButtonsResponseMessage.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.Message.ButtonsResponseMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.selectedButtonId = reader.string(); + break; + case 3: + message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); + break; + case 4: + message.type = reader.int32(); + break; + case 2: + message.selectedDisplayText = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ButtonsResponseMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.ButtonsResponseMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.ButtonsResponseMessage} ButtonsResponseMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ButtonsResponseMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ButtonsResponseMessage message. + * @function verify + * @memberof proto.Message.ButtonsResponseMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ButtonsResponseMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selectedButtonId != null && message.hasOwnProperty("selectedButtonId")) + if (!$util.isString(message.selectedButtonId)) + return "selectedButtonId: string expected"; + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + break; + } + if (message.selectedDisplayText != null && message.hasOwnProperty("selectedDisplayText")) { + properties.response = 1; + if (!$util.isString(message.selectedDisplayText)) + return "selectedDisplayText: string expected"; + } + return null; + }; + + /** + * Creates a ButtonsResponseMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.ButtonsResponseMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.ButtonsResponseMessage} ButtonsResponseMessage + */ + ButtonsResponseMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.ButtonsResponseMessage) + return object; + var message = new $root.proto.Message.ButtonsResponseMessage(); + if (object.selectedButtonId != null) + message.selectedButtonId = String(object.selectedButtonId); + if (object.contextInfo != null) { + if (typeof object.contextInfo !== "object") + throw TypeError(".proto.Message.ButtonsResponseMessage.contextInfo: object expected"); + message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); + } + switch (object.type) { + case "UNKNOWN": + case 0: + message.type = 0; + break; + case "DISPLAY_TEXT": + case 1: + message.type = 1; + break; + } + if (object.selectedDisplayText != null) + message.selectedDisplayText = String(object.selectedDisplayText); + return message; + }; + + /** + * Creates a plain object from a ButtonsResponseMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.ButtonsResponseMessage + * @static + * @param {proto.Message.ButtonsResponseMessage} message ButtonsResponseMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ButtonsResponseMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.selectedButtonId = ""; + object.contextInfo = null; + object.type = options.enums === String ? "UNKNOWN" : 0; + } + if (message.selectedButtonId != null && message.hasOwnProperty("selectedButtonId")) + object.selectedButtonId = message.selectedButtonId; + if (message.selectedDisplayText != null && message.hasOwnProperty("selectedDisplayText")) { + object.selectedDisplayText = message.selectedDisplayText; + if (options.oneofs) + object.response = "selectedDisplayText"; + } + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) + object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.proto.Message.ButtonsResponseMessage.Type[message.type] : message.type; + return object; + }; + + /** + * Converts this ButtonsResponseMessage to JSON. + * @function toJSON + * @memberof proto.Message.ButtonsResponseMessage + * @instance + * @returns {Object.} JSON object + */ + ButtonsResponseMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name proto.Message.ButtonsResponseMessage.Type + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} DISPLAY_TEXT=1 DISPLAY_TEXT value + */ + ButtonsResponseMessage.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "DISPLAY_TEXT"] = 1; + return values; + })(); + + return ButtonsResponseMessage; + })(); + + Message.Call = (function() { + + /** + * Properties of a Call. + * @memberof proto.Message + * @interface ICall + * @property {Uint8Array|null} [callKey] Call callKey + * @property {string|null} [conversionSource] Call conversionSource + * @property {Uint8Array|null} [conversionData] Call conversionData + * @property {number|null} [conversionDelaySeconds] Call conversionDelaySeconds + */ + + /** + * Constructs a new Call. + * @memberof proto.Message + * @classdesc Represents a Call. + * @implements ICall + * @constructor + * @param {proto.Message.ICall=} [properties] Properties to set + */ + function Call(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]]; + } + + /** + * Call callKey. + * @member {Uint8Array} callKey + * @memberof proto.Message.Call + * @instance + */ + Call.prototype.callKey = $util.newBuffer([]); + + /** + * Call conversionSource. + * @member {string} conversionSource + * @memberof proto.Message.Call + * @instance + */ + Call.prototype.conversionSource = ""; + + /** + * Call conversionData. + * @member {Uint8Array} conversionData + * @memberof proto.Message.Call + * @instance + */ + Call.prototype.conversionData = $util.newBuffer([]); + + /** + * Call conversionDelaySeconds. + * @member {number} conversionDelaySeconds + * @memberof proto.Message.Call + * @instance + */ + Call.prototype.conversionDelaySeconds = 0; + + /** + * Creates a new Call instance using the specified properties. + * @function create + * @memberof proto.Message.Call + * @static + * @param {proto.Message.ICall=} [properties] Properties to set + * @returns {proto.Message.Call} Call instance + */ + Call.create = function create(properties) { + return new Call(properties); + }; + + /** + * Encodes the specified Call message. Does not implicitly {@link proto.Message.Call.verify|verify} messages. + * @function encode + * @memberof proto.Message.Call + * @static + * @param {proto.Message.ICall} message Call message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Call.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.callKey != null && Object.hasOwnProperty.call(message, "callKey")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.callKey); + if (message.conversionSource != null && Object.hasOwnProperty.call(message, "conversionSource")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.conversionSource); + if (message.conversionData != null && Object.hasOwnProperty.call(message, "conversionData")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.conversionData); + if (message.conversionDelaySeconds != null && Object.hasOwnProperty.call(message, "conversionDelaySeconds")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.conversionDelaySeconds); + return writer; + }; + + /** + * Encodes the specified Call message, length delimited. Does not implicitly {@link proto.Message.Call.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.Call + * @static + * @param {proto.Message.ICall} message Call message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Call.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Call message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.Call + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.Call} Call + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Call.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.Message.Call(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.callKey = reader.bytes(); + break; + case 2: + message.conversionSource = reader.string(); + break; + case 3: + message.conversionData = reader.bytes(); + break; + case 4: + message.conversionDelaySeconds = reader.uint32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Call message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.Call + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.Call} Call + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Call.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Call message. + * @function verify + * @memberof proto.Message.Call + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Call.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.callKey != null && message.hasOwnProperty("callKey")) + if (!(message.callKey && typeof message.callKey.length === "number" || $util.isString(message.callKey))) + return "callKey: buffer expected"; + if (message.conversionSource != null && message.hasOwnProperty("conversionSource")) + if (!$util.isString(message.conversionSource)) + return "conversionSource: string expected"; + if (message.conversionData != null && message.hasOwnProperty("conversionData")) + if (!(message.conversionData && typeof message.conversionData.length === "number" || $util.isString(message.conversionData))) + return "conversionData: buffer expected"; + if (message.conversionDelaySeconds != null && message.hasOwnProperty("conversionDelaySeconds")) + if (!$util.isInteger(message.conversionDelaySeconds)) + return "conversionDelaySeconds: integer expected"; + return null; + }; + + /** + * Creates a Call message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.Call + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.Call} Call + */ + Call.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.Call) + return object; + var message = new $root.proto.Message.Call(); + if (object.callKey != null) + if (typeof object.callKey === "string") + $util.base64.decode(object.callKey, message.callKey = $util.newBuffer($util.base64.length(object.callKey)), 0); + else if (object.callKey.length) + message.callKey = object.callKey; + if (object.conversionSource != null) + message.conversionSource = String(object.conversionSource); + if (object.conversionData != null) + if (typeof object.conversionData === "string") + $util.base64.decode(object.conversionData, message.conversionData = $util.newBuffer($util.base64.length(object.conversionData)), 0); + else if (object.conversionData.length) + message.conversionData = object.conversionData; + if (object.conversionDelaySeconds != null) + message.conversionDelaySeconds = object.conversionDelaySeconds >>> 0; + return message; + }; + + /** + * Creates a plain object from a Call message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.Call + * @static + * @param {proto.Message.Call} message Call + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Call.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.callKey = ""; + else { + object.callKey = []; + if (options.bytes !== Array) + object.callKey = $util.newBuffer(object.callKey); + } + object.conversionSource = ""; + if (options.bytes === String) + object.conversionData = ""; + else { + object.conversionData = []; + if (options.bytes !== Array) + object.conversionData = $util.newBuffer(object.conversionData); + } + object.conversionDelaySeconds = 0; + } + if (message.callKey != null && message.hasOwnProperty("callKey")) + object.callKey = options.bytes === String ? $util.base64.encode(message.callKey, 0, message.callKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.callKey) : message.callKey; + if (message.conversionSource != null && message.hasOwnProperty("conversionSource")) + object.conversionSource = message.conversionSource; + if (message.conversionData != null && message.hasOwnProperty("conversionData")) + object.conversionData = options.bytes === String ? $util.base64.encode(message.conversionData, 0, message.conversionData.length) : options.bytes === Array ? Array.prototype.slice.call(message.conversionData) : message.conversionData; + if (message.conversionDelaySeconds != null && message.hasOwnProperty("conversionDelaySeconds")) + object.conversionDelaySeconds = message.conversionDelaySeconds; + return object; + }; + + /** + * Converts this Call to JSON. + * @function toJSON + * @memberof proto.Message.Call + * @instance + * @returns {Object.} JSON object + */ + Call.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Call; + })(); + + Message.CancelPaymentRequestMessage = (function() { + + /** + * Properties of a CancelPaymentRequestMessage. + * @memberof proto.Message + * @interface ICancelPaymentRequestMessage + * @property {proto.IMessageKey|null} [key] CancelPaymentRequestMessage key + */ + + /** + * Constructs a new CancelPaymentRequestMessage. + * @memberof proto.Message + * @classdesc Represents a CancelPaymentRequestMessage. + * @implements ICancelPaymentRequestMessage + * @constructor + * @param {proto.Message.ICancelPaymentRequestMessage=} [properties] Properties to set + */ + function CancelPaymentRequestMessage(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]]; + } + + /** + * CancelPaymentRequestMessage key. + * @member {proto.IMessageKey|null|undefined} key + * @memberof proto.Message.CancelPaymentRequestMessage + * @instance + */ + CancelPaymentRequestMessage.prototype.key = null; + + /** + * Creates a new CancelPaymentRequestMessage instance using the specified properties. + * @function create + * @memberof proto.Message.CancelPaymentRequestMessage + * @static + * @param {proto.Message.ICancelPaymentRequestMessage=} [properties] Properties to set + * @returns {proto.Message.CancelPaymentRequestMessage} CancelPaymentRequestMessage instance + */ + CancelPaymentRequestMessage.create = function create(properties) { + return new CancelPaymentRequestMessage(properties); + }; + + /** + * Encodes the specified CancelPaymentRequestMessage message. Does not implicitly {@link proto.Message.CancelPaymentRequestMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.CancelPaymentRequestMessage + * @static + * @param {proto.Message.ICancelPaymentRequestMessage} message CancelPaymentRequestMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelPaymentRequestMessage.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(); + return writer; + }; + + /** + * Encodes the specified CancelPaymentRequestMessage message, length delimited. Does not implicitly {@link proto.Message.CancelPaymentRequestMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.CancelPaymentRequestMessage + * @static + * @param {proto.Message.ICancelPaymentRequestMessage} message CancelPaymentRequestMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelPaymentRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelPaymentRequestMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.CancelPaymentRequestMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.CancelPaymentRequestMessage} CancelPaymentRequestMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelPaymentRequestMessage.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.Message.CancelPaymentRequestMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CancelPaymentRequestMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.CancelPaymentRequestMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.CancelPaymentRequestMessage} CancelPaymentRequestMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelPaymentRequestMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelPaymentRequestMessage message. + * @function verify + * @memberof proto.Message.CancelPaymentRequestMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelPaymentRequestMessage.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; + } + return null; + }; + + /** + * Creates a CancelPaymentRequestMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.CancelPaymentRequestMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.CancelPaymentRequestMessage} CancelPaymentRequestMessage + */ + CancelPaymentRequestMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.CancelPaymentRequestMessage) + return object; + var message = new $root.proto.Message.CancelPaymentRequestMessage(); + if (object.key != null) { + if (typeof object.key !== "object") + throw TypeError(".proto.Message.CancelPaymentRequestMessage.key: object expected"); + message.key = $root.proto.MessageKey.fromObject(object.key); + } + return message; + }; + + /** + * Creates a plain object from a CancelPaymentRequestMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.CancelPaymentRequestMessage + * @static + * @param {proto.Message.CancelPaymentRequestMessage} message CancelPaymentRequestMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelPaymentRequestMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.key = null; + if (message.key != null && message.hasOwnProperty("key")) + object.key = $root.proto.MessageKey.toObject(message.key, options); + return object; + }; + + /** + * Converts this CancelPaymentRequestMessage to JSON. + * @function toJSON + * @memberof proto.Message.CancelPaymentRequestMessage + * @instance + * @returns {Object.} JSON object + */ + CancelPaymentRequestMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CancelPaymentRequestMessage; + })(); + + Message.Chat = (function() { + + /** + * Properties of a Chat. + * @memberof proto.Message + * @interface IChat + * @property {string|null} [displayName] Chat displayName + * @property {string|null} [id] Chat id + */ + + /** + * Constructs a new Chat. + * @memberof proto.Message + * @classdesc Represents a Chat. + * @implements IChat + * @constructor + * @param {proto.Message.IChat=} [properties] Properties to set + */ + function Chat(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]]; + } + + /** + * Chat displayName. + * @member {string} displayName + * @memberof proto.Message.Chat + * @instance + */ + Chat.prototype.displayName = ""; + + /** + * Chat id. + * @member {string} id + * @memberof proto.Message.Chat + * @instance + */ + Chat.prototype.id = ""; + + /** + * Creates a new Chat instance using the specified properties. + * @function create + * @memberof proto.Message.Chat + * @static + * @param {proto.Message.IChat=} [properties] Properties to set + * @returns {proto.Message.Chat} Chat instance + */ + Chat.create = function create(properties) { + return new Chat(properties); + }; + + /** + * Encodes the specified Chat message. Does not implicitly {@link proto.Message.Chat.verify|verify} messages. + * @function encode + * @memberof proto.Message.Chat + * @static + * @param {proto.Message.IChat} message Chat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Chat.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); + return writer; + }; + + /** + * Encodes the specified Chat message, length delimited. Does not implicitly {@link proto.Message.Chat.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.Chat + * @static + * @param {proto.Message.IChat} message Chat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Chat.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Chat message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.Chat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.Chat} Chat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Chat.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.Message.Chat(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.displayName = reader.string(); + break; + case 2: + message.id = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Chat message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.Chat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.Chat} Chat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Chat.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Chat message. + * @function verify + * @memberof proto.Message.Chat + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Chat.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + return null; + }; + + /** + * Creates a Chat message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.Chat + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.Chat} Chat + */ + Chat.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.Chat) + return object; + var message = new $root.proto.Message.Chat(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.id != null) + message.id = String(object.id); + return message; + }; + + /** + * Creates a plain object from a Chat message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.Chat + * @static + * @param {proto.Message.Chat} message Chat + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Chat.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.id = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + return object; + }; + + /** + * Converts this Chat to JSON. + * @function toJSON + * @memberof proto.Message.Chat + * @instance + * @returns {Object.} JSON object + */ + Chat.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Chat; + })(); + + Message.ContactMessage = (function() { + + /** + * Properties of a ContactMessage. + * @memberof proto.Message + * @interface IContactMessage + * @property {string|null} [displayName] ContactMessage displayName + * @property {string|null} [vcard] ContactMessage vcard + * @property {proto.IContextInfo|null} [contextInfo] ContactMessage contextInfo + */ + + /** + * Constructs a new ContactMessage. + * @memberof proto.Message + * @classdesc Represents a ContactMessage. + * @implements IContactMessage + * @constructor + * @param {proto.Message.IContactMessage=} [properties] Properties to set + */ + function ContactMessage(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]]; + } + + /** + * ContactMessage displayName. + * @member {string} displayName + * @memberof proto.Message.ContactMessage + * @instance + */ + ContactMessage.prototype.displayName = ""; + + /** + * ContactMessage vcard. + * @member {string} vcard + * @memberof proto.Message.ContactMessage + * @instance + */ + ContactMessage.prototype.vcard = ""; + + /** + * ContactMessage contextInfo. + * @member {proto.IContextInfo|null|undefined} contextInfo + * @memberof proto.Message.ContactMessage + * @instance + */ + ContactMessage.prototype.contextInfo = null; + + /** + * Creates a new ContactMessage instance using the specified properties. + * @function create + * @memberof proto.Message.ContactMessage + * @static + * @param {proto.Message.IContactMessage=} [properties] Properties to set + * @returns {proto.Message.ContactMessage} ContactMessage instance + */ + ContactMessage.create = function create(properties) { + return new ContactMessage(properties); + }; + + /** + * Encodes the specified ContactMessage message. Does not implicitly {@link proto.Message.ContactMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.ContactMessage + * @static + * @param {proto.Message.IContactMessage} message ContactMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContactMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.vcard != null && Object.hasOwnProperty.call(message, "vcard")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.vcard); + if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) + $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ContactMessage message, length delimited. Does not implicitly {@link proto.Message.ContactMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.ContactMessage + * @static + * @param {proto.Message.IContactMessage} message ContactMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContactMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ContactMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.ContactMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.ContactMessage} ContactMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContactMessage.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.Message.ContactMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.displayName = reader.string(); + break; + case 16: + message.vcard = reader.string(); + break; + case 17: + message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ContactMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.ContactMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.ContactMessage} ContactMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContactMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ContactMessage message. + * @function verify + * @memberof proto.Message.ContactMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ContactMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.vcard != null && message.hasOwnProperty("vcard")) + if (!$util.isString(message.vcard)) + return "vcard: string expected"; + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } + return null; + }; + + /** + * Creates a ContactMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.ContactMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.ContactMessage} ContactMessage + */ + ContactMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.ContactMessage) + return object; + var message = new $root.proto.Message.ContactMessage(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.vcard != null) + message.vcard = String(object.vcard); + if (object.contextInfo != null) { + if (typeof object.contextInfo !== "object") + throw TypeError(".proto.Message.ContactMessage.contextInfo: object expected"); + message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); + } + return message; + }; + + /** + * Creates a plain object from a ContactMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.ContactMessage + * @static + * @param {proto.Message.ContactMessage} message ContactMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ContactMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.vcard = ""; + object.contextInfo = null; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.vcard != null && message.hasOwnProperty("vcard")) + object.vcard = message.vcard; + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) + object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + return object; + }; + + /** + * Converts this ContactMessage to JSON. + * @function toJSON + * @memberof proto.Message.ContactMessage + * @instance + * @returns {Object.} JSON object + */ + ContactMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ContactMessage; + })(); + + Message.ContactsArrayMessage = (function() { + + /** + * Properties of a ContactsArrayMessage. + * @memberof proto.Message + * @interface IContactsArrayMessage + * @property {string|null} [displayName] ContactsArrayMessage displayName + * @property {Array.|null} [contacts] ContactsArrayMessage contacts + * @property {proto.IContextInfo|null} [contextInfo] ContactsArrayMessage contextInfo + */ + + /** + * Constructs a new ContactsArrayMessage. + * @memberof proto.Message + * @classdesc Represents a ContactsArrayMessage. + * @implements IContactsArrayMessage + * @constructor + * @param {proto.Message.IContactsArrayMessage=} [properties] Properties to set + */ + function ContactsArrayMessage(properties) { + this.contacts = []; + 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]]; + } + + /** + * ContactsArrayMessage displayName. + * @member {string} displayName + * @memberof proto.Message.ContactsArrayMessage + * @instance + */ + ContactsArrayMessage.prototype.displayName = ""; + + /** + * ContactsArrayMessage contacts. + * @member {Array.} contacts + * @memberof proto.Message.ContactsArrayMessage + * @instance + */ + ContactsArrayMessage.prototype.contacts = $util.emptyArray; + + /** + * ContactsArrayMessage contextInfo. + * @member {proto.IContextInfo|null|undefined} contextInfo + * @memberof proto.Message.ContactsArrayMessage + * @instance + */ + ContactsArrayMessage.prototype.contextInfo = null; + + /** + * Creates a new ContactsArrayMessage instance using the specified properties. + * @function create + * @memberof proto.Message.ContactsArrayMessage + * @static + * @param {proto.Message.IContactsArrayMessage=} [properties] Properties to set + * @returns {proto.Message.ContactsArrayMessage} ContactsArrayMessage instance + */ + ContactsArrayMessage.create = function create(properties) { + return new ContactsArrayMessage(properties); + }; + + /** + * Encodes the specified ContactsArrayMessage message. Does not implicitly {@link proto.Message.ContactsArrayMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.ContactsArrayMessage + * @static + * @param {proto.Message.IContactsArrayMessage} message ContactsArrayMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContactsArrayMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.contacts != null && message.contacts.length) + for (var i = 0; i < message.contacts.length; ++i) + $root.proto.Message.ContactMessage.encode(message.contacts[i], 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 17, wireType 2 =*/138).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ContactsArrayMessage message, length delimited. Does not implicitly {@link proto.Message.ContactsArrayMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.ContactsArrayMessage + * @static + * @param {proto.Message.IContactsArrayMessage} message ContactsArrayMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContactsArrayMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ContactsArrayMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.ContactsArrayMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.ContactsArrayMessage} ContactsArrayMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContactsArrayMessage.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.Message.ContactsArrayMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.displayName = reader.string(); + break; + case 2: + if (!(message.contacts && message.contacts.length)) + message.contacts = []; + message.contacts.push($root.proto.Message.ContactMessage.decode(reader, reader.uint32())); + break; + case 17: + message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ContactsArrayMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.ContactsArrayMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.ContactsArrayMessage} ContactsArrayMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContactsArrayMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ContactsArrayMessage message. + * @function verify + * @memberof proto.Message.ContactsArrayMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ContactsArrayMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.contacts != null && message.hasOwnProperty("contacts")) { + if (!Array.isArray(message.contacts)) + return "contacts: array expected"; + for (var i = 0; i < message.contacts.length; ++i) { + var error = $root.proto.Message.ContactMessage.verify(message.contacts[i]); + if (error) + return "contacts." + error; + } + } + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } + return null; + }; + + /** + * Creates a ContactsArrayMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.ContactsArrayMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.ContactsArrayMessage} ContactsArrayMessage + */ + ContactsArrayMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.ContactsArrayMessage) + return object; + var message = new $root.proto.Message.ContactsArrayMessage(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.contacts) { + if (!Array.isArray(object.contacts)) + throw TypeError(".proto.Message.ContactsArrayMessage.contacts: array expected"); + message.contacts = []; + for (var i = 0; i < object.contacts.length; ++i) { + if (typeof object.contacts[i] !== "object") + throw TypeError(".proto.Message.ContactsArrayMessage.contacts: object expected"); + message.contacts[i] = $root.proto.Message.ContactMessage.fromObject(object.contacts[i]); + } + } + if (object.contextInfo != null) { + if (typeof object.contextInfo !== "object") + throw TypeError(".proto.Message.ContactsArrayMessage.contextInfo: object expected"); + message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); + } + return message; + }; + + /** + * Creates a plain object from a ContactsArrayMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.ContactsArrayMessage + * @static + * @param {proto.Message.ContactsArrayMessage} message ContactsArrayMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ContactsArrayMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.contacts = []; + if (options.defaults) { + object.displayName = ""; + object.contextInfo = null; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.contacts && message.contacts.length) { + object.contacts = []; + for (var j = 0; j < message.contacts.length; ++j) + object.contacts[j] = $root.proto.Message.ContactMessage.toObject(message.contacts[j], options); + } + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) + object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + return object; + }; + + /** + * Converts this ContactsArrayMessage to JSON. + * @function toJSON + * @memberof proto.Message.ContactsArrayMessage + * @instance + * @returns {Object.} JSON object + */ + ContactsArrayMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ContactsArrayMessage; + })(); + + Message.DeclinePaymentRequestMessage = (function() { + + /** + * Properties of a DeclinePaymentRequestMessage. + * @memberof proto.Message + * @interface IDeclinePaymentRequestMessage + * @property {proto.IMessageKey|null} [key] DeclinePaymentRequestMessage key + */ + + /** + * Constructs a new DeclinePaymentRequestMessage. + * @memberof proto.Message + * @classdesc Represents a DeclinePaymentRequestMessage. + * @implements IDeclinePaymentRequestMessage + * @constructor + * @param {proto.Message.IDeclinePaymentRequestMessage=} [properties] Properties to set + */ + function DeclinePaymentRequestMessage(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]]; + } + + /** + * DeclinePaymentRequestMessage key. + * @member {proto.IMessageKey|null|undefined} key + * @memberof proto.Message.DeclinePaymentRequestMessage + * @instance + */ + DeclinePaymentRequestMessage.prototype.key = null; + + /** + * Creates a new DeclinePaymentRequestMessage instance using the specified properties. + * @function create + * @memberof proto.Message.DeclinePaymentRequestMessage + * @static + * @param {proto.Message.IDeclinePaymentRequestMessage=} [properties] Properties to set + * @returns {proto.Message.DeclinePaymentRequestMessage} DeclinePaymentRequestMessage instance + */ + DeclinePaymentRequestMessage.create = function create(properties) { + return new DeclinePaymentRequestMessage(properties); + }; + + /** + * Encodes the specified DeclinePaymentRequestMessage message. Does not implicitly {@link proto.Message.DeclinePaymentRequestMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.DeclinePaymentRequestMessage + * @static + * @param {proto.Message.IDeclinePaymentRequestMessage} message DeclinePaymentRequestMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeclinePaymentRequestMessage.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(); + return writer; + }; + + /** + * Encodes the specified DeclinePaymentRequestMessage message, length delimited. Does not implicitly {@link proto.Message.DeclinePaymentRequestMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.DeclinePaymentRequestMessage + * @static + * @param {proto.Message.IDeclinePaymentRequestMessage} message DeclinePaymentRequestMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeclinePaymentRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeclinePaymentRequestMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.DeclinePaymentRequestMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.DeclinePaymentRequestMessage} DeclinePaymentRequestMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeclinePaymentRequestMessage.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.Message.DeclinePaymentRequestMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeclinePaymentRequestMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.DeclinePaymentRequestMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.DeclinePaymentRequestMessage} DeclinePaymentRequestMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeclinePaymentRequestMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeclinePaymentRequestMessage message. + * @function verify + * @memberof proto.Message.DeclinePaymentRequestMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeclinePaymentRequestMessage.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; + } + return null; + }; + + /** + * Creates a DeclinePaymentRequestMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.DeclinePaymentRequestMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.DeclinePaymentRequestMessage} DeclinePaymentRequestMessage + */ + DeclinePaymentRequestMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.DeclinePaymentRequestMessage) + return object; + var message = new $root.proto.Message.DeclinePaymentRequestMessage(); + if (object.key != null) { + if (typeof object.key !== "object") + throw TypeError(".proto.Message.DeclinePaymentRequestMessage.key: object expected"); + message.key = $root.proto.MessageKey.fromObject(object.key); + } + return message; + }; + + /** + * Creates a plain object from a DeclinePaymentRequestMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.DeclinePaymentRequestMessage + * @static + * @param {proto.Message.DeclinePaymentRequestMessage} message DeclinePaymentRequestMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeclinePaymentRequestMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.key = null; + if (message.key != null && message.hasOwnProperty("key")) + object.key = $root.proto.MessageKey.toObject(message.key, options); + return object; + }; + + /** + * Converts this DeclinePaymentRequestMessage to JSON. + * @function toJSON + * @memberof proto.Message.DeclinePaymentRequestMessage + * @instance + * @returns {Object.} JSON object + */ + DeclinePaymentRequestMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeclinePaymentRequestMessage; + })(); + + Message.DeviceSentMessage = (function() { + + /** + * Properties of a DeviceSentMessage. + * @memberof proto.Message + * @interface IDeviceSentMessage + * @property {string|null} [destinationJid] DeviceSentMessage destinationJid + * @property {proto.IMessage|null} [message] DeviceSentMessage message + * @property {string|null} [phash] DeviceSentMessage phash + */ + + /** + * Constructs a new DeviceSentMessage. + * @memberof proto.Message + * @classdesc Represents a DeviceSentMessage. + * @implements IDeviceSentMessage + * @constructor + * @param {proto.Message.IDeviceSentMessage=} [properties] Properties to set + */ + function DeviceSentMessage(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]]; + } + + /** + * DeviceSentMessage destinationJid. + * @member {string} destinationJid + * @memberof proto.Message.DeviceSentMessage + * @instance + */ + DeviceSentMessage.prototype.destinationJid = ""; + + /** + * DeviceSentMessage message. + * @member {proto.IMessage|null|undefined} message + * @memberof proto.Message.DeviceSentMessage + * @instance + */ + DeviceSentMessage.prototype.message = null; + + /** + * DeviceSentMessage phash. + * @member {string} phash + * @memberof proto.Message.DeviceSentMessage + * @instance + */ + DeviceSentMessage.prototype.phash = ""; + + /** + * Creates a new DeviceSentMessage instance using the specified properties. + * @function create + * @memberof proto.Message.DeviceSentMessage + * @static + * @param {proto.Message.IDeviceSentMessage=} [properties] Properties to set + * @returns {proto.Message.DeviceSentMessage} DeviceSentMessage instance + */ + DeviceSentMessage.create = function create(properties) { + return new DeviceSentMessage(properties); + }; + + /** + * Encodes the specified DeviceSentMessage message. Does not implicitly {@link proto.Message.DeviceSentMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.DeviceSentMessage + * @static + * @param {proto.Message.IDeviceSentMessage} message DeviceSentMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeviceSentMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.destinationJid != null && Object.hasOwnProperty.call(message, "destinationJid")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.destinationJid); + 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.phash != null && Object.hasOwnProperty.call(message, "phash")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.phash); + return writer; + }; + + /** + * Encodes the specified DeviceSentMessage message, length delimited. Does not implicitly {@link proto.Message.DeviceSentMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.DeviceSentMessage + * @static + * @param {proto.Message.IDeviceSentMessage} message DeviceSentMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeviceSentMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeviceSentMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.DeviceSentMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.DeviceSentMessage} DeviceSentMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeviceSentMessage.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.Message.DeviceSentMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.destinationJid = reader.string(); + break; + case 2: + message.message = $root.proto.Message.decode(reader, reader.uint32()); + break; + case 3: + message.phash = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeviceSentMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.DeviceSentMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.DeviceSentMessage} DeviceSentMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeviceSentMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeviceSentMessage message. + * @function verify + * @memberof proto.Message.DeviceSentMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeviceSentMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.destinationJid != null && message.hasOwnProperty("destinationJid")) + if (!$util.isString(message.destinationJid)) + return "destinationJid: string expected"; + if (message.message != null && message.hasOwnProperty("message")) { + var error = $root.proto.Message.verify(message.message); + if (error) + return "message." + error; + } + if (message.phash != null && message.hasOwnProperty("phash")) + if (!$util.isString(message.phash)) + return "phash: string expected"; + return null; + }; + + /** + * Creates a DeviceSentMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.DeviceSentMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.DeviceSentMessage} DeviceSentMessage + */ + DeviceSentMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.DeviceSentMessage) + return object; + var message = new $root.proto.Message.DeviceSentMessage(); + if (object.destinationJid != null) + message.destinationJid = String(object.destinationJid); + if (object.message != null) { + if (typeof object.message !== "object") + throw TypeError(".proto.Message.DeviceSentMessage.message: object expected"); + message.message = $root.proto.Message.fromObject(object.message); + } + if (object.phash != null) + message.phash = String(object.phash); + return message; + }; + + /** + * Creates a plain object from a DeviceSentMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.DeviceSentMessage + * @static + * @param {proto.Message.DeviceSentMessage} message DeviceSentMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeviceSentMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.destinationJid = ""; + object.message = null; + object.phash = ""; + } + if (message.destinationJid != null && message.hasOwnProperty("destinationJid")) + object.destinationJid = message.destinationJid; + if (message.message != null && message.hasOwnProperty("message")) + object.message = $root.proto.Message.toObject(message.message, options); + if (message.phash != null && message.hasOwnProperty("phash")) + object.phash = message.phash; + return object; + }; + + /** + * Converts this DeviceSentMessage to JSON. + * @function toJSON + * @memberof proto.Message.DeviceSentMessage + * @instance + * @returns {Object.} JSON object + */ + DeviceSentMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeviceSentMessage; + })(); + + Message.DocumentMessage = (function() { + + /** + * Properties of a DocumentMessage. + * @memberof proto.Message + * @interface IDocumentMessage + * @property {string|null} [url] DocumentMessage url + * @property {string|null} [mimetype] DocumentMessage mimetype + * @property {string|null} [title] DocumentMessage title + * @property {Uint8Array|null} [fileSha256] DocumentMessage fileSha256 + * @property {number|Long|null} [fileLength] DocumentMessage fileLength + * @property {number|null} [pageCount] DocumentMessage pageCount + * @property {Uint8Array|null} [mediaKey] DocumentMessage mediaKey + * @property {string|null} [fileName] DocumentMessage fileName + * @property {Uint8Array|null} [fileEncSha256] DocumentMessage fileEncSha256 + * @property {string|null} [directPath] DocumentMessage directPath + * @property {number|Long|null} [mediaKeyTimestamp] DocumentMessage mediaKeyTimestamp + * @property {boolean|null} [contactVcard] DocumentMessage contactVcard + * @property {string|null} [thumbnailDirectPath] DocumentMessage thumbnailDirectPath + * @property {Uint8Array|null} [thumbnailSha256] DocumentMessage thumbnailSha256 + * @property {Uint8Array|null} [thumbnailEncSha256] DocumentMessage thumbnailEncSha256 + * @property {Uint8Array|null} [jpegThumbnail] DocumentMessage jpegThumbnail + * @property {proto.IContextInfo|null} [contextInfo] DocumentMessage contextInfo + * @property {number|null} [thumbnailHeight] DocumentMessage thumbnailHeight + * @property {number|null} [thumbnailWidth] DocumentMessage thumbnailWidth + * @property {string|null} [caption] DocumentMessage caption + */ + + /** + * Constructs a new DocumentMessage. + * @memberof proto.Message + * @classdesc Represents a DocumentMessage. + * @implements IDocumentMessage + * @constructor + * @param {proto.Message.IDocumentMessage=} [properties] Properties to set + */ + function DocumentMessage(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]]; + } + + /** + * DocumentMessage url. + * @member {string} url + * @memberof proto.Message.DocumentMessage + * @instance + */ + DocumentMessage.prototype.url = ""; + + /** + * DocumentMessage mimetype. + * @member {string} mimetype + * @memberof proto.Message.DocumentMessage + * @instance + */ + DocumentMessage.prototype.mimetype = ""; + + /** + * DocumentMessage title. + * @member {string} title + * @memberof proto.Message.DocumentMessage + * @instance + */ + DocumentMessage.prototype.title = ""; + + /** + * DocumentMessage fileSha256. + * @member {Uint8Array} fileSha256 + * @memberof proto.Message.DocumentMessage + * @instance + */ + DocumentMessage.prototype.fileSha256 = $util.newBuffer([]); + + /** + * DocumentMessage fileLength. + * @member {number|Long} fileLength + * @memberof proto.Message.DocumentMessage + * @instance + */ + DocumentMessage.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * DocumentMessage pageCount. + * @member {number} pageCount + * @memberof proto.Message.DocumentMessage + * @instance + */ + DocumentMessage.prototype.pageCount = 0; + + /** + * DocumentMessage mediaKey. + * @member {Uint8Array} mediaKey + * @memberof proto.Message.DocumentMessage + * @instance + */ + DocumentMessage.prototype.mediaKey = $util.newBuffer([]); + + /** + * DocumentMessage fileName. + * @member {string} fileName + * @memberof proto.Message.DocumentMessage + * @instance + */ + DocumentMessage.prototype.fileName = ""; + + /** + * DocumentMessage fileEncSha256. + * @member {Uint8Array} fileEncSha256 + * @memberof proto.Message.DocumentMessage + * @instance + */ + DocumentMessage.prototype.fileEncSha256 = $util.newBuffer([]); + + /** + * DocumentMessage directPath. + * @member {string} directPath + * @memberof proto.Message.DocumentMessage + * @instance + */ + DocumentMessage.prototype.directPath = ""; + + /** + * DocumentMessage mediaKeyTimestamp. + * @member {number|Long} mediaKeyTimestamp + * @memberof proto.Message.DocumentMessage + * @instance + */ + DocumentMessage.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DocumentMessage contactVcard. + * @member {boolean} contactVcard + * @memberof proto.Message.DocumentMessage + * @instance + */ + DocumentMessage.prototype.contactVcard = false; + + /** + * DocumentMessage thumbnailDirectPath. + * @member {string} thumbnailDirectPath + * @memberof proto.Message.DocumentMessage + * @instance + */ + DocumentMessage.prototype.thumbnailDirectPath = ""; + + /** + * DocumentMessage thumbnailSha256. + * @member {Uint8Array} thumbnailSha256 + * @memberof proto.Message.DocumentMessage + * @instance + */ + DocumentMessage.prototype.thumbnailSha256 = $util.newBuffer([]); + + /** + * DocumentMessage thumbnailEncSha256. + * @member {Uint8Array} thumbnailEncSha256 + * @memberof proto.Message.DocumentMessage + * @instance + */ + DocumentMessage.prototype.thumbnailEncSha256 = $util.newBuffer([]); + + /** + * DocumentMessage jpegThumbnail. + * @member {Uint8Array} jpegThumbnail + * @memberof proto.Message.DocumentMessage + * @instance + */ + DocumentMessage.prototype.jpegThumbnail = $util.newBuffer([]); + + /** + * DocumentMessage contextInfo. + * @member {proto.IContextInfo|null|undefined} contextInfo + * @memberof proto.Message.DocumentMessage + * @instance + */ + DocumentMessage.prototype.contextInfo = null; + + /** + * DocumentMessage thumbnailHeight. + * @member {number} thumbnailHeight + * @memberof proto.Message.DocumentMessage + * @instance + */ + DocumentMessage.prototype.thumbnailHeight = 0; + + /** + * DocumentMessage thumbnailWidth. + * @member {number} thumbnailWidth + * @memberof proto.Message.DocumentMessage + * @instance + */ + DocumentMessage.prototype.thumbnailWidth = 0; + + /** + * DocumentMessage caption. + * @member {string} caption + * @memberof proto.Message.DocumentMessage + * @instance + */ + DocumentMessage.prototype.caption = ""; + + /** + * Creates a new DocumentMessage instance using the specified properties. + * @function create + * @memberof proto.Message.DocumentMessage + * @static + * @param {proto.Message.IDocumentMessage=} [properties] Properties to set + * @returns {proto.Message.DocumentMessage} DocumentMessage instance + */ + DocumentMessage.create = function create(properties) { + return new DocumentMessage(properties); + }; + + /** + * Encodes the specified DocumentMessage message. Does not implicitly {@link proto.Message.DocumentMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.DocumentMessage + * @static + * @param {proto.Message.IDocumentMessage} message DocumentMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DocumentMessage.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.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.title); + if (message.fileSha256 != null && Object.hasOwnProperty.call(message, "fileSha256")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.fileSha256); + if (message.fileLength != null && Object.hasOwnProperty.call(message, "fileLength")) + writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.fileLength); + if (message.pageCount != null && Object.hasOwnProperty.call(message, "pageCount")) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.pageCount); + if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.mediaKey); + if (message.fileName != null && Object.hasOwnProperty.call(message, "fileName")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.fileName); + if (message.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256")) + writer.uint32(/* id 9, wireType 2 =*/74).bytes(message.fileEncSha256); + if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.directPath); + if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp")) + writer.uint32(/* id 11, wireType 0 =*/88).int64(message.mediaKeyTimestamp); + if (message.contactVcard != null && Object.hasOwnProperty.call(message, "contactVcard")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.contactVcard); + if (message.thumbnailDirectPath != null && Object.hasOwnProperty.call(message, "thumbnailDirectPath")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.thumbnailDirectPath); + if (message.thumbnailSha256 != null && Object.hasOwnProperty.call(message, "thumbnailSha256")) + writer.uint32(/* id 14, wireType 2 =*/114).bytes(message.thumbnailSha256); + if (message.thumbnailEncSha256 != null && Object.hasOwnProperty.call(message, "thumbnailEncSha256")) + writer.uint32(/* id 15, wireType 2 =*/122).bytes(message.thumbnailEncSha256); + 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.thumbnailHeight != null && Object.hasOwnProperty.call(message, "thumbnailHeight")) + writer.uint32(/* id 18, wireType 0 =*/144).uint32(message.thumbnailHeight); + if (message.thumbnailWidth != null && Object.hasOwnProperty.call(message, "thumbnailWidth")) + writer.uint32(/* id 19, wireType 0 =*/152).uint32(message.thumbnailWidth); + if (message.caption != null && Object.hasOwnProperty.call(message, "caption")) + writer.uint32(/* id 20, wireType 2 =*/162).string(message.caption); + return writer; + }; + + /** + * Encodes the specified DocumentMessage message, length delimited. Does not implicitly {@link proto.Message.DocumentMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.DocumentMessage + * @static + * @param {proto.Message.IDocumentMessage} message DocumentMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DocumentMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DocumentMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.DocumentMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.DocumentMessage} DocumentMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DocumentMessage.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.Message.DocumentMessage(); + 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.title = reader.string(); + break; + case 4: + message.fileSha256 = reader.bytes(); + break; + case 5: + message.fileLength = reader.uint64(); + break; + case 6: + message.pageCount = reader.uint32(); + break; + case 7: + message.mediaKey = reader.bytes(); + break; + case 8: + message.fileName = reader.string(); + break; + case 9: + message.fileEncSha256 = reader.bytes(); + break; + case 10: + message.directPath = reader.string(); + break; + case 11: + message.mediaKeyTimestamp = reader.int64(); + break; + case 12: + message.contactVcard = reader.bool(); + break; + case 13: + message.thumbnailDirectPath = reader.string(); + break; + case 14: + message.thumbnailSha256 = reader.bytes(); + break; + case 15: + message.thumbnailEncSha256 = reader.bytes(); + break; + case 16: + message.jpegThumbnail = reader.bytes(); + break; + case 17: + message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); + break; + case 18: + message.thumbnailHeight = reader.uint32(); + break; + case 19: + message.thumbnailWidth = reader.uint32(); + break; + case 20: + message.caption = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DocumentMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.DocumentMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.DocumentMessage} DocumentMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DocumentMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DocumentMessage message. + * @function verify + * @memberof proto.Message.DocumentMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DocumentMessage.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.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: 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.pageCount != null && message.hasOwnProperty("pageCount")) + if (!$util.isInteger(message.pageCount)) + return "pageCount: 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.fileName != null && message.hasOwnProperty("fileName")) + if (!$util.isString(message.fileName)) + return "fileName: string 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.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.contactVcard != null && message.hasOwnProperty("contactVcard")) + if (typeof message.contactVcard !== "boolean") + return "contactVcard: 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.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.thumbnailHeight != null && message.hasOwnProperty("thumbnailHeight")) + if (!$util.isInteger(message.thumbnailHeight)) + return "thumbnailHeight: integer expected"; + if (message.thumbnailWidth != null && message.hasOwnProperty("thumbnailWidth")) + if (!$util.isInteger(message.thumbnailWidth)) + return "thumbnailWidth: integer expected"; + if (message.caption != null && message.hasOwnProperty("caption")) + if (!$util.isString(message.caption)) + return "caption: string expected"; + return null; + }; + + /** + * Creates a DocumentMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.DocumentMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.DocumentMessage} DocumentMessage + */ + DocumentMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.DocumentMessage) + return object; + var message = new $root.proto.Message.DocumentMessage(); + if (object.url != null) + message.url = String(object.url); + if (object.mimetype != null) + message.mimetype = String(object.mimetype); + if (object.title != null) + message.title = String(object.title); + 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.pageCount != null) + message.pageCount = object.pageCount >>> 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.fileName != null) + message.fileName = String(object.fileName); + 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); + 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.contactVcard != null) + message.contactVcard = Boolean(object.contactVcard); + 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.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.Message.DocumentMessage.contextInfo: object expected"); + message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); + } + if (object.thumbnailHeight != null) + message.thumbnailHeight = object.thumbnailHeight >>> 0; + if (object.thumbnailWidth != null) + message.thumbnailWidth = object.thumbnailWidth >>> 0; + if (object.caption != null) + message.caption = String(object.caption); + return message; + }; + + /** + * Creates a plain object from a DocumentMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.DocumentMessage + * @static + * @param {proto.Message.DocumentMessage} message DocumentMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DocumentMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.url = ""; + object.mimetype = ""; + object.title = ""; + 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.pageCount = 0; + if (options.bytes === String) + object.mediaKey = ""; + else { + object.mediaKey = []; + if (options.bytes !== Array) + object.mediaKey = $util.newBuffer(object.mediaKey); + } + object.fileName = ""; + 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; + object.contactVcard = 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); + } + if (options.bytes === String) + object.jpegThumbnail = ""; + else { + object.jpegThumbnail = []; + if (options.bytes !== Array) + object.jpegThumbnail = $util.newBuffer(object.jpegThumbnail); + } + object.contextInfo = null; + object.thumbnailHeight = 0; + object.thumbnailWidth = 0; + object.caption = ""; + } + if (message.url != null && message.hasOwnProperty("url")) + object.url = message.url; + if (message.mimetype != null && message.hasOwnProperty("mimetype")) + object.mimetype = message.mimetype; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + 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.pageCount != null && message.hasOwnProperty("pageCount")) + object.pageCount = message.pageCount; + 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.fileName != null && message.hasOwnProperty("fileName")) + object.fileName = message.fileName; + 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.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.contactVcard != null && message.hasOwnProperty("contactVcard")) + object.contactVcard = message.contactVcard; + 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.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.thumbnailHeight != null && message.hasOwnProperty("thumbnailHeight")) + object.thumbnailHeight = message.thumbnailHeight; + if (message.thumbnailWidth != null && message.hasOwnProperty("thumbnailWidth")) + object.thumbnailWidth = message.thumbnailWidth; + if (message.caption != null && message.hasOwnProperty("caption")) + object.caption = message.caption; + return object; + }; + + /** + * Converts this DocumentMessage to JSON. + * @function toJSON + * @memberof proto.Message.DocumentMessage + * @instance + * @returns {Object.} JSON object + */ + DocumentMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DocumentMessage; + })(); + + Message.ExtendedTextMessage = (function() { + + /** + * Properties of an ExtendedTextMessage. + * @memberof proto.Message + * @interface IExtendedTextMessage + * @property {string|null} [text] ExtendedTextMessage text + * @property {string|null} [matchedText] ExtendedTextMessage matchedText + * @property {string|null} [canonicalUrl] ExtendedTextMessage canonicalUrl + * @property {string|null} [description] ExtendedTextMessage description + * @property {string|null} [title] ExtendedTextMessage title + * @property {number|null} [textArgb] ExtendedTextMessage textArgb + * @property {number|null} [backgroundArgb] ExtendedTextMessage backgroundArgb + * @property {proto.Message.ExtendedTextMessage.FontType|null} [font] ExtendedTextMessage font + * @property {proto.Message.ExtendedTextMessage.PreviewType|null} [previewType] ExtendedTextMessage previewType + * @property {Uint8Array|null} [jpegThumbnail] ExtendedTextMessage jpegThumbnail + * @property {proto.IContextInfo|null} [contextInfo] ExtendedTextMessage contextInfo + * @property {boolean|null} [doNotPlayInline] ExtendedTextMessage doNotPlayInline + * @property {string|null} [thumbnailDirectPath] ExtendedTextMessage thumbnailDirectPath + * @property {Uint8Array|null} [thumbnailSha256] ExtendedTextMessage thumbnailSha256 + * @property {Uint8Array|null} [thumbnailEncSha256] ExtendedTextMessage thumbnailEncSha256 + * @property {Uint8Array|null} [mediaKey] ExtendedTextMessage mediaKey + * @property {number|Long|null} [mediaKeyTimestamp] ExtendedTextMessage mediaKeyTimestamp + * @property {number|null} [thumbnailHeight] ExtendedTextMessage thumbnailHeight + * @property {number|null} [thumbnailWidth] ExtendedTextMessage thumbnailWidth + * @property {proto.Message.ExtendedTextMessage.InviteLinkGroupType|null} [inviteLinkGroupType] ExtendedTextMessage inviteLinkGroupType + * @property {string|null} [inviteLinkParentGroupSubjectV2] ExtendedTextMessage inviteLinkParentGroupSubjectV2 + * @property {Uint8Array|null} [inviteLinkParentGroupThumbnailV2] ExtendedTextMessage inviteLinkParentGroupThumbnailV2 + * @property {proto.Message.ExtendedTextMessage.InviteLinkGroupType|null} [inviteLinkGroupTypeV2] ExtendedTextMessage inviteLinkGroupTypeV2 + */ + + /** + * Constructs a new ExtendedTextMessage. + * @memberof proto.Message + * @classdesc Represents an ExtendedTextMessage. + * @implements IExtendedTextMessage + * @constructor + * @param {proto.Message.IExtendedTextMessage=} [properties] Properties to set + */ + function ExtendedTextMessage(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]]; + } + + /** + * ExtendedTextMessage text. + * @member {string} text + * @memberof proto.Message.ExtendedTextMessage + * @instance + */ + ExtendedTextMessage.prototype.text = ""; + + /** + * ExtendedTextMessage matchedText. + * @member {string} matchedText + * @memberof proto.Message.ExtendedTextMessage + * @instance + */ + ExtendedTextMessage.prototype.matchedText = ""; + + /** + * ExtendedTextMessage canonicalUrl. + * @member {string} canonicalUrl + * @memberof proto.Message.ExtendedTextMessage + * @instance + */ + ExtendedTextMessage.prototype.canonicalUrl = ""; + + /** + * ExtendedTextMessage description. + * @member {string} description + * @memberof proto.Message.ExtendedTextMessage + * @instance + */ + ExtendedTextMessage.prototype.description = ""; + + /** + * ExtendedTextMessage title. + * @member {string} title + * @memberof proto.Message.ExtendedTextMessage + * @instance + */ + ExtendedTextMessage.prototype.title = ""; + + /** + * ExtendedTextMessage textArgb. + * @member {number} textArgb + * @memberof proto.Message.ExtendedTextMessage + * @instance + */ + ExtendedTextMessage.prototype.textArgb = 0; + + /** + * ExtendedTextMessage backgroundArgb. + * @member {number} backgroundArgb + * @memberof proto.Message.ExtendedTextMessage + * @instance + */ + ExtendedTextMessage.prototype.backgroundArgb = 0; + + /** + * ExtendedTextMessage font. + * @member {proto.Message.ExtendedTextMessage.FontType} font + * @memberof proto.Message.ExtendedTextMessage + * @instance + */ + ExtendedTextMessage.prototype.font = 0; + + /** + * ExtendedTextMessage previewType. + * @member {proto.Message.ExtendedTextMessage.PreviewType} previewType + * @memberof proto.Message.ExtendedTextMessage + * @instance + */ + ExtendedTextMessage.prototype.previewType = 0; + + /** + * ExtendedTextMessage jpegThumbnail. + * @member {Uint8Array} jpegThumbnail + * @memberof proto.Message.ExtendedTextMessage + * @instance + */ + ExtendedTextMessage.prototype.jpegThumbnail = $util.newBuffer([]); + + /** + * ExtendedTextMessage contextInfo. + * @member {proto.IContextInfo|null|undefined} contextInfo + * @memberof proto.Message.ExtendedTextMessage + * @instance + */ + ExtendedTextMessage.prototype.contextInfo = null; + + /** + * ExtendedTextMessage doNotPlayInline. + * @member {boolean} doNotPlayInline + * @memberof proto.Message.ExtendedTextMessage + * @instance + */ + ExtendedTextMessage.prototype.doNotPlayInline = false; + + /** + * ExtendedTextMessage thumbnailDirectPath. + * @member {string} thumbnailDirectPath + * @memberof proto.Message.ExtendedTextMessage + * @instance + */ + ExtendedTextMessage.prototype.thumbnailDirectPath = ""; + + /** + * ExtendedTextMessage thumbnailSha256. + * @member {Uint8Array} thumbnailSha256 + * @memberof proto.Message.ExtendedTextMessage + * @instance + */ + ExtendedTextMessage.prototype.thumbnailSha256 = $util.newBuffer([]); + + /** + * ExtendedTextMessage thumbnailEncSha256. + * @member {Uint8Array} thumbnailEncSha256 + * @memberof proto.Message.ExtendedTextMessage + * @instance + */ + ExtendedTextMessage.prototype.thumbnailEncSha256 = $util.newBuffer([]); + + /** + * ExtendedTextMessage mediaKey. + * @member {Uint8Array} mediaKey + * @memberof proto.Message.ExtendedTextMessage + * @instance + */ + ExtendedTextMessage.prototype.mediaKey = $util.newBuffer([]); + + /** + * ExtendedTextMessage mediaKeyTimestamp. + * @member {number|Long} mediaKeyTimestamp + * @memberof proto.Message.ExtendedTextMessage + * @instance + */ + ExtendedTextMessage.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ExtendedTextMessage thumbnailHeight. + * @member {number} thumbnailHeight + * @memberof proto.Message.ExtendedTextMessage + * @instance + */ + ExtendedTextMessage.prototype.thumbnailHeight = 0; + + /** + * ExtendedTextMessage thumbnailWidth. + * @member {number} thumbnailWidth + * @memberof proto.Message.ExtendedTextMessage + * @instance + */ + ExtendedTextMessage.prototype.thumbnailWidth = 0; + + /** + * ExtendedTextMessage inviteLinkGroupType. + * @member {proto.Message.ExtendedTextMessage.InviteLinkGroupType} inviteLinkGroupType + * @memberof proto.Message.ExtendedTextMessage + * @instance + */ + ExtendedTextMessage.prototype.inviteLinkGroupType = 0; + + /** + * ExtendedTextMessage inviteLinkParentGroupSubjectV2. + * @member {string} inviteLinkParentGroupSubjectV2 + * @memberof proto.Message.ExtendedTextMessage + * @instance + */ + ExtendedTextMessage.prototype.inviteLinkParentGroupSubjectV2 = ""; + + /** + * ExtendedTextMessage inviteLinkParentGroupThumbnailV2. + * @member {Uint8Array} inviteLinkParentGroupThumbnailV2 + * @memberof proto.Message.ExtendedTextMessage + * @instance + */ + ExtendedTextMessage.prototype.inviteLinkParentGroupThumbnailV2 = $util.newBuffer([]); + + /** + * ExtendedTextMessage inviteLinkGroupTypeV2. + * @member {proto.Message.ExtendedTextMessage.InviteLinkGroupType} inviteLinkGroupTypeV2 + * @memberof proto.Message.ExtendedTextMessage + * @instance + */ + ExtendedTextMessage.prototype.inviteLinkGroupTypeV2 = 0; + + /** + * Creates a new ExtendedTextMessage instance using the specified properties. + * @function create + * @memberof proto.Message.ExtendedTextMessage + * @static + * @param {proto.Message.IExtendedTextMessage=} [properties] Properties to set + * @returns {proto.Message.ExtendedTextMessage} ExtendedTextMessage instance + */ + ExtendedTextMessage.create = function create(properties) { + return new ExtendedTextMessage(properties); + }; + + /** + * Encodes the specified ExtendedTextMessage message. Does not implicitly {@link proto.Message.ExtendedTextMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.ExtendedTextMessage + * @static + * @param {proto.Message.IExtendedTextMessage} message ExtendedTextMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtendedTextMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + if (message.matchedText != null && Object.hasOwnProperty.call(message, "matchedText")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.matchedText); + if (message.canonicalUrl != null && Object.hasOwnProperty.call(message, "canonicalUrl")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.canonicalUrl); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.title); + if (message.textArgb != null && Object.hasOwnProperty.call(message, "textArgb")) + writer.uint32(/* id 7, wireType 5 =*/61).fixed32(message.textArgb); + if (message.backgroundArgb != null && Object.hasOwnProperty.call(message, "backgroundArgb")) + writer.uint32(/* id 8, wireType 5 =*/69).fixed32(message.backgroundArgb); + if (message.font != null && Object.hasOwnProperty.call(message, "font")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.font); + if (message.previewType != null && Object.hasOwnProperty.call(message, "previewType")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.previewType); + 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.doNotPlayInline != null && Object.hasOwnProperty.call(message, "doNotPlayInline")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.doNotPlayInline); + if (message.thumbnailDirectPath != null && Object.hasOwnProperty.call(message, "thumbnailDirectPath")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.thumbnailDirectPath); + if (message.thumbnailSha256 != null && Object.hasOwnProperty.call(message, "thumbnailSha256")) + writer.uint32(/* id 20, wireType 2 =*/162).bytes(message.thumbnailSha256); + if (message.thumbnailEncSha256 != null && Object.hasOwnProperty.call(message, "thumbnailEncSha256")) + writer.uint32(/* id 21, wireType 2 =*/170).bytes(message.thumbnailEncSha256); + if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey")) + writer.uint32(/* id 22, wireType 2 =*/178).bytes(message.mediaKey); + if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp")) + writer.uint32(/* id 23, wireType 0 =*/184).int64(message.mediaKeyTimestamp); + if (message.thumbnailHeight != null && Object.hasOwnProperty.call(message, "thumbnailHeight")) + writer.uint32(/* id 24, wireType 0 =*/192).uint32(message.thumbnailHeight); + if (message.thumbnailWidth != null && Object.hasOwnProperty.call(message, "thumbnailWidth")) + writer.uint32(/* id 25, wireType 0 =*/200).uint32(message.thumbnailWidth); + if (message.inviteLinkGroupType != null && Object.hasOwnProperty.call(message, "inviteLinkGroupType")) + writer.uint32(/* id 26, wireType 0 =*/208).int32(message.inviteLinkGroupType); + if (message.inviteLinkParentGroupSubjectV2 != null && Object.hasOwnProperty.call(message, "inviteLinkParentGroupSubjectV2")) + writer.uint32(/* id 27, wireType 2 =*/218).string(message.inviteLinkParentGroupSubjectV2); + if (message.inviteLinkParentGroupThumbnailV2 != null && Object.hasOwnProperty.call(message, "inviteLinkParentGroupThumbnailV2")) + writer.uint32(/* id 28, wireType 2 =*/226).bytes(message.inviteLinkParentGroupThumbnailV2); + if (message.inviteLinkGroupTypeV2 != null && Object.hasOwnProperty.call(message, "inviteLinkGroupTypeV2")) + writer.uint32(/* id 29, wireType 0 =*/232).int32(message.inviteLinkGroupTypeV2); + return writer; + }; + + /** + * Encodes the specified ExtendedTextMessage message, length delimited. Does not implicitly {@link proto.Message.ExtendedTextMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.ExtendedTextMessage + * @static + * @param {proto.Message.IExtendedTextMessage} message ExtendedTextMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtendedTextMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtendedTextMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.ExtendedTextMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.ExtendedTextMessage} ExtendedTextMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtendedTextMessage.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.Message.ExtendedTextMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.text = reader.string(); + break; + case 2: + message.matchedText = reader.string(); + break; + case 4: + message.canonicalUrl = reader.string(); + break; + case 5: + message.description = reader.string(); + break; + case 6: + message.title = reader.string(); + break; + case 7: + message.textArgb = reader.fixed32(); + break; + case 8: + message.backgroundArgb = reader.fixed32(); + break; + case 9: + message.font = reader.int32(); + break; + case 10: + message.previewType = reader.int32(); + break; + case 16: + message.jpegThumbnail = reader.bytes(); + break; + case 17: + message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); + break; + case 18: + message.doNotPlayInline = reader.bool(); + break; + case 19: + message.thumbnailDirectPath = reader.string(); + break; + case 20: + message.thumbnailSha256 = reader.bytes(); + break; + case 21: + message.thumbnailEncSha256 = reader.bytes(); + break; + case 22: + message.mediaKey = reader.bytes(); + break; + case 23: + message.mediaKeyTimestamp = reader.int64(); + break; + case 24: + message.thumbnailHeight = reader.uint32(); + break; + case 25: + message.thumbnailWidth = reader.uint32(); + break; + case 26: + message.inviteLinkGroupType = reader.int32(); + break; + case 27: + message.inviteLinkParentGroupSubjectV2 = reader.string(); + break; + case 28: + message.inviteLinkParentGroupThumbnailV2 = reader.bytes(); + break; + case 29: + message.inviteLinkGroupTypeV2 = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtendedTextMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.ExtendedTextMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.ExtendedTextMessage} ExtendedTextMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtendedTextMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtendedTextMessage message. + * @function verify + * @memberof proto.Message.ExtendedTextMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtendedTextMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + if (message.matchedText != null && message.hasOwnProperty("matchedText")) + if (!$util.isString(message.matchedText)) + return "matchedText: string expected"; + if (message.canonicalUrl != null && message.hasOwnProperty("canonicalUrl")) + if (!$util.isString(message.canonicalUrl)) + return "canonicalUrl: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.textArgb != null && message.hasOwnProperty("textArgb")) + if (!$util.isInteger(message.textArgb)) + return "textArgb: integer expected"; + if (message.backgroundArgb != null && message.hasOwnProperty("backgroundArgb")) + if (!$util.isInteger(message.backgroundArgb)) + return "backgroundArgb: integer expected"; + if (message.font != null && message.hasOwnProperty("font")) + switch (message.font) { + default: + return "font: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.previewType != null && message.hasOwnProperty("previewType")) + switch (message.previewType) { + default: + return "previewType: enum value expected"; + case 0: + case 1: + break; + } + 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.doNotPlayInline != null && message.hasOwnProperty("doNotPlayInline")) + if (typeof message.doNotPlayInline !== "boolean") + return "doNotPlayInline: 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.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.thumbnailHeight != null && message.hasOwnProperty("thumbnailHeight")) + if (!$util.isInteger(message.thumbnailHeight)) + return "thumbnailHeight: integer expected"; + if (message.thumbnailWidth != null && message.hasOwnProperty("thumbnailWidth")) + if (!$util.isInteger(message.thumbnailWidth)) + return "thumbnailWidth: integer expected"; + if (message.inviteLinkGroupType != null && message.hasOwnProperty("inviteLinkGroupType")) + switch (message.inviteLinkGroupType) { + default: + return "inviteLinkGroupType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.inviteLinkParentGroupSubjectV2 != null && message.hasOwnProperty("inviteLinkParentGroupSubjectV2")) + if (!$util.isString(message.inviteLinkParentGroupSubjectV2)) + return "inviteLinkParentGroupSubjectV2: string expected"; + if (message.inviteLinkParentGroupThumbnailV2 != null && message.hasOwnProperty("inviteLinkParentGroupThumbnailV2")) + if (!(message.inviteLinkParentGroupThumbnailV2 && typeof message.inviteLinkParentGroupThumbnailV2.length === "number" || $util.isString(message.inviteLinkParentGroupThumbnailV2))) + return "inviteLinkParentGroupThumbnailV2: buffer expected"; + if (message.inviteLinkGroupTypeV2 != null && message.hasOwnProperty("inviteLinkGroupTypeV2")) + switch (message.inviteLinkGroupTypeV2) { + default: + return "inviteLinkGroupTypeV2: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates an ExtendedTextMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.ExtendedTextMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.ExtendedTextMessage} ExtendedTextMessage + */ + ExtendedTextMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.ExtendedTextMessage) + return object; + var message = new $root.proto.Message.ExtendedTextMessage(); + if (object.text != null) + message.text = String(object.text); + if (object.matchedText != null) + message.matchedText = String(object.matchedText); + if (object.canonicalUrl != null) + message.canonicalUrl = String(object.canonicalUrl); + if (object.description != null) + message.description = String(object.description); + if (object.title != null) + message.title = String(object.title); + if (object.textArgb != null) + message.textArgb = object.textArgb >>> 0; + if (object.backgroundArgb != null) + message.backgroundArgb = object.backgroundArgb >>> 0; + switch (object.font) { + case "SANS_SERIF": + case 0: + message.font = 0; + break; + case "SERIF": + case 1: + message.font = 1; + break; + case "NORICAN_REGULAR": + case 2: + message.font = 2; + break; + case "BRYNDAN_WRITE": + case 3: + message.font = 3; + break; + case "BEBASNEUE_REGULAR": + case 4: + message.font = 4; + break; + case "OSWALD_HEAVY": + case 5: + message.font = 5; + break; + } + switch (object.previewType) { + case "NONE": + case 0: + message.previewType = 0; + break; + case "VIDEO": + case 1: + message.previewType = 1; + break; + } + 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.Message.ExtendedTextMessage.contextInfo: object expected"); + message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); + } + if (object.doNotPlayInline != null) + message.doNotPlayInline = Boolean(object.doNotPlayInline); + 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.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.thumbnailHeight != null) + message.thumbnailHeight = object.thumbnailHeight >>> 0; + if (object.thumbnailWidth != null) + message.thumbnailWidth = object.thumbnailWidth >>> 0; + switch (object.inviteLinkGroupType) { + case "DEFAULT": + case 0: + message.inviteLinkGroupType = 0; + break; + case "PARENT": + case 1: + message.inviteLinkGroupType = 1; + break; + case "SUB": + case 2: + message.inviteLinkGroupType = 2; + break; + case "DEFAULT_SUB": + case 3: + message.inviteLinkGroupType = 3; + break; + } + if (object.inviteLinkParentGroupSubjectV2 != null) + message.inviteLinkParentGroupSubjectV2 = String(object.inviteLinkParentGroupSubjectV2); + if (object.inviteLinkParentGroupThumbnailV2 != null) + if (typeof object.inviteLinkParentGroupThumbnailV2 === "string") + $util.base64.decode(object.inviteLinkParentGroupThumbnailV2, message.inviteLinkParentGroupThumbnailV2 = $util.newBuffer($util.base64.length(object.inviteLinkParentGroupThumbnailV2)), 0); + else if (object.inviteLinkParentGroupThumbnailV2.length) + message.inviteLinkParentGroupThumbnailV2 = object.inviteLinkParentGroupThumbnailV2; + switch (object.inviteLinkGroupTypeV2) { + case "DEFAULT": + case 0: + message.inviteLinkGroupTypeV2 = 0; + break; + case "PARENT": + case 1: + message.inviteLinkGroupTypeV2 = 1; + break; + case "SUB": + case 2: + message.inviteLinkGroupTypeV2 = 2; + break; + case "DEFAULT_SUB": + case 3: + message.inviteLinkGroupTypeV2 = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from an ExtendedTextMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.ExtendedTextMessage + * @static + * @param {proto.Message.ExtendedTextMessage} message ExtendedTextMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtendedTextMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.text = ""; + object.matchedText = ""; + object.canonicalUrl = ""; + object.description = ""; + object.title = ""; + object.textArgb = 0; + object.backgroundArgb = 0; + object.font = options.enums === String ? "SANS_SERIF" : 0; + object.previewType = options.enums === String ? "NONE" : 0; + if (options.bytes === String) + object.jpegThumbnail = ""; + else { + object.jpegThumbnail = []; + if (options.bytes !== Array) + object.jpegThumbnail = $util.newBuffer(object.jpegThumbnail); + } + object.contextInfo = null; + object.doNotPlayInline = 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); + } + 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; + object.thumbnailHeight = 0; + object.thumbnailWidth = 0; + object.inviteLinkGroupType = options.enums === String ? "DEFAULT" : 0; + object.inviteLinkParentGroupSubjectV2 = ""; + if (options.bytes === String) + object.inviteLinkParentGroupThumbnailV2 = ""; + else { + object.inviteLinkParentGroupThumbnailV2 = []; + if (options.bytes !== Array) + object.inviteLinkParentGroupThumbnailV2 = $util.newBuffer(object.inviteLinkParentGroupThumbnailV2); + } + object.inviteLinkGroupTypeV2 = options.enums === String ? "DEFAULT" : 0; + } + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + if (message.matchedText != null && message.hasOwnProperty("matchedText")) + object.matchedText = message.matchedText; + if (message.canonicalUrl != null && message.hasOwnProperty("canonicalUrl")) + object.canonicalUrl = message.canonicalUrl; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.textArgb != null && message.hasOwnProperty("textArgb")) + object.textArgb = message.textArgb; + if (message.backgroundArgb != null && message.hasOwnProperty("backgroundArgb")) + object.backgroundArgb = message.backgroundArgb; + if (message.font != null && message.hasOwnProperty("font")) + object.font = options.enums === String ? $root.proto.Message.ExtendedTextMessage.FontType[message.font] : message.font; + if (message.previewType != null && message.hasOwnProperty("previewType")) + object.previewType = options.enums === String ? $root.proto.Message.ExtendedTextMessage.PreviewType[message.previewType] : message.previewType; + 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.doNotPlayInline != null && message.hasOwnProperty("doNotPlayInline")) + object.doNotPlayInline = message.doNotPlayInline; + 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.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.thumbnailHeight != null && message.hasOwnProperty("thumbnailHeight")) + object.thumbnailHeight = message.thumbnailHeight; + if (message.thumbnailWidth != null && message.hasOwnProperty("thumbnailWidth")) + object.thumbnailWidth = message.thumbnailWidth; + if (message.inviteLinkGroupType != null && message.hasOwnProperty("inviteLinkGroupType")) + object.inviteLinkGroupType = options.enums === String ? $root.proto.Message.ExtendedTextMessage.InviteLinkGroupType[message.inviteLinkGroupType] : message.inviteLinkGroupType; + if (message.inviteLinkParentGroupSubjectV2 != null && message.hasOwnProperty("inviteLinkParentGroupSubjectV2")) + object.inviteLinkParentGroupSubjectV2 = message.inviteLinkParentGroupSubjectV2; + if (message.inviteLinkParentGroupThumbnailV2 != null && message.hasOwnProperty("inviteLinkParentGroupThumbnailV2")) + object.inviteLinkParentGroupThumbnailV2 = options.bytes === String ? $util.base64.encode(message.inviteLinkParentGroupThumbnailV2, 0, message.inviteLinkParentGroupThumbnailV2.length) : options.bytes === Array ? Array.prototype.slice.call(message.inviteLinkParentGroupThumbnailV2) : message.inviteLinkParentGroupThumbnailV2; + if (message.inviteLinkGroupTypeV2 != null && message.hasOwnProperty("inviteLinkGroupTypeV2")) + object.inviteLinkGroupTypeV2 = options.enums === String ? $root.proto.Message.ExtendedTextMessage.InviteLinkGroupType[message.inviteLinkGroupTypeV2] : message.inviteLinkGroupTypeV2; + return object; + }; + + /** + * Converts this ExtendedTextMessage to JSON. + * @function toJSON + * @memberof proto.Message.ExtendedTextMessage + * @instance + * @returns {Object.} JSON object + */ + ExtendedTextMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * FontType enum. + * @name proto.Message.ExtendedTextMessage.FontType + * @enum {number} + * @property {number} SANS_SERIF=0 SANS_SERIF value + * @property {number} SERIF=1 SERIF value + * @property {number} NORICAN_REGULAR=2 NORICAN_REGULAR value + * @property {number} BRYNDAN_WRITE=3 BRYNDAN_WRITE value + * @property {number} BEBASNEUE_REGULAR=4 BEBASNEUE_REGULAR value + * @property {number} OSWALD_HEAVY=5 OSWALD_HEAVY value + */ + ExtendedTextMessage.FontType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SANS_SERIF"] = 0; + values[valuesById[1] = "SERIF"] = 1; + values[valuesById[2] = "NORICAN_REGULAR"] = 2; + values[valuesById[3] = "BRYNDAN_WRITE"] = 3; + values[valuesById[4] = "BEBASNEUE_REGULAR"] = 4; + values[valuesById[5] = "OSWALD_HEAVY"] = 5; + return values; + })(); + + /** + * InviteLinkGroupType enum. + * @name proto.Message.ExtendedTextMessage.InviteLinkGroupType + * @enum {number} + * @property {number} DEFAULT=0 DEFAULT value + * @property {number} PARENT=1 PARENT value + * @property {number} SUB=2 SUB value + * @property {number} DEFAULT_SUB=3 DEFAULT_SUB value + */ + ExtendedTextMessage.InviteLinkGroupType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DEFAULT"] = 0; + values[valuesById[1] = "PARENT"] = 1; + values[valuesById[2] = "SUB"] = 2; + values[valuesById[3] = "DEFAULT_SUB"] = 3; + return values; + })(); + + /** + * PreviewType enum. + * @name proto.Message.ExtendedTextMessage.PreviewType + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} VIDEO=1 VIDEO value + */ + ExtendedTextMessage.PreviewType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "VIDEO"] = 1; + return values; + })(); + + return ExtendedTextMessage; + })(); + + Message.FutureProofMessage = (function() { + + /** + * Properties of a FutureProofMessage. + * @memberof proto.Message + * @interface IFutureProofMessage + * @property {proto.IMessage|null} [message] FutureProofMessage message + */ + + /** + * Constructs a new FutureProofMessage. + * @memberof proto.Message + * @classdesc Represents a FutureProofMessage. + * @implements IFutureProofMessage + * @constructor + * @param {proto.Message.IFutureProofMessage=} [properties] Properties to set + */ + function FutureProofMessage(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]]; + } + + /** + * FutureProofMessage message. + * @member {proto.IMessage|null|undefined} message + * @memberof proto.Message.FutureProofMessage + * @instance + */ + FutureProofMessage.prototype.message = null; + + /** + * Creates a new FutureProofMessage instance using the specified properties. + * @function create + * @memberof proto.Message.FutureProofMessage + * @static + * @param {proto.Message.IFutureProofMessage=} [properties] Properties to set + * @returns {proto.Message.FutureProofMessage} FutureProofMessage instance + */ + FutureProofMessage.create = function create(properties) { + return new FutureProofMessage(properties); + }; + + /** + * Encodes the specified FutureProofMessage message. Does not implicitly {@link proto.Message.FutureProofMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.FutureProofMessage + * @static + * @param {proto.Message.IFutureProofMessage} message FutureProofMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FutureProofMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + $root.proto.Message.encode(message.message, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FutureProofMessage message, length delimited. Does not implicitly {@link proto.Message.FutureProofMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.FutureProofMessage + * @static + * @param {proto.Message.IFutureProofMessage} message FutureProofMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FutureProofMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FutureProofMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.FutureProofMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.FutureProofMessage} FutureProofMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FutureProofMessage.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.Message.FutureProofMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.message = $root.proto.Message.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FutureProofMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.FutureProofMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.FutureProofMessage} FutureProofMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FutureProofMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FutureProofMessage message. + * @function verify + * @memberof proto.Message.FutureProofMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FutureProofMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.message != null && message.hasOwnProperty("message")) { + var error = $root.proto.Message.verify(message.message); + if (error) + return "message." + error; + } + return null; + }; + + /** + * Creates a FutureProofMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.FutureProofMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.FutureProofMessage} FutureProofMessage + */ + FutureProofMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.FutureProofMessage) + return object; + var message = new $root.proto.Message.FutureProofMessage(); + if (object.message != null) { + if (typeof object.message !== "object") + throw TypeError(".proto.Message.FutureProofMessage.message: object expected"); + message.message = $root.proto.Message.fromObject(object.message); + } + return message; + }; + + /** + * Creates a plain object from a FutureProofMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.FutureProofMessage + * @static + * @param {proto.Message.FutureProofMessage} message FutureProofMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FutureProofMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.message = null; + if (message.message != null && message.hasOwnProperty("message")) + object.message = $root.proto.Message.toObject(message.message, options); + return object; + }; + + /** + * Converts this FutureProofMessage to JSON. + * @function toJSON + * @memberof proto.Message.FutureProofMessage + * @instance + * @returns {Object.} JSON object + */ + FutureProofMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FutureProofMessage; + })(); + + Message.GroupInviteMessage = (function() { + + /** + * Properties of a GroupInviteMessage. + * @memberof proto.Message + * @interface IGroupInviteMessage + * @property {string|null} [groupJid] GroupInviteMessage groupJid + * @property {string|null} [inviteCode] GroupInviteMessage inviteCode + * @property {number|Long|null} [inviteExpiration] GroupInviteMessage inviteExpiration + * @property {string|null} [groupName] GroupInviteMessage groupName + * @property {Uint8Array|null} [jpegThumbnail] GroupInviteMessage jpegThumbnail + * @property {string|null} [caption] GroupInviteMessage caption + * @property {proto.IContextInfo|null} [contextInfo] GroupInviteMessage contextInfo + * @property {proto.Message.GroupInviteMessage.GroupType|null} [groupType] GroupInviteMessage groupType + */ + + /** + * Constructs a new GroupInviteMessage. + * @memberof proto.Message + * @classdesc Represents a GroupInviteMessage. + * @implements IGroupInviteMessage + * @constructor + * @param {proto.Message.IGroupInviteMessage=} [properties] Properties to set + */ + function GroupInviteMessage(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]]; + } + + /** + * GroupInviteMessage groupJid. + * @member {string} groupJid + * @memberof proto.Message.GroupInviteMessage + * @instance + */ + GroupInviteMessage.prototype.groupJid = ""; + + /** + * GroupInviteMessage inviteCode. + * @member {string} inviteCode + * @memberof proto.Message.GroupInviteMessage + * @instance + */ + GroupInviteMessage.prototype.inviteCode = ""; + + /** + * GroupInviteMessage inviteExpiration. + * @member {number|Long} inviteExpiration + * @memberof proto.Message.GroupInviteMessage + * @instance + */ + GroupInviteMessage.prototype.inviteExpiration = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * GroupInviteMessage groupName. + * @member {string} groupName + * @memberof proto.Message.GroupInviteMessage + * @instance + */ + GroupInviteMessage.prototype.groupName = ""; + + /** + * GroupInviteMessage jpegThumbnail. + * @member {Uint8Array} jpegThumbnail + * @memberof proto.Message.GroupInviteMessage + * @instance + */ + GroupInviteMessage.prototype.jpegThumbnail = $util.newBuffer([]); + + /** + * GroupInviteMessage caption. + * @member {string} caption + * @memberof proto.Message.GroupInviteMessage + * @instance + */ + GroupInviteMessage.prototype.caption = ""; + + /** + * GroupInviteMessage contextInfo. + * @member {proto.IContextInfo|null|undefined} contextInfo + * @memberof proto.Message.GroupInviteMessage + * @instance + */ + GroupInviteMessage.prototype.contextInfo = null; + + /** + * GroupInviteMessage groupType. + * @member {proto.Message.GroupInviteMessage.GroupType} groupType + * @memberof proto.Message.GroupInviteMessage + * @instance + */ + GroupInviteMessage.prototype.groupType = 0; + + /** + * Creates a new GroupInviteMessage instance using the specified properties. + * @function create + * @memberof proto.Message.GroupInviteMessage + * @static + * @param {proto.Message.IGroupInviteMessage=} [properties] Properties to set + * @returns {proto.Message.GroupInviteMessage} GroupInviteMessage instance + */ + GroupInviteMessage.create = function create(properties) { + return new GroupInviteMessage(properties); + }; + + /** + * Encodes the specified GroupInviteMessage message. Does not implicitly {@link proto.Message.GroupInviteMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.GroupInviteMessage + * @static + * @param {proto.Message.IGroupInviteMessage} message GroupInviteMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GroupInviteMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.groupJid != null && Object.hasOwnProperty.call(message, "groupJid")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.groupJid); + if (message.inviteCode != null && Object.hasOwnProperty.call(message, "inviteCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inviteCode); + if (message.inviteExpiration != null && Object.hasOwnProperty.call(message, "inviteExpiration")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.inviteExpiration); + if (message.groupName != null && Object.hasOwnProperty.call(message, "groupName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.groupName); + if (message.jpegThumbnail != null && Object.hasOwnProperty.call(message, "jpegThumbnail")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.jpegThumbnail); + if (message.caption != null && Object.hasOwnProperty.call(message, "caption")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.caption); + if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) + $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.groupType != null && Object.hasOwnProperty.call(message, "groupType")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.groupType); + return writer; + }; + + /** + * Encodes the specified GroupInviteMessage message, length delimited. Does not implicitly {@link proto.Message.GroupInviteMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.GroupInviteMessage + * @static + * @param {proto.Message.IGroupInviteMessage} message GroupInviteMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GroupInviteMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GroupInviteMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.GroupInviteMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.GroupInviteMessage} GroupInviteMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GroupInviteMessage.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.Message.GroupInviteMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.groupJid = reader.string(); + break; + case 2: + message.inviteCode = reader.string(); + break; + case 3: + message.inviteExpiration = reader.int64(); + break; + case 4: + message.groupName = reader.string(); + break; + case 5: + message.jpegThumbnail = reader.bytes(); + break; + case 6: + message.caption = reader.string(); + break; + case 7: + message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); + break; + case 8: + message.groupType = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GroupInviteMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.GroupInviteMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.GroupInviteMessage} GroupInviteMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GroupInviteMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GroupInviteMessage message. + * @function verify + * @memberof proto.Message.GroupInviteMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GroupInviteMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.groupJid != null && message.hasOwnProperty("groupJid")) + if (!$util.isString(message.groupJid)) + return "groupJid: string expected"; + if (message.inviteCode != null && message.hasOwnProperty("inviteCode")) + if (!$util.isString(message.inviteCode)) + return "inviteCode: string expected"; + if (message.inviteExpiration != null && message.hasOwnProperty("inviteExpiration")) + if (!$util.isInteger(message.inviteExpiration) && !(message.inviteExpiration && $util.isInteger(message.inviteExpiration.low) && $util.isInteger(message.inviteExpiration.high))) + return "inviteExpiration: integer|Long expected"; + if (message.groupName != null && message.hasOwnProperty("groupName")) + if (!$util.isString(message.groupName)) + return "groupName: string 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.caption != null && message.hasOwnProperty("caption")) + if (!$util.isString(message.caption)) + return "caption: string expected"; + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } + if (message.groupType != null && message.hasOwnProperty("groupType")) + switch (message.groupType) { + default: + return "groupType: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates a GroupInviteMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.GroupInviteMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.GroupInviteMessage} GroupInviteMessage + */ + GroupInviteMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.GroupInviteMessage) + return object; + var message = new $root.proto.Message.GroupInviteMessage(); + if (object.groupJid != null) + message.groupJid = String(object.groupJid); + if (object.inviteCode != null) + message.inviteCode = String(object.inviteCode); + if (object.inviteExpiration != null) + if ($util.Long) + (message.inviteExpiration = $util.Long.fromValue(object.inviteExpiration)).unsigned = false; + else if (typeof object.inviteExpiration === "string") + message.inviteExpiration = parseInt(object.inviteExpiration, 10); + else if (typeof object.inviteExpiration === "number") + message.inviteExpiration = object.inviteExpiration; + else if (typeof object.inviteExpiration === "object") + message.inviteExpiration = new $util.LongBits(object.inviteExpiration.low >>> 0, object.inviteExpiration.high >>> 0).toNumber(); + if (object.groupName != null) + message.groupName = String(object.groupName); + 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.caption != null) + message.caption = String(object.caption); + if (object.contextInfo != null) { + if (typeof object.contextInfo !== "object") + throw TypeError(".proto.Message.GroupInviteMessage.contextInfo: object expected"); + message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); + } + switch (object.groupType) { + case "DEFAULT": + case 0: + message.groupType = 0; + break; + case "PARENT": + case 1: + message.groupType = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a GroupInviteMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.GroupInviteMessage + * @static + * @param {proto.Message.GroupInviteMessage} message GroupInviteMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GroupInviteMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.groupJid = ""; + object.inviteCode = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.inviteExpiration = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.inviteExpiration = options.longs === String ? "0" : 0; + object.groupName = ""; + if (options.bytes === String) + object.jpegThumbnail = ""; + else { + object.jpegThumbnail = []; + if (options.bytes !== Array) + object.jpegThumbnail = $util.newBuffer(object.jpegThumbnail); + } + object.caption = ""; + object.contextInfo = null; + object.groupType = options.enums === String ? "DEFAULT" : 0; + } + if (message.groupJid != null && message.hasOwnProperty("groupJid")) + object.groupJid = message.groupJid; + if (message.inviteCode != null && message.hasOwnProperty("inviteCode")) + object.inviteCode = message.inviteCode; + if (message.inviteExpiration != null && message.hasOwnProperty("inviteExpiration")) + if (typeof message.inviteExpiration === "number") + object.inviteExpiration = options.longs === String ? String(message.inviteExpiration) : message.inviteExpiration; + else + object.inviteExpiration = options.longs === String ? $util.Long.prototype.toString.call(message.inviteExpiration) : options.longs === Number ? new $util.LongBits(message.inviteExpiration.low >>> 0, message.inviteExpiration.high >>> 0).toNumber() : message.inviteExpiration; + if (message.groupName != null && message.hasOwnProperty("groupName")) + object.groupName = message.groupName; + 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.caption != null && message.hasOwnProperty("caption")) + object.caption = message.caption; + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) + object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + if (message.groupType != null && message.hasOwnProperty("groupType")) + object.groupType = options.enums === String ? $root.proto.Message.GroupInviteMessage.GroupType[message.groupType] : message.groupType; + return object; + }; + + /** + * Converts this GroupInviteMessage to JSON. + * @function toJSON + * @memberof proto.Message.GroupInviteMessage + * @instance + * @returns {Object.} JSON object + */ + GroupInviteMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * GroupType enum. + * @name proto.Message.GroupInviteMessage.GroupType + * @enum {number} + * @property {number} DEFAULT=0 DEFAULT value + * @property {number} PARENT=1 PARENT value + */ + GroupInviteMessage.GroupType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DEFAULT"] = 0; + values[valuesById[1] = "PARENT"] = 1; + return values; + })(); + + return GroupInviteMessage; + })(); + + Message.HighlyStructuredMessage = (function() { + + /** + * Properties of a HighlyStructuredMessage. + * @memberof proto.Message + * @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.Message.ITemplateMessage|null} [hydratedHsm] HighlyStructuredMessage hydratedHsm + */ + + /** + * Constructs a new HighlyStructuredMessage. + * @memberof proto.Message + * @classdesc Represents a HighlyStructuredMessage. + * @implements IHighlyStructuredMessage + * @constructor + * @param {proto.Message.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.Message.HighlyStructuredMessage + * @instance + */ + HighlyStructuredMessage.prototype.namespace = ""; + + /** + * HighlyStructuredMessage elementName. + * @member {string} elementName + * @memberof proto.Message.HighlyStructuredMessage + * @instance + */ + HighlyStructuredMessage.prototype.elementName = ""; + + /** + * HighlyStructuredMessage params. + * @member {Array.} params + * @memberof proto.Message.HighlyStructuredMessage + * @instance + */ + HighlyStructuredMessage.prototype.params = $util.emptyArray; + + /** + * HighlyStructuredMessage fallbackLg. + * @member {string} fallbackLg + * @memberof proto.Message.HighlyStructuredMessage + * @instance + */ + HighlyStructuredMessage.prototype.fallbackLg = ""; + + /** + * HighlyStructuredMessage fallbackLc. + * @member {string} fallbackLc + * @memberof proto.Message.HighlyStructuredMessage + * @instance + */ + HighlyStructuredMessage.prototype.fallbackLc = ""; + + /** + * HighlyStructuredMessage localizableParams. + * @member {Array.} localizableParams + * @memberof proto.Message.HighlyStructuredMessage + * @instance + */ + HighlyStructuredMessage.prototype.localizableParams = $util.emptyArray; + + /** + * HighlyStructuredMessage deterministicLg. + * @member {string} deterministicLg + * @memberof proto.Message.HighlyStructuredMessage + * @instance + */ + HighlyStructuredMessage.prototype.deterministicLg = ""; + + /** + * HighlyStructuredMessage deterministicLc. + * @member {string} deterministicLc + * @memberof proto.Message.HighlyStructuredMessage + * @instance + */ + HighlyStructuredMessage.prototype.deterministicLc = ""; + + /** + * HighlyStructuredMessage hydratedHsm. + * @member {proto.Message.ITemplateMessage|null|undefined} hydratedHsm + * @memberof proto.Message.HighlyStructuredMessage + * @instance + */ + HighlyStructuredMessage.prototype.hydratedHsm = null; + + /** + * Creates a new HighlyStructuredMessage instance using the specified properties. + * @function create + * @memberof proto.Message.HighlyStructuredMessage + * @static + * @param {proto.Message.IHighlyStructuredMessage=} [properties] Properties to set + * @returns {proto.Message.HighlyStructuredMessage} HighlyStructuredMessage instance + */ + HighlyStructuredMessage.create = function create(properties) { + return new HighlyStructuredMessage(properties); + }; + + /** + * Encodes the specified HighlyStructuredMessage message. Does not implicitly {@link proto.Message.HighlyStructuredMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.HighlyStructuredMessage + * @static + * @param {proto.Message.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.Message.HighlyStructuredMessage.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.Message.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.Message.HighlyStructuredMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.HighlyStructuredMessage + * @static + * @param {proto.Message.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.Message.HighlyStructuredMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.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.Message.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.Message.HighlyStructuredMessage.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.Message.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.Message.HighlyStructuredMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.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.Message.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.Message.HighlyStructuredMessage.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.Message.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.Message.HighlyStructuredMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.HighlyStructuredMessage} HighlyStructuredMessage + */ + HighlyStructuredMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.HighlyStructuredMessage) + return object; + var message = new $root.proto.Message.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.Message.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.Message.HighlyStructuredMessage.localizableParams: array expected"); + message.localizableParams = []; + for (var i = 0; i < object.localizableParams.length; ++i) { + if (typeof object.localizableParams[i] !== "object") + throw TypeError(".proto.Message.HighlyStructuredMessage.localizableParams: object expected"); + message.localizableParams[i] = $root.proto.Message.HighlyStructuredMessage.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.Message.HighlyStructuredMessage.hydratedHsm: object expected"); + message.hydratedHsm = $root.proto.Message.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.Message.HighlyStructuredMessage + * @static + * @param {proto.Message.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.Message.HighlyStructuredMessage.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.Message.TemplateMessage.toObject(message.hydratedHsm, options); + return object; + }; + + /** + * Converts this HighlyStructuredMessage to JSON. + * @function toJSON + * @memberof proto.Message.HighlyStructuredMessage + * @instance + * @returns {Object.} JSON object + */ + HighlyStructuredMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + HighlyStructuredMessage.HSMLocalizableParameter = (function() { + + /** + * Properties of a HSMLocalizableParameter. + * @memberof proto.Message.HighlyStructuredMessage + * @interface IHSMLocalizableParameter + * @property {string|null} ["default"] HSMLocalizableParameter default + * @property {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMCurrency|null} [currency] HSMLocalizableParameter currency + * @property {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMDateTime|null} [dateTime] HSMLocalizableParameter dateTime + */ + + /** + * Constructs a new HSMLocalizableParameter. + * @memberof proto.Message.HighlyStructuredMessage + * @classdesc Represents a HSMLocalizableParameter. + * @implements IHSMLocalizableParameter + * @constructor + * @param {proto.Message.HighlyStructuredMessage.IHSMLocalizableParameter=} [properties] Properties to set + */ + function HSMLocalizableParameter(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]]; + } + + /** + * HSMLocalizableParameter default. + * @member {string} default + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter + * @instance + */ + HSMLocalizableParameter.prototype["default"] = ""; + + /** + * HSMLocalizableParameter currency. + * @member {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMCurrency|null|undefined} currency + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter + * @instance + */ + HSMLocalizableParameter.prototype.currency = null; + + /** + * HSMLocalizableParameter dateTime. + * @member {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMDateTime|null|undefined} dateTime + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter + * @instance + */ + HSMLocalizableParameter.prototype.dateTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HSMLocalizableParameter paramOneof. + * @member {"currency"|"dateTime"|undefined} paramOneof + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter + * @instance + */ + Object.defineProperty(HSMLocalizableParameter.prototype, "paramOneof", { + get: $util.oneOfGetter($oneOfFields = ["currency", "dateTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HSMLocalizableParameter instance using the specified properties. + * @function create + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter + * @static + * @param {proto.Message.HighlyStructuredMessage.IHSMLocalizableParameter=} [properties] Properties to set + * @returns {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter} HSMLocalizableParameter instance + */ + HSMLocalizableParameter.create = function create(properties) { + return new HSMLocalizableParameter(properties); + }; + + /** + * Encodes the specified HSMLocalizableParameter message. Does not implicitly {@link proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.verify|verify} messages. + * @function encode + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter + * @static + * @param {proto.Message.HighlyStructuredMessage.IHSMLocalizableParameter} message HSMLocalizableParameter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HSMLocalizableParameter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message["default"] != null && Object.hasOwnProperty.call(message, "default")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message["default"]); + if (message.currency != null && Object.hasOwnProperty.call(message, "currency")) + $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency.encode(message.currency, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.dateTime != null && Object.hasOwnProperty.call(message, "dateTime")) + $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.encode(message.dateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified HSMLocalizableParameter message, length delimited. Does not implicitly {@link proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter + * @static + * @param {proto.Message.HighlyStructuredMessage.IHSMLocalizableParameter} message HSMLocalizableParameter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HSMLocalizableParameter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HSMLocalizableParameter message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter} HSMLocalizableParameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HSMLocalizableParameter.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.Message.HighlyStructuredMessage.HSMLocalizableParameter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message["default"] = reader.string(); + break; + case 2: + message.currency = $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency.decode(reader, reader.uint32()); + break; + case 3: + message.dateTime = $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HSMLocalizableParameter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter} HSMLocalizableParameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HSMLocalizableParameter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HSMLocalizableParameter message. + * @function verify + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HSMLocalizableParameter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message["default"] != null && message.hasOwnProperty("default")) + if (!$util.isString(message["default"])) + return "default: string expected"; + if (message.currency != null && message.hasOwnProperty("currency")) { + properties.paramOneof = 1; + { + var error = $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency.verify(message.currency); + if (error) + return "currency." + error; + } + } + if (message.dateTime != null && message.hasOwnProperty("dateTime")) { + if (properties.paramOneof === 1) + return "paramOneof: multiple values"; + properties.paramOneof = 1; + { + var error = $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.verify(message.dateTime); + if (error) + return "dateTime." + error; + } + } + return null; + }; + + /** + * Creates a HSMLocalizableParameter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter} HSMLocalizableParameter + */ + HSMLocalizableParameter.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter) + return object; + var message = new $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter(); + if (object["default"] != null) + message["default"] = String(object["default"]); + if (object.currency != null) { + if (typeof object.currency !== "object") + throw TypeError(".proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.currency: object expected"); + message.currency = $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency.fromObject(object.currency); + } + if (object.dateTime != null) { + if (typeof object.dateTime !== "object") + throw TypeError(".proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.dateTime: object expected"); + message.dateTime = $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.fromObject(object.dateTime); + } + return message; + }; + + /** + * Creates a plain object from a HSMLocalizableParameter message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter + * @static + * @param {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter} message HSMLocalizableParameter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HSMLocalizableParameter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object["default"] = ""; + if (message["default"] != null && message.hasOwnProperty("default")) + object["default"] = message["default"]; + if (message.currency != null && message.hasOwnProperty("currency")) { + object.currency = $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency.toObject(message.currency, options); + if (options.oneofs) + object.paramOneof = "currency"; + } + if (message.dateTime != null && message.hasOwnProperty("dateTime")) { + object.dateTime = $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.toObject(message.dateTime, options); + if (options.oneofs) + object.paramOneof = "dateTime"; + } + return object; + }; + + /** + * Converts this HSMLocalizableParameter to JSON. + * @function toJSON + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter + * @instance + * @returns {Object.} JSON object + */ + HSMLocalizableParameter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + HSMLocalizableParameter.HSMCurrency = (function() { + + /** + * Properties of a HSMCurrency. + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter + * @interface IHSMCurrency + * @property {string|null} [currencyCode] HSMCurrency currencyCode + * @property {number|Long|null} [amount1000] HSMCurrency amount1000 + */ + + /** + * Constructs a new HSMCurrency. + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter + * @classdesc Represents a HSMCurrency. + * @implements IHSMCurrency + * @constructor + * @param {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMCurrency=} [properties] Properties to set + */ + function HSMCurrency(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]]; + } + + /** + * HSMCurrency currencyCode. + * @member {string} currencyCode + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency + * @instance + */ + HSMCurrency.prototype.currencyCode = ""; + + /** + * HSMCurrency amount1000. + * @member {number|Long} amount1000 + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency + * @instance + */ + HSMCurrency.prototype.amount1000 = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new HSMCurrency instance using the specified properties. + * @function create + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency + * @static + * @param {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMCurrency=} [properties] Properties to set + * @returns {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency} HSMCurrency instance + */ + HSMCurrency.create = function create(properties) { + return new HSMCurrency(properties); + }; + + /** + * Encodes the specified HSMCurrency message. Does not implicitly {@link proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency.verify|verify} messages. + * @function encode + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency + * @static + * @param {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMCurrency} message HSMCurrency message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HSMCurrency.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.currencyCode); + if (message.amount1000 != null && Object.hasOwnProperty.call(message, "amount1000")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.amount1000); + return writer; + }; + + /** + * Encodes the specified HSMCurrency message, length delimited. Does not implicitly {@link proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency + * @static + * @param {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMCurrency} message HSMCurrency message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HSMCurrency.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HSMCurrency message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency} HSMCurrency + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HSMCurrency.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.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.currencyCode = reader.string(); + break; + case 2: + message.amount1000 = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HSMCurrency message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency} HSMCurrency + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HSMCurrency.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HSMCurrency message. + * @function verify + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HSMCurrency.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + if (!$util.isString(message.currencyCode)) + return "currencyCode: string expected"; + 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"; + return null; + }; + + /** + * Creates a HSMCurrency message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency} HSMCurrency + */ + HSMCurrency.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency) + return object; + var message = new $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency(); + if (object.currencyCode != null) + message.currencyCode = String(object.currencyCode); + if (object.amount1000 != null) + if ($util.Long) + (message.amount1000 = $util.Long.fromValue(object.amount1000)).unsigned = false; + 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(); + return message; + }; + + /** + * Creates a plain object from a HSMCurrency message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency + * @static + * @param {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency} message HSMCurrency + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HSMCurrency.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.currencyCode = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.amount1000 = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.amount1000 = options.longs === String ? "0" : 0; + } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + object.currencyCode = message.currencyCode; + 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() : message.amount1000; + return object; + }; + + /** + * Converts this HSMCurrency to JSON. + * @function toJSON + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency + * @instance + * @returns {Object.} JSON object + */ + HSMCurrency.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HSMCurrency; + })(); + + HSMLocalizableParameter.HSMDateTime = (function() { + + /** + * Properties of a HSMDateTime. + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter + * @interface IHSMDateTime + * @property {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeComponent|null} [component] HSMDateTime component + * @property {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeUnixEpoch|null} [unixEpoch] HSMDateTime unixEpoch + */ + + /** + * Constructs a new HSMDateTime. + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter + * @classdesc Represents a HSMDateTime. + * @implements IHSMDateTime + * @constructor + * @param {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMDateTime=} [properties] Properties to set + */ + function HSMDateTime(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]]; + } + + /** + * HSMDateTime component. + * @member {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeComponent|null|undefined} component + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime + * @instance + */ + HSMDateTime.prototype.component = null; + + /** + * HSMDateTime unixEpoch. + * @member {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeUnixEpoch|null|undefined} unixEpoch + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime + * @instance + */ + HSMDateTime.prototype.unixEpoch = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HSMDateTime datetimeOneof. + * @member {"component"|"unixEpoch"|undefined} datetimeOneof + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime + * @instance + */ + Object.defineProperty(HSMDateTime.prototype, "datetimeOneof", { + get: $util.oneOfGetter($oneOfFields = ["component", "unixEpoch"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HSMDateTime instance using the specified properties. + * @function create + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime + * @static + * @param {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMDateTime=} [properties] Properties to set + * @returns {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime} HSMDateTime instance + */ + HSMDateTime.create = function create(properties) { + return new HSMDateTime(properties); + }; + + /** + * Encodes the specified HSMDateTime message. Does not implicitly {@link proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.verify|verify} messages. + * @function encode + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime + * @static + * @param {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMDateTime} message HSMDateTime message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HSMDateTime.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.component != null && Object.hasOwnProperty.call(message, "component")) + $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.encode(message.component, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.unixEpoch != null && Object.hasOwnProperty.call(message, "unixEpoch")) + $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch.encode(message.unixEpoch, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified HSMDateTime message, length delimited. Does not implicitly {@link proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime + * @static + * @param {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMDateTime} message HSMDateTime message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HSMDateTime.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HSMDateTime message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime} HSMDateTime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HSMDateTime.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.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.component = $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.decode(reader, reader.uint32()); + break; + case 2: + message.unixEpoch = $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HSMDateTime message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime} HSMDateTime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HSMDateTime.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HSMDateTime message. + * @function verify + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HSMDateTime.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.component != null && message.hasOwnProperty("component")) { + properties.datetimeOneof = 1; + { + var error = $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.verify(message.component); + if (error) + return "component." + error; + } + } + if (message.unixEpoch != null && message.hasOwnProperty("unixEpoch")) { + if (properties.datetimeOneof === 1) + return "datetimeOneof: multiple values"; + properties.datetimeOneof = 1; + { + var error = $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch.verify(message.unixEpoch); + if (error) + return "unixEpoch." + error; + } + } + return null; + }; + + /** + * Creates a HSMDateTime message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime} HSMDateTime + */ + HSMDateTime.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime) + return object; + var message = new $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime(); + if (object.component != null) { + if (typeof object.component !== "object") + throw TypeError(".proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.component: object expected"); + message.component = $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.fromObject(object.component); + } + if (object.unixEpoch != null) { + if (typeof object.unixEpoch !== "object") + throw TypeError(".proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.unixEpoch: object expected"); + message.unixEpoch = $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch.fromObject(object.unixEpoch); + } + return message; + }; + + /** + * Creates a plain object from a HSMDateTime message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime + * @static + * @param {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime} message HSMDateTime + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HSMDateTime.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.component != null && message.hasOwnProperty("component")) { + object.component = $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.toObject(message.component, options); + if (options.oneofs) + object.datetimeOneof = "component"; + } + if (message.unixEpoch != null && message.hasOwnProperty("unixEpoch")) { + object.unixEpoch = $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch.toObject(message.unixEpoch, options); + if (options.oneofs) + object.datetimeOneof = "unixEpoch"; + } + return object; + }; + + /** + * Converts this HSMDateTime to JSON. + * @function toJSON + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime + * @instance + * @returns {Object.} JSON object + */ + HSMDateTime.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + HSMDateTime.HSMDateTimeComponent = (function() { + + /** + * Properties of a HSMDateTimeComponent. + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime + * @interface IHSMDateTimeComponent + * @property {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.DayOfWeekType|null} [dayOfWeek] HSMDateTimeComponent dayOfWeek + * @property {number|null} [year] HSMDateTimeComponent year + * @property {number|null} [month] HSMDateTimeComponent month + * @property {number|null} [dayOfMonth] HSMDateTimeComponent dayOfMonth + * @property {number|null} [hour] HSMDateTimeComponent hour + * @property {number|null} [minute] HSMDateTimeComponent minute + * @property {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.CalendarType|null} [calendar] HSMDateTimeComponent calendar + */ + + /** + * Constructs a new HSMDateTimeComponent. + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime + * @classdesc Represents a HSMDateTimeComponent. + * @implements IHSMDateTimeComponent + * @constructor + * @param {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeComponent=} [properties] Properties to set + */ + function HSMDateTimeComponent(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]]; + } + + /** + * HSMDateTimeComponent dayOfWeek. + * @member {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.DayOfWeekType} dayOfWeek + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent + * @instance + */ + HSMDateTimeComponent.prototype.dayOfWeek = 1; + + /** + * HSMDateTimeComponent year. + * @member {number} year + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent + * @instance + */ + HSMDateTimeComponent.prototype.year = 0; + + /** + * HSMDateTimeComponent month. + * @member {number} month + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent + * @instance + */ + HSMDateTimeComponent.prototype.month = 0; + + /** + * HSMDateTimeComponent dayOfMonth. + * @member {number} dayOfMonth + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent + * @instance + */ + HSMDateTimeComponent.prototype.dayOfMonth = 0; + + /** + * HSMDateTimeComponent hour. + * @member {number} hour + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent + * @instance + */ + HSMDateTimeComponent.prototype.hour = 0; + + /** + * HSMDateTimeComponent minute. + * @member {number} minute + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent + * @instance + */ + HSMDateTimeComponent.prototype.minute = 0; + + /** + * HSMDateTimeComponent calendar. + * @member {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.CalendarType} calendar + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent + * @instance + */ + HSMDateTimeComponent.prototype.calendar = 1; + + /** + * Creates a new HSMDateTimeComponent instance using the specified properties. + * @function create + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent + * @static + * @param {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeComponent=} [properties] Properties to set + * @returns {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent} HSMDateTimeComponent instance + */ + HSMDateTimeComponent.create = function create(properties) { + return new HSMDateTimeComponent(properties); + }; + + /** + * Encodes the specified HSMDateTimeComponent message. Does not implicitly {@link proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.verify|verify} messages. + * @function encode + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent + * @static + * @param {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeComponent} message HSMDateTimeComponent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HSMDateTimeComponent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dayOfWeek != null && Object.hasOwnProperty.call(message, "dayOfWeek")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.dayOfWeek); + if (message.year != null && Object.hasOwnProperty.call(message, "year")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.year); + if (message.month != null && Object.hasOwnProperty.call(message, "month")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.month); + if (message.dayOfMonth != null && Object.hasOwnProperty.call(message, "dayOfMonth")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.dayOfMonth); + if (message.hour != null && Object.hasOwnProperty.call(message, "hour")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.hour); + if (message.minute != null && Object.hasOwnProperty.call(message, "minute")) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.minute); + if (message.calendar != null && Object.hasOwnProperty.call(message, "calendar")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.calendar); + return writer; + }; + + /** + * Encodes the specified HSMDateTimeComponent message, length delimited. Does not implicitly {@link proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent + * @static + * @param {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeComponent} message HSMDateTimeComponent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HSMDateTimeComponent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HSMDateTimeComponent message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent} HSMDateTimeComponent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HSMDateTimeComponent.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.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.dayOfWeek = reader.int32(); + break; + case 2: + message.year = reader.uint32(); + break; + case 3: + message.month = reader.uint32(); + break; + case 4: + message.dayOfMonth = reader.uint32(); + break; + case 5: + message.hour = reader.uint32(); + break; + case 6: + message.minute = reader.uint32(); + break; + case 7: + message.calendar = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HSMDateTimeComponent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent} HSMDateTimeComponent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HSMDateTimeComponent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HSMDateTimeComponent message. + * @function verify + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HSMDateTimeComponent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) + switch (message.dayOfWeek) { + default: + return "dayOfWeek: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.year != null && message.hasOwnProperty("year")) + if (!$util.isInteger(message.year)) + return "year: integer expected"; + if (message.month != null && message.hasOwnProperty("month")) + if (!$util.isInteger(message.month)) + return "month: integer expected"; + if (message.dayOfMonth != null && message.hasOwnProperty("dayOfMonth")) + if (!$util.isInteger(message.dayOfMonth)) + return "dayOfMonth: integer expected"; + if (message.hour != null && message.hasOwnProperty("hour")) + if (!$util.isInteger(message.hour)) + return "hour: integer expected"; + if (message.minute != null && message.hasOwnProperty("minute")) + if (!$util.isInteger(message.minute)) + return "minute: integer expected"; + if (message.calendar != null && message.hasOwnProperty("calendar")) + switch (message.calendar) { + default: + return "calendar: enum value expected"; + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a HSMDateTimeComponent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent} HSMDateTimeComponent + */ + HSMDateTimeComponent.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent) + return object; + var message = new $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent(); + switch (object.dayOfWeek) { + case "MONDAY": + case 1: + message.dayOfWeek = 1; + break; + case "TUESDAY": + case 2: + message.dayOfWeek = 2; + break; + case "WEDNESDAY": + case 3: + message.dayOfWeek = 3; + break; + case "THURSDAY": + case 4: + message.dayOfWeek = 4; + break; + case "FRIDAY": + case 5: + message.dayOfWeek = 5; + break; + case "SATURDAY": + case 6: + message.dayOfWeek = 6; + break; + case "SUNDAY": + case 7: + message.dayOfWeek = 7; + break; + } + if (object.year != null) + message.year = object.year >>> 0; + if (object.month != null) + message.month = object.month >>> 0; + if (object.dayOfMonth != null) + message.dayOfMonth = object.dayOfMonth >>> 0; + if (object.hour != null) + message.hour = object.hour >>> 0; + if (object.minute != null) + message.minute = object.minute >>> 0; + switch (object.calendar) { + case "GREGORIAN": + case 1: + message.calendar = 1; + break; + case "SOLAR_HIJRI": + case 2: + message.calendar = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a HSMDateTimeComponent message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent + * @static + * @param {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent} message HSMDateTimeComponent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HSMDateTimeComponent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dayOfWeek = options.enums === String ? "MONDAY" : 1; + object.year = 0; + object.month = 0; + object.dayOfMonth = 0; + object.hour = 0; + object.minute = 0; + object.calendar = options.enums === String ? "GREGORIAN" : 1; + } + if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) + object.dayOfWeek = options.enums === String ? $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.DayOfWeekType[message.dayOfWeek] : message.dayOfWeek; + if (message.year != null && message.hasOwnProperty("year")) + object.year = message.year; + if (message.month != null && message.hasOwnProperty("month")) + object.month = message.month; + if (message.dayOfMonth != null && message.hasOwnProperty("dayOfMonth")) + object.dayOfMonth = message.dayOfMonth; + if (message.hour != null && message.hasOwnProperty("hour")) + object.hour = message.hour; + if (message.minute != null && message.hasOwnProperty("minute")) + object.minute = message.minute; + if (message.calendar != null && message.hasOwnProperty("calendar")) + object.calendar = options.enums === String ? $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.CalendarType[message.calendar] : message.calendar; + return object; + }; + + /** + * Converts this HSMDateTimeComponent to JSON. + * @function toJSON + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent + * @instance + * @returns {Object.} JSON object + */ + HSMDateTimeComponent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * CalendarType enum. + * @name proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.CalendarType + * @enum {number} + * @property {number} GREGORIAN=1 GREGORIAN value + * @property {number} SOLAR_HIJRI=2 SOLAR_HIJRI value + */ + HSMDateTimeComponent.CalendarType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "GREGORIAN"] = 1; + values[valuesById[2] = "SOLAR_HIJRI"] = 2; + return values; + })(); + + /** + * DayOfWeekType enum. + * @name proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.DayOfWeekType + * @enum {number} + * @property {number} MONDAY=1 MONDAY value + * @property {number} TUESDAY=2 TUESDAY value + * @property {number} WEDNESDAY=3 WEDNESDAY value + * @property {number} THURSDAY=4 THURSDAY value + * @property {number} FRIDAY=5 FRIDAY value + * @property {number} SATURDAY=6 SATURDAY value + * @property {number} SUNDAY=7 SUNDAY value + */ + HSMDateTimeComponent.DayOfWeekType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "MONDAY"] = 1; + values[valuesById[2] = "TUESDAY"] = 2; + values[valuesById[3] = "WEDNESDAY"] = 3; + values[valuesById[4] = "THURSDAY"] = 4; + values[valuesById[5] = "FRIDAY"] = 5; + values[valuesById[6] = "SATURDAY"] = 6; + values[valuesById[7] = "SUNDAY"] = 7; + return values; + })(); + + return HSMDateTimeComponent; + })(); + + HSMDateTime.HSMDateTimeUnixEpoch = (function() { + + /** + * Properties of a HSMDateTimeUnixEpoch. + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime + * @interface IHSMDateTimeUnixEpoch + * @property {number|Long|null} [timestamp] HSMDateTimeUnixEpoch timestamp + */ + + /** + * Constructs a new HSMDateTimeUnixEpoch. + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime + * @classdesc Represents a HSMDateTimeUnixEpoch. + * @implements IHSMDateTimeUnixEpoch + * @constructor + * @param {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeUnixEpoch=} [properties] Properties to set + */ + function HSMDateTimeUnixEpoch(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]]; + } + + /** + * HSMDateTimeUnixEpoch timestamp. + * @member {number|Long} timestamp + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch + * @instance + */ + HSMDateTimeUnixEpoch.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new HSMDateTimeUnixEpoch instance using the specified properties. + * @function create + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch + * @static + * @param {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeUnixEpoch=} [properties] Properties to set + * @returns {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch} HSMDateTimeUnixEpoch instance + */ + HSMDateTimeUnixEpoch.create = function create(properties) { + return new HSMDateTimeUnixEpoch(properties); + }; + + /** + * Encodes the specified HSMDateTimeUnixEpoch message. Does not implicitly {@link proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch.verify|verify} messages. + * @function encode + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch + * @static + * @param {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeUnixEpoch} message HSMDateTimeUnixEpoch message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HSMDateTimeUnixEpoch.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); + return writer; + }; + + /** + * Encodes the specified HSMDateTimeUnixEpoch message, length delimited. Does not implicitly {@link proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch + * @static + * @param {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeUnixEpoch} message HSMDateTimeUnixEpoch message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HSMDateTimeUnixEpoch.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HSMDateTimeUnixEpoch message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch} HSMDateTimeUnixEpoch + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HSMDateTimeUnixEpoch.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.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.timestamp = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HSMDateTimeUnixEpoch message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch} HSMDateTimeUnixEpoch + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HSMDateTimeUnixEpoch.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HSMDateTimeUnixEpoch message. + * @function verify + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HSMDateTimeUnixEpoch.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"; + return null; + }; + + /** + * Creates a HSMDateTimeUnixEpoch message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch} HSMDateTimeUnixEpoch + */ + HSMDateTimeUnixEpoch.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch) + return object; + var message = new $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch(); + 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 HSMDateTimeUnixEpoch message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch + * @static + * @param {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch} message HSMDateTimeUnixEpoch + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HSMDateTimeUnixEpoch.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; + 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 HSMDateTimeUnixEpoch to JSON. + * @function toJSON + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch + * @instance + * @returns {Object.} JSON object + */ + HSMDateTimeUnixEpoch.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HSMDateTimeUnixEpoch; + })(); + + return HSMDateTime; + })(); + + return HSMLocalizableParameter; + })(); + + return HighlyStructuredMessage; + })(); + + Message.HistorySyncNotification = (function() { + + /** + * Properties of a HistorySyncNotification. + * @memberof proto.Message + * @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.Message.HistorySyncNotification.HistorySyncType|null} [syncType] HistorySyncNotification syncType + * @property {number|null} [chunkOrder] HistorySyncNotification chunkOrder + * @property {string|null} [originalMessageId] HistorySyncNotification originalMessageId + * @property {number|null} [progress] HistorySyncNotification progress + */ + + /** + * Constructs a new HistorySyncNotification. + * @memberof proto.Message + * @classdesc Represents a HistorySyncNotification. + * @implements IHistorySyncNotification + * @constructor + * @param {proto.Message.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.Message.HistorySyncNotification + * @instance + */ + HistorySyncNotification.prototype.fileSha256 = $util.newBuffer([]); + + /** + * HistorySyncNotification fileLength. + * @member {number|Long} fileLength + * @memberof proto.Message.HistorySyncNotification + * @instance + */ + HistorySyncNotification.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * HistorySyncNotification mediaKey. + * @member {Uint8Array} mediaKey + * @memberof proto.Message.HistorySyncNotification + * @instance + */ + HistorySyncNotification.prototype.mediaKey = $util.newBuffer([]); + + /** + * HistorySyncNotification fileEncSha256. + * @member {Uint8Array} fileEncSha256 + * @memberof proto.Message.HistorySyncNotification + * @instance + */ + HistorySyncNotification.prototype.fileEncSha256 = $util.newBuffer([]); + + /** + * HistorySyncNotification directPath. + * @member {string} directPath + * @memberof proto.Message.HistorySyncNotification + * @instance + */ + HistorySyncNotification.prototype.directPath = ""; + + /** + * HistorySyncNotification syncType. + * @member {proto.Message.HistorySyncNotification.HistorySyncType} syncType + * @memberof proto.Message.HistorySyncNotification + * @instance + */ + HistorySyncNotification.prototype.syncType = 0; + + /** + * HistorySyncNotification chunkOrder. + * @member {number} chunkOrder + * @memberof proto.Message.HistorySyncNotification + * @instance + */ + HistorySyncNotification.prototype.chunkOrder = 0; + + /** + * HistorySyncNotification originalMessageId. + * @member {string} originalMessageId + * @memberof proto.Message.HistorySyncNotification + * @instance + */ + HistorySyncNotification.prototype.originalMessageId = ""; + + /** + * HistorySyncNotification progress. + * @member {number} progress + * @memberof proto.Message.HistorySyncNotification + * @instance + */ + HistorySyncNotification.prototype.progress = 0; + + /** + * Creates a new HistorySyncNotification instance using the specified properties. + * @function create + * @memberof proto.Message.HistorySyncNotification + * @static + * @param {proto.Message.IHistorySyncNotification=} [properties] Properties to set + * @returns {proto.Message.HistorySyncNotification} HistorySyncNotification instance + */ + HistorySyncNotification.create = function create(properties) { + return new HistorySyncNotification(properties); + }; + + /** + * Encodes the specified HistorySyncNotification message. Does not implicitly {@link proto.Message.HistorySyncNotification.verify|verify} messages. + * @function encode + * @memberof proto.Message.HistorySyncNotification + * @static + * @param {proto.Message.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); + if (message.progress != null && Object.hasOwnProperty.call(message, "progress")) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.progress); + return writer; + }; + + /** + * Encodes the specified HistorySyncNotification message, length delimited. Does not implicitly {@link proto.Message.HistorySyncNotification.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.HistorySyncNotification + * @static + * @param {proto.Message.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.Message.HistorySyncNotification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.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.Message.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; + case 9: + message.progress = reader.uint32(); + 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.Message.HistorySyncNotification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.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.Message.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"; + if (message.progress != null && message.hasOwnProperty("progress")) + if (!$util.isInteger(message.progress)) + return "progress: integer expected"; + return null; + }; + + /** + * Creates a HistorySyncNotification message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.HistorySyncNotification + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.HistorySyncNotification} HistorySyncNotification + */ + HistorySyncNotification.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.HistorySyncNotification) + return object; + var message = new $root.proto.Message.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); + if (object.progress != null) + message.progress = object.progress >>> 0; + return message; + }; + + /** + * Creates a plain object from a HistorySyncNotification message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.HistorySyncNotification + * @static + * @param {proto.Message.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 = ""; + object.progress = 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.Message.HistorySyncNotification.HistorySyncType[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.progress != null && message.hasOwnProperty("progress")) + object.progress = message.progress; + return object; + }; + + /** + * Converts this HistorySyncNotification to JSON. + * @function toJSON + * @memberof proto.Message.HistorySyncNotification + * @instance + * @returns {Object.} JSON object + */ + HistorySyncNotification.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * HistorySyncType enum. + * @name proto.Message.HistorySyncNotification.HistorySyncType + * @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.HistorySyncType = (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; + })(); + + Message.ImageMessage = (function() { + + /** + * Properties of an ImageMessage. + * @memberof proto.Message + * @interface IImageMessage + * @property {string|null} [url] ImageMessage url + * @property {string|null} [mimetype] ImageMessage mimetype + * @property {string|null} [caption] ImageMessage caption + * @property {Uint8Array|null} [fileSha256] ImageMessage fileSha256 + * @property {number|Long|null} [fileLength] ImageMessage fileLength + * @property {number|null} [height] ImageMessage height + * @property {number|null} [width] ImageMessage width + * @property {Uint8Array|null} [mediaKey] ImageMessage mediaKey + * @property {Uint8Array|null} [fileEncSha256] ImageMessage fileEncSha256 + * @property {Array.|null} [interactiveAnnotations] ImageMessage interactiveAnnotations + * @property {string|null} [directPath] ImageMessage directPath + * @property {number|Long|null} [mediaKeyTimestamp] ImageMessage mediaKeyTimestamp + * @property {Uint8Array|null} [jpegThumbnail] ImageMessage jpegThumbnail + * @property {proto.IContextInfo|null} [contextInfo] ImageMessage contextInfo + * @property {Uint8Array|null} [firstScanSidecar] ImageMessage firstScanSidecar + * @property {number|null} [firstScanLength] ImageMessage firstScanLength + * @property {number|null} [experimentGroupId] ImageMessage experimentGroupId + * @property {Uint8Array|null} [scansSidecar] ImageMessage scansSidecar + * @property {Array.|null} [scanLengths] ImageMessage scanLengths + * @property {Uint8Array|null} [midQualityFileSha256] ImageMessage midQualityFileSha256 + * @property {Uint8Array|null} [midQualityFileEncSha256] ImageMessage midQualityFileEncSha256 + * @property {boolean|null} [viewOnce] ImageMessage viewOnce + * @property {string|null} [thumbnailDirectPath] ImageMessage thumbnailDirectPath + * @property {Uint8Array|null} [thumbnailSha256] ImageMessage thumbnailSha256 + * @property {Uint8Array|null} [thumbnailEncSha256] ImageMessage thumbnailEncSha256 + * @property {string|null} [staticUrl] ImageMessage staticUrl + */ + + /** + * Constructs a new ImageMessage. + * @memberof proto.Message + * @classdesc Represents an ImageMessage. + * @implements IImageMessage + * @constructor + * @param {proto.Message.IImageMessage=} [properties] Properties to set + */ + function ImageMessage(properties) { + this.interactiveAnnotations = []; + this.scanLengths = []; + 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]]; + } + + /** + * ImageMessage url. + * @member {string} url + * @memberof proto.Message.ImageMessage + * @instance + */ + ImageMessage.prototype.url = ""; + + /** + * ImageMessage mimetype. + * @member {string} mimetype + * @memberof proto.Message.ImageMessage + * @instance + */ + ImageMessage.prototype.mimetype = ""; + + /** + * ImageMessage caption. + * @member {string} caption + * @memberof proto.Message.ImageMessage + * @instance + */ + ImageMessage.prototype.caption = ""; + + /** + * ImageMessage fileSha256. + * @member {Uint8Array} fileSha256 + * @memberof proto.Message.ImageMessage + * @instance + */ + ImageMessage.prototype.fileSha256 = $util.newBuffer([]); + + /** + * ImageMessage fileLength. + * @member {number|Long} fileLength + * @memberof proto.Message.ImageMessage + * @instance + */ + ImageMessage.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * ImageMessage height. + * @member {number} height + * @memberof proto.Message.ImageMessage + * @instance + */ + ImageMessage.prototype.height = 0; + + /** + * ImageMessage width. + * @member {number} width + * @memberof proto.Message.ImageMessage + * @instance + */ + ImageMessage.prototype.width = 0; + + /** + * ImageMessage mediaKey. + * @member {Uint8Array} mediaKey + * @memberof proto.Message.ImageMessage + * @instance + */ + ImageMessage.prototype.mediaKey = $util.newBuffer([]); + + /** + * ImageMessage fileEncSha256. + * @member {Uint8Array} fileEncSha256 + * @memberof proto.Message.ImageMessage + * @instance + */ + ImageMessage.prototype.fileEncSha256 = $util.newBuffer([]); + + /** + * ImageMessage interactiveAnnotations. + * @member {Array.} interactiveAnnotations + * @memberof proto.Message.ImageMessage + * @instance + */ + ImageMessage.prototype.interactiveAnnotations = $util.emptyArray; + + /** + * ImageMessage directPath. + * @member {string} directPath + * @memberof proto.Message.ImageMessage + * @instance + */ + ImageMessage.prototype.directPath = ""; + + /** + * ImageMessage mediaKeyTimestamp. + * @member {number|Long} mediaKeyTimestamp + * @memberof proto.Message.ImageMessage + * @instance + */ + ImageMessage.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ImageMessage jpegThumbnail. + * @member {Uint8Array} jpegThumbnail + * @memberof proto.Message.ImageMessage + * @instance + */ + ImageMessage.prototype.jpegThumbnail = $util.newBuffer([]); + + /** + * ImageMessage contextInfo. + * @member {proto.IContextInfo|null|undefined} contextInfo + * @memberof proto.Message.ImageMessage + * @instance + */ + ImageMessage.prototype.contextInfo = null; + + /** + * ImageMessage firstScanSidecar. + * @member {Uint8Array} firstScanSidecar + * @memberof proto.Message.ImageMessage + * @instance + */ + ImageMessage.prototype.firstScanSidecar = $util.newBuffer([]); + + /** + * ImageMessage firstScanLength. + * @member {number} firstScanLength + * @memberof proto.Message.ImageMessage + * @instance + */ + ImageMessage.prototype.firstScanLength = 0; + + /** + * ImageMessage experimentGroupId. + * @member {number} experimentGroupId + * @memberof proto.Message.ImageMessage + * @instance + */ + ImageMessage.prototype.experimentGroupId = 0; + + /** + * ImageMessage scansSidecar. + * @member {Uint8Array} scansSidecar + * @memberof proto.Message.ImageMessage + * @instance + */ + ImageMessage.prototype.scansSidecar = $util.newBuffer([]); + + /** + * ImageMessage scanLengths. + * @member {Array.} scanLengths + * @memberof proto.Message.ImageMessage + * @instance + */ + ImageMessage.prototype.scanLengths = $util.emptyArray; + + /** + * ImageMessage midQualityFileSha256. + * @member {Uint8Array} midQualityFileSha256 + * @memberof proto.Message.ImageMessage + * @instance + */ + ImageMessage.prototype.midQualityFileSha256 = $util.newBuffer([]); + + /** + * ImageMessage midQualityFileEncSha256. + * @member {Uint8Array} midQualityFileEncSha256 + * @memberof proto.Message.ImageMessage + * @instance + */ + ImageMessage.prototype.midQualityFileEncSha256 = $util.newBuffer([]); + + /** + * ImageMessage viewOnce. + * @member {boolean} viewOnce + * @memberof proto.Message.ImageMessage + * @instance + */ + ImageMessage.prototype.viewOnce = false; + + /** + * ImageMessage thumbnailDirectPath. + * @member {string} thumbnailDirectPath + * @memberof proto.Message.ImageMessage + * @instance + */ + ImageMessage.prototype.thumbnailDirectPath = ""; + + /** + * ImageMessage thumbnailSha256. + * @member {Uint8Array} thumbnailSha256 + * @memberof proto.Message.ImageMessage + * @instance + */ + ImageMessage.prototype.thumbnailSha256 = $util.newBuffer([]); + + /** + * ImageMessage thumbnailEncSha256. + * @member {Uint8Array} thumbnailEncSha256 + * @memberof proto.Message.ImageMessage + * @instance + */ + ImageMessage.prototype.thumbnailEncSha256 = $util.newBuffer([]); + + /** + * ImageMessage staticUrl. + * @member {string} staticUrl + * @memberof proto.Message.ImageMessage + * @instance + */ + ImageMessage.prototype.staticUrl = ""; + + /** + * Creates a new ImageMessage instance using the specified properties. + * @function create + * @memberof proto.Message.ImageMessage + * @static + * @param {proto.Message.IImageMessage=} [properties] Properties to set + * @returns {proto.Message.ImageMessage} ImageMessage instance + */ + ImageMessage.create = function create(properties) { + return new ImageMessage(properties); + }; + + /** + * Encodes the specified ImageMessage message. Does not implicitly {@link proto.Message.ImageMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.ImageMessage + * @static + * @param {proto.Message.IImageMessage} message ImageMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImageMessage.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.caption != null && Object.hasOwnProperty.call(message, "caption")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.caption); + if (message.fileSha256 != null && Object.hasOwnProperty.call(message, "fileSha256")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.fileSha256); + if (message.fileLength != null && Object.hasOwnProperty.call(message, "fileLength")) + writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.fileLength); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.height); + if (message.width != null && Object.hasOwnProperty.call(message, "width")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.width); + if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey")) + writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.mediaKey); + if (message.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256")) + writer.uint32(/* id 9, wireType 2 =*/74).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 10, wireType 2 =*/82).fork()).ldelim(); + if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.directPath); + if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp")) + writer.uint32(/* id 12, wireType 0 =*/96).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.firstScanSidecar != null && Object.hasOwnProperty.call(message, "firstScanSidecar")) + writer.uint32(/* id 18, wireType 2 =*/146).bytes(message.firstScanSidecar); + if (message.firstScanLength != null && Object.hasOwnProperty.call(message, "firstScanLength")) + writer.uint32(/* id 19, wireType 0 =*/152).uint32(message.firstScanLength); + if (message.experimentGroupId != null && Object.hasOwnProperty.call(message, "experimentGroupId")) + writer.uint32(/* id 20, wireType 0 =*/160).uint32(message.experimentGroupId); + if (message.scansSidecar != null && Object.hasOwnProperty.call(message, "scansSidecar")) + writer.uint32(/* id 21, wireType 2 =*/170).bytes(message.scansSidecar); + if (message.scanLengths != null && message.scanLengths.length) + for (var i = 0; i < message.scanLengths.length; ++i) + writer.uint32(/* id 22, wireType 0 =*/176).uint32(message.scanLengths[i]); + if (message.midQualityFileSha256 != null && Object.hasOwnProperty.call(message, "midQualityFileSha256")) + writer.uint32(/* id 23, wireType 2 =*/186).bytes(message.midQualityFileSha256); + if (message.midQualityFileEncSha256 != null && Object.hasOwnProperty.call(message, "midQualityFileEncSha256")) + writer.uint32(/* id 24, wireType 2 =*/194).bytes(message.midQualityFileEncSha256); + if (message.viewOnce != null && Object.hasOwnProperty.call(message, "viewOnce")) + writer.uint32(/* id 25, wireType 0 =*/200).bool(message.viewOnce); + if (message.thumbnailDirectPath != null && Object.hasOwnProperty.call(message, "thumbnailDirectPath")) + writer.uint32(/* id 26, wireType 2 =*/210).string(message.thumbnailDirectPath); + if (message.thumbnailSha256 != null && Object.hasOwnProperty.call(message, "thumbnailSha256")) + writer.uint32(/* id 27, wireType 2 =*/218).bytes(message.thumbnailSha256); + if (message.thumbnailEncSha256 != null && Object.hasOwnProperty.call(message, "thumbnailEncSha256")) + writer.uint32(/* id 28, wireType 2 =*/226).bytes(message.thumbnailEncSha256); + if (message.staticUrl != null && Object.hasOwnProperty.call(message, "staticUrl")) + writer.uint32(/* id 29, wireType 2 =*/234).string(message.staticUrl); + return writer; + }; + + /** + * Encodes the specified ImageMessage message, length delimited. Does not implicitly {@link proto.Message.ImageMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.ImageMessage + * @static + * @param {proto.Message.IImageMessage} message ImageMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImageMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImageMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.ImageMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.ImageMessage} ImageMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageMessage.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.Message.ImageMessage(); + 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.caption = reader.string(); + break; + case 4: + message.fileSha256 = reader.bytes(); + break; + case 5: + message.fileLength = reader.uint64(); + break; + case 6: + message.height = reader.uint32(); + break; + case 7: + message.width = reader.uint32(); + break; + case 8: + message.mediaKey = reader.bytes(); + break; + case 9: + message.fileEncSha256 = reader.bytes(); + break; + case 10: + if (!(message.interactiveAnnotations && message.interactiveAnnotations.length)) + message.interactiveAnnotations = []; + message.interactiveAnnotations.push($root.proto.InteractiveAnnotation.decode(reader, reader.uint32())); + break; + case 11: + message.directPath = reader.string(); + break; + case 12: + 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.firstScanSidecar = reader.bytes(); + break; + case 19: + message.firstScanLength = reader.uint32(); + break; + case 20: + message.experimentGroupId = reader.uint32(); + break; + case 21: + message.scansSidecar = reader.bytes(); + break; + case 22: + if (!(message.scanLengths && message.scanLengths.length)) + message.scanLengths = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.scanLengths.push(reader.uint32()); + } else + message.scanLengths.push(reader.uint32()); + break; + case 23: + message.midQualityFileSha256 = reader.bytes(); + break; + case 24: + message.midQualityFileEncSha256 = reader.bytes(); + break; + case 25: + message.viewOnce = reader.bool(); + break; + case 26: + message.thumbnailDirectPath = reader.string(); + break; + case 27: + message.thumbnailSha256 = reader.bytes(); + break; + case 28: + message.thumbnailEncSha256 = reader.bytes(); + break; + case 29: + message.staticUrl = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImageMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.ImageMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.ImageMessage} ImageMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImageMessage message. + * @function verify + * @memberof proto.Message.ImageMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImageMessage.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.caption != null && message.hasOwnProperty("caption")) + if (!$util.isString(message.caption)) + return "caption: 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.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.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.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.firstScanSidecar != null && message.hasOwnProperty("firstScanSidecar")) + if (!(message.firstScanSidecar && typeof message.firstScanSidecar.length === "number" || $util.isString(message.firstScanSidecar))) + return "firstScanSidecar: buffer expected"; + if (message.firstScanLength != null && message.hasOwnProperty("firstScanLength")) + if (!$util.isInteger(message.firstScanLength)) + return "firstScanLength: integer expected"; + if (message.experimentGroupId != null && message.hasOwnProperty("experimentGroupId")) + if (!$util.isInteger(message.experimentGroupId)) + return "experimentGroupId: integer expected"; + if (message.scansSidecar != null && message.hasOwnProperty("scansSidecar")) + if (!(message.scansSidecar && typeof message.scansSidecar.length === "number" || $util.isString(message.scansSidecar))) + return "scansSidecar: buffer expected"; + if (message.scanLengths != null && message.hasOwnProperty("scanLengths")) { + if (!Array.isArray(message.scanLengths)) + return "scanLengths: array expected"; + for (var i = 0; i < message.scanLengths.length; ++i) + if (!$util.isInteger(message.scanLengths[i])) + return "scanLengths: integer[] expected"; + } + if (message.midQualityFileSha256 != null && message.hasOwnProperty("midQualityFileSha256")) + if (!(message.midQualityFileSha256 && typeof message.midQualityFileSha256.length === "number" || $util.isString(message.midQualityFileSha256))) + return "midQualityFileSha256: buffer expected"; + if (message.midQualityFileEncSha256 != null && message.hasOwnProperty("midQualityFileEncSha256")) + if (!(message.midQualityFileEncSha256 && typeof message.midQualityFileEncSha256.length === "number" || $util.isString(message.midQualityFileEncSha256))) + return "midQualityFileEncSha256: buffer expected"; + 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 an ImageMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.ImageMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.ImageMessage} ImageMessage + */ + ImageMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.ImageMessage) + return object; + var message = new $root.proto.Message.ImageMessage(); + if (object.url != null) + message.url = String(object.url); + if (object.mimetype != null) + message.mimetype = String(object.mimetype); + if (object.caption != null) + message.caption = String(object.caption); + 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.height != null) + message.height = object.height >>> 0; + if (object.width != null) + message.width = object.width >>> 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.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.Message.ImageMessage.interactiveAnnotations: array expected"); + message.interactiveAnnotations = []; + for (var i = 0; i < object.interactiveAnnotations.length; ++i) { + if (typeof object.interactiveAnnotations[i] !== "object") + throw TypeError(".proto.Message.ImageMessage.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.Message.ImageMessage.contextInfo: object expected"); + message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); + } + if (object.firstScanSidecar != null) + if (typeof object.firstScanSidecar === "string") + $util.base64.decode(object.firstScanSidecar, message.firstScanSidecar = $util.newBuffer($util.base64.length(object.firstScanSidecar)), 0); + else if (object.firstScanSidecar.length) + message.firstScanSidecar = object.firstScanSidecar; + if (object.firstScanLength != null) + message.firstScanLength = object.firstScanLength >>> 0; + if (object.experimentGroupId != null) + message.experimentGroupId = object.experimentGroupId >>> 0; + if (object.scansSidecar != null) + if (typeof object.scansSidecar === "string") + $util.base64.decode(object.scansSidecar, message.scansSidecar = $util.newBuffer($util.base64.length(object.scansSidecar)), 0); + else if (object.scansSidecar.length) + message.scansSidecar = object.scansSidecar; + if (object.scanLengths) { + if (!Array.isArray(object.scanLengths)) + throw TypeError(".proto.Message.ImageMessage.scanLengths: array expected"); + message.scanLengths = []; + for (var i = 0; i < object.scanLengths.length; ++i) + message.scanLengths[i] = object.scanLengths[i] >>> 0; + } + if (object.midQualityFileSha256 != null) + if (typeof object.midQualityFileSha256 === "string") + $util.base64.decode(object.midQualityFileSha256, message.midQualityFileSha256 = $util.newBuffer($util.base64.length(object.midQualityFileSha256)), 0); + else if (object.midQualityFileSha256.length) + message.midQualityFileSha256 = object.midQualityFileSha256; + if (object.midQualityFileEncSha256 != null) + if (typeof object.midQualityFileEncSha256 === "string") + $util.base64.decode(object.midQualityFileEncSha256, message.midQualityFileEncSha256 = $util.newBuffer($util.base64.length(object.midQualityFileEncSha256)), 0); + else if (object.midQualityFileEncSha256.length) + message.midQualityFileEncSha256 = object.midQualityFileEncSha256; + 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 an ImageMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.ImageMessage + * @static + * @param {proto.Message.ImageMessage} message ImageMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImageMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.interactiveAnnotations = []; + object.scanLengths = []; + } + if (options.defaults) { + object.url = ""; + object.mimetype = ""; + object.caption = ""; + 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.height = 0; + object.width = 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 = ""; + 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.firstScanSidecar = ""; + else { + object.firstScanSidecar = []; + if (options.bytes !== Array) + object.firstScanSidecar = $util.newBuffer(object.firstScanSidecar); + } + object.firstScanLength = 0; + object.experimentGroupId = 0; + if (options.bytes === String) + object.scansSidecar = ""; + else { + object.scansSidecar = []; + if (options.bytes !== Array) + object.scansSidecar = $util.newBuffer(object.scansSidecar); + } + if (options.bytes === String) + object.midQualityFileSha256 = ""; + else { + object.midQualityFileSha256 = []; + if (options.bytes !== Array) + object.midQualityFileSha256 = $util.newBuffer(object.midQualityFileSha256); + } + if (options.bytes === String) + object.midQualityFileEncSha256 = ""; + else { + object.midQualityFileEncSha256 = []; + if (options.bytes !== Array) + object.midQualityFileEncSha256 = $util.newBuffer(object.midQualityFileEncSha256); + } + 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.caption != null && message.hasOwnProperty("caption")) + object.caption = message.caption; + 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.height != null && message.hasOwnProperty("height")) + object.height = message.height; + if (message.width != null && message.hasOwnProperty("width")) + object.width = message.width; + 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.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.firstScanSidecar != null && message.hasOwnProperty("firstScanSidecar")) + object.firstScanSidecar = options.bytes === String ? $util.base64.encode(message.firstScanSidecar, 0, message.firstScanSidecar.length) : options.bytes === Array ? Array.prototype.slice.call(message.firstScanSidecar) : message.firstScanSidecar; + if (message.firstScanLength != null && message.hasOwnProperty("firstScanLength")) + object.firstScanLength = message.firstScanLength; + if (message.experimentGroupId != null && message.hasOwnProperty("experimentGroupId")) + object.experimentGroupId = message.experimentGroupId; + if (message.scansSidecar != null && message.hasOwnProperty("scansSidecar")) + object.scansSidecar = options.bytes === String ? $util.base64.encode(message.scansSidecar, 0, message.scansSidecar.length) : options.bytes === Array ? Array.prototype.slice.call(message.scansSidecar) : message.scansSidecar; + if (message.scanLengths && message.scanLengths.length) { + object.scanLengths = []; + for (var j = 0; j < message.scanLengths.length; ++j) + object.scanLengths[j] = message.scanLengths[j]; + } + if (message.midQualityFileSha256 != null && message.hasOwnProperty("midQualityFileSha256")) + object.midQualityFileSha256 = options.bytes === String ? $util.base64.encode(message.midQualityFileSha256, 0, message.midQualityFileSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.midQualityFileSha256) : message.midQualityFileSha256; + if (message.midQualityFileEncSha256 != null && message.hasOwnProperty("midQualityFileEncSha256")) + object.midQualityFileEncSha256 = options.bytes === String ? $util.base64.encode(message.midQualityFileEncSha256, 0, message.midQualityFileEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.midQualityFileEncSha256) : message.midQualityFileEncSha256; + 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 ImageMessage to JSON. + * @function toJSON + * @memberof proto.Message.ImageMessage + * @instance + * @returns {Object.} JSON object + */ + ImageMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ImageMessage; + })(); + + Message.InitialSecurityNotificationSettingSync = (function() { + + /** + * Properties of an InitialSecurityNotificationSettingSync. + * @memberof proto.Message + * @interface IInitialSecurityNotificationSettingSync + * @property {boolean|null} [securityNotificationEnabled] InitialSecurityNotificationSettingSync securityNotificationEnabled + */ + + /** + * Constructs a new InitialSecurityNotificationSettingSync. + * @memberof proto.Message + * @classdesc Represents an InitialSecurityNotificationSettingSync. + * @implements IInitialSecurityNotificationSettingSync + * @constructor + * @param {proto.Message.IInitialSecurityNotificationSettingSync=} [properties] Properties to set + */ + function InitialSecurityNotificationSettingSync(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]]; + } + + /** + * InitialSecurityNotificationSettingSync securityNotificationEnabled. + * @member {boolean} securityNotificationEnabled + * @memberof proto.Message.InitialSecurityNotificationSettingSync + * @instance + */ + InitialSecurityNotificationSettingSync.prototype.securityNotificationEnabled = false; + + /** + * Creates a new InitialSecurityNotificationSettingSync instance using the specified properties. + * @function create + * @memberof proto.Message.InitialSecurityNotificationSettingSync + * @static + * @param {proto.Message.IInitialSecurityNotificationSettingSync=} [properties] Properties to set + * @returns {proto.Message.InitialSecurityNotificationSettingSync} InitialSecurityNotificationSettingSync instance + */ + InitialSecurityNotificationSettingSync.create = function create(properties) { + return new InitialSecurityNotificationSettingSync(properties); + }; + + /** + * Encodes the specified InitialSecurityNotificationSettingSync message. Does not implicitly {@link proto.Message.InitialSecurityNotificationSettingSync.verify|verify} messages. + * @function encode + * @memberof proto.Message.InitialSecurityNotificationSettingSync + * @static + * @param {proto.Message.IInitialSecurityNotificationSettingSync} message InitialSecurityNotificationSettingSync message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InitialSecurityNotificationSettingSync.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.securityNotificationEnabled != null && Object.hasOwnProperty.call(message, "securityNotificationEnabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.securityNotificationEnabled); + return writer; + }; + + /** + * Encodes the specified InitialSecurityNotificationSettingSync message, length delimited. Does not implicitly {@link proto.Message.InitialSecurityNotificationSettingSync.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.InitialSecurityNotificationSettingSync + * @static + * @param {proto.Message.IInitialSecurityNotificationSettingSync} message InitialSecurityNotificationSettingSync message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InitialSecurityNotificationSettingSync.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InitialSecurityNotificationSettingSync message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.InitialSecurityNotificationSettingSync + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.InitialSecurityNotificationSettingSync} InitialSecurityNotificationSettingSync + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InitialSecurityNotificationSettingSync.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.Message.InitialSecurityNotificationSettingSync(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.securityNotificationEnabled = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InitialSecurityNotificationSettingSync message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.InitialSecurityNotificationSettingSync + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.InitialSecurityNotificationSettingSync} InitialSecurityNotificationSettingSync + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InitialSecurityNotificationSettingSync.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InitialSecurityNotificationSettingSync message. + * @function verify + * @memberof proto.Message.InitialSecurityNotificationSettingSync + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InitialSecurityNotificationSettingSync.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.securityNotificationEnabled != null && message.hasOwnProperty("securityNotificationEnabled")) + if (typeof message.securityNotificationEnabled !== "boolean") + return "securityNotificationEnabled: boolean expected"; + return null; + }; + + /** + * Creates an InitialSecurityNotificationSettingSync message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.InitialSecurityNotificationSettingSync + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.InitialSecurityNotificationSettingSync} InitialSecurityNotificationSettingSync + */ + InitialSecurityNotificationSettingSync.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.InitialSecurityNotificationSettingSync) + return object; + var message = new $root.proto.Message.InitialSecurityNotificationSettingSync(); + if (object.securityNotificationEnabled != null) + message.securityNotificationEnabled = Boolean(object.securityNotificationEnabled); + return message; + }; + + /** + * Creates a plain object from an InitialSecurityNotificationSettingSync message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.InitialSecurityNotificationSettingSync + * @static + * @param {proto.Message.InitialSecurityNotificationSettingSync} message InitialSecurityNotificationSettingSync + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InitialSecurityNotificationSettingSync.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.securityNotificationEnabled = false; + if (message.securityNotificationEnabled != null && message.hasOwnProperty("securityNotificationEnabled")) + object.securityNotificationEnabled = message.securityNotificationEnabled; + return object; + }; + + /** + * Converts this InitialSecurityNotificationSettingSync to JSON. + * @function toJSON + * @memberof proto.Message.InitialSecurityNotificationSettingSync + * @instance + * @returns {Object.} JSON object + */ + InitialSecurityNotificationSettingSync.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return InitialSecurityNotificationSettingSync; + })(); + + Message.InteractiveMessage = (function() { + + /** + * Properties of an InteractiveMessage. + * @memberof proto.Message + * @interface IInteractiveMessage + * @property {proto.Message.InteractiveMessage.IHeader|null} [header] InteractiveMessage header + * @property {proto.Message.InteractiveMessage.IBody|null} [body] InteractiveMessage body + * @property {proto.Message.InteractiveMessage.IFooter|null} [footer] InteractiveMessage footer + * @property {proto.IContextInfo|null} [contextInfo] InteractiveMessage contextInfo + * @property {proto.Message.InteractiveMessage.IShopMessage|null} [shopStorefrontMessage] InteractiveMessage shopStorefrontMessage + * @property {proto.Message.InteractiveMessage.ICollectionMessage|null} [collectionMessage] InteractiveMessage collectionMessage + * @property {proto.Message.InteractiveMessage.INativeFlowMessage|null} [nativeFlowMessage] InteractiveMessage nativeFlowMessage + */ + + /** + * Constructs a new InteractiveMessage. + * @memberof proto.Message + * @classdesc Represents an InteractiveMessage. + * @implements IInteractiveMessage + * @constructor + * @param {proto.Message.IInteractiveMessage=} [properties] Properties to set + */ + function InteractiveMessage(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]]; + } + + /** + * InteractiveMessage header. + * @member {proto.Message.InteractiveMessage.IHeader|null|undefined} header + * @memberof proto.Message.InteractiveMessage + * @instance + */ + InteractiveMessage.prototype.header = null; + + /** + * InteractiveMessage body. + * @member {proto.Message.InteractiveMessage.IBody|null|undefined} body + * @memberof proto.Message.InteractiveMessage + * @instance + */ + InteractiveMessage.prototype.body = null; + + /** + * InteractiveMessage footer. + * @member {proto.Message.InteractiveMessage.IFooter|null|undefined} footer + * @memberof proto.Message.InteractiveMessage + * @instance + */ + InteractiveMessage.prototype.footer = null; + + /** + * InteractiveMessage contextInfo. + * @member {proto.IContextInfo|null|undefined} contextInfo + * @memberof proto.Message.InteractiveMessage + * @instance + */ + InteractiveMessage.prototype.contextInfo = null; + + /** + * InteractiveMessage shopStorefrontMessage. + * @member {proto.Message.InteractiveMessage.IShopMessage|null|undefined} shopStorefrontMessage + * @memberof proto.Message.InteractiveMessage + * @instance + */ + InteractiveMessage.prototype.shopStorefrontMessage = null; + + /** + * InteractiveMessage collectionMessage. + * @member {proto.Message.InteractiveMessage.ICollectionMessage|null|undefined} collectionMessage + * @memberof proto.Message.InteractiveMessage + * @instance + */ + InteractiveMessage.prototype.collectionMessage = null; + + /** + * InteractiveMessage nativeFlowMessage. + * @member {proto.Message.InteractiveMessage.INativeFlowMessage|null|undefined} nativeFlowMessage + * @memberof proto.Message.InteractiveMessage + * @instance + */ + InteractiveMessage.prototype.nativeFlowMessage = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * InteractiveMessage interactiveMessage. + * @member {"shopStorefrontMessage"|"collectionMessage"|"nativeFlowMessage"|undefined} interactiveMessage + * @memberof proto.Message.InteractiveMessage + * @instance + */ + Object.defineProperty(InteractiveMessage.prototype, "interactiveMessage", { + get: $util.oneOfGetter($oneOfFields = ["shopStorefrontMessage", "collectionMessage", "nativeFlowMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new InteractiveMessage instance using the specified properties. + * @function create + * @memberof proto.Message.InteractiveMessage + * @static + * @param {proto.Message.IInteractiveMessage=} [properties] Properties to set + * @returns {proto.Message.InteractiveMessage} InteractiveMessage instance + */ + InteractiveMessage.create = function create(properties) { + return new InteractiveMessage(properties); + }; + + /** + * Encodes the specified InteractiveMessage message. Does not implicitly {@link proto.Message.InteractiveMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.InteractiveMessage + * @static + * @param {proto.Message.IInteractiveMessage} message InteractiveMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InteractiveMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.header != null && Object.hasOwnProperty.call(message, "header")) + $root.proto.Message.InteractiveMessage.Header.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + $root.proto.Message.InteractiveMessage.Body.encode(message.body, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.footer != null && Object.hasOwnProperty.call(message, "footer")) + $root.proto.Message.InteractiveMessage.Footer.encode(message.footer, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.shopStorefrontMessage != null && Object.hasOwnProperty.call(message, "shopStorefrontMessage")) + $root.proto.Message.InteractiveMessage.ShopMessage.encode(message.shopStorefrontMessage, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.collectionMessage != null && Object.hasOwnProperty.call(message, "collectionMessage")) + $root.proto.Message.InteractiveMessage.CollectionMessage.encode(message.collectionMessage, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.nativeFlowMessage != null && Object.hasOwnProperty.call(message, "nativeFlowMessage")) + $root.proto.Message.InteractiveMessage.NativeFlowMessage.encode(message.nativeFlowMessage, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) + $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified InteractiveMessage message, length delimited. Does not implicitly {@link proto.Message.InteractiveMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.InteractiveMessage + * @static + * @param {proto.Message.IInteractiveMessage} message InteractiveMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InteractiveMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InteractiveMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.InteractiveMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.InteractiveMessage} InteractiveMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InteractiveMessage.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.Message.InteractiveMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.header = $root.proto.Message.InteractiveMessage.Header.decode(reader, reader.uint32()); + break; + case 2: + message.body = $root.proto.Message.InteractiveMessage.Body.decode(reader, reader.uint32()); + break; + case 3: + message.footer = $root.proto.Message.InteractiveMessage.Footer.decode(reader, reader.uint32()); + break; + case 15: + message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); + break; + case 4: + message.shopStorefrontMessage = $root.proto.Message.InteractiveMessage.ShopMessage.decode(reader, reader.uint32()); + break; + case 5: + message.collectionMessage = $root.proto.Message.InteractiveMessage.CollectionMessage.decode(reader, reader.uint32()); + break; + case 6: + message.nativeFlowMessage = $root.proto.Message.InteractiveMessage.NativeFlowMessage.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InteractiveMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.InteractiveMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.InteractiveMessage} InteractiveMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InteractiveMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InteractiveMessage message. + * @function verify + * @memberof proto.Message.InteractiveMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InteractiveMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.header != null && message.hasOwnProperty("header")) { + var error = $root.proto.Message.InteractiveMessage.Header.verify(message.header); + if (error) + return "header." + error; + } + if (message.body != null && message.hasOwnProperty("body")) { + var error = $root.proto.Message.InteractiveMessage.Body.verify(message.body); + if (error) + return "body." + error; + } + if (message.footer != null && message.hasOwnProperty("footer")) { + var error = $root.proto.Message.InteractiveMessage.Footer.verify(message.footer); + if (error) + return "footer." + error; + } + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } + if (message.shopStorefrontMessage != null && message.hasOwnProperty("shopStorefrontMessage")) { + properties.interactiveMessage = 1; + { + var error = $root.proto.Message.InteractiveMessage.ShopMessage.verify(message.shopStorefrontMessage); + if (error) + return "shopStorefrontMessage." + error; + } + } + if (message.collectionMessage != null && message.hasOwnProperty("collectionMessage")) { + if (properties.interactiveMessage === 1) + return "interactiveMessage: multiple values"; + properties.interactiveMessage = 1; + { + var error = $root.proto.Message.InteractiveMessage.CollectionMessage.verify(message.collectionMessage); + if (error) + return "collectionMessage." + error; + } + } + if (message.nativeFlowMessage != null && message.hasOwnProperty("nativeFlowMessage")) { + if (properties.interactiveMessage === 1) + return "interactiveMessage: multiple values"; + properties.interactiveMessage = 1; + { + var error = $root.proto.Message.InteractiveMessage.NativeFlowMessage.verify(message.nativeFlowMessage); + if (error) + return "nativeFlowMessage." + error; + } + } + return null; + }; + + /** + * Creates an InteractiveMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.InteractiveMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.InteractiveMessage} InteractiveMessage + */ + InteractiveMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.InteractiveMessage) + return object; + var message = new $root.proto.Message.InteractiveMessage(); + if (object.header != null) { + if (typeof object.header !== "object") + throw TypeError(".proto.Message.InteractiveMessage.header: object expected"); + message.header = $root.proto.Message.InteractiveMessage.Header.fromObject(object.header); + } + if (object.body != null) { + if (typeof object.body !== "object") + throw TypeError(".proto.Message.InteractiveMessage.body: object expected"); + message.body = $root.proto.Message.InteractiveMessage.Body.fromObject(object.body); + } + if (object.footer != null) { + if (typeof object.footer !== "object") + throw TypeError(".proto.Message.InteractiveMessage.footer: object expected"); + message.footer = $root.proto.Message.InteractiveMessage.Footer.fromObject(object.footer); + } + if (object.contextInfo != null) { + if (typeof object.contextInfo !== "object") + throw TypeError(".proto.Message.InteractiveMessage.contextInfo: object expected"); + message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); + } + if (object.shopStorefrontMessage != null) { + if (typeof object.shopStorefrontMessage !== "object") + throw TypeError(".proto.Message.InteractiveMessage.shopStorefrontMessage: object expected"); + message.shopStorefrontMessage = $root.proto.Message.InteractiveMessage.ShopMessage.fromObject(object.shopStorefrontMessage); + } + if (object.collectionMessage != null) { + if (typeof object.collectionMessage !== "object") + throw TypeError(".proto.Message.InteractiveMessage.collectionMessage: object expected"); + message.collectionMessage = $root.proto.Message.InteractiveMessage.CollectionMessage.fromObject(object.collectionMessage); + } + if (object.nativeFlowMessage != null) { + if (typeof object.nativeFlowMessage !== "object") + throw TypeError(".proto.Message.InteractiveMessage.nativeFlowMessage: object expected"); + message.nativeFlowMessage = $root.proto.Message.InteractiveMessage.NativeFlowMessage.fromObject(object.nativeFlowMessage); + } + return message; + }; + + /** + * Creates a plain object from an InteractiveMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.InteractiveMessage + * @static + * @param {proto.Message.InteractiveMessage} message InteractiveMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InteractiveMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.header = null; + object.body = null; + object.footer = null; + object.contextInfo = null; + } + if (message.header != null && message.hasOwnProperty("header")) + object.header = $root.proto.Message.InteractiveMessage.Header.toObject(message.header, options); + if (message.body != null && message.hasOwnProperty("body")) + object.body = $root.proto.Message.InteractiveMessage.Body.toObject(message.body, options); + if (message.footer != null && message.hasOwnProperty("footer")) + object.footer = $root.proto.Message.InteractiveMessage.Footer.toObject(message.footer, options); + if (message.shopStorefrontMessage != null && message.hasOwnProperty("shopStorefrontMessage")) { + object.shopStorefrontMessage = $root.proto.Message.InteractiveMessage.ShopMessage.toObject(message.shopStorefrontMessage, options); + if (options.oneofs) + object.interactiveMessage = "shopStorefrontMessage"; + } + if (message.collectionMessage != null && message.hasOwnProperty("collectionMessage")) { + object.collectionMessage = $root.proto.Message.InteractiveMessage.CollectionMessage.toObject(message.collectionMessage, options); + if (options.oneofs) + object.interactiveMessage = "collectionMessage"; + } + if (message.nativeFlowMessage != null && message.hasOwnProperty("nativeFlowMessage")) { + object.nativeFlowMessage = $root.proto.Message.InteractiveMessage.NativeFlowMessage.toObject(message.nativeFlowMessage, options); + if (options.oneofs) + object.interactiveMessage = "nativeFlowMessage"; + } + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) + object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + return object; + }; + + /** + * Converts this InteractiveMessage to JSON. + * @function toJSON + * @memberof proto.Message.InteractiveMessage + * @instance + * @returns {Object.} JSON object + */ + InteractiveMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + InteractiveMessage.Body = (function() { + + /** + * Properties of a Body. + * @memberof proto.Message.InteractiveMessage + * @interface IBody + * @property {string|null} [text] Body text + */ + + /** + * Constructs a new Body. + * @memberof proto.Message.InteractiveMessage + * @classdesc Represents a Body. + * @implements IBody + * @constructor + * @param {proto.Message.InteractiveMessage.IBody=} [properties] Properties to set + */ + function Body(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]]; + } + + /** + * Body text. + * @member {string} text + * @memberof proto.Message.InteractiveMessage.Body + * @instance + */ + Body.prototype.text = ""; + + /** + * Creates a new Body instance using the specified properties. + * @function create + * @memberof proto.Message.InteractiveMessage.Body + * @static + * @param {proto.Message.InteractiveMessage.IBody=} [properties] Properties to set + * @returns {proto.Message.InteractiveMessage.Body} Body instance + */ + Body.create = function create(properties) { + return new Body(properties); + }; + + /** + * Encodes the specified Body message. Does not implicitly {@link proto.Message.InteractiveMessage.Body.verify|verify} messages. + * @function encode + * @memberof proto.Message.InteractiveMessage.Body + * @static + * @param {proto.Message.InteractiveMessage.IBody} message Body message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Body.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + return writer; + }; + + /** + * Encodes the specified Body message, length delimited. Does not implicitly {@link proto.Message.InteractiveMessage.Body.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.InteractiveMessage.Body + * @static + * @param {proto.Message.InteractiveMessage.IBody} message Body message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Body.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Body message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.InteractiveMessage.Body + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.InteractiveMessage.Body} Body + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Body.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.Message.InteractiveMessage.Body(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.text = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Body message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.InteractiveMessage.Body + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.InteractiveMessage.Body} Body + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Body.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Body message. + * @function verify + * @memberof proto.Message.InteractiveMessage.Body + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Body.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + return null; + }; + + /** + * Creates a Body message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.InteractiveMessage.Body + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.InteractiveMessage.Body} Body + */ + Body.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.InteractiveMessage.Body) + return object; + var message = new $root.proto.Message.InteractiveMessage.Body(); + if (object.text != null) + message.text = String(object.text); + return message; + }; + + /** + * Creates a plain object from a Body message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.InteractiveMessage.Body + * @static + * @param {proto.Message.InteractiveMessage.Body} message Body + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Body.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.text = ""; + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + return object; + }; + + /** + * Converts this Body to JSON. + * @function toJSON + * @memberof proto.Message.InteractiveMessage.Body + * @instance + * @returns {Object.} JSON object + */ + Body.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Body; + })(); + + InteractiveMessage.CollectionMessage = (function() { + + /** + * Properties of a CollectionMessage. + * @memberof proto.Message.InteractiveMessage + * @interface ICollectionMessage + * @property {string|null} [bizJid] CollectionMessage bizJid + * @property {string|null} [id] CollectionMessage id + * @property {number|null} [messageVersion] CollectionMessage messageVersion + */ + + /** + * Constructs a new CollectionMessage. + * @memberof proto.Message.InteractiveMessage + * @classdesc Represents a CollectionMessage. + * @implements ICollectionMessage + * @constructor + * @param {proto.Message.InteractiveMessage.ICollectionMessage=} [properties] Properties to set + */ + function CollectionMessage(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]]; + } + + /** + * CollectionMessage bizJid. + * @member {string} bizJid + * @memberof proto.Message.InteractiveMessage.CollectionMessage + * @instance + */ + CollectionMessage.prototype.bizJid = ""; + + /** + * CollectionMessage id. + * @member {string} id + * @memberof proto.Message.InteractiveMessage.CollectionMessage + * @instance + */ + CollectionMessage.prototype.id = ""; + + /** + * CollectionMessage messageVersion. + * @member {number} messageVersion + * @memberof proto.Message.InteractiveMessage.CollectionMessage + * @instance + */ + CollectionMessage.prototype.messageVersion = 0; + + /** + * Creates a new CollectionMessage instance using the specified properties. + * @function create + * @memberof proto.Message.InteractiveMessage.CollectionMessage + * @static + * @param {proto.Message.InteractiveMessage.ICollectionMessage=} [properties] Properties to set + * @returns {proto.Message.InteractiveMessage.CollectionMessage} CollectionMessage instance + */ + CollectionMessage.create = function create(properties) { + return new CollectionMessage(properties); + }; + + /** + * Encodes the specified CollectionMessage message. Does not implicitly {@link proto.Message.InteractiveMessage.CollectionMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.InteractiveMessage.CollectionMessage + * @static + * @param {proto.Message.InteractiveMessage.ICollectionMessage} message CollectionMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CollectionMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bizJid != null && Object.hasOwnProperty.call(message, "bizJid")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.bizJid); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); + if (message.messageVersion != null && Object.hasOwnProperty.call(message, "messageVersion")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.messageVersion); + return writer; + }; + + /** + * Encodes the specified CollectionMessage message, length delimited. Does not implicitly {@link proto.Message.InteractiveMessage.CollectionMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.InteractiveMessage.CollectionMessage + * @static + * @param {proto.Message.InteractiveMessage.ICollectionMessage} message CollectionMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CollectionMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CollectionMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.InteractiveMessage.CollectionMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.InteractiveMessage.CollectionMessage} CollectionMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CollectionMessage.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.Message.InteractiveMessage.CollectionMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.bizJid = reader.string(); + break; + case 2: + message.id = reader.string(); + break; + case 3: + message.messageVersion = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CollectionMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.InteractiveMessage.CollectionMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.InteractiveMessage.CollectionMessage} CollectionMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CollectionMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CollectionMessage message. + * @function verify + * @memberof proto.Message.InteractiveMessage.CollectionMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CollectionMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bizJid != null && message.hasOwnProperty("bizJid")) + if (!$util.isString(message.bizJid)) + return "bizJid: string expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) + if (!$util.isInteger(message.messageVersion)) + return "messageVersion: integer expected"; + return null; + }; + + /** + * Creates a CollectionMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.InteractiveMessage.CollectionMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.InteractiveMessage.CollectionMessage} CollectionMessage + */ + CollectionMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.InteractiveMessage.CollectionMessage) + return object; + var message = new $root.proto.Message.InteractiveMessage.CollectionMessage(); + if (object.bizJid != null) + message.bizJid = String(object.bizJid); + if (object.id != null) + message.id = String(object.id); + if (object.messageVersion != null) + message.messageVersion = object.messageVersion | 0; + return message; + }; + + /** + * Creates a plain object from a CollectionMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.InteractiveMessage.CollectionMessage + * @static + * @param {proto.Message.InteractiveMessage.CollectionMessage} message CollectionMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CollectionMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.bizJid = ""; + object.id = ""; + object.messageVersion = 0; + } + if (message.bizJid != null && message.hasOwnProperty("bizJid")) + object.bizJid = message.bizJid; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) + object.messageVersion = message.messageVersion; + return object; + }; + + /** + * Converts this CollectionMessage to JSON. + * @function toJSON + * @memberof proto.Message.InteractiveMessage.CollectionMessage + * @instance + * @returns {Object.} JSON object + */ + CollectionMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CollectionMessage; + })(); + + InteractiveMessage.Footer = (function() { + + /** + * Properties of a Footer. + * @memberof proto.Message.InteractiveMessage + * @interface IFooter + * @property {string|null} [text] Footer text + */ + + /** + * Constructs a new Footer. + * @memberof proto.Message.InteractiveMessage + * @classdesc Represents a Footer. + * @implements IFooter + * @constructor + * @param {proto.Message.InteractiveMessage.IFooter=} [properties] Properties to set + */ + function Footer(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]]; + } + + /** + * Footer text. + * @member {string} text + * @memberof proto.Message.InteractiveMessage.Footer + * @instance + */ + Footer.prototype.text = ""; + + /** + * Creates a new Footer instance using the specified properties. + * @function create + * @memberof proto.Message.InteractiveMessage.Footer + * @static + * @param {proto.Message.InteractiveMessage.IFooter=} [properties] Properties to set + * @returns {proto.Message.InteractiveMessage.Footer} Footer instance + */ + Footer.create = function create(properties) { + return new Footer(properties); + }; + + /** + * Encodes the specified Footer message. Does not implicitly {@link proto.Message.InteractiveMessage.Footer.verify|verify} messages. + * @function encode + * @memberof proto.Message.InteractiveMessage.Footer + * @static + * @param {proto.Message.InteractiveMessage.IFooter} message Footer message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Footer.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + return writer; + }; + + /** + * Encodes the specified Footer message, length delimited. Does not implicitly {@link proto.Message.InteractiveMessage.Footer.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.InteractiveMessage.Footer + * @static + * @param {proto.Message.InteractiveMessage.IFooter} message Footer message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Footer.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Footer message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.InteractiveMessage.Footer + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.InteractiveMessage.Footer} Footer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Footer.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.Message.InteractiveMessage.Footer(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.text = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Footer message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.InteractiveMessage.Footer + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.InteractiveMessage.Footer} Footer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Footer.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Footer message. + * @function verify + * @memberof proto.Message.InteractiveMessage.Footer + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Footer.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + return null; + }; + + /** + * Creates a Footer message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.InteractiveMessage.Footer + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.InteractiveMessage.Footer} Footer + */ + Footer.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.InteractiveMessage.Footer) + return object; + var message = new $root.proto.Message.InteractiveMessage.Footer(); + if (object.text != null) + message.text = String(object.text); + return message; + }; + + /** + * Creates a plain object from a Footer message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.InteractiveMessage.Footer + * @static + * @param {proto.Message.InteractiveMessage.Footer} message Footer + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Footer.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.text = ""; + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + return object; + }; + + /** + * Converts this Footer to JSON. + * @function toJSON + * @memberof proto.Message.InteractiveMessage.Footer + * @instance + * @returns {Object.} JSON object + */ + Footer.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Footer; + })(); + + InteractiveMessage.Header = (function() { + + /** + * Properties of a Header. + * @memberof proto.Message.InteractiveMessage + * @interface IHeader + * @property {string|null} [title] Header title + * @property {string|null} [subtitle] Header subtitle + * @property {boolean|null} [hasMediaAttachment] Header hasMediaAttachment + * @property {proto.Message.IDocumentMessage|null} [documentMessage] Header documentMessage + * @property {proto.Message.IImageMessage|null} [imageMessage] Header imageMessage + * @property {Uint8Array|null} [jpegThumbnail] Header jpegThumbnail + * @property {proto.Message.IVideoMessage|null} [videoMessage] Header videoMessage + */ + + /** + * Constructs a new Header. + * @memberof proto.Message.InteractiveMessage + * @classdesc Represents a Header. + * @implements IHeader + * @constructor + * @param {proto.Message.InteractiveMessage.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.Message.InteractiveMessage.Header + * @instance + */ + Header.prototype.title = ""; + + /** + * Header subtitle. + * @member {string} subtitle + * @memberof proto.Message.InteractiveMessage.Header + * @instance + */ + Header.prototype.subtitle = ""; + + /** + * Header hasMediaAttachment. + * @member {boolean} hasMediaAttachment + * @memberof proto.Message.InteractiveMessage.Header + * @instance + */ + Header.prototype.hasMediaAttachment = false; + + /** + * Header documentMessage. + * @member {proto.Message.IDocumentMessage|null|undefined} documentMessage + * @memberof proto.Message.InteractiveMessage.Header + * @instance + */ + Header.prototype.documentMessage = null; + + /** + * Header imageMessage. + * @member {proto.Message.IImageMessage|null|undefined} imageMessage + * @memberof proto.Message.InteractiveMessage.Header + * @instance + */ + Header.prototype.imageMessage = null; + + /** + * Header jpegThumbnail. + * @member {Uint8Array|null|undefined} jpegThumbnail + * @memberof proto.Message.InteractiveMessage.Header + * @instance + */ + Header.prototype.jpegThumbnail = null; + + /** + * Header videoMessage. + * @member {proto.Message.IVideoMessage|null|undefined} videoMessage + * @memberof proto.Message.InteractiveMessage.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.Message.InteractiveMessage.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.Message.InteractiveMessage.Header + * @static + * @param {proto.Message.InteractiveMessage.IHeader=} [properties] Properties to set + * @returns {proto.Message.InteractiveMessage.Header} Header instance + */ + Header.create = function create(properties) { + return new Header(properties); + }; + + /** + * Encodes the specified Header message. Does not implicitly {@link proto.Message.InteractiveMessage.Header.verify|verify} messages. + * @function encode + * @memberof proto.Message.InteractiveMessage.Header + * @static + * @param {proto.Message.InteractiveMessage.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.Message.DocumentMessage.encode(message.documentMessage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.imageMessage != null && Object.hasOwnProperty.call(message, "imageMessage")) + $root.proto.Message.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.Message.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.Message.InteractiveMessage.Header.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.InteractiveMessage.Header + * @static + * @param {proto.Message.InteractiveMessage.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.Message.InteractiveMessage.Header + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.InteractiveMessage.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.Message.InteractiveMessage.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.Message.DocumentMessage.decode(reader, reader.uint32()); + break; + case 4: + message.imageMessage = $root.proto.Message.ImageMessage.decode(reader, reader.uint32()); + break; + case 6: + message.jpegThumbnail = reader.bytes(); + break; + case 7: + message.videoMessage = $root.proto.Message.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.Message.InteractiveMessage.Header + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.InteractiveMessage.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.Message.InteractiveMessage.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.Message.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.Message.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.Message.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.Message.InteractiveMessage.Header + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.InteractiveMessage.Header} Header + */ + Header.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.InteractiveMessage.Header) + return object; + var message = new $root.proto.Message.InteractiveMessage.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.Message.InteractiveMessage.Header.documentMessage: object expected"); + message.documentMessage = $root.proto.Message.DocumentMessage.fromObject(object.documentMessage); + } + if (object.imageMessage != null) { + if (typeof object.imageMessage !== "object") + throw TypeError(".proto.Message.InteractiveMessage.Header.imageMessage: object expected"); + message.imageMessage = $root.proto.Message.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.Message.InteractiveMessage.Header.videoMessage: object expected"); + message.videoMessage = $root.proto.Message.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.Message.InteractiveMessage.Header + * @static + * @param {proto.Message.InteractiveMessage.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.Message.DocumentMessage.toObject(message.documentMessage, options); + if (options.oneofs) + object.media = "documentMessage"; + } + if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) { + object.imageMessage = $root.proto.Message.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.Message.VideoMessage.toObject(message.videoMessage, options); + if (options.oneofs) + object.media = "videoMessage"; + } + return object; + }; + + /** + * Converts this Header to JSON. + * @function toJSON + * @memberof proto.Message.InteractiveMessage.Header + * @instance + * @returns {Object.} JSON object + */ + Header.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Header; + })(); + + InteractiveMessage.NativeFlowMessage = (function() { + + /** + * Properties of a NativeFlowMessage. + * @memberof proto.Message.InteractiveMessage + * @interface INativeFlowMessage + * @property {Array.|null} [buttons] NativeFlowMessage buttons + * @property {string|null} [messageParamsJson] NativeFlowMessage messageParamsJson + * @property {number|null} [messageVersion] NativeFlowMessage messageVersion + */ + + /** + * Constructs a new NativeFlowMessage. + * @memberof proto.Message.InteractiveMessage + * @classdesc Represents a NativeFlowMessage. + * @implements INativeFlowMessage + * @constructor + * @param {proto.Message.InteractiveMessage.INativeFlowMessage=} [properties] Properties to set + */ + function NativeFlowMessage(properties) { + this.buttons = []; + 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]]; + } + + /** + * NativeFlowMessage buttons. + * @member {Array.} buttons + * @memberof proto.Message.InteractiveMessage.NativeFlowMessage + * @instance + */ + NativeFlowMessage.prototype.buttons = $util.emptyArray; + + /** + * NativeFlowMessage messageParamsJson. + * @member {string} messageParamsJson + * @memberof proto.Message.InteractiveMessage.NativeFlowMessage + * @instance + */ + NativeFlowMessage.prototype.messageParamsJson = ""; + + /** + * NativeFlowMessage messageVersion. + * @member {number} messageVersion + * @memberof proto.Message.InteractiveMessage.NativeFlowMessage + * @instance + */ + NativeFlowMessage.prototype.messageVersion = 0; + + /** + * Creates a new NativeFlowMessage instance using the specified properties. + * @function create + * @memberof proto.Message.InteractiveMessage.NativeFlowMessage + * @static + * @param {proto.Message.InteractiveMessage.INativeFlowMessage=} [properties] Properties to set + * @returns {proto.Message.InteractiveMessage.NativeFlowMessage} NativeFlowMessage instance + */ + NativeFlowMessage.create = function create(properties) { + return new NativeFlowMessage(properties); + }; + + /** + * Encodes the specified NativeFlowMessage message. Does not implicitly {@link proto.Message.InteractiveMessage.NativeFlowMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.InteractiveMessage.NativeFlowMessage + * @static + * @param {proto.Message.InteractiveMessage.INativeFlowMessage} message NativeFlowMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NativeFlowMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.buttons != null && message.buttons.length) + for (var i = 0; i < message.buttons.length; ++i) + $root.proto.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton.encode(message.buttons[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.messageParamsJson != null && Object.hasOwnProperty.call(message, "messageParamsJson")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.messageParamsJson); + if (message.messageVersion != null && Object.hasOwnProperty.call(message, "messageVersion")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.messageVersion); + return writer; + }; + + /** + * Encodes the specified NativeFlowMessage message, length delimited. Does not implicitly {@link proto.Message.InteractiveMessage.NativeFlowMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.InteractiveMessage.NativeFlowMessage + * @static + * @param {proto.Message.InteractiveMessage.INativeFlowMessage} message NativeFlowMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NativeFlowMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NativeFlowMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.InteractiveMessage.NativeFlowMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.InteractiveMessage.NativeFlowMessage} NativeFlowMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NativeFlowMessage.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.Message.InteractiveMessage.NativeFlowMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.buttons && message.buttons.length)) + message.buttons = []; + message.buttons.push($root.proto.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton.decode(reader, reader.uint32())); + break; + case 2: + message.messageParamsJson = reader.string(); + break; + case 3: + message.messageVersion = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NativeFlowMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.InteractiveMessage.NativeFlowMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.InteractiveMessage.NativeFlowMessage} NativeFlowMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NativeFlowMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NativeFlowMessage message. + * @function verify + * @memberof proto.Message.InteractiveMessage.NativeFlowMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NativeFlowMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.buttons != null && message.hasOwnProperty("buttons")) { + if (!Array.isArray(message.buttons)) + return "buttons: array expected"; + for (var i = 0; i < message.buttons.length; ++i) { + var error = $root.proto.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton.verify(message.buttons[i]); + if (error) + return "buttons." + error; + } + } + if (message.messageParamsJson != null && message.hasOwnProperty("messageParamsJson")) + if (!$util.isString(message.messageParamsJson)) + return "messageParamsJson: string expected"; + if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) + if (!$util.isInteger(message.messageVersion)) + return "messageVersion: integer expected"; + return null; + }; + + /** + * Creates a NativeFlowMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.InteractiveMessage.NativeFlowMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.InteractiveMessage.NativeFlowMessage} NativeFlowMessage + */ + NativeFlowMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.InteractiveMessage.NativeFlowMessage) + return object; + var message = new $root.proto.Message.InteractiveMessage.NativeFlowMessage(); + if (object.buttons) { + if (!Array.isArray(object.buttons)) + throw TypeError(".proto.Message.InteractiveMessage.NativeFlowMessage.buttons: array expected"); + message.buttons = []; + for (var i = 0; i < object.buttons.length; ++i) { + if (typeof object.buttons[i] !== "object") + throw TypeError(".proto.Message.InteractiveMessage.NativeFlowMessage.buttons: object expected"); + message.buttons[i] = $root.proto.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton.fromObject(object.buttons[i]); + } + } + if (object.messageParamsJson != null) + message.messageParamsJson = String(object.messageParamsJson); + if (object.messageVersion != null) + message.messageVersion = object.messageVersion | 0; + return message; + }; + + /** + * Creates a plain object from a NativeFlowMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.InteractiveMessage.NativeFlowMessage + * @static + * @param {proto.Message.InteractiveMessage.NativeFlowMessage} message NativeFlowMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NativeFlowMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.buttons = []; + if (options.defaults) { + object.messageParamsJson = ""; + object.messageVersion = 0; + } + if (message.buttons && message.buttons.length) { + object.buttons = []; + for (var j = 0; j < message.buttons.length; ++j) + object.buttons[j] = $root.proto.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton.toObject(message.buttons[j], options); + } + if (message.messageParamsJson != null && message.hasOwnProperty("messageParamsJson")) + object.messageParamsJson = message.messageParamsJson; + if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) + object.messageVersion = message.messageVersion; + return object; + }; + + /** + * Converts this NativeFlowMessage to JSON. + * @function toJSON + * @memberof proto.Message.InteractiveMessage.NativeFlowMessage + * @instance + * @returns {Object.} JSON object + */ + NativeFlowMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + NativeFlowMessage.NativeFlowButton = (function() { + + /** + * Properties of a NativeFlowButton. + * @memberof proto.Message.InteractiveMessage.NativeFlowMessage + * @interface INativeFlowButton + * @property {string|null} [name] NativeFlowButton name + * @property {string|null} [buttonParamsJson] NativeFlowButton buttonParamsJson + */ + + /** + * Constructs a new NativeFlowButton. + * @memberof proto.Message.InteractiveMessage.NativeFlowMessage + * @classdesc Represents a NativeFlowButton. + * @implements INativeFlowButton + * @constructor + * @param {proto.Message.InteractiveMessage.NativeFlowMessage.INativeFlowButton=} [properties] Properties to set + */ + function NativeFlowButton(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]]; + } + + /** + * NativeFlowButton name. + * @member {string} name + * @memberof proto.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton + * @instance + */ + NativeFlowButton.prototype.name = ""; + + /** + * NativeFlowButton buttonParamsJson. + * @member {string} buttonParamsJson + * @memberof proto.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton + * @instance + */ + NativeFlowButton.prototype.buttonParamsJson = ""; + + /** + * Creates a new NativeFlowButton instance using the specified properties. + * @function create + * @memberof proto.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton + * @static + * @param {proto.Message.InteractiveMessage.NativeFlowMessage.INativeFlowButton=} [properties] Properties to set + * @returns {proto.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton} NativeFlowButton instance + */ + NativeFlowButton.create = function create(properties) { + return new NativeFlowButton(properties); + }; + + /** + * Encodes the specified NativeFlowButton message. Does not implicitly {@link proto.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton.verify|verify} messages. + * @function encode + * @memberof proto.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton + * @static + * @param {proto.Message.InteractiveMessage.NativeFlowMessage.INativeFlowButton} message NativeFlowButton message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NativeFlowButton.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.buttonParamsJson != null && Object.hasOwnProperty.call(message, "buttonParamsJson")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.buttonParamsJson); + return writer; + }; + + /** + * Encodes the specified NativeFlowButton message, length delimited. Does not implicitly {@link proto.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton + * @static + * @param {proto.Message.InteractiveMessage.NativeFlowMessage.INativeFlowButton} message NativeFlowButton message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NativeFlowButton.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NativeFlowButton message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton} NativeFlowButton + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NativeFlowButton.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.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.buttonParamsJson = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NativeFlowButton message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton} NativeFlowButton + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NativeFlowButton.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NativeFlowButton message. + * @function verify + * @memberof proto.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NativeFlowButton.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.buttonParamsJson != null && message.hasOwnProperty("buttonParamsJson")) + if (!$util.isString(message.buttonParamsJson)) + return "buttonParamsJson: string expected"; + return null; + }; + + /** + * Creates a NativeFlowButton message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton} NativeFlowButton + */ + NativeFlowButton.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton) + return object; + var message = new $root.proto.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton(); + if (object.name != null) + message.name = String(object.name); + if (object.buttonParamsJson != null) + message.buttonParamsJson = String(object.buttonParamsJson); + return message; + }; + + /** + * Creates a plain object from a NativeFlowButton message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton + * @static + * @param {proto.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton} message NativeFlowButton + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NativeFlowButton.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.buttonParamsJson = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.buttonParamsJson != null && message.hasOwnProperty("buttonParamsJson")) + object.buttonParamsJson = message.buttonParamsJson; + return object; + }; + + /** + * Converts this NativeFlowButton to JSON. + * @function toJSON + * @memberof proto.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton + * @instance + * @returns {Object.} JSON object + */ + NativeFlowButton.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return NativeFlowButton; + })(); + + return NativeFlowMessage; + })(); + + InteractiveMessage.ShopMessage = (function() { + + /** + * Properties of a ShopMessage. + * @memberof proto.Message.InteractiveMessage + * @interface IShopMessage + * @property {string|null} [id] ShopMessage id + * @property {proto.Message.InteractiveMessage.ShopMessage.Surface|null} [surface] ShopMessage surface + * @property {number|null} [messageVersion] ShopMessage messageVersion + */ + + /** + * Constructs a new ShopMessage. + * @memberof proto.Message.InteractiveMessage + * @classdesc Represents a ShopMessage. + * @implements IShopMessage + * @constructor + * @param {proto.Message.InteractiveMessage.IShopMessage=} [properties] Properties to set + */ + function ShopMessage(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]]; + } + + /** + * ShopMessage id. + * @member {string} id + * @memberof proto.Message.InteractiveMessage.ShopMessage + * @instance + */ + ShopMessage.prototype.id = ""; + + /** + * ShopMessage surface. + * @member {proto.Message.InteractiveMessage.ShopMessage.Surface} surface + * @memberof proto.Message.InteractiveMessage.ShopMessage + * @instance + */ + ShopMessage.prototype.surface = 0; + + /** + * ShopMessage messageVersion. + * @member {number} messageVersion + * @memberof proto.Message.InteractiveMessage.ShopMessage + * @instance + */ + ShopMessage.prototype.messageVersion = 0; + + /** + * Creates a new ShopMessage instance using the specified properties. + * @function create + * @memberof proto.Message.InteractiveMessage.ShopMessage + * @static + * @param {proto.Message.InteractiveMessage.IShopMessage=} [properties] Properties to set + * @returns {proto.Message.InteractiveMessage.ShopMessage} ShopMessage instance + */ + ShopMessage.create = function create(properties) { + return new ShopMessage(properties); + }; + + /** + * Encodes the specified ShopMessage message. Does not implicitly {@link proto.Message.InteractiveMessage.ShopMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.InteractiveMessage.ShopMessage + * @static + * @param {proto.Message.InteractiveMessage.IShopMessage} message ShopMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ShopMessage.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.surface != null && Object.hasOwnProperty.call(message, "surface")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.surface); + if (message.messageVersion != null && Object.hasOwnProperty.call(message, "messageVersion")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.messageVersion); + return writer; + }; + + /** + * Encodes the specified ShopMessage message, length delimited. Does not implicitly {@link proto.Message.InteractiveMessage.ShopMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.InteractiveMessage.ShopMessage + * @static + * @param {proto.Message.InteractiveMessage.IShopMessage} message ShopMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ShopMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ShopMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.InteractiveMessage.ShopMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.InteractiveMessage.ShopMessage} ShopMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ShopMessage.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.Message.InteractiveMessage.ShopMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.surface = reader.int32(); + break; + case 3: + message.messageVersion = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ShopMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.InteractiveMessage.ShopMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.InteractiveMessage.ShopMessage} ShopMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ShopMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ShopMessage message. + * @function verify + * @memberof proto.Message.InteractiveMessage.ShopMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ShopMessage.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.surface != null && message.hasOwnProperty("surface")) + switch (message.surface) { + default: + return "surface: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) + if (!$util.isInteger(message.messageVersion)) + return "messageVersion: integer expected"; + return null; + }; + + /** + * Creates a ShopMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.InteractiveMessage.ShopMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.InteractiveMessage.ShopMessage} ShopMessage + */ + ShopMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.InteractiveMessage.ShopMessage) + return object; + var message = new $root.proto.Message.InteractiveMessage.ShopMessage(); + if (object.id != null) + message.id = String(object.id); + switch (object.surface) { + case "UNKNOWN_SURFACE": + case 0: + message.surface = 0; + break; + case "FB": + case 1: + message.surface = 1; + break; + case "IG": + case 2: + message.surface = 2; + break; + case "WA": + case 3: + message.surface = 3; + break; + } + if (object.messageVersion != null) + message.messageVersion = object.messageVersion | 0; + return message; + }; + + /** + * Creates a plain object from a ShopMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.InteractiveMessage.ShopMessage + * @static + * @param {proto.Message.InteractiveMessage.ShopMessage} message ShopMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ShopMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.surface = options.enums === String ? "UNKNOWN_SURFACE" : 0; + object.messageVersion = 0; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.surface != null && message.hasOwnProperty("surface")) + object.surface = options.enums === String ? $root.proto.Message.InteractiveMessage.ShopMessage.Surface[message.surface] : message.surface; + if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) + object.messageVersion = message.messageVersion; + return object; + }; + + /** + * Converts this ShopMessage to JSON. + * @function toJSON + * @memberof proto.Message.InteractiveMessage.ShopMessage + * @instance + * @returns {Object.} JSON object + */ + ShopMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Surface enum. + * @name proto.Message.InteractiveMessage.ShopMessage.Surface + * @enum {number} + * @property {number} UNKNOWN_SURFACE=0 UNKNOWN_SURFACE value + * @property {number} FB=1 FB value + * @property {number} IG=2 IG value + * @property {number} WA=3 WA value + */ + ShopMessage.Surface = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN_SURFACE"] = 0; + values[valuesById[1] = "FB"] = 1; + values[valuesById[2] = "IG"] = 2; + values[valuesById[3] = "WA"] = 3; + return values; + })(); + + return ShopMessage; + })(); + + return InteractiveMessage; + })(); + + Message.InteractiveResponseMessage = (function() { + + /** + * Properties of an InteractiveResponseMessage. + * @memberof proto.Message + * @interface IInteractiveResponseMessage + * @property {proto.Message.InteractiveResponseMessage.IBody|null} [body] InteractiveResponseMessage body + * @property {proto.IContextInfo|null} [contextInfo] InteractiveResponseMessage contextInfo + * @property {proto.Message.InteractiveResponseMessage.INativeFlowResponseMessage|null} [nativeFlowResponseMessage] InteractiveResponseMessage nativeFlowResponseMessage + */ + + /** + * Constructs a new InteractiveResponseMessage. + * @memberof proto.Message + * @classdesc Represents an InteractiveResponseMessage. + * @implements IInteractiveResponseMessage + * @constructor + * @param {proto.Message.IInteractiveResponseMessage=} [properties] Properties to set + */ + function InteractiveResponseMessage(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]]; + } + + /** + * InteractiveResponseMessage body. + * @member {proto.Message.InteractiveResponseMessage.IBody|null|undefined} body + * @memberof proto.Message.InteractiveResponseMessage + * @instance + */ + InteractiveResponseMessage.prototype.body = null; + + /** + * InteractiveResponseMessage contextInfo. + * @member {proto.IContextInfo|null|undefined} contextInfo + * @memberof proto.Message.InteractiveResponseMessage + * @instance + */ + InteractiveResponseMessage.prototype.contextInfo = null; + + /** + * InteractiveResponseMessage nativeFlowResponseMessage. + * @member {proto.Message.InteractiveResponseMessage.INativeFlowResponseMessage|null|undefined} nativeFlowResponseMessage + * @memberof proto.Message.InteractiveResponseMessage + * @instance + */ + InteractiveResponseMessage.prototype.nativeFlowResponseMessage = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * InteractiveResponseMessage interactiveResponseMessage. + * @member {"nativeFlowResponseMessage"|undefined} interactiveResponseMessage + * @memberof proto.Message.InteractiveResponseMessage + * @instance + */ + Object.defineProperty(InteractiveResponseMessage.prototype, "interactiveResponseMessage", { + get: $util.oneOfGetter($oneOfFields = ["nativeFlowResponseMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new InteractiveResponseMessage instance using the specified properties. + * @function create + * @memberof proto.Message.InteractiveResponseMessage + * @static + * @param {proto.Message.IInteractiveResponseMessage=} [properties] Properties to set + * @returns {proto.Message.InteractiveResponseMessage} InteractiveResponseMessage instance + */ + InteractiveResponseMessage.create = function create(properties) { + return new InteractiveResponseMessage(properties); + }; + + /** + * Encodes the specified InteractiveResponseMessage message. Does not implicitly {@link proto.Message.InteractiveResponseMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.InteractiveResponseMessage + * @static + * @param {proto.Message.IInteractiveResponseMessage} message InteractiveResponseMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InteractiveResponseMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + $root.proto.Message.InteractiveResponseMessage.Body.encode(message.body, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nativeFlowResponseMessage != null && Object.hasOwnProperty.call(message, "nativeFlowResponseMessage")) + $root.proto.Message.InteractiveResponseMessage.NativeFlowResponseMessage.encode(message.nativeFlowResponseMessage, 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 15, wireType 2 =*/122).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified InteractiveResponseMessage message, length delimited. Does not implicitly {@link proto.Message.InteractiveResponseMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.InteractiveResponseMessage + * @static + * @param {proto.Message.IInteractiveResponseMessage} message InteractiveResponseMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InteractiveResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InteractiveResponseMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.InteractiveResponseMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.InteractiveResponseMessage} InteractiveResponseMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InteractiveResponseMessage.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.Message.InteractiveResponseMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.body = $root.proto.Message.InteractiveResponseMessage.Body.decode(reader, reader.uint32()); + break; + case 15: + message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); + break; + case 2: + message.nativeFlowResponseMessage = $root.proto.Message.InteractiveResponseMessage.NativeFlowResponseMessage.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InteractiveResponseMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.InteractiveResponseMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.InteractiveResponseMessage} InteractiveResponseMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InteractiveResponseMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InteractiveResponseMessage message. + * @function verify + * @memberof proto.Message.InteractiveResponseMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InteractiveResponseMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.body != null && message.hasOwnProperty("body")) { + var error = $root.proto.Message.InteractiveResponseMessage.Body.verify(message.body); + if (error) + return "body." + error; + } + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } + if (message.nativeFlowResponseMessage != null && message.hasOwnProperty("nativeFlowResponseMessage")) { + properties.interactiveResponseMessage = 1; + { + var error = $root.proto.Message.InteractiveResponseMessage.NativeFlowResponseMessage.verify(message.nativeFlowResponseMessage); + if (error) + return "nativeFlowResponseMessage." + error; + } + } + return null; + }; + + /** + * Creates an InteractiveResponseMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.InteractiveResponseMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.InteractiveResponseMessage} InteractiveResponseMessage + */ + InteractiveResponseMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.InteractiveResponseMessage) + return object; + var message = new $root.proto.Message.InteractiveResponseMessage(); + if (object.body != null) { + if (typeof object.body !== "object") + throw TypeError(".proto.Message.InteractiveResponseMessage.body: object expected"); + message.body = $root.proto.Message.InteractiveResponseMessage.Body.fromObject(object.body); + } + if (object.contextInfo != null) { + if (typeof object.contextInfo !== "object") + throw TypeError(".proto.Message.InteractiveResponseMessage.contextInfo: object expected"); + message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); + } + if (object.nativeFlowResponseMessage != null) { + if (typeof object.nativeFlowResponseMessage !== "object") + throw TypeError(".proto.Message.InteractiveResponseMessage.nativeFlowResponseMessage: object expected"); + message.nativeFlowResponseMessage = $root.proto.Message.InteractiveResponseMessage.NativeFlowResponseMessage.fromObject(object.nativeFlowResponseMessage); + } + return message; + }; + + /** + * Creates a plain object from an InteractiveResponseMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.InteractiveResponseMessage + * @static + * @param {proto.Message.InteractiveResponseMessage} message InteractiveResponseMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InteractiveResponseMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.body = null; + object.contextInfo = null; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = $root.proto.Message.InteractiveResponseMessage.Body.toObject(message.body, options); + if (message.nativeFlowResponseMessage != null && message.hasOwnProperty("nativeFlowResponseMessage")) { + object.nativeFlowResponseMessage = $root.proto.Message.InteractiveResponseMessage.NativeFlowResponseMessage.toObject(message.nativeFlowResponseMessage, options); + if (options.oneofs) + object.interactiveResponseMessage = "nativeFlowResponseMessage"; + } + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) + object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + return object; + }; + + /** + * Converts this InteractiveResponseMessage to JSON. + * @function toJSON + * @memberof proto.Message.InteractiveResponseMessage + * @instance + * @returns {Object.} JSON object + */ + InteractiveResponseMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + InteractiveResponseMessage.Body = (function() { + + /** + * Properties of a Body. + * @memberof proto.Message.InteractiveResponseMessage + * @interface IBody + * @property {string|null} [text] Body text + */ + + /** + * Constructs a new Body. + * @memberof proto.Message.InteractiveResponseMessage + * @classdesc Represents a Body. + * @implements IBody + * @constructor + * @param {proto.Message.InteractiveResponseMessage.IBody=} [properties] Properties to set + */ + function Body(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]]; + } + + /** + * Body text. + * @member {string} text + * @memberof proto.Message.InteractiveResponseMessage.Body + * @instance + */ + Body.prototype.text = ""; + + /** + * Creates a new Body instance using the specified properties. + * @function create + * @memberof proto.Message.InteractiveResponseMessage.Body + * @static + * @param {proto.Message.InteractiveResponseMessage.IBody=} [properties] Properties to set + * @returns {proto.Message.InteractiveResponseMessage.Body} Body instance + */ + Body.create = function create(properties) { + return new Body(properties); + }; + + /** + * Encodes the specified Body message. Does not implicitly {@link proto.Message.InteractiveResponseMessage.Body.verify|verify} messages. + * @function encode + * @memberof proto.Message.InteractiveResponseMessage.Body + * @static + * @param {proto.Message.InteractiveResponseMessage.IBody} message Body message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Body.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + return writer; + }; + + /** + * Encodes the specified Body message, length delimited. Does not implicitly {@link proto.Message.InteractiveResponseMessage.Body.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.InteractiveResponseMessage.Body + * @static + * @param {proto.Message.InteractiveResponseMessage.IBody} message Body message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Body.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Body message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.InteractiveResponseMessage.Body + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.InteractiveResponseMessage.Body} Body + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Body.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.Message.InteractiveResponseMessage.Body(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.text = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Body message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.InteractiveResponseMessage.Body + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.InteractiveResponseMessage.Body} Body + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Body.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Body message. + * @function verify + * @memberof proto.Message.InteractiveResponseMessage.Body + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Body.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + return null; + }; + + /** + * Creates a Body message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.InteractiveResponseMessage.Body + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.InteractiveResponseMessage.Body} Body + */ + Body.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.InteractiveResponseMessage.Body) + return object; + var message = new $root.proto.Message.InteractiveResponseMessage.Body(); + if (object.text != null) + message.text = String(object.text); + return message; + }; + + /** + * Creates a plain object from a Body message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.InteractiveResponseMessage.Body + * @static + * @param {proto.Message.InteractiveResponseMessage.Body} message Body + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Body.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.text = ""; + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + return object; + }; + + /** + * Converts this Body to JSON. + * @function toJSON + * @memberof proto.Message.InteractiveResponseMessage.Body + * @instance + * @returns {Object.} JSON object + */ + Body.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Body; + })(); + + InteractiveResponseMessage.NativeFlowResponseMessage = (function() { + + /** + * Properties of a NativeFlowResponseMessage. + * @memberof proto.Message.InteractiveResponseMessage + * @interface INativeFlowResponseMessage + * @property {string|null} [name] NativeFlowResponseMessage name + * @property {string|null} [paramsJson] NativeFlowResponseMessage paramsJson + * @property {number|null} [version] NativeFlowResponseMessage version + */ + + /** + * Constructs a new NativeFlowResponseMessage. + * @memberof proto.Message.InteractiveResponseMessage + * @classdesc Represents a NativeFlowResponseMessage. + * @implements INativeFlowResponseMessage + * @constructor + * @param {proto.Message.InteractiveResponseMessage.INativeFlowResponseMessage=} [properties] Properties to set + */ + function NativeFlowResponseMessage(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]]; + } + + /** + * NativeFlowResponseMessage name. + * @member {string} name + * @memberof proto.Message.InteractiveResponseMessage.NativeFlowResponseMessage + * @instance + */ + NativeFlowResponseMessage.prototype.name = ""; + + /** + * NativeFlowResponseMessage paramsJson. + * @member {string} paramsJson + * @memberof proto.Message.InteractiveResponseMessage.NativeFlowResponseMessage + * @instance + */ + NativeFlowResponseMessage.prototype.paramsJson = ""; + + /** + * NativeFlowResponseMessage version. + * @member {number} version + * @memberof proto.Message.InteractiveResponseMessage.NativeFlowResponseMessage + * @instance + */ + NativeFlowResponseMessage.prototype.version = 0; + + /** + * Creates a new NativeFlowResponseMessage instance using the specified properties. + * @function create + * @memberof proto.Message.InteractiveResponseMessage.NativeFlowResponseMessage + * @static + * @param {proto.Message.InteractiveResponseMessage.INativeFlowResponseMessage=} [properties] Properties to set + * @returns {proto.Message.InteractiveResponseMessage.NativeFlowResponseMessage} NativeFlowResponseMessage instance + */ + NativeFlowResponseMessage.create = function create(properties) { + return new NativeFlowResponseMessage(properties); + }; + + /** + * Encodes the specified NativeFlowResponseMessage message. Does not implicitly {@link proto.Message.InteractiveResponseMessage.NativeFlowResponseMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.InteractiveResponseMessage.NativeFlowResponseMessage + * @static + * @param {proto.Message.InteractiveResponseMessage.INativeFlowResponseMessage} message NativeFlowResponseMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NativeFlowResponseMessage.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.paramsJson != null && Object.hasOwnProperty.call(message, "paramsJson")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.paramsJson); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.version); + return writer; + }; + + /** + * Encodes the specified NativeFlowResponseMessage message, length delimited. Does not implicitly {@link proto.Message.InteractiveResponseMessage.NativeFlowResponseMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.InteractiveResponseMessage.NativeFlowResponseMessage + * @static + * @param {proto.Message.InteractiveResponseMessage.INativeFlowResponseMessage} message NativeFlowResponseMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NativeFlowResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NativeFlowResponseMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.InteractiveResponseMessage.NativeFlowResponseMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.InteractiveResponseMessage.NativeFlowResponseMessage} NativeFlowResponseMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NativeFlowResponseMessage.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.Message.InteractiveResponseMessage.NativeFlowResponseMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.paramsJson = reader.string(); + break; + case 3: + message.version = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NativeFlowResponseMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.InteractiveResponseMessage.NativeFlowResponseMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.InteractiveResponseMessage.NativeFlowResponseMessage} NativeFlowResponseMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NativeFlowResponseMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NativeFlowResponseMessage message. + * @function verify + * @memberof proto.Message.InteractiveResponseMessage.NativeFlowResponseMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NativeFlowResponseMessage.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.paramsJson != null && message.hasOwnProperty("paramsJson")) + if (!$util.isString(message.paramsJson)) + return "paramsJson: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version)) + return "version: integer expected"; + return null; + }; + + /** + * Creates a NativeFlowResponseMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.InteractiveResponseMessage.NativeFlowResponseMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.InteractiveResponseMessage.NativeFlowResponseMessage} NativeFlowResponseMessage + */ + NativeFlowResponseMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.InteractiveResponseMessage.NativeFlowResponseMessage) + return object; + var message = new $root.proto.Message.InteractiveResponseMessage.NativeFlowResponseMessage(); + if (object.name != null) + message.name = String(object.name); + if (object.paramsJson != null) + message.paramsJson = String(object.paramsJson); + if (object.version != null) + message.version = object.version | 0; + return message; + }; + + /** + * Creates a plain object from a NativeFlowResponseMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.InteractiveResponseMessage.NativeFlowResponseMessage + * @static + * @param {proto.Message.InteractiveResponseMessage.NativeFlowResponseMessage} message NativeFlowResponseMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NativeFlowResponseMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.paramsJson = ""; + object.version = 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.paramsJson != null && message.hasOwnProperty("paramsJson")) + object.paramsJson = message.paramsJson; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; + + /** + * Converts this NativeFlowResponseMessage to JSON. + * @function toJSON + * @memberof proto.Message.InteractiveResponseMessage.NativeFlowResponseMessage + * @instance + * @returns {Object.} JSON object + */ + NativeFlowResponseMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return NativeFlowResponseMessage; + })(); + + return InteractiveResponseMessage; + })(); + + Message.InvoiceMessage = (function() { + + /** + * Properties of an InvoiceMessage. + * @memberof proto.Message + * @interface IInvoiceMessage + * @property {string|null} [note] InvoiceMessage note + * @property {string|null} [token] InvoiceMessage token + * @property {proto.Message.InvoiceMessage.AttachmentType|null} [attachmentType] InvoiceMessage attachmentType + * @property {string|null} [attachmentMimetype] InvoiceMessage attachmentMimetype + * @property {Uint8Array|null} [attachmentMediaKey] InvoiceMessage attachmentMediaKey + * @property {number|Long|null} [attachmentMediaKeyTimestamp] InvoiceMessage attachmentMediaKeyTimestamp + * @property {Uint8Array|null} [attachmentFileSha256] InvoiceMessage attachmentFileSha256 + * @property {Uint8Array|null} [attachmentFileEncSha256] InvoiceMessage attachmentFileEncSha256 + * @property {string|null} [attachmentDirectPath] InvoiceMessage attachmentDirectPath + * @property {Uint8Array|null} [attachmentJpegThumbnail] InvoiceMessage attachmentJpegThumbnail + */ + + /** + * Constructs a new InvoiceMessage. + * @memberof proto.Message + * @classdesc Represents an InvoiceMessage. + * @implements IInvoiceMessage + * @constructor + * @param {proto.Message.IInvoiceMessage=} [properties] Properties to set + */ + function InvoiceMessage(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]]; + } + + /** + * InvoiceMessage note. + * @member {string} note + * @memberof proto.Message.InvoiceMessage + * @instance + */ + InvoiceMessage.prototype.note = ""; + + /** + * InvoiceMessage token. + * @member {string} token + * @memberof proto.Message.InvoiceMessage + * @instance + */ + InvoiceMessage.prototype.token = ""; + + /** + * InvoiceMessage attachmentType. + * @member {proto.Message.InvoiceMessage.AttachmentType} attachmentType + * @memberof proto.Message.InvoiceMessage + * @instance + */ + InvoiceMessage.prototype.attachmentType = 0; + + /** + * InvoiceMessage attachmentMimetype. + * @member {string} attachmentMimetype + * @memberof proto.Message.InvoiceMessage + * @instance + */ + InvoiceMessage.prototype.attachmentMimetype = ""; + + /** + * InvoiceMessage attachmentMediaKey. + * @member {Uint8Array} attachmentMediaKey + * @memberof proto.Message.InvoiceMessage + * @instance + */ + InvoiceMessage.prototype.attachmentMediaKey = $util.newBuffer([]); + + /** + * InvoiceMessage attachmentMediaKeyTimestamp. + * @member {number|Long} attachmentMediaKeyTimestamp + * @memberof proto.Message.InvoiceMessage + * @instance + */ + InvoiceMessage.prototype.attachmentMediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * InvoiceMessage attachmentFileSha256. + * @member {Uint8Array} attachmentFileSha256 + * @memberof proto.Message.InvoiceMessage + * @instance + */ + InvoiceMessage.prototype.attachmentFileSha256 = $util.newBuffer([]); + + /** + * InvoiceMessage attachmentFileEncSha256. + * @member {Uint8Array} attachmentFileEncSha256 + * @memberof proto.Message.InvoiceMessage + * @instance + */ + InvoiceMessage.prototype.attachmentFileEncSha256 = $util.newBuffer([]); + + /** + * InvoiceMessage attachmentDirectPath. + * @member {string} attachmentDirectPath + * @memberof proto.Message.InvoiceMessage + * @instance + */ + InvoiceMessage.prototype.attachmentDirectPath = ""; + + /** + * InvoiceMessage attachmentJpegThumbnail. + * @member {Uint8Array} attachmentJpegThumbnail + * @memberof proto.Message.InvoiceMessage + * @instance + */ + InvoiceMessage.prototype.attachmentJpegThumbnail = $util.newBuffer([]); + + /** + * Creates a new InvoiceMessage instance using the specified properties. + * @function create + * @memberof proto.Message.InvoiceMessage + * @static + * @param {proto.Message.IInvoiceMessage=} [properties] Properties to set + * @returns {proto.Message.InvoiceMessage} InvoiceMessage instance + */ + InvoiceMessage.create = function create(properties) { + return new InvoiceMessage(properties); + }; + + /** + * Encodes the specified InvoiceMessage message. Does not implicitly {@link proto.Message.InvoiceMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.InvoiceMessage + * @static + * @param {proto.Message.IInvoiceMessage} message InvoiceMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InvoiceMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.note != null && Object.hasOwnProperty.call(message, "note")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.note); + if (message.token != null && Object.hasOwnProperty.call(message, "token")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.token); + if (message.attachmentType != null && Object.hasOwnProperty.call(message, "attachmentType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.attachmentType); + if (message.attachmentMimetype != null && Object.hasOwnProperty.call(message, "attachmentMimetype")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.attachmentMimetype); + if (message.attachmentMediaKey != null && Object.hasOwnProperty.call(message, "attachmentMediaKey")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.attachmentMediaKey); + if (message.attachmentMediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "attachmentMediaKeyTimestamp")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.attachmentMediaKeyTimestamp); + if (message.attachmentFileSha256 != null && Object.hasOwnProperty.call(message, "attachmentFileSha256")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.attachmentFileSha256); + if (message.attachmentFileEncSha256 != null && Object.hasOwnProperty.call(message, "attachmentFileEncSha256")) + writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.attachmentFileEncSha256); + if (message.attachmentDirectPath != null && Object.hasOwnProperty.call(message, "attachmentDirectPath")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.attachmentDirectPath); + if (message.attachmentJpegThumbnail != null && Object.hasOwnProperty.call(message, "attachmentJpegThumbnail")) + writer.uint32(/* id 10, wireType 2 =*/82).bytes(message.attachmentJpegThumbnail); + return writer; + }; + + /** + * Encodes the specified InvoiceMessage message, length delimited. Does not implicitly {@link proto.Message.InvoiceMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.InvoiceMessage + * @static + * @param {proto.Message.IInvoiceMessage} message InvoiceMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InvoiceMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InvoiceMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.InvoiceMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.InvoiceMessage} InvoiceMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InvoiceMessage.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.Message.InvoiceMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.note = reader.string(); + break; + case 2: + message.token = reader.string(); + break; + case 3: + message.attachmentType = reader.int32(); + break; + case 4: + message.attachmentMimetype = reader.string(); + break; + case 5: + message.attachmentMediaKey = reader.bytes(); + break; + case 6: + message.attachmentMediaKeyTimestamp = reader.int64(); + break; + case 7: + message.attachmentFileSha256 = reader.bytes(); + break; + case 8: + message.attachmentFileEncSha256 = reader.bytes(); + break; + case 9: + message.attachmentDirectPath = reader.string(); + break; + case 10: + message.attachmentJpegThumbnail = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InvoiceMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.InvoiceMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.InvoiceMessage} InvoiceMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InvoiceMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InvoiceMessage message. + * @function verify + * @memberof proto.Message.InvoiceMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InvoiceMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.note != null && message.hasOwnProperty("note")) + if (!$util.isString(message.note)) + return "note: string expected"; + if (message.token != null && message.hasOwnProperty("token")) + if (!$util.isString(message.token)) + return "token: string expected"; + if (message.attachmentType != null && message.hasOwnProperty("attachmentType")) + switch (message.attachmentType) { + default: + return "attachmentType: enum value expected"; + case 0: + case 1: + break; + } + if (message.attachmentMimetype != null && message.hasOwnProperty("attachmentMimetype")) + if (!$util.isString(message.attachmentMimetype)) + return "attachmentMimetype: string expected"; + if (message.attachmentMediaKey != null && message.hasOwnProperty("attachmentMediaKey")) + if (!(message.attachmentMediaKey && typeof message.attachmentMediaKey.length === "number" || $util.isString(message.attachmentMediaKey))) + return "attachmentMediaKey: buffer expected"; + if (message.attachmentMediaKeyTimestamp != null && message.hasOwnProperty("attachmentMediaKeyTimestamp")) + if (!$util.isInteger(message.attachmentMediaKeyTimestamp) && !(message.attachmentMediaKeyTimestamp && $util.isInteger(message.attachmentMediaKeyTimestamp.low) && $util.isInteger(message.attachmentMediaKeyTimestamp.high))) + return "attachmentMediaKeyTimestamp: integer|Long expected"; + if (message.attachmentFileSha256 != null && message.hasOwnProperty("attachmentFileSha256")) + if (!(message.attachmentFileSha256 && typeof message.attachmentFileSha256.length === "number" || $util.isString(message.attachmentFileSha256))) + return "attachmentFileSha256: buffer expected"; + if (message.attachmentFileEncSha256 != null && message.hasOwnProperty("attachmentFileEncSha256")) + if (!(message.attachmentFileEncSha256 && typeof message.attachmentFileEncSha256.length === "number" || $util.isString(message.attachmentFileEncSha256))) + return "attachmentFileEncSha256: buffer expected"; + if (message.attachmentDirectPath != null && message.hasOwnProperty("attachmentDirectPath")) + if (!$util.isString(message.attachmentDirectPath)) + return "attachmentDirectPath: string expected"; + if (message.attachmentJpegThumbnail != null && message.hasOwnProperty("attachmentJpegThumbnail")) + if (!(message.attachmentJpegThumbnail && typeof message.attachmentJpegThumbnail.length === "number" || $util.isString(message.attachmentJpegThumbnail))) + return "attachmentJpegThumbnail: buffer expected"; + return null; + }; + + /** + * Creates an InvoiceMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.InvoiceMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.InvoiceMessage} InvoiceMessage + */ + InvoiceMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.InvoiceMessage) + return object; + var message = new $root.proto.Message.InvoiceMessage(); + if (object.note != null) + message.note = String(object.note); + if (object.token != null) + message.token = String(object.token); + switch (object.attachmentType) { + case "IMAGE": + case 0: + message.attachmentType = 0; + break; + case "PDF": + case 1: + message.attachmentType = 1; + break; + } + if (object.attachmentMimetype != null) + message.attachmentMimetype = String(object.attachmentMimetype); + if (object.attachmentMediaKey != null) + if (typeof object.attachmentMediaKey === "string") + $util.base64.decode(object.attachmentMediaKey, message.attachmentMediaKey = $util.newBuffer($util.base64.length(object.attachmentMediaKey)), 0); + else if (object.attachmentMediaKey.length) + message.attachmentMediaKey = object.attachmentMediaKey; + if (object.attachmentMediaKeyTimestamp != null) + if ($util.Long) + (message.attachmentMediaKeyTimestamp = $util.Long.fromValue(object.attachmentMediaKeyTimestamp)).unsigned = false; + else if (typeof object.attachmentMediaKeyTimestamp === "string") + message.attachmentMediaKeyTimestamp = parseInt(object.attachmentMediaKeyTimestamp, 10); + else if (typeof object.attachmentMediaKeyTimestamp === "number") + message.attachmentMediaKeyTimestamp = object.attachmentMediaKeyTimestamp; + else if (typeof object.attachmentMediaKeyTimestamp === "object") + message.attachmentMediaKeyTimestamp = new $util.LongBits(object.attachmentMediaKeyTimestamp.low >>> 0, object.attachmentMediaKeyTimestamp.high >>> 0).toNumber(); + if (object.attachmentFileSha256 != null) + if (typeof object.attachmentFileSha256 === "string") + $util.base64.decode(object.attachmentFileSha256, message.attachmentFileSha256 = $util.newBuffer($util.base64.length(object.attachmentFileSha256)), 0); + else if (object.attachmentFileSha256.length) + message.attachmentFileSha256 = object.attachmentFileSha256; + if (object.attachmentFileEncSha256 != null) + if (typeof object.attachmentFileEncSha256 === "string") + $util.base64.decode(object.attachmentFileEncSha256, message.attachmentFileEncSha256 = $util.newBuffer($util.base64.length(object.attachmentFileEncSha256)), 0); + else if (object.attachmentFileEncSha256.length) + message.attachmentFileEncSha256 = object.attachmentFileEncSha256; + if (object.attachmentDirectPath != null) + message.attachmentDirectPath = String(object.attachmentDirectPath); + if (object.attachmentJpegThumbnail != null) + if (typeof object.attachmentJpegThumbnail === "string") + $util.base64.decode(object.attachmentJpegThumbnail, message.attachmentJpegThumbnail = $util.newBuffer($util.base64.length(object.attachmentJpegThumbnail)), 0); + else if (object.attachmentJpegThumbnail.length) + message.attachmentJpegThumbnail = object.attachmentJpegThumbnail; + return message; + }; + + /** + * Creates a plain object from an InvoiceMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.InvoiceMessage + * @static + * @param {proto.Message.InvoiceMessage} message InvoiceMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InvoiceMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.note = ""; + object.token = ""; + object.attachmentType = options.enums === String ? "IMAGE" : 0; + object.attachmentMimetype = ""; + if (options.bytes === String) + object.attachmentMediaKey = ""; + else { + object.attachmentMediaKey = []; + if (options.bytes !== Array) + object.attachmentMediaKey = $util.newBuffer(object.attachmentMediaKey); + } + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.attachmentMediaKeyTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.attachmentMediaKeyTimestamp = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.attachmentFileSha256 = ""; + else { + object.attachmentFileSha256 = []; + if (options.bytes !== Array) + object.attachmentFileSha256 = $util.newBuffer(object.attachmentFileSha256); + } + if (options.bytes === String) + object.attachmentFileEncSha256 = ""; + else { + object.attachmentFileEncSha256 = []; + if (options.bytes !== Array) + object.attachmentFileEncSha256 = $util.newBuffer(object.attachmentFileEncSha256); + } + object.attachmentDirectPath = ""; + if (options.bytes === String) + object.attachmentJpegThumbnail = ""; + else { + object.attachmentJpegThumbnail = []; + if (options.bytes !== Array) + object.attachmentJpegThumbnail = $util.newBuffer(object.attachmentJpegThumbnail); + } + } + if (message.note != null && message.hasOwnProperty("note")) + object.note = message.note; + if (message.token != null && message.hasOwnProperty("token")) + object.token = message.token; + if (message.attachmentType != null && message.hasOwnProperty("attachmentType")) + object.attachmentType = options.enums === String ? $root.proto.Message.InvoiceMessage.AttachmentType[message.attachmentType] : message.attachmentType; + if (message.attachmentMimetype != null && message.hasOwnProperty("attachmentMimetype")) + object.attachmentMimetype = message.attachmentMimetype; + if (message.attachmentMediaKey != null && message.hasOwnProperty("attachmentMediaKey")) + object.attachmentMediaKey = options.bytes === String ? $util.base64.encode(message.attachmentMediaKey, 0, message.attachmentMediaKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.attachmentMediaKey) : message.attachmentMediaKey; + if (message.attachmentMediaKeyTimestamp != null && message.hasOwnProperty("attachmentMediaKeyTimestamp")) + if (typeof message.attachmentMediaKeyTimestamp === "number") + object.attachmentMediaKeyTimestamp = options.longs === String ? String(message.attachmentMediaKeyTimestamp) : message.attachmentMediaKeyTimestamp; + else + object.attachmentMediaKeyTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.attachmentMediaKeyTimestamp) : options.longs === Number ? new $util.LongBits(message.attachmentMediaKeyTimestamp.low >>> 0, message.attachmentMediaKeyTimestamp.high >>> 0).toNumber() : message.attachmentMediaKeyTimestamp; + if (message.attachmentFileSha256 != null && message.hasOwnProperty("attachmentFileSha256")) + object.attachmentFileSha256 = options.bytes === String ? $util.base64.encode(message.attachmentFileSha256, 0, message.attachmentFileSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.attachmentFileSha256) : message.attachmentFileSha256; + if (message.attachmentFileEncSha256 != null && message.hasOwnProperty("attachmentFileEncSha256")) + object.attachmentFileEncSha256 = options.bytes === String ? $util.base64.encode(message.attachmentFileEncSha256, 0, message.attachmentFileEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.attachmentFileEncSha256) : message.attachmentFileEncSha256; + if (message.attachmentDirectPath != null && message.hasOwnProperty("attachmentDirectPath")) + object.attachmentDirectPath = message.attachmentDirectPath; + if (message.attachmentJpegThumbnail != null && message.hasOwnProperty("attachmentJpegThumbnail")) + object.attachmentJpegThumbnail = options.bytes === String ? $util.base64.encode(message.attachmentJpegThumbnail, 0, message.attachmentJpegThumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.attachmentJpegThumbnail) : message.attachmentJpegThumbnail; + return object; + }; + + /** + * Converts this InvoiceMessage to JSON. + * @function toJSON + * @memberof proto.Message.InvoiceMessage + * @instance + * @returns {Object.} JSON object + */ + InvoiceMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * AttachmentType enum. + * @name proto.Message.InvoiceMessage.AttachmentType + * @enum {number} + * @property {number} IMAGE=0 IMAGE value + * @property {number} PDF=1 PDF value + */ + InvoiceMessage.AttachmentType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IMAGE"] = 0; + values[valuesById[1] = "PDF"] = 1; + return values; + })(); + + return InvoiceMessage; + })(); + + Message.KeepInChatMessage = (function() { + + /** + * Properties of a KeepInChatMessage. + * @memberof proto.Message + * @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.Message + * @classdesc Represents a KeepInChatMessage. + * @implements IKeepInChatMessage + * @constructor + * @param {proto.Message.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.Message.KeepInChatMessage + * @instance + */ + KeepInChatMessage.prototype.key = null; + + /** + * KeepInChatMessage keepType. + * @member {proto.KeepType} keepType + * @memberof proto.Message.KeepInChatMessage + * @instance + */ + KeepInChatMessage.prototype.keepType = 0; + + /** + * KeepInChatMessage timestampMs. + * @member {number|Long} timestampMs + * @memberof proto.Message.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.Message.KeepInChatMessage + * @static + * @param {proto.Message.IKeepInChatMessage=} [properties] Properties to set + * @returns {proto.Message.KeepInChatMessage} KeepInChatMessage instance + */ + KeepInChatMessage.create = function create(properties) { + return new KeepInChatMessage(properties); + }; + + /** + * Encodes the specified KeepInChatMessage message. Does not implicitly {@link proto.Message.KeepInChatMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.KeepInChatMessage + * @static + * @param {proto.Message.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.Message.KeepInChatMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.KeepInChatMessage + * @static + * @param {proto.Message.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.Message.KeepInChatMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.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.Message.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.Message.KeepInChatMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.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.Message.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.Message.KeepInChatMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.KeepInChatMessage} KeepInChatMessage + */ + KeepInChatMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.KeepInChatMessage) + return object; + var message = new $root.proto.Message.KeepInChatMessage(); + if (object.key != null) { + if (typeof object.key !== "object") + throw TypeError(".proto.Message.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.Message.KeepInChatMessage + * @static + * @param {proto.Message.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.Message.KeepInChatMessage + * @instance + * @returns {Object.} JSON object + */ + KeepInChatMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return KeepInChatMessage; + })(); + + Message.ListMessage = (function() { + + /** + * Properties of a ListMessage. + * @memberof proto.Message + * @interface IListMessage + * @property {string|null} [title] ListMessage title + * @property {string|null} [description] ListMessage description + * @property {string|null} [buttonText] ListMessage buttonText + * @property {proto.Message.ListMessage.ListType|null} [listType] ListMessage listType + * @property {Array.|null} [sections] ListMessage sections + * @property {proto.Message.ListMessage.IProductListInfo|null} [productListInfo] ListMessage productListInfo + * @property {string|null} [footerText] ListMessage footerText + * @property {proto.IContextInfo|null} [contextInfo] ListMessage contextInfo + */ + + /** + * Constructs a new ListMessage. + * @memberof proto.Message + * @classdesc Represents a ListMessage. + * @implements IListMessage + * @constructor + * @param {proto.Message.IListMessage=} [properties] Properties to set + */ + function ListMessage(properties) { + this.sections = []; + 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]]; + } + + /** + * ListMessage title. + * @member {string} title + * @memberof proto.Message.ListMessage + * @instance + */ + ListMessage.prototype.title = ""; + + /** + * ListMessage description. + * @member {string} description + * @memberof proto.Message.ListMessage + * @instance + */ + ListMessage.prototype.description = ""; + + /** + * ListMessage buttonText. + * @member {string} buttonText + * @memberof proto.Message.ListMessage + * @instance + */ + ListMessage.prototype.buttonText = ""; + + /** + * ListMessage listType. + * @member {proto.Message.ListMessage.ListType} listType + * @memberof proto.Message.ListMessage + * @instance + */ + ListMessage.prototype.listType = 0; + + /** + * ListMessage sections. + * @member {Array.} sections + * @memberof proto.Message.ListMessage + * @instance + */ + ListMessage.prototype.sections = $util.emptyArray; + + /** + * ListMessage productListInfo. + * @member {proto.Message.ListMessage.IProductListInfo|null|undefined} productListInfo + * @memberof proto.Message.ListMessage + * @instance + */ + ListMessage.prototype.productListInfo = null; + + /** + * ListMessage footerText. + * @member {string} footerText + * @memberof proto.Message.ListMessage + * @instance + */ + ListMessage.prototype.footerText = ""; + + /** + * ListMessage contextInfo. + * @member {proto.IContextInfo|null|undefined} contextInfo + * @memberof proto.Message.ListMessage + * @instance + */ + ListMessage.prototype.contextInfo = null; + + /** + * Creates a new ListMessage instance using the specified properties. + * @function create + * @memberof proto.Message.ListMessage + * @static + * @param {proto.Message.IListMessage=} [properties] Properties to set + * @returns {proto.Message.ListMessage} ListMessage instance + */ + ListMessage.create = function create(properties) { + return new ListMessage(properties); + }; + + /** + * Encodes the specified ListMessage message. Does not implicitly {@link proto.Message.ListMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.ListMessage + * @static + * @param {proto.Message.IListMessage} message ListMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMessage.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.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.buttonText != null && Object.hasOwnProperty.call(message, "buttonText")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.buttonText); + if (message.listType != null && Object.hasOwnProperty.call(message, "listType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.listType); + if (message.sections != null && message.sections.length) + for (var i = 0; i < message.sections.length; ++i) + $root.proto.Message.ListMessage.Section.encode(message.sections[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.productListInfo != null && Object.hasOwnProperty.call(message, "productListInfo")) + $root.proto.Message.ListMessage.ProductListInfo.encode(message.productListInfo, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.footerText != null && Object.hasOwnProperty.call(message, "footerText")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.footerText); + if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) + $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ListMessage message, length delimited. Does not implicitly {@link proto.Message.ListMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.ListMessage + * @static + * @param {proto.Message.IListMessage} message ListMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.ListMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.ListMessage} ListMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMessage.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.Message.ListMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.buttonText = reader.string(); + break; + case 4: + message.listType = reader.int32(); + break; + case 5: + if (!(message.sections && message.sections.length)) + message.sections = []; + message.sections.push($root.proto.Message.ListMessage.Section.decode(reader, reader.uint32())); + break; + case 6: + message.productListInfo = $root.proto.Message.ListMessage.ProductListInfo.decode(reader, reader.uint32()); + break; + case 7: + message.footerText = reader.string(); + break; + case 8: + message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.ListMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.ListMessage} ListMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMessage message. + * @function verify + * @memberof proto.Message.ListMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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.buttonText != null && message.hasOwnProperty("buttonText")) + if (!$util.isString(message.buttonText)) + return "buttonText: string expected"; + if (message.listType != null && message.hasOwnProperty("listType")) + switch (message.listType) { + default: + return "listType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.sections != null && message.hasOwnProperty("sections")) { + if (!Array.isArray(message.sections)) + return "sections: array expected"; + for (var i = 0; i < message.sections.length; ++i) { + var error = $root.proto.Message.ListMessage.Section.verify(message.sections[i]); + if (error) + return "sections." + error; + } + } + if (message.productListInfo != null && message.hasOwnProperty("productListInfo")) { + var error = $root.proto.Message.ListMessage.ProductListInfo.verify(message.productListInfo); + if (error) + return "productListInfo." + error; + } + if (message.footerText != null && message.hasOwnProperty("footerText")) + if (!$util.isString(message.footerText)) + return "footerText: string expected"; + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } + return null; + }; + + /** + * Creates a ListMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.ListMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.ListMessage} ListMessage + */ + ListMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.ListMessage) + return object; + var message = new $root.proto.Message.ListMessage(); + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + if (object.buttonText != null) + message.buttonText = String(object.buttonText); + switch (object.listType) { + case "UNKNOWN": + case 0: + message.listType = 0; + break; + case "SINGLE_SELECT": + case 1: + message.listType = 1; + break; + case "PRODUCT_LIST": + case 2: + message.listType = 2; + break; + } + if (object.sections) { + if (!Array.isArray(object.sections)) + throw TypeError(".proto.Message.ListMessage.sections: array expected"); + message.sections = []; + for (var i = 0; i < object.sections.length; ++i) { + if (typeof object.sections[i] !== "object") + throw TypeError(".proto.Message.ListMessage.sections: object expected"); + message.sections[i] = $root.proto.Message.ListMessage.Section.fromObject(object.sections[i]); + } + } + if (object.productListInfo != null) { + if (typeof object.productListInfo !== "object") + throw TypeError(".proto.Message.ListMessage.productListInfo: object expected"); + message.productListInfo = $root.proto.Message.ListMessage.ProductListInfo.fromObject(object.productListInfo); + } + if (object.footerText != null) + message.footerText = String(object.footerText); + if (object.contextInfo != null) { + if (typeof object.contextInfo !== "object") + throw TypeError(".proto.Message.ListMessage.contextInfo: object expected"); + message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); + } + return message; + }; + + /** + * Creates a plain object from a ListMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.ListMessage + * @static + * @param {proto.Message.ListMessage} message ListMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.sections = []; + if (options.defaults) { + object.title = ""; + object.description = ""; + object.buttonText = ""; + object.listType = options.enums === String ? "UNKNOWN" : 0; + object.productListInfo = null; + object.footerText = ""; + object.contextInfo = null; + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.buttonText != null && message.hasOwnProperty("buttonText")) + object.buttonText = message.buttonText; + if (message.listType != null && message.hasOwnProperty("listType")) + object.listType = options.enums === String ? $root.proto.Message.ListMessage.ListType[message.listType] : message.listType; + if (message.sections && message.sections.length) { + object.sections = []; + for (var j = 0; j < message.sections.length; ++j) + object.sections[j] = $root.proto.Message.ListMessage.Section.toObject(message.sections[j], options); + } + if (message.productListInfo != null && message.hasOwnProperty("productListInfo")) + object.productListInfo = $root.proto.Message.ListMessage.ProductListInfo.toObject(message.productListInfo, options); + if (message.footerText != null && message.hasOwnProperty("footerText")) + object.footerText = message.footerText; + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) + object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + return object; + }; + + /** + * Converts this ListMessage to JSON. + * @function toJSON + * @memberof proto.Message.ListMessage + * @instance + * @returns {Object.} JSON object + */ + ListMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * ListType enum. + * @name proto.Message.ListMessage.ListType + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} SINGLE_SELECT=1 SINGLE_SELECT value + * @property {number} PRODUCT_LIST=2 PRODUCT_LIST value + */ + ListMessage.ListType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "SINGLE_SELECT"] = 1; + values[valuesById[2] = "PRODUCT_LIST"] = 2; + return values; + })(); + + ListMessage.ProductListHeaderImage = (function() { + + /** + * Properties of a ProductListHeaderImage. + * @memberof proto.Message.ListMessage + * @interface IProductListHeaderImage + * @property {string|null} [productId] ProductListHeaderImage productId + * @property {Uint8Array|null} [jpegThumbnail] ProductListHeaderImage jpegThumbnail + */ + + /** + * Constructs a new ProductListHeaderImage. + * @memberof proto.Message.ListMessage + * @classdesc Represents a ProductListHeaderImage. + * @implements IProductListHeaderImage + * @constructor + * @param {proto.Message.ListMessage.IProductListHeaderImage=} [properties] Properties to set + */ + function ProductListHeaderImage(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]]; + } + + /** + * ProductListHeaderImage productId. + * @member {string} productId + * @memberof proto.Message.ListMessage.ProductListHeaderImage + * @instance + */ + ProductListHeaderImage.prototype.productId = ""; + + /** + * ProductListHeaderImage jpegThumbnail. + * @member {Uint8Array} jpegThumbnail + * @memberof proto.Message.ListMessage.ProductListHeaderImage + * @instance + */ + ProductListHeaderImage.prototype.jpegThumbnail = $util.newBuffer([]); + + /** + * Creates a new ProductListHeaderImage instance using the specified properties. + * @function create + * @memberof proto.Message.ListMessage.ProductListHeaderImage + * @static + * @param {proto.Message.ListMessage.IProductListHeaderImage=} [properties] Properties to set + * @returns {proto.Message.ListMessage.ProductListHeaderImage} ProductListHeaderImage instance + */ + ProductListHeaderImage.create = function create(properties) { + return new ProductListHeaderImage(properties); + }; + + /** + * Encodes the specified ProductListHeaderImage message. Does not implicitly {@link proto.Message.ListMessage.ProductListHeaderImage.verify|verify} messages. + * @function encode + * @memberof proto.Message.ListMessage.ProductListHeaderImage + * @static + * @param {proto.Message.ListMessage.IProductListHeaderImage} message ProductListHeaderImage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProductListHeaderImage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.productId != null && Object.hasOwnProperty.call(message, "productId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.productId); + if (message.jpegThumbnail != null && Object.hasOwnProperty.call(message, "jpegThumbnail")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.jpegThumbnail); + return writer; + }; + + /** + * Encodes the specified ProductListHeaderImage message, length delimited. Does not implicitly {@link proto.Message.ListMessage.ProductListHeaderImage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.ListMessage.ProductListHeaderImage + * @static + * @param {proto.Message.ListMessage.IProductListHeaderImage} message ProductListHeaderImage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProductListHeaderImage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProductListHeaderImage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.ListMessage.ProductListHeaderImage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.ListMessage.ProductListHeaderImage} ProductListHeaderImage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProductListHeaderImage.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.Message.ListMessage.ProductListHeaderImage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.productId = reader.string(); + break; + case 2: + message.jpegThumbnail = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProductListHeaderImage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.ListMessage.ProductListHeaderImage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.ListMessage.ProductListHeaderImage} ProductListHeaderImage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProductListHeaderImage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProductListHeaderImage message. + * @function verify + * @memberof proto.Message.ListMessage.ProductListHeaderImage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProductListHeaderImage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.productId != null && message.hasOwnProperty("productId")) + if (!$util.isString(message.productId)) + return "productId: string expected"; + if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) + if (!(message.jpegThumbnail && typeof message.jpegThumbnail.length === "number" || $util.isString(message.jpegThumbnail))) + return "jpegThumbnail: buffer expected"; + return null; + }; + + /** + * Creates a ProductListHeaderImage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.ListMessage.ProductListHeaderImage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.ListMessage.ProductListHeaderImage} ProductListHeaderImage + */ + ProductListHeaderImage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.ListMessage.ProductListHeaderImage) + return object; + var message = new $root.proto.Message.ListMessage.ProductListHeaderImage(); + if (object.productId != null) + message.productId = String(object.productId); + 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; + return message; + }; + + /** + * Creates a plain object from a ProductListHeaderImage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.ListMessage.ProductListHeaderImage + * @static + * @param {proto.Message.ListMessage.ProductListHeaderImage} message ProductListHeaderImage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProductListHeaderImage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.productId = ""; + if (options.bytes === String) + object.jpegThumbnail = ""; + else { + object.jpegThumbnail = []; + if (options.bytes !== Array) + object.jpegThumbnail = $util.newBuffer(object.jpegThumbnail); + } + } + if (message.productId != null && message.hasOwnProperty("productId")) + object.productId = message.productId; + 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; + return object; + }; + + /** + * Converts this ProductListHeaderImage to JSON. + * @function toJSON + * @memberof proto.Message.ListMessage.ProductListHeaderImage + * @instance + * @returns {Object.} JSON object + */ + ProductListHeaderImage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ProductListHeaderImage; + })(); + + ListMessage.ProductListInfo = (function() { + + /** + * Properties of a ProductListInfo. + * @memberof proto.Message.ListMessage + * @interface IProductListInfo + * @property {Array.|null} [productSections] ProductListInfo productSections + * @property {proto.Message.ListMessage.IProductListHeaderImage|null} [headerImage] ProductListInfo headerImage + * @property {string|null} [businessOwnerJid] ProductListInfo businessOwnerJid + */ + + /** + * Constructs a new ProductListInfo. + * @memberof proto.Message.ListMessage + * @classdesc Represents a ProductListInfo. + * @implements IProductListInfo + * @constructor + * @param {proto.Message.ListMessage.IProductListInfo=} [properties] Properties to set + */ + function ProductListInfo(properties) { + this.productSections = []; + 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]]; + } + + /** + * ProductListInfo productSections. + * @member {Array.} productSections + * @memberof proto.Message.ListMessage.ProductListInfo + * @instance + */ + ProductListInfo.prototype.productSections = $util.emptyArray; + + /** + * ProductListInfo headerImage. + * @member {proto.Message.ListMessage.IProductListHeaderImage|null|undefined} headerImage + * @memberof proto.Message.ListMessage.ProductListInfo + * @instance + */ + ProductListInfo.prototype.headerImage = null; + + /** + * ProductListInfo businessOwnerJid. + * @member {string} businessOwnerJid + * @memberof proto.Message.ListMessage.ProductListInfo + * @instance + */ + ProductListInfo.prototype.businessOwnerJid = ""; + + /** + * Creates a new ProductListInfo instance using the specified properties. + * @function create + * @memberof proto.Message.ListMessage.ProductListInfo + * @static + * @param {proto.Message.ListMessage.IProductListInfo=} [properties] Properties to set + * @returns {proto.Message.ListMessage.ProductListInfo} ProductListInfo instance + */ + ProductListInfo.create = function create(properties) { + return new ProductListInfo(properties); + }; + + /** + * Encodes the specified ProductListInfo message. Does not implicitly {@link proto.Message.ListMessage.ProductListInfo.verify|verify} messages. + * @function encode + * @memberof proto.Message.ListMessage.ProductListInfo + * @static + * @param {proto.Message.ListMessage.IProductListInfo} message ProductListInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProductListInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.productSections != null && message.productSections.length) + for (var i = 0; i < message.productSections.length; ++i) + $root.proto.Message.ListMessage.ProductSection.encode(message.productSections[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.headerImage != null && Object.hasOwnProperty.call(message, "headerImage")) + $root.proto.Message.ListMessage.ProductListHeaderImage.encode(message.headerImage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.businessOwnerJid != null && Object.hasOwnProperty.call(message, "businessOwnerJid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.businessOwnerJid); + return writer; + }; + + /** + * Encodes the specified ProductListInfo message, length delimited. Does not implicitly {@link proto.Message.ListMessage.ProductListInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.ListMessage.ProductListInfo + * @static + * @param {proto.Message.ListMessage.IProductListInfo} message ProductListInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProductListInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProductListInfo message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.ListMessage.ProductListInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.ListMessage.ProductListInfo} ProductListInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProductListInfo.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.Message.ListMessage.ProductListInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.productSections && message.productSections.length)) + message.productSections = []; + message.productSections.push($root.proto.Message.ListMessage.ProductSection.decode(reader, reader.uint32())); + break; + case 2: + message.headerImage = $root.proto.Message.ListMessage.ProductListHeaderImage.decode(reader, reader.uint32()); + break; + case 3: + message.businessOwnerJid = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProductListInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.ListMessage.ProductListInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.ListMessage.ProductListInfo} ProductListInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProductListInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProductListInfo message. + * @function verify + * @memberof proto.Message.ListMessage.ProductListInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProductListInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.productSections != null && message.hasOwnProperty("productSections")) { + if (!Array.isArray(message.productSections)) + return "productSections: array expected"; + for (var i = 0; i < message.productSections.length; ++i) { + var error = $root.proto.Message.ListMessage.ProductSection.verify(message.productSections[i]); + if (error) + return "productSections." + error; + } + } + if (message.headerImage != null && message.hasOwnProperty("headerImage")) { + var error = $root.proto.Message.ListMessage.ProductListHeaderImage.verify(message.headerImage); + if (error) + return "headerImage." + error; + } + if (message.businessOwnerJid != null && message.hasOwnProperty("businessOwnerJid")) + if (!$util.isString(message.businessOwnerJid)) + return "businessOwnerJid: string expected"; + return null; + }; + + /** + * Creates a ProductListInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.ListMessage.ProductListInfo + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.ListMessage.ProductListInfo} ProductListInfo + */ + ProductListInfo.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.ListMessage.ProductListInfo) + return object; + var message = new $root.proto.Message.ListMessage.ProductListInfo(); + if (object.productSections) { + if (!Array.isArray(object.productSections)) + throw TypeError(".proto.Message.ListMessage.ProductListInfo.productSections: array expected"); + message.productSections = []; + for (var i = 0; i < object.productSections.length; ++i) { + if (typeof object.productSections[i] !== "object") + throw TypeError(".proto.Message.ListMessage.ProductListInfo.productSections: object expected"); + message.productSections[i] = $root.proto.Message.ListMessage.ProductSection.fromObject(object.productSections[i]); + } + } + if (object.headerImage != null) { + if (typeof object.headerImage !== "object") + throw TypeError(".proto.Message.ListMessage.ProductListInfo.headerImage: object expected"); + message.headerImage = $root.proto.Message.ListMessage.ProductListHeaderImage.fromObject(object.headerImage); + } + if (object.businessOwnerJid != null) + message.businessOwnerJid = String(object.businessOwnerJid); + return message; + }; + + /** + * Creates a plain object from a ProductListInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.ListMessage.ProductListInfo + * @static + * @param {proto.Message.ListMessage.ProductListInfo} message ProductListInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProductListInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.productSections = []; + if (options.defaults) { + object.headerImage = null; + object.businessOwnerJid = ""; + } + if (message.productSections && message.productSections.length) { + object.productSections = []; + for (var j = 0; j < message.productSections.length; ++j) + object.productSections[j] = $root.proto.Message.ListMessage.ProductSection.toObject(message.productSections[j], options); + } + if (message.headerImage != null && message.hasOwnProperty("headerImage")) + object.headerImage = $root.proto.Message.ListMessage.ProductListHeaderImage.toObject(message.headerImage, options); + if (message.businessOwnerJid != null && message.hasOwnProperty("businessOwnerJid")) + object.businessOwnerJid = message.businessOwnerJid; + return object; + }; + + /** + * Converts this ProductListInfo to JSON. + * @function toJSON + * @memberof proto.Message.ListMessage.ProductListInfo + * @instance + * @returns {Object.} JSON object + */ + ProductListInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ProductListInfo; + })(); + + ListMessage.ProductSection = (function() { + + /** + * Properties of a ProductSection. + * @memberof proto.Message.ListMessage + * @interface IProductSection + * @property {string|null} [title] ProductSection title + * @property {Array.|null} [products] ProductSection products + */ + + /** + * Constructs a new ProductSection. + * @memberof proto.Message.ListMessage + * @classdesc Represents a ProductSection. + * @implements IProductSection + * @constructor + * @param {proto.Message.ListMessage.IProductSection=} [properties] Properties to set + */ + function ProductSection(properties) { + this.products = []; + 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]]; + } + + /** + * ProductSection title. + * @member {string} title + * @memberof proto.Message.ListMessage.ProductSection + * @instance + */ + ProductSection.prototype.title = ""; + + /** + * ProductSection products. + * @member {Array.} products + * @memberof proto.Message.ListMessage.ProductSection + * @instance + */ + ProductSection.prototype.products = $util.emptyArray; + + /** + * Creates a new ProductSection instance using the specified properties. + * @function create + * @memberof proto.Message.ListMessage.ProductSection + * @static + * @param {proto.Message.ListMessage.IProductSection=} [properties] Properties to set + * @returns {proto.Message.ListMessage.ProductSection} ProductSection instance + */ + ProductSection.create = function create(properties) { + return new ProductSection(properties); + }; + + /** + * Encodes the specified ProductSection message. Does not implicitly {@link proto.Message.ListMessage.ProductSection.verify|verify} messages. + * @function encode + * @memberof proto.Message.ListMessage.ProductSection + * @static + * @param {proto.Message.ListMessage.IProductSection} message ProductSection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProductSection.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.products != null && message.products.length) + for (var i = 0; i < message.products.length; ++i) + $root.proto.Message.ListMessage.Product.encode(message.products[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ProductSection message, length delimited. Does not implicitly {@link proto.Message.ListMessage.ProductSection.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.ListMessage.ProductSection + * @static + * @param {proto.Message.ListMessage.IProductSection} message ProductSection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProductSection.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProductSection message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.ListMessage.ProductSection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.ListMessage.ProductSection} ProductSection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProductSection.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.Message.ListMessage.ProductSection(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + if (!(message.products && message.products.length)) + message.products = []; + message.products.push($root.proto.Message.ListMessage.Product.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProductSection message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.ListMessage.ProductSection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.ListMessage.ProductSection} ProductSection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProductSection.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProductSection message. + * @function verify + * @memberof proto.Message.ListMessage.ProductSection + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProductSection.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.products != null && message.hasOwnProperty("products")) { + if (!Array.isArray(message.products)) + return "products: array expected"; + for (var i = 0; i < message.products.length; ++i) { + var error = $root.proto.Message.ListMessage.Product.verify(message.products[i]); + if (error) + return "products." + error; + } + } + return null; + }; + + /** + * Creates a ProductSection message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.ListMessage.ProductSection + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.ListMessage.ProductSection} ProductSection + */ + ProductSection.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.ListMessage.ProductSection) + return object; + var message = new $root.proto.Message.ListMessage.ProductSection(); + if (object.title != null) + message.title = String(object.title); + if (object.products) { + if (!Array.isArray(object.products)) + throw TypeError(".proto.Message.ListMessage.ProductSection.products: array expected"); + message.products = []; + for (var i = 0; i < object.products.length; ++i) { + if (typeof object.products[i] !== "object") + throw TypeError(".proto.Message.ListMessage.ProductSection.products: object expected"); + message.products[i] = $root.proto.Message.ListMessage.Product.fromObject(object.products[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ProductSection message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.ListMessage.ProductSection + * @static + * @param {proto.Message.ListMessage.ProductSection} message ProductSection + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProductSection.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.products = []; + if (options.defaults) + object.title = ""; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.products && message.products.length) { + object.products = []; + for (var j = 0; j < message.products.length; ++j) + object.products[j] = $root.proto.Message.ListMessage.Product.toObject(message.products[j], options); + } + return object; + }; + + /** + * Converts this ProductSection to JSON. + * @function toJSON + * @memberof proto.Message.ListMessage.ProductSection + * @instance + * @returns {Object.} JSON object + */ + ProductSection.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ProductSection; + })(); + + ListMessage.Product = (function() { + + /** + * Properties of a Product. + * @memberof proto.Message.ListMessage + * @interface IProduct + * @property {string|null} [productId] Product productId + */ + + /** + * Constructs a new Product. + * @memberof proto.Message.ListMessage + * @classdesc Represents a Product. + * @implements IProduct + * @constructor + * @param {proto.Message.ListMessage.IProduct=} [properties] Properties to set + */ + function Product(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]]; + } + + /** + * Product productId. + * @member {string} productId + * @memberof proto.Message.ListMessage.Product + * @instance + */ + Product.prototype.productId = ""; + + /** + * Creates a new Product instance using the specified properties. + * @function create + * @memberof proto.Message.ListMessage.Product + * @static + * @param {proto.Message.ListMessage.IProduct=} [properties] Properties to set + * @returns {proto.Message.ListMessage.Product} Product instance + */ + Product.create = function create(properties) { + return new Product(properties); + }; + + /** + * Encodes the specified Product message. Does not implicitly {@link proto.Message.ListMessage.Product.verify|verify} messages. + * @function encode + * @memberof proto.Message.ListMessage.Product + * @static + * @param {proto.Message.ListMessage.IProduct} message Product message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Product.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.productId != null && Object.hasOwnProperty.call(message, "productId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.productId); + return writer; + }; + + /** + * Encodes the specified Product message, length delimited. Does not implicitly {@link proto.Message.ListMessage.Product.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.ListMessage.Product + * @static + * @param {proto.Message.ListMessage.IProduct} message Product message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Product.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Product message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.ListMessage.Product + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.ListMessage.Product} Product + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Product.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.Message.ListMessage.Product(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.productId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Product message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.ListMessage.Product + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.ListMessage.Product} Product + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Product.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Product message. + * @function verify + * @memberof proto.Message.ListMessage.Product + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Product.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.productId != null && message.hasOwnProperty("productId")) + if (!$util.isString(message.productId)) + return "productId: string expected"; + return null; + }; + + /** + * Creates a Product message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.ListMessage.Product + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.ListMessage.Product} Product + */ + Product.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.ListMessage.Product) + return object; + var message = new $root.proto.Message.ListMessage.Product(); + if (object.productId != null) + message.productId = String(object.productId); + return message; + }; + + /** + * Creates a plain object from a Product message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.ListMessage.Product + * @static + * @param {proto.Message.ListMessage.Product} message Product + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Product.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.productId = ""; + if (message.productId != null && message.hasOwnProperty("productId")) + object.productId = message.productId; + return object; + }; + + /** + * Converts this Product to JSON. + * @function toJSON + * @memberof proto.Message.ListMessage.Product + * @instance + * @returns {Object.} JSON object + */ + Product.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Product; + })(); + + ListMessage.Row = (function() { + + /** + * Properties of a Row. + * @memberof proto.Message.ListMessage + * @interface IRow + * @property {string|null} [title] Row title + * @property {string|null} [description] Row description + * @property {string|null} [rowId] Row rowId + */ + + /** + * Constructs a new Row. + * @memberof proto.Message.ListMessage + * @classdesc Represents a Row. + * @implements IRow + * @constructor + * @param {proto.Message.ListMessage.IRow=} [properties] Properties to set + */ + function Row(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]]; + } + + /** + * Row title. + * @member {string} title + * @memberof proto.Message.ListMessage.Row + * @instance + */ + Row.prototype.title = ""; + + /** + * Row description. + * @member {string} description + * @memberof proto.Message.ListMessage.Row + * @instance + */ + Row.prototype.description = ""; + + /** + * Row rowId. + * @member {string} rowId + * @memberof proto.Message.ListMessage.Row + * @instance + */ + Row.prototype.rowId = ""; + + /** + * Creates a new Row instance using the specified properties. + * @function create + * @memberof proto.Message.ListMessage.Row + * @static + * @param {proto.Message.ListMessage.IRow=} [properties] Properties to set + * @returns {proto.Message.ListMessage.Row} Row instance + */ + Row.create = function create(properties) { + return new Row(properties); + }; + + /** + * Encodes the specified Row message. Does not implicitly {@link proto.Message.ListMessage.Row.verify|verify} messages. + * @function encode + * @memberof proto.Message.ListMessage.Row + * @static + * @param {proto.Message.ListMessage.IRow} message Row message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Row.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.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.rowId != null && Object.hasOwnProperty.call(message, "rowId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.rowId); + return writer; + }; + + /** + * Encodes the specified Row message, length delimited. Does not implicitly {@link proto.Message.ListMessage.Row.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.ListMessage.Row + * @static + * @param {proto.Message.ListMessage.IRow} message Row message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Row.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Row message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.ListMessage.Row + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.ListMessage.Row} Row + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Row.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.Message.ListMessage.Row(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.rowId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Row message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.ListMessage.Row + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.ListMessage.Row} Row + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Row.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Row message. + * @function verify + * @memberof proto.Message.ListMessage.Row + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Row.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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.rowId != null && message.hasOwnProperty("rowId")) + if (!$util.isString(message.rowId)) + return "rowId: string expected"; + return null; + }; + + /** + * Creates a Row message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.ListMessage.Row + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.ListMessage.Row} Row + */ + Row.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.ListMessage.Row) + return object; + var message = new $root.proto.Message.ListMessage.Row(); + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + if (object.rowId != null) + message.rowId = String(object.rowId); + return message; + }; + + /** + * Creates a plain object from a Row message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.ListMessage.Row + * @static + * @param {proto.Message.ListMessage.Row} message Row + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Row.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.title = ""; + object.description = ""; + object.rowId = ""; + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.rowId != null && message.hasOwnProperty("rowId")) + object.rowId = message.rowId; + return object; + }; + + /** + * Converts this Row to JSON. + * @function toJSON + * @memberof proto.Message.ListMessage.Row + * @instance + * @returns {Object.} JSON object + */ + Row.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Row; + })(); + + ListMessage.Section = (function() { + + /** + * Properties of a Section. + * @memberof proto.Message.ListMessage + * @interface ISection + * @property {string|null} [title] Section title + * @property {Array.|null} [rows] Section rows + */ + + /** + * Constructs a new Section. + * @memberof proto.Message.ListMessage + * @classdesc Represents a Section. + * @implements ISection + * @constructor + * @param {proto.Message.ListMessage.ISection=} [properties] Properties to set + */ + function Section(properties) { + this.rows = []; + 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]]; + } + + /** + * Section title. + * @member {string} title + * @memberof proto.Message.ListMessage.Section + * @instance + */ + Section.prototype.title = ""; + + /** + * Section rows. + * @member {Array.} rows + * @memberof proto.Message.ListMessage.Section + * @instance + */ + Section.prototype.rows = $util.emptyArray; + + /** + * Creates a new Section instance using the specified properties. + * @function create + * @memberof proto.Message.ListMessage.Section + * @static + * @param {proto.Message.ListMessage.ISection=} [properties] Properties to set + * @returns {proto.Message.ListMessage.Section} Section instance + */ + Section.create = function create(properties) { + return new Section(properties); + }; + + /** + * Encodes the specified Section message. Does not implicitly {@link proto.Message.ListMessage.Section.verify|verify} messages. + * @function encode + * @memberof proto.Message.ListMessage.Section + * @static + * @param {proto.Message.ListMessage.ISection} message Section message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Section.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.rows != null && message.rows.length) + for (var i = 0; i < message.rows.length; ++i) + $root.proto.Message.ListMessage.Row.encode(message.rows[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Section message, length delimited. Does not implicitly {@link proto.Message.ListMessage.Section.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.ListMessage.Section + * @static + * @param {proto.Message.ListMessage.ISection} message Section message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Section.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Section message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.ListMessage.Section + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.ListMessage.Section} Section + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Section.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.Message.ListMessage.Section(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + if (!(message.rows && message.rows.length)) + message.rows = []; + message.rows.push($root.proto.Message.ListMessage.Row.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Section message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.ListMessage.Section + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.ListMessage.Section} Section + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Section.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Section message. + * @function verify + * @memberof proto.Message.ListMessage.Section + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Section.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.rows != null && message.hasOwnProperty("rows")) { + if (!Array.isArray(message.rows)) + return "rows: array expected"; + for (var i = 0; i < message.rows.length; ++i) { + var error = $root.proto.Message.ListMessage.Row.verify(message.rows[i]); + if (error) + return "rows." + error; + } + } + return null; + }; + + /** + * Creates a Section message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.ListMessage.Section + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.ListMessage.Section} Section + */ + Section.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.ListMessage.Section) + return object; + var message = new $root.proto.Message.ListMessage.Section(); + if (object.title != null) + message.title = String(object.title); + if (object.rows) { + if (!Array.isArray(object.rows)) + throw TypeError(".proto.Message.ListMessage.Section.rows: array expected"); + message.rows = []; + for (var i = 0; i < object.rows.length; ++i) { + if (typeof object.rows[i] !== "object") + throw TypeError(".proto.Message.ListMessage.Section.rows: object expected"); + message.rows[i] = $root.proto.Message.ListMessage.Row.fromObject(object.rows[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Section message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.ListMessage.Section + * @static + * @param {proto.Message.ListMessage.Section} message Section + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Section.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rows = []; + if (options.defaults) + object.title = ""; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.rows && message.rows.length) { + object.rows = []; + for (var j = 0; j < message.rows.length; ++j) + object.rows[j] = $root.proto.Message.ListMessage.Row.toObject(message.rows[j], options); + } + return object; + }; + + /** + * Converts this Section to JSON. + * @function toJSON + * @memberof proto.Message.ListMessage.Section + * @instance + * @returns {Object.} JSON object + */ + Section.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Section; + })(); + + return ListMessage; + })(); + + Message.ListResponseMessage = (function() { + + /** + * Properties of a ListResponseMessage. + * @memberof proto.Message + * @interface IListResponseMessage + * @property {string|null} [title] ListResponseMessage title + * @property {proto.Message.ListResponseMessage.ListType|null} [listType] ListResponseMessage listType + * @property {proto.Message.ListResponseMessage.ISingleSelectReply|null} [singleSelectReply] ListResponseMessage singleSelectReply + * @property {proto.IContextInfo|null} [contextInfo] ListResponseMessage contextInfo + * @property {string|null} [description] ListResponseMessage description + */ + + /** + * Constructs a new ListResponseMessage. + * @memberof proto.Message + * @classdesc Represents a ListResponseMessage. + * @implements IListResponseMessage + * @constructor + * @param {proto.Message.IListResponseMessage=} [properties] Properties to set + */ + function ListResponseMessage(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]]; + } + + /** + * ListResponseMessage title. + * @member {string} title + * @memberof proto.Message.ListResponseMessage + * @instance + */ + ListResponseMessage.prototype.title = ""; + + /** + * ListResponseMessage listType. + * @member {proto.Message.ListResponseMessage.ListType} listType + * @memberof proto.Message.ListResponseMessage + * @instance + */ + ListResponseMessage.prototype.listType = 0; + + /** + * ListResponseMessage singleSelectReply. + * @member {proto.Message.ListResponseMessage.ISingleSelectReply|null|undefined} singleSelectReply + * @memberof proto.Message.ListResponseMessage + * @instance + */ + ListResponseMessage.prototype.singleSelectReply = null; + + /** + * ListResponseMessage contextInfo. + * @member {proto.IContextInfo|null|undefined} contextInfo + * @memberof proto.Message.ListResponseMessage + * @instance + */ + ListResponseMessage.prototype.contextInfo = null; + + /** + * ListResponseMessage description. + * @member {string} description + * @memberof proto.Message.ListResponseMessage + * @instance + */ + ListResponseMessage.prototype.description = ""; + + /** + * Creates a new ListResponseMessage instance using the specified properties. + * @function create + * @memberof proto.Message.ListResponseMessage + * @static + * @param {proto.Message.IListResponseMessage=} [properties] Properties to set + * @returns {proto.Message.ListResponseMessage} ListResponseMessage instance + */ + ListResponseMessage.create = function create(properties) { + return new ListResponseMessage(properties); + }; + + /** + * Encodes the specified ListResponseMessage message. Does not implicitly {@link proto.Message.ListResponseMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.ListResponseMessage + * @static + * @param {proto.Message.IListResponseMessage} message ListResponseMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListResponseMessage.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.listType != null && Object.hasOwnProperty.call(message, "listType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.listType); + if (message.singleSelectReply != null && Object.hasOwnProperty.call(message, "singleSelectReply")) + $root.proto.Message.ListResponseMessage.SingleSelectReply.encode(message.singleSelectReply, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) + $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); + return writer; + }; + + /** + * Encodes the specified ListResponseMessage message, length delimited. Does not implicitly {@link proto.Message.ListResponseMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.ListResponseMessage + * @static + * @param {proto.Message.IListResponseMessage} message ListResponseMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListResponseMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.ListResponseMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.ListResponseMessage} ListResponseMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListResponseMessage.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.Message.ListResponseMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.listType = reader.int32(); + break; + case 3: + message.singleSelectReply = $root.proto.Message.ListResponseMessage.SingleSelectReply.decode(reader, reader.uint32()); + break; + case 4: + message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); + break; + case 5: + message.description = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListResponseMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.ListResponseMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.ListResponseMessage} ListResponseMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListResponseMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListResponseMessage message. + * @function verify + * @memberof proto.Message.ListResponseMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListResponseMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.listType != null && message.hasOwnProperty("listType")) + switch (message.listType) { + default: + return "listType: enum value expected"; + case 0: + case 1: + break; + } + if (message.singleSelectReply != null && message.hasOwnProperty("singleSelectReply")) { + var error = $root.proto.Message.ListResponseMessage.SingleSelectReply.verify(message.singleSelectReply); + if (error) + return "singleSelectReply." + error; + } + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates a ListResponseMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.ListResponseMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.ListResponseMessage} ListResponseMessage + */ + ListResponseMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.ListResponseMessage) + return object; + var message = new $root.proto.Message.ListResponseMessage(); + if (object.title != null) + message.title = String(object.title); + switch (object.listType) { + case "UNKNOWN": + case 0: + message.listType = 0; + break; + case "SINGLE_SELECT": + case 1: + message.listType = 1; + break; + } + if (object.singleSelectReply != null) { + if (typeof object.singleSelectReply !== "object") + throw TypeError(".proto.Message.ListResponseMessage.singleSelectReply: object expected"); + message.singleSelectReply = $root.proto.Message.ListResponseMessage.SingleSelectReply.fromObject(object.singleSelectReply); + } + if (object.contextInfo != null) { + if (typeof object.contextInfo !== "object") + throw TypeError(".proto.Message.ListResponseMessage.contextInfo: object expected"); + message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); + } + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from a ListResponseMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.ListResponseMessage + * @static + * @param {proto.Message.ListResponseMessage} message ListResponseMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListResponseMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.title = ""; + object.listType = options.enums === String ? "UNKNOWN" : 0; + object.singleSelectReply = null; + object.contextInfo = null; + object.description = ""; + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.listType != null && message.hasOwnProperty("listType")) + object.listType = options.enums === String ? $root.proto.Message.ListResponseMessage.ListType[message.listType] : message.listType; + if (message.singleSelectReply != null && message.hasOwnProperty("singleSelectReply")) + object.singleSelectReply = $root.proto.Message.ListResponseMessage.SingleSelectReply.toObject(message.singleSelectReply, options); + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) + object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + return object; + }; + + /** + * Converts this ListResponseMessage to JSON. + * @function toJSON + * @memberof proto.Message.ListResponseMessage + * @instance + * @returns {Object.} JSON object + */ + ListResponseMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * ListType enum. + * @name proto.Message.ListResponseMessage.ListType + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} SINGLE_SELECT=1 SINGLE_SELECT value + */ + ListResponseMessage.ListType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "SINGLE_SELECT"] = 1; + return values; + })(); + + ListResponseMessage.SingleSelectReply = (function() { + + /** + * Properties of a SingleSelectReply. + * @memberof proto.Message.ListResponseMessage + * @interface ISingleSelectReply + * @property {string|null} [selectedRowId] SingleSelectReply selectedRowId + */ + + /** + * Constructs a new SingleSelectReply. + * @memberof proto.Message.ListResponseMessage + * @classdesc Represents a SingleSelectReply. + * @implements ISingleSelectReply + * @constructor + * @param {proto.Message.ListResponseMessage.ISingleSelectReply=} [properties] Properties to set + */ + function SingleSelectReply(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]]; + } + + /** + * SingleSelectReply selectedRowId. + * @member {string} selectedRowId + * @memberof proto.Message.ListResponseMessage.SingleSelectReply + * @instance + */ + SingleSelectReply.prototype.selectedRowId = ""; + + /** + * Creates a new SingleSelectReply instance using the specified properties. + * @function create + * @memberof proto.Message.ListResponseMessage.SingleSelectReply + * @static + * @param {proto.Message.ListResponseMessage.ISingleSelectReply=} [properties] Properties to set + * @returns {proto.Message.ListResponseMessage.SingleSelectReply} SingleSelectReply instance + */ + SingleSelectReply.create = function create(properties) { + return new SingleSelectReply(properties); + }; + + /** + * Encodes the specified SingleSelectReply message. Does not implicitly {@link proto.Message.ListResponseMessage.SingleSelectReply.verify|verify} messages. + * @function encode + * @memberof proto.Message.ListResponseMessage.SingleSelectReply + * @static + * @param {proto.Message.ListResponseMessage.ISingleSelectReply} message SingleSelectReply message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SingleSelectReply.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selectedRowId != null && Object.hasOwnProperty.call(message, "selectedRowId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selectedRowId); + return writer; + }; + + /** + * Encodes the specified SingleSelectReply message, length delimited. Does not implicitly {@link proto.Message.ListResponseMessage.SingleSelectReply.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.ListResponseMessage.SingleSelectReply + * @static + * @param {proto.Message.ListResponseMessage.ISingleSelectReply} message SingleSelectReply message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SingleSelectReply.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SingleSelectReply message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.ListResponseMessage.SingleSelectReply + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.ListResponseMessage.SingleSelectReply} SingleSelectReply + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SingleSelectReply.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.Message.ListResponseMessage.SingleSelectReply(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.selectedRowId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SingleSelectReply message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.ListResponseMessage.SingleSelectReply + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.ListResponseMessage.SingleSelectReply} SingleSelectReply + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SingleSelectReply.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SingleSelectReply message. + * @function verify + * @memberof proto.Message.ListResponseMessage.SingleSelectReply + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SingleSelectReply.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.selectedRowId != null && message.hasOwnProperty("selectedRowId")) + if (!$util.isString(message.selectedRowId)) + return "selectedRowId: string expected"; + return null; + }; + + /** + * Creates a SingleSelectReply message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.ListResponseMessage.SingleSelectReply + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.ListResponseMessage.SingleSelectReply} SingleSelectReply + */ + SingleSelectReply.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.ListResponseMessage.SingleSelectReply) + return object; + var message = new $root.proto.Message.ListResponseMessage.SingleSelectReply(); + if (object.selectedRowId != null) + message.selectedRowId = String(object.selectedRowId); + return message; + }; + + /** + * Creates a plain object from a SingleSelectReply message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.ListResponseMessage.SingleSelectReply + * @static + * @param {proto.Message.ListResponseMessage.SingleSelectReply} message SingleSelectReply + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SingleSelectReply.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.selectedRowId = ""; + if (message.selectedRowId != null && message.hasOwnProperty("selectedRowId")) + object.selectedRowId = message.selectedRowId; + return object; + }; + + /** + * Converts this SingleSelectReply to JSON. + * @function toJSON + * @memberof proto.Message.ListResponseMessage.SingleSelectReply + * @instance + * @returns {Object.} JSON object + */ + SingleSelectReply.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SingleSelectReply; + })(); + + return ListResponseMessage; + })(); + + Message.LiveLocationMessage = (function() { + + /** + * Properties of a LiveLocationMessage. + * @memberof proto.Message + * @interface ILiveLocationMessage + * @property {number|null} [degreesLatitude] LiveLocationMessage degreesLatitude + * @property {number|null} [degreesLongitude] LiveLocationMessage degreesLongitude + * @property {number|null} [accuracyInMeters] LiveLocationMessage accuracyInMeters + * @property {number|null} [speedInMps] LiveLocationMessage speedInMps + * @property {number|null} [degreesClockwiseFromMagneticNorth] LiveLocationMessage degreesClockwiseFromMagneticNorth + * @property {string|null} [caption] LiveLocationMessage caption + * @property {number|Long|null} [sequenceNumber] LiveLocationMessage sequenceNumber + * @property {number|null} [timeOffset] LiveLocationMessage timeOffset + * @property {Uint8Array|null} [jpegThumbnail] LiveLocationMessage jpegThumbnail + * @property {proto.IContextInfo|null} [contextInfo] LiveLocationMessage contextInfo + */ + + /** + * Constructs a new LiveLocationMessage. + * @memberof proto.Message + * @classdesc Represents a LiveLocationMessage. + * @implements ILiveLocationMessage + * @constructor + * @param {proto.Message.ILiveLocationMessage=} [properties] Properties to set + */ + function LiveLocationMessage(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]]; + } + + /** + * LiveLocationMessage degreesLatitude. + * @member {number} degreesLatitude + * @memberof proto.Message.LiveLocationMessage + * @instance + */ + LiveLocationMessage.prototype.degreesLatitude = 0; + + /** + * LiveLocationMessage degreesLongitude. + * @member {number} degreesLongitude + * @memberof proto.Message.LiveLocationMessage + * @instance + */ + LiveLocationMessage.prototype.degreesLongitude = 0; + + /** + * LiveLocationMessage accuracyInMeters. + * @member {number} accuracyInMeters + * @memberof proto.Message.LiveLocationMessage + * @instance + */ + LiveLocationMessage.prototype.accuracyInMeters = 0; + + /** + * LiveLocationMessage speedInMps. + * @member {number} speedInMps + * @memberof proto.Message.LiveLocationMessage + * @instance + */ + LiveLocationMessage.prototype.speedInMps = 0; + + /** + * LiveLocationMessage degreesClockwiseFromMagneticNorth. + * @member {number} degreesClockwiseFromMagneticNorth + * @memberof proto.Message.LiveLocationMessage + * @instance + */ + LiveLocationMessage.prototype.degreesClockwiseFromMagneticNorth = 0; + + /** + * LiveLocationMessage caption. + * @member {string} caption + * @memberof proto.Message.LiveLocationMessage + * @instance + */ + LiveLocationMessage.prototype.caption = ""; + + /** + * LiveLocationMessage sequenceNumber. + * @member {number|Long} sequenceNumber + * @memberof proto.Message.LiveLocationMessage + * @instance + */ + LiveLocationMessage.prototype.sequenceNumber = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * LiveLocationMessage timeOffset. + * @member {number} timeOffset + * @memberof proto.Message.LiveLocationMessage + * @instance + */ + LiveLocationMessage.prototype.timeOffset = 0; + + /** + * LiveLocationMessage jpegThumbnail. + * @member {Uint8Array} jpegThumbnail + * @memberof proto.Message.LiveLocationMessage + * @instance + */ + LiveLocationMessage.prototype.jpegThumbnail = $util.newBuffer([]); + + /** + * LiveLocationMessage contextInfo. + * @member {proto.IContextInfo|null|undefined} contextInfo + * @memberof proto.Message.LiveLocationMessage + * @instance + */ + LiveLocationMessage.prototype.contextInfo = null; + + /** + * Creates a new LiveLocationMessage instance using the specified properties. + * @function create + * @memberof proto.Message.LiveLocationMessage + * @static + * @param {proto.Message.ILiveLocationMessage=} [properties] Properties to set + * @returns {proto.Message.LiveLocationMessage} LiveLocationMessage instance + */ + LiveLocationMessage.create = function create(properties) { + return new LiveLocationMessage(properties); + }; + + /** + * Encodes the specified LiveLocationMessage message. Does not implicitly {@link proto.Message.LiveLocationMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.LiveLocationMessage + * @static + * @param {proto.Message.ILiveLocationMessage} message LiveLocationMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LiveLocationMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.degreesLatitude != null && Object.hasOwnProperty.call(message, "degreesLatitude")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.degreesLatitude); + if (message.degreesLongitude != null && Object.hasOwnProperty.call(message, "degreesLongitude")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.degreesLongitude); + if (message.accuracyInMeters != null && Object.hasOwnProperty.call(message, "accuracyInMeters")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.accuracyInMeters); + if (message.speedInMps != null && Object.hasOwnProperty.call(message, "speedInMps")) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.speedInMps); + if (message.degreesClockwiseFromMagneticNorth != null && Object.hasOwnProperty.call(message, "degreesClockwiseFromMagneticNorth")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.degreesClockwiseFromMagneticNorth); + if (message.caption != null && Object.hasOwnProperty.call(message, "caption")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.caption); + if (message.sequenceNumber != null && Object.hasOwnProperty.call(message, "sequenceNumber")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.sequenceNumber); + if (message.timeOffset != null && Object.hasOwnProperty.call(message, "timeOffset")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.timeOffset); + 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(); + return writer; + }; + + /** + * Encodes the specified LiveLocationMessage message, length delimited. Does not implicitly {@link proto.Message.LiveLocationMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.LiveLocationMessage + * @static + * @param {proto.Message.ILiveLocationMessage} message LiveLocationMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LiveLocationMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LiveLocationMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.LiveLocationMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.LiveLocationMessage} LiveLocationMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LiveLocationMessage.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.Message.LiveLocationMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.degreesLatitude = reader.double(); + break; + case 2: + message.degreesLongitude = reader.double(); + break; + case 3: + message.accuracyInMeters = reader.uint32(); + break; + case 4: + message.speedInMps = reader.float(); + break; + case 5: + message.degreesClockwiseFromMagneticNorth = reader.uint32(); + break; + case 6: + message.caption = reader.string(); + break; + case 7: + message.sequenceNumber = reader.int64(); + break; + case 8: + message.timeOffset = reader.uint32(); + break; + case 16: + message.jpegThumbnail = reader.bytes(); + break; + case 17: + message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LiveLocationMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.LiveLocationMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.LiveLocationMessage} LiveLocationMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LiveLocationMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LiveLocationMessage message. + * @function verify + * @memberof proto.Message.LiveLocationMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LiveLocationMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.degreesLatitude != null && message.hasOwnProperty("degreesLatitude")) + if (typeof message.degreesLatitude !== "number") + return "degreesLatitude: number expected"; + if (message.degreesLongitude != null && message.hasOwnProperty("degreesLongitude")) + if (typeof message.degreesLongitude !== "number") + return "degreesLongitude: number expected"; + if (message.accuracyInMeters != null && message.hasOwnProperty("accuracyInMeters")) + if (!$util.isInteger(message.accuracyInMeters)) + return "accuracyInMeters: integer expected"; + if (message.speedInMps != null && message.hasOwnProperty("speedInMps")) + if (typeof message.speedInMps !== "number") + return "speedInMps: number expected"; + if (message.degreesClockwiseFromMagneticNorth != null && message.hasOwnProperty("degreesClockwiseFromMagneticNorth")) + if (!$util.isInteger(message.degreesClockwiseFromMagneticNorth)) + return "degreesClockwiseFromMagneticNorth: integer expected"; + if (message.caption != null && message.hasOwnProperty("caption")) + if (!$util.isString(message.caption)) + return "caption: string expected"; + if (message.sequenceNumber != null && message.hasOwnProperty("sequenceNumber")) + if (!$util.isInteger(message.sequenceNumber) && !(message.sequenceNumber && $util.isInteger(message.sequenceNumber.low) && $util.isInteger(message.sequenceNumber.high))) + return "sequenceNumber: integer|Long expected"; + if (message.timeOffset != null && message.hasOwnProperty("timeOffset")) + if (!$util.isInteger(message.timeOffset)) + return "timeOffset: integer 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; + } + return null; + }; + + /** + * Creates a LiveLocationMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.LiveLocationMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.LiveLocationMessage} LiveLocationMessage + */ + LiveLocationMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.LiveLocationMessage) + return object; + var message = new $root.proto.Message.LiveLocationMessage(); + if (object.degreesLatitude != null) + message.degreesLatitude = Number(object.degreesLatitude); + if (object.degreesLongitude != null) + message.degreesLongitude = Number(object.degreesLongitude); + if (object.accuracyInMeters != null) + message.accuracyInMeters = object.accuracyInMeters >>> 0; + if (object.speedInMps != null) + message.speedInMps = Number(object.speedInMps); + if (object.degreesClockwiseFromMagneticNorth != null) + message.degreesClockwiseFromMagneticNorth = object.degreesClockwiseFromMagneticNorth >>> 0; + if (object.caption != null) + message.caption = String(object.caption); + if (object.sequenceNumber != null) + if ($util.Long) + (message.sequenceNumber = $util.Long.fromValue(object.sequenceNumber)).unsigned = false; + else if (typeof object.sequenceNumber === "string") + message.sequenceNumber = parseInt(object.sequenceNumber, 10); + else if (typeof object.sequenceNumber === "number") + message.sequenceNumber = object.sequenceNumber; + else if (typeof object.sequenceNumber === "object") + message.sequenceNumber = new $util.LongBits(object.sequenceNumber.low >>> 0, object.sequenceNumber.high >>> 0).toNumber(); + if (object.timeOffset != null) + message.timeOffset = object.timeOffset >>> 0; + 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.Message.LiveLocationMessage.contextInfo: object expected"); + message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); + } + return message; + }; + + /** + * Creates a plain object from a LiveLocationMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.LiveLocationMessage + * @static + * @param {proto.Message.LiveLocationMessage} message LiveLocationMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LiveLocationMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.degreesLatitude = 0; + object.degreesLongitude = 0; + object.accuracyInMeters = 0; + object.speedInMps = 0; + object.degreesClockwiseFromMagneticNorth = 0; + object.caption = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.sequenceNumber = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.sequenceNumber = options.longs === String ? "0" : 0; + object.timeOffset = 0; + if (options.bytes === String) + object.jpegThumbnail = ""; + else { + object.jpegThumbnail = []; + if (options.bytes !== Array) + object.jpegThumbnail = $util.newBuffer(object.jpegThumbnail); + } + object.contextInfo = null; + } + if (message.degreesLatitude != null && message.hasOwnProperty("degreesLatitude")) + object.degreesLatitude = options.json && !isFinite(message.degreesLatitude) ? String(message.degreesLatitude) : message.degreesLatitude; + if (message.degreesLongitude != null && message.hasOwnProperty("degreesLongitude")) + object.degreesLongitude = options.json && !isFinite(message.degreesLongitude) ? String(message.degreesLongitude) : message.degreesLongitude; + if (message.accuracyInMeters != null && message.hasOwnProperty("accuracyInMeters")) + object.accuracyInMeters = message.accuracyInMeters; + if (message.speedInMps != null && message.hasOwnProperty("speedInMps")) + object.speedInMps = options.json && !isFinite(message.speedInMps) ? String(message.speedInMps) : message.speedInMps; + if (message.degreesClockwiseFromMagneticNorth != null && message.hasOwnProperty("degreesClockwiseFromMagneticNorth")) + object.degreesClockwiseFromMagneticNorth = message.degreesClockwiseFromMagneticNorth; + if (message.caption != null && message.hasOwnProperty("caption")) + object.caption = message.caption; + if (message.sequenceNumber != null && message.hasOwnProperty("sequenceNumber")) + if (typeof message.sequenceNumber === "number") + object.sequenceNumber = options.longs === String ? String(message.sequenceNumber) : message.sequenceNumber; + else + object.sequenceNumber = options.longs === String ? $util.Long.prototype.toString.call(message.sequenceNumber) : options.longs === Number ? new $util.LongBits(message.sequenceNumber.low >>> 0, message.sequenceNumber.high >>> 0).toNumber() : message.sequenceNumber; + if (message.timeOffset != null && message.hasOwnProperty("timeOffset")) + object.timeOffset = message.timeOffset; + 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); + return object; + }; + + /** + * Converts this LiveLocationMessage to JSON. + * @function toJSON + * @memberof proto.Message.LiveLocationMessage + * @instance + * @returns {Object.} JSON object + */ + LiveLocationMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LiveLocationMessage; + })(); + + Message.LocationMessage = (function() { + + /** + * Properties of a LocationMessage. + * @memberof proto.Message + * @interface ILocationMessage + * @property {number|null} [degreesLatitude] LocationMessage degreesLatitude + * @property {number|null} [degreesLongitude] LocationMessage degreesLongitude + * @property {string|null} [name] LocationMessage name + * @property {string|null} [address] LocationMessage address + * @property {string|null} [url] LocationMessage url + * @property {boolean|null} [isLive] LocationMessage isLive + * @property {number|null} [accuracyInMeters] LocationMessage accuracyInMeters + * @property {number|null} [speedInMps] LocationMessage speedInMps + * @property {number|null} [degreesClockwiseFromMagneticNorth] LocationMessage degreesClockwiseFromMagneticNorth + * @property {string|null} [comment] LocationMessage comment + * @property {Uint8Array|null} [jpegThumbnail] LocationMessage jpegThumbnail + * @property {proto.IContextInfo|null} [contextInfo] LocationMessage contextInfo + */ + + /** + * Constructs a new LocationMessage. + * @memberof proto.Message + * @classdesc Represents a LocationMessage. + * @implements ILocationMessage + * @constructor + * @param {proto.Message.ILocationMessage=} [properties] Properties to set + */ + function LocationMessage(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]]; + } + + /** + * LocationMessage degreesLatitude. + * @member {number} degreesLatitude + * @memberof proto.Message.LocationMessage + * @instance + */ + LocationMessage.prototype.degreesLatitude = 0; + + /** + * LocationMessage degreesLongitude. + * @member {number} degreesLongitude + * @memberof proto.Message.LocationMessage + * @instance + */ + LocationMessage.prototype.degreesLongitude = 0; + + /** + * LocationMessage name. + * @member {string} name + * @memberof proto.Message.LocationMessage + * @instance + */ + LocationMessage.prototype.name = ""; + + /** + * LocationMessage address. + * @member {string} address + * @memberof proto.Message.LocationMessage + * @instance + */ + LocationMessage.prototype.address = ""; + + /** + * LocationMessage url. + * @member {string} url + * @memberof proto.Message.LocationMessage + * @instance + */ + LocationMessage.prototype.url = ""; + + /** + * LocationMessage isLive. + * @member {boolean} isLive + * @memberof proto.Message.LocationMessage + * @instance + */ + LocationMessage.prototype.isLive = false; + + /** + * LocationMessage accuracyInMeters. + * @member {number} accuracyInMeters + * @memberof proto.Message.LocationMessage + * @instance + */ + LocationMessage.prototype.accuracyInMeters = 0; + + /** + * LocationMessage speedInMps. + * @member {number} speedInMps + * @memberof proto.Message.LocationMessage + * @instance + */ + LocationMessage.prototype.speedInMps = 0; + + /** + * LocationMessage degreesClockwiseFromMagneticNorth. + * @member {number} degreesClockwiseFromMagneticNorth + * @memberof proto.Message.LocationMessage + * @instance + */ + LocationMessage.prototype.degreesClockwiseFromMagneticNorth = 0; + + /** + * LocationMessage comment. + * @member {string} comment + * @memberof proto.Message.LocationMessage + * @instance + */ + LocationMessage.prototype.comment = ""; + + /** + * LocationMessage jpegThumbnail. + * @member {Uint8Array} jpegThumbnail + * @memberof proto.Message.LocationMessage + * @instance + */ + LocationMessage.prototype.jpegThumbnail = $util.newBuffer([]); + + /** + * LocationMessage contextInfo. + * @member {proto.IContextInfo|null|undefined} contextInfo + * @memberof proto.Message.LocationMessage + * @instance + */ + LocationMessage.prototype.contextInfo = null; + + /** + * Creates a new LocationMessage instance using the specified properties. + * @function create + * @memberof proto.Message.LocationMessage + * @static + * @param {proto.Message.ILocationMessage=} [properties] Properties to set + * @returns {proto.Message.LocationMessage} LocationMessage instance + */ + LocationMessage.create = function create(properties) { + return new LocationMessage(properties); + }; + + /** + * Encodes the specified LocationMessage message. Does not implicitly {@link proto.Message.LocationMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.LocationMessage + * @static + * @param {proto.Message.ILocationMessage} message LocationMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocationMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.degreesLatitude != null && Object.hasOwnProperty.call(message, "degreesLatitude")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.degreesLatitude); + if (message.degreesLongitude != null && Object.hasOwnProperty.call(message, "degreesLongitude")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.degreesLongitude); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.address); + if (message.url != null && Object.hasOwnProperty.call(message, "url")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.url); + if (message.isLive != null && Object.hasOwnProperty.call(message, "isLive")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.isLive); + if (message.accuracyInMeters != null && Object.hasOwnProperty.call(message, "accuracyInMeters")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.accuracyInMeters); + if (message.speedInMps != null && Object.hasOwnProperty.call(message, "speedInMps")) + writer.uint32(/* id 8, wireType 5 =*/69).float(message.speedInMps); + if (message.degreesClockwiseFromMagneticNorth != null && Object.hasOwnProperty.call(message, "degreesClockwiseFromMagneticNorth")) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.degreesClockwiseFromMagneticNorth); + if (message.comment != null && Object.hasOwnProperty.call(message, "comment")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.comment); + 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(); + return writer; + }; + + /** + * Encodes the specified LocationMessage message, length delimited. Does not implicitly {@link proto.Message.LocationMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.LocationMessage + * @static + * @param {proto.Message.ILocationMessage} message LocationMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocationMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LocationMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.LocationMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.LocationMessage} LocationMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocationMessage.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.Message.LocationMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.degreesLatitude = reader.double(); + break; + case 2: + message.degreesLongitude = reader.double(); + break; + case 3: + message.name = reader.string(); + break; + case 4: + message.address = reader.string(); + break; + case 5: + message.url = reader.string(); + break; + case 6: + message.isLive = reader.bool(); + break; + case 7: + message.accuracyInMeters = reader.uint32(); + break; + case 8: + message.speedInMps = reader.float(); + break; + case 9: + message.degreesClockwiseFromMagneticNorth = reader.uint32(); + break; + case 11: + message.comment = reader.string(); + break; + case 16: + message.jpegThumbnail = reader.bytes(); + break; + case 17: + message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LocationMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.LocationMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.LocationMessage} LocationMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocationMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LocationMessage message. + * @function verify + * @memberof proto.Message.LocationMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LocationMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.degreesLatitude != null && message.hasOwnProperty("degreesLatitude")) + if (typeof message.degreesLatitude !== "number") + return "degreesLatitude: number expected"; + if (message.degreesLongitude != null && message.hasOwnProperty("degreesLongitude")) + if (typeof message.degreesLongitude !== "number") + return "degreesLongitude: number expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.address != null && message.hasOwnProperty("address")) + if (!$util.isString(message.address)) + return "address: string expected"; + if (message.url != null && message.hasOwnProperty("url")) + if (!$util.isString(message.url)) + return "url: string expected"; + if (message.isLive != null && message.hasOwnProperty("isLive")) + if (typeof message.isLive !== "boolean") + return "isLive: boolean expected"; + if (message.accuracyInMeters != null && message.hasOwnProperty("accuracyInMeters")) + if (!$util.isInteger(message.accuracyInMeters)) + return "accuracyInMeters: integer expected"; + if (message.speedInMps != null && message.hasOwnProperty("speedInMps")) + if (typeof message.speedInMps !== "number") + return "speedInMps: number expected"; + if (message.degreesClockwiseFromMagneticNorth != null && message.hasOwnProperty("degreesClockwiseFromMagneticNorth")) + if (!$util.isInteger(message.degreesClockwiseFromMagneticNorth)) + return "degreesClockwiseFromMagneticNorth: integer expected"; + if (message.comment != null && message.hasOwnProperty("comment")) + if (!$util.isString(message.comment)) + return "comment: string 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; + } + return null; + }; + + /** + * Creates a LocationMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.LocationMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.LocationMessage} LocationMessage + */ + LocationMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.LocationMessage) + return object; + var message = new $root.proto.Message.LocationMessage(); + if (object.degreesLatitude != null) + message.degreesLatitude = Number(object.degreesLatitude); + if (object.degreesLongitude != null) + message.degreesLongitude = Number(object.degreesLongitude); + if (object.name != null) + message.name = String(object.name); + if (object.address != null) + message.address = String(object.address); + if (object.url != null) + message.url = String(object.url); + if (object.isLive != null) + message.isLive = Boolean(object.isLive); + if (object.accuracyInMeters != null) + message.accuracyInMeters = object.accuracyInMeters >>> 0; + if (object.speedInMps != null) + message.speedInMps = Number(object.speedInMps); + if (object.degreesClockwiseFromMagneticNorth != null) + message.degreesClockwiseFromMagneticNorth = object.degreesClockwiseFromMagneticNorth >>> 0; + if (object.comment != null) + message.comment = String(object.comment); + 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.Message.LocationMessage.contextInfo: object expected"); + message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); + } + return message; + }; + + /** + * Creates a plain object from a LocationMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.LocationMessage + * @static + * @param {proto.Message.LocationMessage} message LocationMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LocationMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.degreesLatitude = 0; + object.degreesLongitude = 0; + object.name = ""; + object.address = ""; + object.url = ""; + object.isLive = false; + object.accuracyInMeters = 0; + object.speedInMps = 0; + object.degreesClockwiseFromMagneticNorth = 0; + object.comment = ""; + if (options.bytes === String) + object.jpegThumbnail = ""; + else { + object.jpegThumbnail = []; + if (options.bytes !== Array) + object.jpegThumbnail = $util.newBuffer(object.jpegThumbnail); + } + object.contextInfo = null; + } + if (message.degreesLatitude != null && message.hasOwnProperty("degreesLatitude")) + object.degreesLatitude = options.json && !isFinite(message.degreesLatitude) ? String(message.degreesLatitude) : message.degreesLatitude; + if (message.degreesLongitude != null && message.hasOwnProperty("degreesLongitude")) + object.degreesLongitude = options.json && !isFinite(message.degreesLongitude) ? String(message.degreesLongitude) : message.degreesLongitude; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.address != null && message.hasOwnProperty("address")) + object.address = message.address; + if (message.url != null && message.hasOwnProperty("url")) + object.url = message.url; + if (message.isLive != null && message.hasOwnProperty("isLive")) + object.isLive = message.isLive; + if (message.accuracyInMeters != null && message.hasOwnProperty("accuracyInMeters")) + object.accuracyInMeters = message.accuracyInMeters; + if (message.speedInMps != null && message.hasOwnProperty("speedInMps")) + object.speedInMps = options.json && !isFinite(message.speedInMps) ? String(message.speedInMps) : message.speedInMps; + if (message.degreesClockwiseFromMagneticNorth != null && message.hasOwnProperty("degreesClockwiseFromMagneticNorth")) + object.degreesClockwiseFromMagneticNorth = message.degreesClockwiseFromMagneticNorth; + if (message.comment != null && message.hasOwnProperty("comment")) + object.comment = message.comment; + 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); + return object; + }; + + /** + * Converts this LocationMessage to JSON. + * @function toJSON + * @memberof proto.Message.LocationMessage + * @instance + * @returns {Object.} JSON object + */ + LocationMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LocationMessage; + })(); + + Message.OrderMessage = (function() { + + /** + * Properties of an OrderMessage. + * @memberof proto.Message + * @interface IOrderMessage + * @property {string|null} [orderId] OrderMessage orderId + * @property {Uint8Array|null} [thumbnail] OrderMessage thumbnail + * @property {number|null} [itemCount] OrderMessage itemCount + * @property {proto.Message.OrderMessage.OrderStatus|null} [status] OrderMessage status + * @property {proto.Message.OrderMessage.OrderSurface|null} [surface] OrderMessage surface + * @property {string|null} [message] OrderMessage message + * @property {string|null} [orderTitle] OrderMessage orderTitle + * @property {string|null} [sellerJid] OrderMessage sellerJid + * @property {string|null} [token] OrderMessage token + * @property {number|Long|null} [totalAmount1000] OrderMessage totalAmount1000 + * @property {string|null} [totalCurrencyCode] OrderMessage totalCurrencyCode + * @property {proto.IContextInfo|null} [contextInfo] OrderMessage contextInfo + */ + + /** + * Constructs a new OrderMessage. + * @memberof proto.Message + * @classdesc Represents an OrderMessage. + * @implements IOrderMessage + * @constructor + * @param {proto.Message.IOrderMessage=} [properties] Properties to set + */ + function OrderMessage(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]]; + } + + /** + * OrderMessage orderId. + * @member {string} orderId + * @memberof proto.Message.OrderMessage + * @instance + */ + OrderMessage.prototype.orderId = ""; + + /** + * OrderMessage thumbnail. + * @member {Uint8Array} thumbnail + * @memberof proto.Message.OrderMessage + * @instance + */ + OrderMessage.prototype.thumbnail = $util.newBuffer([]); + + /** + * OrderMessage itemCount. + * @member {number} itemCount + * @memberof proto.Message.OrderMessage + * @instance + */ + OrderMessage.prototype.itemCount = 0; + + /** + * OrderMessage status. + * @member {proto.Message.OrderMessage.OrderStatus} status + * @memberof proto.Message.OrderMessage + * @instance + */ + OrderMessage.prototype.status = 1; + + /** + * OrderMessage surface. + * @member {proto.Message.OrderMessage.OrderSurface} surface + * @memberof proto.Message.OrderMessage + * @instance + */ + OrderMessage.prototype.surface = 1; + + /** + * OrderMessage message. + * @member {string} message + * @memberof proto.Message.OrderMessage + * @instance + */ + OrderMessage.prototype.message = ""; + + /** + * OrderMessage orderTitle. + * @member {string} orderTitle + * @memberof proto.Message.OrderMessage + * @instance + */ + OrderMessage.prototype.orderTitle = ""; + + /** + * OrderMessage sellerJid. + * @member {string} sellerJid + * @memberof proto.Message.OrderMessage + * @instance + */ + OrderMessage.prototype.sellerJid = ""; + + /** + * OrderMessage token. + * @member {string} token + * @memberof proto.Message.OrderMessage + * @instance + */ + OrderMessage.prototype.token = ""; + + /** + * OrderMessage totalAmount1000. + * @member {number|Long} totalAmount1000 + * @memberof proto.Message.OrderMessage + * @instance + */ + OrderMessage.prototype.totalAmount1000 = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * OrderMessage totalCurrencyCode. + * @member {string} totalCurrencyCode + * @memberof proto.Message.OrderMessage + * @instance + */ + OrderMessage.prototype.totalCurrencyCode = ""; + + /** + * OrderMessage contextInfo. + * @member {proto.IContextInfo|null|undefined} contextInfo + * @memberof proto.Message.OrderMessage + * @instance + */ + OrderMessage.prototype.contextInfo = null; + + /** + * Creates a new OrderMessage instance using the specified properties. + * @function create + * @memberof proto.Message.OrderMessage + * @static + * @param {proto.Message.IOrderMessage=} [properties] Properties to set + * @returns {proto.Message.OrderMessage} OrderMessage instance + */ + OrderMessage.create = function create(properties) { + return new OrderMessage(properties); + }; + + /** + * Encodes the specified OrderMessage message. Does not implicitly {@link proto.Message.OrderMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.OrderMessage + * @static + * @param {proto.Message.IOrderMessage} message OrderMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrderMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.orderId != null && Object.hasOwnProperty.call(message, "orderId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.orderId); + if (message.thumbnail != null && Object.hasOwnProperty.call(message, "thumbnail")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.thumbnail); + if (message.itemCount != null && Object.hasOwnProperty.call(message, "itemCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.itemCount); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.status); + if (message.surface != null && Object.hasOwnProperty.call(message, "surface")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.surface); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.message); + if (message.orderTitle != null && Object.hasOwnProperty.call(message, "orderTitle")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.orderTitle); + if (message.sellerJid != null && Object.hasOwnProperty.call(message, "sellerJid")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.sellerJid); + if (message.token != null && Object.hasOwnProperty.call(message, "token")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.token); + if (message.totalAmount1000 != null && Object.hasOwnProperty.call(message, "totalAmount1000")) + writer.uint32(/* id 10, wireType 0 =*/80).int64(message.totalAmount1000); + if (message.totalCurrencyCode != null && Object.hasOwnProperty.call(message, "totalCurrencyCode")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.totalCurrencyCode); + if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) + $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OrderMessage message, length delimited. Does not implicitly {@link proto.Message.OrderMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.OrderMessage + * @static + * @param {proto.Message.IOrderMessage} message OrderMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrderMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OrderMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.OrderMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.OrderMessage} OrderMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrderMessage.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.Message.OrderMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.orderId = reader.string(); + break; + case 2: + message.thumbnail = reader.bytes(); + break; + case 3: + message.itemCount = reader.int32(); + break; + case 4: + message.status = reader.int32(); + break; + case 5: + message.surface = reader.int32(); + break; + case 6: + message.message = reader.string(); + break; + case 7: + message.orderTitle = reader.string(); + break; + case 8: + message.sellerJid = reader.string(); + break; + case 9: + message.token = reader.string(); + break; + case 10: + message.totalAmount1000 = reader.int64(); + break; + case 11: + message.totalCurrencyCode = reader.string(); + break; + case 17: + message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OrderMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.OrderMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.OrderMessage} OrderMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrderMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OrderMessage message. + * @function verify + * @memberof proto.Message.OrderMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OrderMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.orderId != null && message.hasOwnProperty("orderId")) + if (!$util.isString(message.orderId)) + return "orderId: string expected"; + if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) + if (!(message.thumbnail && typeof message.thumbnail.length === "number" || $util.isString(message.thumbnail))) + return "thumbnail: buffer expected"; + if (message.itemCount != null && message.hasOwnProperty("itemCount")) + if (!$util.isInteger(message.itemCount)) + return "itemCount: integer expected"; + if (message.status != null && message.hasOwnProperty("status")) + switch (message.status) { + default: + return "status: enum value expected"; + case 1: + break; + } + if (message.surface != null && message.hasOwnProperty("surface")) + switch (message.surface) { + default: + return "surface: enum value expected"; + case 1: + break; + } + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.orderTitle != null && message.hasOwnProperty("orderTitle")) + if (!$util.isString(message.orderTitle)) + return "orderTitle: string expected"; + if (message.sellerJid != null && message.hasOwnProperty("sellerJid")) + if (!$util.isString(message.sellerJid)) + return "sellerJid: string expected"; + if (message.token != null && message.hasOwnProperty("token")) + if (!$util.isString(message.token)) + return "token: string expected"; + if (message.totalAmount1000 != null && message.hasOwnProperty("totalAmount1000")) + if (!$util.isInteger(message.totalAmount1000) && !(message.totalAmount1000 && $util.isInteger(message.totalAmount1000.low) && $util.isInteger(message.totalAmount1000.high))) + return "totalAmount1000: integer|Long expected"; + if (message.totalCurrencyCode != null && message.hasOwnProperty("totalCurrencyCode")) + if (!$util.isString(message.totalCurrencyCode)) + return "totalCurrencyCode: string expected"; + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } + return null; + }; + + /** + * Creates an OrderMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.OrderMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.OrderMessage} OrderMessage + */ + OrderMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.OrderMessage) + return object; + var message = new $root.proto.Message.OrderMessage(); + if (object.orderId != null) + message.orderId = String(object.orderId); + if (object.thumbnail != null) + if (typeof object.thumbnail === "string") + $util.base64.decode(object.thumbnail, message.thumbnail = $util.newBuffer($util.base64.length(object.thumbnail)), 0); + else if (object.thumbnail.length) + message.thumbnail = object.thumbnail; + if (object.itemCount != null) + message.itemCount = object.itemCount | 0; + switch (object.status) { + case "INQUIRY": + case 1: + message.status = 1; + break; + } + switch (object.surface) { + case "CATALOG": + case 1: + message.surface = 1; + break; + } + if (object.message != null) + message.message = String(object.message); + if (object.orderTitle != null) + message.orderTitle = String(object.orderTitle); + if (object.sellerJid != null) + message.sellerJid = String(object.sellerJid); + if (object.token != null) + message.token = String(object.token); + if (object.totalAmount1000 != null) + if ($util.Long) + (message.totalAmount1000 = $util.Long.fromValue(object.totalAmount1000)).unsigned = false; + else if (typeof object.totalAmount1000 === "string") + message.totalAmount1000 = parseInt(object.totalAmount1000, 10); + else if (typeof object.totalAmount1000 === "number") + message.totalAmount1000 = object.totalAmount1000; + else if (typeof object.totalAmount1000 === "object") + message.totalAmount1000 = new $util.LongBits(object.totalAmount1000.low >>> 0, object.totalAmount1000.high >>> 0).toNumber(); + if (object.totalCurrencyCode != null) + message.totalCurrencyCode = String(object.totalCurrencyCode); + if (object.contextInfo != null) { + if (typeof object.contextInfo !== "object") + throw TypeError(".proto.Message.OrderMessage.contextInfo: object expected"); + message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); + } + return message; + }; + + /** + * Creates a plain object from an OrderMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.OrderMessage + * @static + * @param {proto.Message.OrderMessage} message OrderMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OrderMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.orderId = ""; + if (options.bytes === String) + object.thumbnail = ""; + else { + object.thumbnail = []; + if (options.bytes !== Array) + object.thumbnail = $util.newBuffer(object.thumbnail); + } + object.itemCount = 0; + object.status = options.enums === String ? "INQUIRY" : 1; + object.surface = options.enums === String ? "CATALOG" : 1; + object.message = ""; + object.orderTitle = ""; + object.sellerJid = ""; + object.token = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.totalAmount1000 = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalAmount1000 = options.longs === String ? "0" : 0; + object.totalCurrencyCode = ""; + object.contextInfo = null; + } + if (message.orderId != null && message.hasOwnProperty("orderId")) + object.orderId = message.orderId; + if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) + object.thumbnail = options.bytes === String ? $util.base64.encode(message.thumbnail, 0, message.thumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.thumbnail) : message.thumbnail; + if (message.itemCount != null && message.hasOwnProperty("itemCount")) + object.itemCount = message.itemCount; + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.proto.Message.OrderMessage.OrderStatus[message.status] : message.status; + if (message.surface != null && message.hasOwnProperty("surface")) + object.surface = options.enums === String ? $root.proto.Message.OrderMessage.OrderSurface[message.surface] : message.surface; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.orderTitle != null && message.hasOwnProperty("orderTitle")) + object.orderTitle = message.orderTitle; + if (message.sellerJid != null && message.hasOwnProperty("sellerJid")) + object.sellerJid = message.sellerJid; + if (message.token != null && message.hasOwnProperty("token")) + object.token = message.token; + if (message.totalAmount1000 != null && message.hasOwnProperty("totalAmount1000")) + if (typeof message.totalAmount1000 === "number") + object.totalAmount1000 = options.longs === String ? String(message.totalAmount1000) : message.totalAmount1000; + else + object.totalAmount1000 = options.longs === String ? $util.Long.prototype.toString.call(message.totalAmount1000) : options.longs === Number ? new $util.LongBits(message.totalAmount1000.low >>> 0, message.totalAmount1000.high >>> 0).toNumber() : message.totalAmount1000; + if (message.totalCurrencyCode != null && message.hasOwnProperty("totalCurrencyCode")) + object.totalCurrencyCode = message.totalCurrencyCode; + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) + object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + return object; + }; + + /** + * Converts this OrderMessage to JSON. + * @function toJSON + * @memberof proto.Message.OrderMessage + * @instance + * @returns {Object.} JSON object + */ + OrderMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * OrderStatus enum. + * @name proto.Message.OrderMessage.OrderStatus + * @enum {number} + * @property {number} INQUIRY=1 INQUIRY value + */ + OrderMessage.OrderStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "INQUIRY"] = 1; + return values; + })(); + + /** + * OrderSurface enum. + * @name proto.Message.OrderMessage.OrderSurface + * @enum {number} + * @property {number} CATALOG=1 CATALOG value + */ + OrderMessage.OrderSurface = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "CATALOG"] = 1; + return values; + })(); + + return OrderMessage; + })(); + + Message.PaymentInviteMessage = (function() { + + /** + * Properties of a PaymentInviteMessage. + * @memberof proto.Message + * @interface IPaymentInviteMessage + * @property {proto.Message.PaymentInviteMessage.ServiceType|null} [serviceType] PaymentInviteMessage serviceType + * @property {number|Long|null} [expiryTimestamp] PaymentInviteMessage expiryTimestamp + */ + + /** + * Constructs a new PaymentInviteMessage. + * @memberof proto.Message + * @classdesc Represents a PaymentInviteMessage. + * @implements IPaymentInviteMessage + * @constructor + * @param {proto.Message.IPaymentInviteMessage=} [properties] Properties to set + */ + function PaymentInviteMessage(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]]; + } + + /** + * PaymentInviteMessage serviceType. + * @member {proto.Message.PaymentInviteMessage.ServiceType} serviceType + * @memberof proto.Message.PaymentInviteMessage + * @instance + */ + PaymentInviteMessage.prototype.serviceType = 0; + + /** + * PaymentInviteMessage expiryTimestamp. + * @member {number|Long} expiryTimestamp + * @memberof proto.Message.PaymentInviteMessage + * @instance + */ + PaymentInviteMessage.prototype.expiryTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new PaymentInviteMessage instance using the specified properties. + * @function create + * @memberof proto.Message.PaymentInviteMessage + * @static + * @param {proto.Message.IPaymentInviteMessage=} [properties] Properties to set + * @returns {proto.Message.PaymentInviteMessage} PaymentInviteMessage instance + */ + PaymentInviteMessage.create = function create(properties) { + return new PaymentInviteMessage(properties); + }; + + /** + * Encodes the specified PaymentInviteMessage message. Does not implicitly {@link proto.Message.PaymentInviteMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.PaymentInviteMessage + * @static + * @param {proto.Message.IPaymentInviteMessage} message PaymentInviteMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PaymentInviteMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.serviceType != null && Object.hasOwnProperty.call(message, "serviceType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.serviceType); + if (message.expiryTimestamp != null && Object.hasOwnProperty.call(message, "expiryTimestamp")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.expiryTimestamp); + return writer; + }; + + /** + * Encodes the specified PaymentInviteMessage message, length delimited. Does not implicitly {@link proto.Message.PaymentInviteMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.PaymentInviteMessage + * @static + * @param {proto.Message.IPaymentInviteMessage} message PaymentInviteMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PaymentInviteMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PaymentInviteMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.PaymentInviteMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.PaymentInviteMessage} PaymentInviteMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PaymentInviteMessage.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.Message.PaymentInviteMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.serviceType = reader.int32(); + break; + case 2: + message.expiryTimestamp = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PaymentInviteMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.PaymentInviteMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.PaymentInviteMessage} PaymentInviteMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PaymentInviteMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PaymentInviteMessage message. + * @function verify + * @memberof proto.Message.PaymentInviteMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PaymentInviteMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.serviceType != null && message.hasOwnProperty("serviceType")) + switch (message.serviceType) { + default: + return "serviceType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + 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"; + return null; + }; + + /** + * Creates a PaymentInviteMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.PaymentInviteMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.PaymentInviteMessage} PaymentInviteMessage + */ + PaymentInviteMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.PaymentInviteMessage) + return object; + var message = new $root.proto.Message.PaymentInviteMessage(); + switch (object.serviceType) { + case "UNKNOWN": + case 0: + message.serviceType = 0; + break; + case "FBPAY": + case 1: + message.serviceType = 1; + break; + case "NOVI": + case 2: + message.serviceType = 2; + break; + case "UPI": + case 3: + message.serviceType = 3; + break; + } + if (object.expiryTimestamp != null) + if ($util.Long) + (message.expiryTimestamp = $util.Long.fromValue(object.expiryTimestamp)).unsigned = false; + 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(); + return message; + }; + + /** + * Creates a plain object from a PaymentInviteMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.PaymentInviteMessage + * @static + * @param {proto.Message.PaymentInviteMessage} message PaymentInviteMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PaymentInviteMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.serviceType = options.enums === String ? "UNKNOWN" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.expiryTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.expiryTimestamp = options.longs === String ? "0" : 0; + } + if (message.serviceType != null && message.hasOwnProperty("serviceType")) + object.serviceType = options.enums === String ? $root.proto.Message.PaymentInviteMessage.ServiceType[message.serviceType] : message.serviceType; + 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() : message.expiryTimestamp; + return object; + }; + + /** + * Converts this PaymentInviteMessage to JSON. + * @function toJSON + * @memberof proto.Message.PaymentInviteMessage + * @instance + * @returns {Object.} JSON object + */ + PaymentInviteMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * ServiceType enum. + * @name proto.Message.PaymentInviteMessage.ServiceType + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} FBPAY=1 FBPAY value + * @property {number} NOVI=2 NOVI value + * @property {number} UPI=3 UPI value + */ + PaymentInviteMessage.ServiceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "FBPAY"] = 1; + values[valuesById[2] = "NOVI"] = 2; + values[valuesById[3] = "UPI"] = 3; + return values; + })(); + + return PaymentInviteMessage; + })(); + + Message.PollCreationMessage = (function() { + + /** + * Properties of a PollCreationMessage. + * @memberof proto.Message + * @interface IPollCreationMessage + * @property {Uint8Array|null} [encKey] PollCreationMessage encKey + * @property {string|null} [name] PollCreationMessage name + * @property {Array.|null} [options] PollCreationMessage options + * @property {number|null} [selectableOptionsCount] PollCreationMessage selectableOptionsCount + * @property {proto.IContextInfo|null} [contextInfo] PollCreationMessage contextInfo + */ + + /** + * Constructs a new PollCreationMessage. + * @memberof proto.Message + * @classdesc Represents a PollCreationMessage. + * @implements IPollCreationMessage + * @constructor + * @param {proto.Message.IPollCreationMessage=} [properties] Properties to set + */ + function PollCreationMessage(properties) { + this.options = []; + 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]]; + } + + /** + * PollCreationMessage encKey. + * @member {Uint8Array} encKey + * @memberof proto.Message.PollCreationMessage + * @instance + */ + PollCreationMessage.prototype.encKey = $util.newBuffer([]); + + /** + * PollCreationMessage name. + * @member {string} name + * @memberof proto.Message.PollCreationMessage + * @instance + */ + PollCreationMessage.prototype.name = ""; + + /** + * PollCreationMessage options. + * @member {Array.} options + * @memberof proto.Message.PollCreationMessage + * @instance + */ + PollCreationMessage.prototype.options = $util.emptyArray; + + /** + * PollCreationMessage selectableOptionsCount. + * @member {number} selectableOptionsCount + * @memberof proto.Message.PollCreationMessage + * @instance + */ + PollCreationMessage.prototype.selectableOptionsCount = 0; + + /** + * PollCreationMessage contextInfo. + * @member {proto.IContextInfo|null|undefined} contextInfo + * @memberof proto.Message.PollCreationMessage + * @instance + */ + PollCreationMessage.prototype.contextInfo = null; + + /** + * Creates a new PollCreationMessage instance using the specified properties. + * @function create + * @memberof proto.Message.PollCreationMessage + * @static + * @param {proto.Message.IPollCreationMessage=} [properties] Properties to set + * @returns {proto.Message.PollCreationMessage} PollCreationMessage instance + */ + PollCreationMessage.create = function create(properties) { + return new PollCreationMessage(properties); + }; + + /** + * Encodes the specified PollCreationMessage message. Does not implicitly {@link proto.Message.PollCreationMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.PollCreationMessage + * @static + * @param {proto.Message.IPollCreationMessage} message PollCreationMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PollCreationMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.encKey != null && Object.hasOwnProperty.call(message, "encKey")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.encKey); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.options != null && message.options.length) + for (var i = 0; i < message.options.length; ++i) + $root.proto.Message.PollCreationMessage.Option.encode(message.options[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.selectableOptionsCount != null && Object.hasOwnProperty.call(message, "selectableOptionsCount")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.selectableOptionsCount); + if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) + $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PollCreationMessage message, length delimited. Does not implicitly {@link proto.Message.PollCreationMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.PollCreationMessage + * @static + * @param {proto.Message.IPollCreationMessage} message PollCreationMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PollCreationMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PollCreationMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.PollCreationMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.PollCreationMessage} PollCreationMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PollCreationMessage.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.Message.PollCreationMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.encKey = reader.bytes(); + break; + case 2: + message.name = reader.string(); + break; + case 3: + if (!(message.options && message.options.length)) + message.options = []; + message.options.push($root.proto.Message.PollCreationMessage.Option.decode(reader, reader.uint32())); + break; + case 4: + message.selectableOptionsCount = reader.uint32(); + break; + case 5: + message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PollCreationMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.PollCreationMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.PollCreationMessage} PollCreationMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PollCreationMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PollCreationMessage message. + * @function verify + * @memberof proto.Message.PollCreationMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PollCreationMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.encKey != null && message.hasOwnProperty("encKey")) + if (!(message.encKey && typeof message.encKey.length === "number" || $util.isString(message.encKey))) + return "encKey: buffer expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + if (!Array.isArray(message.options)) + return "options: array expected"; + for (var i = 0; i < message.options.length; ++i) { + var error = $root.proto.Message.PollCreationMessage.Option.verify(message.options[i]); + if (error) + return "options." + error; + } + } + if (message.selectableOptionsCount != null && message.hasOwnProperty("selectableOptionsCount")) + if (!$util.isInteger(message.selectableOptionsCount)) + return "selectableOptionsCount: integer expected"; + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } + return null; + }; + + /** + * Creates a PollCreationMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.PollCreationMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.PollCreationMessage} PollCreationMessage + */ + PollCreationMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.PollCreationMessage) + return object; + var message = new $root.proto.Message.PollCreationMessage(); + if (object.encKey != null) + if (typeof object.encKey === "string") + $util.base64.decode(object.encKey, message.encKey = $util.newBuffer($util.base64.length(object.encKey)), 0); + else if (object.encKey.length) + message.encKey = object.encKey; + if (object.name != null) + message.name = String(object.name); + if (object.options) { + if (!Array.isArray(object.options)) + throw TypeError(".proto.Message.PollCreationMessage.options: array expected"); + message.options = []; + for (var i = 0; i < object.options.length; ++i) { + if (typeof object.options[i] !== "object") + throw TypeError(".proto.Message.PollCreationMessage.options: object expected"); + message.options[i] = $root.proto.Message.PollCreationMessage.Option.fromObject(object.options[i]); + } + } + if (object.selectableOptionsCount != null) + message.selectableOptionsCount = object.selectableOptionsCount >>> 0; + if (object.contextInfo != null) { + if (typeof object.contextInfo !== "object") + throw TypeError(".proto.Message.PollCreationMessage.contextInfo: object expected"); + message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); + } + return message; + }; + + /** + * Creates a plain object from a PollCreationMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.PollCreationMessage + * @static + * @param {proto.Message.PollCreationMessage} message PollCreationMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PollCreationMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.options = []; + if (options.defaults) { + if (options.bytes === String) + object.encKey = ""; + else { + object.encKey = []; + if (options.bytes !== Array) + object.encKey = $util.newBuffer(object.encKey); + } + object.name = ""; + object.selectableOptionsCount = 0; + object.contextInfo = null; + } + if (message.encKey != null && message.hasOwnProperty("encKey")) + object.encKey = options.bytes === String ? $util.base64.encode(message.encKey, 0, message.encKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encKey) : message.encKey; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options && message.options.length) { + object.options = []; + for (var j = 0; j < message.options.length; ++j) + object.options[j] = $root.proto.Message.PollCreationMessage.Option.toObject(message.options[j], options); + } + if (message.selectableOptionsCount != null && message.hasOwnProperty("selectableOptionsCount")) + object.selectableOptionsCount = message.selectableOptionsCount; + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) + object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + return object; + }; + + /** + * Converts this PollCreationMessage to JSON. + * @function toJSON + * @memberof proto.Message.PollCreationMessage + * @instance + * @returns {Object.} JSON object + */ + PollCreationMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + PollCreationMessage.Option = (function() { + + /** + * Properties of an Option. + * @memberof proto.Message.PollCreationMessage + * @interface IOption + * @property {string|null} [optionName] Option optionName + */ + + /** + * Constructs a new Option. + * @memberof proto.Message.PollCreationMessage + * @classdesc Represents an Option. + * @implements IOption + * @constructor + * @param {proto.Message.PollCreationMessage.IOption=} [properties] Properties to set + */ + function Option(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]]; + } + + /** + * Option optionName. + * @member {string} optionName + * @memberof proto.Message.PollCreationMessage.Option + * @instance + */ + Option.prototype.optionName = ""; + + /** + * Creates a new Option instance using the specified properties. + * @function create + * @memberof proto.Message.PollCreationMessage.Option + * @static + * @param {proto.Message.PollCreationMessage.IOption=} [properties] Properties to set + * @returns {proto.Message.PollCreationMessage.Option} Option instance + */ + Option.create = function create(properties) { + return new Option(properties); + }; + + /** + * Encodes the specified Option message. Does not implicitly {@link proto.Message.PollCreationMessage.Option.verify|verify} messages. + * @function encode + * @memberof proto.Message.PollCreationMessage.Option + * @static + * @param {proto.Message.PollCreationMessage.IOption} message Option message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Option.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.optionName != null && Object.hasOwnProperty.call(message, "optionName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.optionName); + return writer; + }; + + /** + * Encodes the specified Option message, length delimited. Does not implicitly {@link proto.Message.PollCreationMessage.Option.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.PollCreationMessage.Option + * @static + * @param {proto.Message.PollCreationMessage.IOption} message Option message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Option.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Option message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.PollCreationMessage.Option + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.PollCreationMessage.Option} Option + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Option.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.Message.PollCreationMessage.Option(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.optionName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Option message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.PollCreationMessage.Option + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.PollCreationMessage.Option} Option + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Option.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Option message. + * @function verify + * @memberof proto.Message.PollCreationMessage.Option + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Option.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.optionName != null && message.hasOwnProperty("optionName")) + if (!$util.isString(message.optionName)) + return "optionName: string expected"; + return null; + }; + + /** + * Creates an Option message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.PollCreationMessage.Option + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.PollCreationMessage.Option} Option + */ + Option.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.PollCreationMessage.Option) + return object; + var message = new $root.proto.Message.PollCreationMessage.Option(); + if (object.optionName != null) + message.optionName = String(object.optionName); + return message; + }; + + /** + * Creates a plain object from an Option message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.PollCreationMessage.Option + * @static + * @param {proto.Message.PollCreationMessage.Option} message Option + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Option.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.optionName = ""; + if (message.optionName != null && message.hasOwnProperty("optionName")) + object.optionName = message.optionName; + return object; + }; + + /** + * Converts this Option to JSON. + * @function toJSON + * @memberof proto.Message.PollCreationMessage.Option + * @instance + * @returns {Object.} JSON object + */ + Option.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Option; + })(); + + return PollCreationMessage; + })(); + + Message.PollEncValue = (function() { + + /** + * Properties of a PollEncValue. + * @memberof proto.Message + * @interface IPollEncValue + * @property {Uint8Array|null} [encPayload] PollEncValue encPayload + * @property {Uint8Array|null} [encIv] PollEncValue encIv + */ + + /** + * Constructs a new PollEncValue. + * @memberof proto.Message + * @classdesc Represents a PollEncValue. + * @implements IPollEncValue + * @constructor + * @param {proto.Message.IPollEncValue=} [properties] Properties to set + */ + function PollEncValue(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]]; + } + + /** + * PollEncValue encPayload. + * @member {Uint8Array} encPayload + * @memberof proto.Message.PollEncValue + * @instance + */ + PollEncValue.prototype.encPayload = $util.newBuffer([]); + + /** + * PollEncValue encIv. + * @member {Uint8Array} encIv + * @memberof proto.Message.PollEncValue + * @instance + */ + PollEncValue.prototype.encIv = $util.newBuffer([]); + + /** + * Creates a new PollEncValue instance using the specified properties. + * @function create + * @memberof proto.Message.PollEncValue + * @static + * @param {proto.Message.IPollEncValue=} [properties] Properties to set + * @returns {proto.Message.PollEncValue} PollEncValue instance + */ + PollEncValue.create = function create(properties) { + return new PollEncValue(properties); + }; + + /** + * Encodes the specified PollEncValue message. Does not implicitly {@link proto.Message.PollEncValue.verify|verify} messages. + * @function encode + * @memberof proto.Message.PollEncValue + * @static + * @param {proto.Message.IPollEncValue} message PollEncValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PollEncValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.encPayload != null && Object.hasOwnProperty.call(message, "encPayload")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.encPayload); + if (message.encIv != null && Object.hasOwnProperty.call(message, "encIv")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.encIv); + return writer; + }; + + /** + * Encodes the specified PollEncValue message, length delimited. Does not implicitly {@link proto.Message.PollEncValue.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.PollEncValue + * @static + * @param {proto.Message.IPollEncValue} message PollEncValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PollEncValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PollEncValue message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.PollEncValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.PollEncValue} PollEncValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PollEncValue.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.Message.PollEncValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.encPayload = reader.bytes(); + break; + case 2: + message.encIv = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PollEncValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.PollEncValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.PollEncValue} PollEncValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PollEncValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PollEncValue message. + * @function verify + * @memberof proto.Message.PollEncValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PollEncValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.encPayload != null && message.hasOwnProperty("encPayload")) + if (!(message.encPayload && typeof message.encPayload.length === "number" || $util.isString(message.encPayload))) + return "encPayload: buffer expected"; + if (message.encIv != null && message.hasOwnProperty("encIv")) + if (!(message.encIv && typeof message.encIv.length === "number" || $util.isString(message.encIv))) + return "encIv: buffer expected"; + return null; + }; + + /** + * Creates a PollEncValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.PollEncValue + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.PollEncValue} PollEncValue + */ + PollEncValue.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.PollEncValue) + return object; + var message = new $root.proto.Message.PollEncValue(); + if (object.encPayload != null) + if (typeof object.encPayload === "string") + $util.base64.decode(object.encPayload, message.encPayload = $util.newBuffer($util.base64.length(object.encPayload)), 0); + else if (object.encPayload.length) + message.encPayload = object.encPayload; + if (object.encIv != null) + if (typeof object.encIv === "string") + $util.base64.decode(object.encIv, message.encIv = $util.newBuffer($util.base64.length(object.encIv)), 0); + else if (object.encIv.length) + message.encIv = object.encIv; + return message; + }; + + /** + * Creates a plain object from a PollEncValue message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.PollEncValue + * @static + * @param {proto.Message.PollEncValue} message PollEncValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PollEncValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.encPayload = ""; + else { + object.encPayload = []; + if (options.bytes !== Array) + object.encPayload = $util.newBuffer(object.encPayload); + } + if (options.bytes === String) + object.encIv = ""; + else { + object.encIv = []; + if (options.bytes !== Array) + object.encIv = $util.newBuffer(object.encIv); + } + } + if (message.encPayload != null && message.hasOwnProperty("encPayload")) + object.encPayload = options.bytes === String ? $util.base64.encode(message.encPayload, 0, message.encPayload.length) : options.bytes === Array ? Array.prototype.slice.call(message.encPayload) : message.encPayload; + if (message.encIv != null && message.hasOwnProperty("encIv")) + object.encIv = options.bytes === String ? $util.base64.encode(message.encIv, 0, message.encIv.length) : options.bytes === Array ? Array.prototype.slice.call(message.encIv) : message.encIv; + return object; + }; + + /** + * Converts this PollEncValue to JSON. + * @function toJSON + * @memberof proto.Message.PollEncValue + * @instance + * @returns {Object.} JSON object + */ + PollEncValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PollEncValue; + })(); + + Message.PollUpdateMessageMetadata = (function() { + + /** + * Properties of a PollUpdateMessageMetadata. + * @memberof proto.Message + * @interface IPollUpdateMessageMetadata + */ + + /** + * Constructs a new PollUpdateMessageMetadata. + * @memberof proto.Message + * @classdesc Represents a PollUpdateMessageMetadata. + * @implements IPollUpdateMessageMetadata + * @constructor + * @param {proto.Message.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.Message.PollUpdateMessageMetadata + * @static + * @param {proto.Message.IPollUpdateMessageMetadata=} [properties] Properties to set + * @returns {proto.Message.PollUpdateMessageMetadata} PollUpdateMessageMetadata instance + */ + PollUpdateMessageMetadata.create = function create(properties) { + return new PollUpdateMessageMetadata(properties); + }; + + /** + * Encodes the specified PollUpdateMessageMetadata message. Does not implicitly {@link proto.Message.PollUpdateMessageMetadata.verify|verify} messages. + * @function encode + * @memberof proto.Message.PollUpdateMessageMetadata + * @static + * @param {proto.Message.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.Message.PollUpdateMessageMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.PollUpdateMessageMetadata + * @static + * @param {proto.Message.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.Message.PollUpdateMessageMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.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.Message.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.Message.PollUpdateMessageMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.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.Message.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.Message.PollUpdateMessageMetadata + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.PollUpdateMessageMetadata} PollUpdateMessageMetadata + */ + PollUpdateMessageMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.PollUpdateMessageMetadata) + return object; + return new $root.proto.Message.PollUpdateMessageMetadata(); + }; + + /** + * Creates a plain object from a PollUpdateMessageMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.PollUpdateMessageMetadata + * @static + * @param {proto.Message.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.Message.PollUpdateMessageMetadata + * @instance + * @returns {Object.} JSON object + */ + PollUpdateMessageMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PollUpdateMessageMetadata; + })(); + + Message.PollUpdateMessage = (function() { + + /** + * Properties of a PollUpdateMessage. + * @memberof proto.Message + * @interface IPollUpdateMessage + * @property {proto.IMessageKey|null} [pollCreationMessageKey] PollUpdateMessage pollCreationMessageKey + * @property {proto.Message.IPollEncValue|null} [vote] PollUpdateMessage vote + * @property {proto.Message.IPollUpdateMessageMetadata|null} [metadata] PollUpdateMessage metadata + * @property {number|Long|null} [senderTimestampMs] PollUpdateMessage senderTimestampMs + */ + + /** + * Constructs a new PollUpdateMessage. + * @memberof proto.Message + * @classdesc Represents a PollUpdateMessage. + * @implements IPollUpdateMessage + * @constructor + * @param {proto.Message.IPollUpdateMessage=} [properties] Properties to set + */ + function PollUpdateMessage(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]]; + } + + /** + * PollUpdateMessage pollCreationMessageKey. + * @member {proto.IMessageKey|null|undefined} pollCreationMessageKey + * @memberof proto.Message.PollUpdateMessage + * @instance + */ + PollUpdateMessage.prototype.pollCreationMessageKey = null; + + /** + * PollUpdateMessage vote. + * @member {proto.Message.IPollEncValue|null|undefined} vote + * @memberof proto.Message.PollUpdateMessage + * @instance + */ + PollUpdateMessage.prototype.vote = null; + + /** + * PollUpdateMessage metadata. + * @member {proto.Message.IPollUpdateMessageMetadata|null|undefined} metadata + * @memberof proto.Message.PollUpdateMessage + * @instance + */ + PollUpdateMessage.prototype.metadata = null; + + /** + * PollUpdateMessage senderTimestampMs. + * @member {number|Long} senderTimestampMs + * @memberof proto.Message.PollUpdateMessage + * @instance + */ + PollUpdateMessage.prototype.senderTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new PollUpdateMessage instance using the specified properties. + * @function create + * @memberof proto.Message.PollUpdateMessage + * @static + * @param {proto.Message.IPollUpdateMessage=} [properties] Properties to set + * @returns {proto.Message.PollUpdateMessage} PollUpdateMessage instance + */ + PollUpdateMessage.create = function create(properties) { + return new PollUpdateMessage(properties); + }; + + /** + * Encodes the specified PollUpdateMessage message. Does not implicitly {@link proto.Message.PollUpdateMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.PollUpdateMessage + * @static + * @param {proto.Message.IPollUpdateMessage} message PollUpdateMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PollUpdateMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pollCreationMessageKey != null && Object.hasOwnProperty.call(message, "pollCreationMessageKey")) + $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.Message.PollEncValue.encode(message.vote, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.proto.Message.PollUpdateMessageMetadata.encode(message.metadata, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.senderTimestampMs != null && Object.hasOwnProperty.call(message, "senderTimestampMs")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.senderTimestampMs); + return writer; + }; + + /** + * Encodes the specified PollUpdateMessage message, length delimited. Does not implicitly {@link proto.Message.PollUpdateMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.PollUpdateMessage + * @static + * @param {proto.Message.IPollUpdateMessage} message PollUpdateMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PollUpdateMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PollUpdateMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.PollUpdateMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.PollUpdateMessage} PollUpdateMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PollUpdateMessage.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.Message.PollUpdateMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pollCreationMessageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + case 2: + message.vote = $root.proto.Message.PollEncValue.decode(reader, reader.uint32()); + break; + case 3: + message.metadata = $root.proto.Message.PollUpdateMessageMetadata.decode(reader, reader.uint32()); + break; + case 4: + message.senderTimestampMs = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PollUpdateMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.PollUpdateMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.PollUpdateMessage} PollUpdateMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PollUpdateMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PollUpdateMessage message. + * @function verify + * @memberof proto.Message.PollUpdateMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PollUpdateMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pollCreationMessageKey != null && message.hasOwnProperty("pollCreationMessageKey")) { + var error = $root.proto.MessageKey.verify(message.pollCreationMessageKey); + if (error) + return "pollCreationMessageKey." + error; + } + if (message.vote != null && message.hasOwnProperty("vote")) { + var error = $root.proto.Message.PollEncValue.verify(message.vote); + if (error) + return "vote." + error; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.proto.Message.PollUpdateMessageMetadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + 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"; + return null; + }; + + /** + * Creates a PollUpdateMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.PollUpdateMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.PollUpdateMessage} PollUpdateMessage + */ + PollUpdateMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.PollUpdateMessage) + return object; + var message = new $root.proto.Message.PollUpdateMessage(); + if (object.pollCreationMessageKey != null) { + if (typeof object.pollCreationMessageKey !== "object") + throw TypeError(".proto.Message.PollUpdateMessage.pollCreationMessageKey: object expected"); + message.pollCreationMessageKey = $root.proto.MessageKey.fromObject(object.pollCreationMessageKey); + } + if (object.vote != null) { + if (typeof object.vote !== "object") + throw TypeError(".proto.Message.PollUpdateMessage.vote: object expected"); + message.vote = $root.proto.Message.PollEncValue.fromObject(object.vote); + } + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".proto.Message.PollUpdateMessage.metadata: object expected"); + message.metadata = $root.proto.Message.PollUpdateMessageMetadata.fromObject(object.metadata); + } + 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(); + return message; + }; + + /** + * Creates a plain object from a PollUpdateMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.PollUpdateMessage + * @static + * @param {proto.Message.PollUpdateMessage} message PollUpdateMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PollUpdateMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.pollCreationMessageKey = null; + object.vote = null; + object.metadata = null; + 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; + } + 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.Message.PollEncValue.toObject(message.vote, options); + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.proto.Message.PollUpdateMessageMetadata.toObject(message.metadata, options); + 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; + return object; + }; + + /** + * Converts this PollUpdateMessage to JSON. + * @function toJSON + * @memberof proto.Message.PollUpdateMessage + * @instance + * @returns {Object.} JSON object + */ + PollUpdateMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PollUpdateMessage; + })(); + + Message.PollVoteMessage = (function() { + + /** + * Properties of a PollVoteMessage. + * @memberof proto.Message + * @interface IPollVoteMessage + * @property {Array.|null} [selectedOptions] PollVoteMessage selectedOptions + */ + + /** + * Constructs a new PollVoteMessage. + * @memberof proto.Message + * @classdesc Represents a PollVoteMessage. + * @implements IPollVoteMessage + * @constructor + * @param {proto.Message.IPollVoteMessage=} [properties] Properties to set + */ + function PollVoteMessage(properties) { + this.selectedOptions = []; + 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]]; + } + + /** + * PollVoteMessage selectedOptions. + * @member {Array.} selectedOptions + * @memberof proto.Message.PollVoteMessage + * @instance + */ + PollVoteMessage.prototype.selectedOptions = $util.emptyArray; + + /** + * Creates a new PollVoteMessage instance using the specified properties. + * @function create + * @memberof proto.Message.PollVoteMessage + * @static + * @param {proto.Message.IPollVoteMessage=} [properties] Properties to set + * @returns {proto.Message.PollVoteMessage} PollVoteMessage instance + */ + PollVoteMessage.create = function create(properties) { + return new PollVoteMessage(properties); + }; + + /** + * Encodes the specified PollVoteMessage message. Does not implicitly {@link proto.Message.PollVoteMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.PollVoteMessage + * @static + * @param {proto.Message.IPollVoteMessage} message PollVoteMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PollVoteMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selectedOptions != null && message.selectedOptions.length) + for (var i = 0; i < message.selectedOptions.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.selectedOptions[i]); + return writer; + }; + + /** + * Encodes the specified PollVoteMessage message, length delimited. Does not implicitly {@link proto.Message.PollVoteMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.PollVoteMessage + * @static + * @param {proto.Message.IPollVoteMessage} message PollVoteMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PollVoteMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PollVoteMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.PollVoteMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.PollVoteMessage} PollVoteMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PollVoteMessage.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.Message.PollVoteMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.selectedOptions && message.selectedOptions.length)) + message.selectedOptions = []; + message.selectedOptions.push(reader.bytes()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PollVoteMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.PollVoteMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.PollVoteMessage} PollVoteMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PollVoteMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PollVoteMessage message. + * @function verify + * @memberof proto.Message.PollVoteMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PollVoteMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.selectedOptions != null && message.hasOwnProperty("selectedOptions")) { + if (!Array.isArray(message.selectedOptions)) + return "selectedOptions: array expected"; + for (var i = 0; i < message.selectedOptions.length; ++i) + if (!(message.selectedOptions[i] && typeof message.selectedOptions[i].length === "number" || $util.isString(message.selectedOptions[i]))) + return "selectedOptions: buffer[] expected"; + } + return null; + }; + + /** + * Creates a PollVoteMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.PollVoteMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.PollVoteMessage} PollVoteMessage + */ + PollVoteMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.PollVoteMessage) + return object; + var message = new $root.proto.Message.PollVoteMessage(); + if (object.selectedOptions) { + if (!Array.isArray(object.selectedOptions)) + throw TypeError(".proto.Message.PollVoteMessage.selectedOptions: array expected"); + message.selectedOptions = []; + for (var i = 0; i < object.selectedOptions.length; ++i) + if (typeof object.selectedOptions[i] === "string") + $util.base64.decode(object.selectedOptions[i], message.selectedOptions[i] = $util.newBuffer($util.base64.length(object.selectedOptions[i])), 0); + else if (object.selectedOptions[i].length) + message.selectedOptions[i] = object.selectedOptions[i]; + } + return message; + }; + + /** + * Creates a plain object from a PollVoteMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.PollVoteMessage + * @static + * @param {proto.Message.PollVoteMessage} message PollVoteMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PollVoteMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.selectedOptions = []; + if (message.selectedOptions && message.selectedOptions.length) { + object.selectedOptions = []; + for (var j = 0; j < message.selectedOptions.length; ++j) + object.selectedOptions[j] = options.bytes === String ? $util.base64.encode(message.selectedOptions[j], 0, message.selectedOptions[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.selectedOptions[j]) : message.selectedOptions[j]; + } + return object; + }; + + /** + * Converts this PollVoteMessage to JSON. + * @function toJSON + * @memberof proto.Message.PollVoteMessage + * @instance + * @returns {Object.} JSON object + */ + PollVoteMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PollVoteMessage; + })(); + + Message.ProductMessage = (function() { + + /** + * Properties of a ProductMessage. + * @memberof proto.Message + * @interface IProductMessage + * @property {proto.Message.ProductMessage.IProductSnapshot|null} [product] ProductMessage product + * @property {string|null} [businessOwnerJid] ProductMessage businessOwnerJid + * @property {proto.Message.ProductMessage.ICatalogSnapshot|null} [catalog] ProductMessage catalog + * @property {string|null} [body] ProductMessage body + * @property {string|null} [footer] ProductMessage footer + * @property {proto.IContextInfo|null} [contextInfo] ProductMessage contextInfo + */ + + /** + * Constructs a new ProductMessage. + * @memberof proto.Message + * @classdesc Represents a ProductMessage. + * @implements IProductMessage + * @constructor + * @param {proto.Message.IProductMessage=} [properties] Properties to set + */ + function ProductMessage(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]]; + } + + /** + * ProductMessage product. + * @member {proto.Message.ProductMessage.IProductSnapshot|null|undefined} product + * @memberof proto.Message.ProductMessage + * @instance + */ + ProductMessage.prototype.product = null; + + /** + * ProductMessage businessOwnerJid. + * @member {string} businessOwnerJid + * @memberof proto.Message.ProductMessage + * @instance + */ + ProductMessage.prototype.businessOwnerJid = ""; + + /** + * ProductMessage catalog. + * @member {proto.Message.ProductMessage.ICatalogSnapshot|null|undefined} catalog + * @memberof proto.Message.ProductMessage + * @instance + */ + ProductMessage.prototype.catalog = null; + + /** + * ProductMessage body. + * @member {string} body + * @memberof proto.Message.ProductMessage + * @instance + */ + ProductMessage.prototype.body = ""; + + /** + * ProductMessage footer. + * @member {string} footer + * @memberof proto.Message.ProductMessage + * @instance + */ + ProductMessage.prototype.footer = ""; + + /** + * ProductMessage contextInfo. + * @member {proto.IContextInfo|null|undefined} contextInfo + * @memberof proto.Message.ProductMessage + * @instance + */ + ProductMessage.prototype.contextInfo = null; + + /** + * Creates a new ProductMessage instance using the specified properties. + * @function create + * @memberof proto.Message.ProductMessage + * @static + * @param {proto.Message.IProductMessage=} [properties] Properties to set + * @returns {proto.Message.ProductMessage} ProductMessage instance + */ + ProductMessage.create = function create(properties) { + return new ProductMessage(properties); + }; + + /** + * Encodes the specified ProductMessage message. Does not implicitly {@link proto.Message.ProductMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.ProductMessage + * @static + * @param {proto.Message.IProductMessage} message ProductMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProductMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.product != null && Object.hasOwnProperty.call(message, "product")) + $root.proto.Message.ProductMessage.ProductSnapshot.encode(message.product, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.businessOwnerJid != null && Object.hasOwnProperty.call(message, "businessOwnerJid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.businessOwnerJid); + if (message.catalog != null && Object.hasOwnProperty.call(message, "catalog")) + $root.proto.Message.ProductMessage.CatalogSnapshot.encode(message.catalog, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.body); + if (message.footer != null && Object.hasOwnProperty.call(message, "footer")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.footer); + if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) + $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ProductMessage message, length delimited. Does not implicitly {@link proto.Message.ProductMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.ProductMessage + * @static + * @param {proto.Message.IProductMessage} message ProductMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProductMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProductMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.ProductMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.ProductMessage} ProductMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProductMessage.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.Message.ProductMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.product = $root.proto.Message.ProductMessage.ProductSnapshot.decode(reader, reader.uint32()); + break; + case 2: + message.businessOwnerJid = reader.string(); + break; + case 4: + message.catalog = $root.proto.Message.ProductMessage.CatalogSnapshot.decode(reader, reader.uint32()); + break; + case 5: + message.body = reader.string(); + break; + case 6: + message.footer = reader.string(); + break; + case 17: + message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProductMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.ProductMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.ProductMessage} ProductMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProductMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProductMessage message. + * @function verify + * @memberof proto.Message.ProductMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProductMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.product != null && message.hasOwnProperty("product")) { + var error = $root.proto.Message.ProductMessage.ProductSnapshot.verify(message.product); + if (error) + return "product." + error; + } + if (message.businessOwnerJid != null && message.hasOwnProperty("businessOwnerJid")) + if (!$util.isString(message.businessOwnerJid)) + return "businessOwnerJid: string expected"; + if (message.catalog != null && message.hasOwnProperty("catalog")) { + var error = $root.proto.Message.ProductMessage.CatalogSnapshot.verify(message.catalog); + if (error) + return "catalog." + error; + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.footer != null && message.hasOwnProperty("footer")) + if (!$util.isString(message.footer)) + return "footer: string expected"; + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } + return null; + }; + + /** + * Creates a ProductMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.ProductMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.ProductMessage} ProductMessage + */ + ProductMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.ProductMessage) + return object; + var message = new $root.proto.Message.ProductMessage(); + if (object.product != null) { + if (typeof object.product !== "object") + throw TypeError(".proto.Message.ProductMessage.product: object expected"); + message.product = $root.proto.Message.ProductMessage.ProductSnapshot.fromObject(object.product); + } + if (object.businessOwnerJid != null) + message.businessOwnerJid = String(object.businessOwnerJid); + if (object.catalog != null) { + if (typeof object.catalog !== "object") + throw TypeError(".proto.Message.ProductMessage.catalog: object expected"); + message.catalog = $root.proto.Message.ProductMessage.CatalogSnapshot.fromObject(object.catalog); + } + if (object.body != null) + message.body = String(object.body); + if (object.footer != null) + message.footer = String(object.footer); + if (object.contextInfo != null) { + if (typeof object.contextInfo !== "object") + throw TypeError(".proto.Message.ProductMessage.contextInfo: object expected"); + message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); + } + return message; + }; + + /** + * Creates a plain object from a ProductMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.ProductMessage + * @static + * @param {proto.Message.ProductMessage} message ProductMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProductMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.product = null; + object.businessOwnerJid = ""; + object.catalog = null; + object.body = ""; + object.footer = ""; + object.contextInfo = null; + } + if (message.product != null && message.hasOwnProperty("product")) + object.product = $root.proto.Message.ProductMessage.ProductSnapshot.toObject(message.product, options); + if (message.businessOwnerJid != null && message.hasOwnProperty("businessOwnerJid")) + object.businessOwnerJid = message.businessOwnerJid; + if (message.catalog != null && message.hasOwnProperty("catalog")) + object.catalog = $root.proto.Message.ProductMessage.CatalogSnapshot.toObject(message.catalog, options); + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.footer != null && message.hasOwnProperty("footer")) + object.footer = message.footer; + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) + object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + return object; + }; + + /** + * Converts this ProductMessage to JSON. + * @function toJSON + * @memberof proto.Message.ProductMessage + * @instance + * @returns {Object.} JSON object + */ + ProductMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + ProductMessage.CatalogSnapshot = (function() { + + /** + * Properties of a CatalogSnapshot. + * @memberof proto.Message.ProductMessage + * @interface ICatalogSnapshot + * @property {proto.Message.IImageMessage|null} [catalogImage] CatalogSnapshot catalogImage + * @property {string|null} [title] CatalogSnapshot title + * @property {string|null} [description] CatalogSnapshot description + */ + + /** + * Constructs a new CatalogSnapshot. + * @memberof proto.Message.ProductMessage + * @classdesc Represents a CatalogSnapshot. + * @implements ICatalogSnapshot + * @constructor + * @param {proto.Message.ProductMessage.ICatalogSnapshot=} [properties] Properties to set + */ + function CatalogSnapshot(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]]; + } + + /** + * CatalogSnapshot catalogImage. + * @member {proto.Message.IImageMessage|null|undefined} catalogImage + * @memberof proto.Message.ProductMessage.CatalogSnapshot + * @instance + */ + CatalogSnapshot.prototype.catalogImage = null; + + /** + * CatalogSnapshot title. + * @member {string} title + * @memberof proto.Message.ProductMessage.CatalogSnapshot + * @instance + */ + CatalogSnapshot.prototype.title = ""; + + /** + * CatalogSnapshot description. + * @member {string} description + * @memberof proto.Message.ProductMessage.CatalogSnapshot + * @instance + */ + CatalogSnapshot.prototype.description = ""; + + /** + * Creates a new CatalogSnapshot instance using the specified properties. + * @function create + * @memberof proto.Message.ProductMessage.CatalogSnapshot + * @static + * @param {proto.Message.ProductMessage.ICatalogSnapshot=} [properties] Properties to set + * @returns {proto.Message.ProductMessage.CatalogSnapshot} CatalogSnapshot instance + */ + CatalogSnapshot.create = function create(properties) { + return new CatalogSnapshot(properties); + }; + + /** + * Encodes the specified CatalogSnapshot message. Does not implicitly {@link proto.Message.ProductMessage.CatalogSnapshot.verify|verify} messages. + * @function encode + * @memberof proto.Message.ProductMessage.CatalogSnapshot + * @static + * @param {proto.Message.ProductMessage.ICatalogSnapshot} message CatalogSnapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CatalogSnapshot.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.catalogImage != null && Object.hasOwnProperty.call(message, "catalogImage")) + $root.proto.Message.ImageMessage.encode(message.catalogImage, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + return writer; + }; + + /** + * Encodes the specified CatalogSnapshot message, length delimited. Does not implicitly {@link proto.Message.ProductMessage.CatalogSnapshot.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.ProductMessage.CatalogSnapshot + * @static + * @param {proto.Message.ProductMessage.ICatalogSnapshot} message CatalogSnapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CatalogSnapshot.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CatalogSnapshot message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.ProductMessage.CatalogSnapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.ProductMessage.CatalogSnapshot} CatalogSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CatalogSnapshot.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.Message.ProductMessage.CatalogSnapshot(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.catalogImage = $root.proto.Message.ImageMessage.decode(reader, reader.uint32()); + break; + case 2: + message.title = reader.string(); + break; + case 3: + message.description = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CatalogSnapshot message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.ProductMessage.CatalogSnapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.ProductMessage.CatalogSnapshot} CatalogSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CatalogSnapshot.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CatalogSnapshot message. + * @function verify + * @memberof proto.Message.ProductMessage.CatalogSnapshot + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CatalogSnapshot.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.catalogImage != null && message.hasOwnProperty("catalogImage")) { + var error = $root.proto.Message.ImageMessage.verify(message.catalogImage); + if (error) + return "catalogImage." + error; + } + 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"; + return null; + }; + + /** + * Creates a CatalogSnapshot message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.ProductMessage.CatalogSnapshot + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.ProductMessage.CatalogSnapshot} CatalogSnapshot + */ + CatalogSnapshot.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.ProductMessage.CatalogSnapshot) + return object; + var message = new $root.proto.Message.ProductMessage.CatalogSnapshot(); + if (object.catalogImage != null) { + if (typeof object.catalogImage !== "object") + throw TypeError(".proto.Message.ProductMessage.CatalogSnapshot.catalogImage: object expected"); + message.catalogImage = $root.proto.Message.ImageMessage.fromObject(object.catalogImage); + } + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from a CatalogSnapshot message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.ProductMessage.CatalogSnapshot + * @static + * @param {proto.Message.ProductMessage.CatalogSnapshot} message CatalogSnapshot + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CatalogSnapshot.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.catalogImage = null; + object.title = ""; + object.description = ""; + } + if (message.catalogImage != null && message.hasOwnProperty("catalogImage")) + object.catalogImage = $root.proto.Message.ImageMessage.toObject(message.catalogImage, options); + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + return object; + }; + + /** + * Converts this CatalogSnapshot to JSON. + * @function toJSON + * @memberof proto.Message.ProductMessage.CatalogSnapshot + * @instance + * @returns {Object.} JSON object + */ + CatalogSnapshot.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CatalogSnapshot; + })(); + + ProductMessage.ProductSnapshot = (function() { + + /** + * Properties of a ProductSnapshot. + * @memberof proto.Message.ProductMessage + * @interface IProductSnapshot + * @property {proto.Message.IImageMessage|null} [productImage] ProductSnapshot productImage + * @property {string|null} [productId] ProductSnapshot productId + * @property {string|null} [title] ProductSnapshot title + * @property {string|null} [description] ProductSnapshot description + * @property {string|null} [currencyCode] ProductSnapshot currencyCode + * @property {number|Long|null} [priceAmount1000] ProductSnapshot priceAmount1000 + * @property {string|null} [retailerId] ProductSnapshot retailerId + * @property {string|null} [url] ProductSnapshot url + * @property {number|null} [productImageCount] ProductSnapshot productImageCount + * @property {string|null} [firstImageId] ProductSnapshot firstImageId + * @property {number|Long|null} [salePriceAmount1000] ProductSnapshot salePriceAmount1000 + */ + + /** + * Constructs a new ProductSnapshot. + * @memberof proto.Message.ProductMessage + * @classdesc Represents a ProductSnapshot. + * @implements IProductSnapshot + * @constructor + * @param {proto.Message.ProductMessage.IProductSnapshot=} [properties] Properties to set + */ + function ProductSnapshot(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]]; + } + + /** + * ProductSnapshot productImage. + * @member {proto.Message.IImageMessage|null|undefined} productImage + * @memberof proto.Message.ProductMessage.ProductSnapshot + * @instance + */ + ProductSnapshot.prototype.productImage = null; + + /** + * ProductSnapshot productId. + * @member {string} productId + * @memberof proto.Message.ProductMessage.ProductSnapshot + * @instance + */ + ProductSnapshot.prototype.productId = ""; + + /** + * ProductSnapshot title. + * @member {string} title + * @memberof proto.Message.ProductMessage.ProductSnapshot + * @instance + */ + ProductSnapshot.prototype.title = ""; + + /** + * ProductSnapshot description. + * @member {string} description + * @memberof proto.Message.ProductMessage.ProductSnapshot + * @instance + */ + ProductSnapshot.prototype.description = ""; + + /** + * ProductSnapshot currencyCode. + * @member {string} currencyCode + * @memberof proto.Message.ProductMessage.ProductSnapshot + * @instance + */ + ProductSnapshot.prototype.currencyCode = ""; + + /** + * ProductSnapshot priceAmount1000. + * @member {number|Long} priceAmount1000 + * @memberof proto.Message.ProductMessage.ProductSnapshot + * @instance + */ + ProductSnapshot.prototype.priceAmount1000 = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ProductSnapshot retailerId. + * @member {string} retailerId + * @memberof proto.Message.ProductMessage.ProductSnapshot + * @instance + */ + ProductSnapshot.prototype.retailerId = ""; + + /** + * ProductSnapshot url. + * @member {string} url + * @memberof proto.Message.ProductMessage.ProductSnapshot + * @instance + */ + ProductSnapshot.prototype.url = ""; + + /** + * ProductSnapshot productImageCount. + * @member {number} productImageCount + * @memberof proto.Message.ProductMessage.ProductSnapshot + * @instance + */ + ProductSnapshot.prototype.productImageCount = 0; + + /** + * ProductSnapshot firstImageId. + * @member {string} firstImageId + * @memberof proto.Message.ProductMessage.ProductSnapshot + * @instance + */ + ProductSnapshot.prototype.firstImageId = ""; + + /** + * ProductSnapshot salePriceAmount1000. + * @member {number|Long} salePriceAmount1000 + * @memberof proto.Message.ProductMessage.ProductSnapshot + * @instance + */ + ProductSnapshot.prototype.salePriceAmount1000 = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new ProductSnapshot instance using the specified properties. + * @function create + * @memberof proto.Message.ProductMessage.ProductSnapshot + * @static + * @param {proto.Message.ProductMessage.IProductSnapshot=} [properties] Properties to set + * @returns {proto.Message.ProductMessage.ProductSnapshot} ProductSnapshot instance + */ + ProductSnapshot.create = function create(properties) { + return new ProductSnapshot(properties); + }; + + /** + * Encodes the specified ProductSnapshot message. Does not implicitly {@link proto.Message.ProductMessage.ProductSnapshot.verify|verify} messages. + * @function encode + * @memberof proto.Message.ProductMessage.ProductSnapshot + * @static + * @param {proto.Message.ProductMessage.IProductSnapshot} message ProductSnapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProductSnapshot.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.productImage != null && Object.hasOwnProperty.call(message, "productImage")) + $root.proto.Message.ImageMessage.encode(message.productImage, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.productId != null && Object.hasOwnProperty.call(message, "productId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.productId); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); + if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.currencyCode); + if (message.priceAmount1000 != null && Object.hasOwnProperty.call(message, "priceAmount1000")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.priceAmount1000); + if (message.retailerId != null && Object.hasOwnProperty.call(message, "retailerId")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.retailerId); + if (message.url != null && Object.hasOwnProperty.call(message, "url")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.url); + if (message.productImageCount != null && Object.hasOwnProperty.call(message, "productImageCount")) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.productImageCount); + if (message.firstImageId != null && Object.hasOwnProperty.call(message, "firstImageId")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.firstImageId); + if (message.salePriceAmount1000 != null && Object.hasOwnProperty.call(message, "salePriceAmount1000")) + writer.uint32(/* id 12, wireType 0 =*/96).int64(message.salePriceAmount1000); + return writer; + }; + + /** + * Encodes the specified ProductSnapshot message, length delimited. Does not implicitly {@link proto.Message.ProductMessage.ProductSnapshot.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.ProductMessage.ProductSnapshot + * @static + * @param {proto.Message.ProductMessage.IProductSnapshot} message ProductSnapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProductSnapshot.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProductSnapshot message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.ProductMessage.ProductSnapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.ProductMessage.ProductSnapshot} ProductSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProductSnapshot.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.Message.ProductMessage.ProductSnapshot(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.productImage = $root.proto.Message.ImageMessage.decode(reader, reader.uint32()); + break; + case 2: + message.productId = reader.string(); + break; + case 3: + message.title = reader.string(); + break; + case 4: + message.description = reader.string(); + break; + case 5: + message.currencyCode = reader.string(); + break; + case 6: + message.priceAmount1000 = reader.int64(); + break; + case 7: + message.retailerId = reader.string(); + break; + case 8: + message.url = reader.string(); + break; + case 9: + message.productImageCount = reader.uint32(); + break; + case 11: + message.firstImageId = reader.string(); + break; + case 12: + message.salePriceAmount1000 = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProductSnapshot message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.ProductMessage.ProductSnapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.ProductMessage.ProductSnapshot} ProductSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProductSnapshot.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProductSnapshot message. + * @function verify + * @memberof proto.Message.ProductMessage.ProductSnapshot + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProductSnapshot.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.productImage != null && message.hasOwnProperty("productImage")) { + var error = $root.proto.Message.ImageMessage.verify(message.productImage); + if (error) + return "productImage." + error; + } + if (message.productId != null && message.hasOwnProperty("productId")) + if (!$util.isString(message.productId)) + return "productId: 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.currencyCode != null && message.hasOwnProperty("currencyCode")) + if (!$util.isString(message.currencyCode)) + return "currencyCode: string expected"; + if (message.priceAmount1000 != null && message.hasOwnProperty("priceAmount1000")) + if (!$util.isInteger(message.priceAmount1000) && !(message.priceAmount1000 && $util.isInteger(message.priceAmount1000.low) && $util.isInteger(message.priceAmount1000.high))) + return "priceAmount1000: integer|Long expected"; + if (message.retailerId != null && message.hasOwnProperty("retailerId")) + if (!$util.isString(message.retailerId)) + return "retailerId: string expected"; + if (message.url != null && message.hasOwnProperty("url")) + if (!$util.isString(message.url)) + return "url: string expected"; + if (message.productImageCount != null && message.hasOwnProperty("productImageCount")) + if (!$util.isInteger(message.productImageCount)) + return "productImageCount: integer expected"; + if (message.firstImageId != null && message.hasOwnProperty("firstImageId")) + if (!$util.isString(message.firstImageId)) + return "firstImageId: string expected"; + if (message.salePriceAmount1000 != null && message.hasOwnProperty("salePriceAmount1000")) + if (!$util.isInteger(message.salePriceAmount1000) && !(message.salePriceAmount1000 && $util.isInteger(message.salePriceAmount1000.low) && $util.isInteger(message.salePriceAmount1000.high))) + return "salePriceAmount1000: integer|Long expected"; + return null; + }; + + /** + * Creates a ProductSnapshot message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.ProductMessage.ProductSnapshot + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.ProductMessage.ProductSnapshot} ProductSnapshot + */ + ProductSnapshot.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.ProductMessage.ProductSnapshot) + return object; + var message = new $root.proto.Message.ProductMessage.ProductSnapshot(); + if (object.productImage != null) { + if (typeof object.productImage !== "object") + throw TypeError(".proto.Message.ProductMessage.ProductSnapshot.productImage: object expected"); + message.productImage = $root.proto.Message.ImageMessage.fromObject(object.productImage); + } + if (object.productId != null) + message.productId = String(object.productId); + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + if (object.currencyCode != null) + message.currencyCode = String(object.currencyCode); + if (object.priceAmount1000 != null) + if ($util.Long) + (message.priceAmount1000 = $util.Long.fromValue(object.priceAmount1000)).unsigned = false; + else if (typeof object.priceAmount1000 === "string") + message.priceAmount1000 = parseInt(object.priceAmount1000, 10); + else if (typeof object.priceAmount1000 === "number") + message.priceAmount1000 = object.priceAmount1000; + else if (typeof object.priceAmount1000 === "object") + message.priceAmount1000 = new $util.LongBits(object.priceAmount1000.low >>> 0, object.priceAmount1000.high >>> 0).toNumber(); + if (object.retailerId != null) + message.retailerId = String(object.retailerId); + if (object.url != null) + message.url = String(object.url); + if (object.productImageCount != null) + message.productImageCount = object.productImageCount >>> 0; + if (object.firstImageId != null) + message.firstImageId = String(object.firstImageId); + if (object.salePriceAmount1000 != null) + if ($util.Long) + (message.salePriceAmount1000 = $util.Long.fromValue(object.salePriceAmount1000)).unsigned = false; + else if (typeof object.salePriceAmount1000 === "string") + message.salePriceAmount1000 = parseInt(object.salePriceAmount1000, 10); + else if (typeof object.salePriceAmount1000 === "number") + message.salePriceAmount1000 = object.salePriceAmount1000; + else if (typeof object.salePriceAmount1000 === "object") + message.salePriceAmount1000 = new $util.LongBits(object.salePriceAmount1000.low >>> 0, object.salePriceAmount1000.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a ProductSnapshot message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.ProductMessage.ProductSnapshot + * @static + * @param {proto.Message.ProductMessage.ProductSnapshot} message ProductSnapshot + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProductSnapshot.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.productImage = null; + object.productId = ""; + object.title = ""; + object.description = ""; + object.currencyCode = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.priceAmount1000 = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.priceAmount1000 = options.longs === String ? "0" : 0; + object.retailerId = ""; + object.url = ""; + object.productImageCount = 0; + object.firstImageId = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.salePriceAmount1000 = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.salePriceAmount1000 = options.longs === String ? "0" : 0; + } + if (message.productImage != null && message.hasOwnProperty("productImage")) + object.productImage = $root.proto.Message.ImageMessage.toObject(message.productImage, options); + if (message.productId != null && message.hasOwnProperty("productId")) + object.productId = message.productId; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + object.currencyCode = message.currencyCode; + if (message.priceAmount1000 != null && message.hasOwnProperty("priceAmount1000")) + if (typeof message.priceAmount1000 === "number") + object.priceAmount1000 = options.longs === String ? String(message.priceAmount1000) : message.priceAmount1000; + else + object.priceAmount1000 = options.longs === String ? $util.Long.prototype.toString.call(message.priceAmount1000) : options.longs === Number ? new $util.LongBits(message.priceAmount1000.low >>> 0, message.priceAmount1000.high >>> 0).toNumber() : message.priceAmount1000; + if (message.retailerId != null && message.hasOwnProperty("retailerId")) + object.retailerId = message.retailerId; + if (message.url != null && message.hasOwnProperty("url")) + object.url = message.url; + if (message.productImageCount != null && message.hasOwnProperty("productImageCount")) + object.productImageCount = message.productImageCount; + if (message.firstImageId != null && message.hasOwnProperty("firstImageId")) + object.firstImageId = message.firstImageId; + if (message.salePriceAmount1000 != null && message.hasOwnProperty("salePriceAmount1000")) + if (typeof message.salePriceAmount1000 === "number") + object.salePriceAmount1000 = options.longs === String ? String(message.salePriceAmount1000) : message.salePriceAmount1000; + else + object.salePriceAmount1000 = options.longs === String ? $util.Long.prototype.toString.call(message.salePriceAmount1000) : options.longs === Number ? new $util.LongBits(message.salePriceAmount1000.low >>> 0, message.salePriceAmount1000.high >>> 0).toNumber() : message.salePriceAmount1000; + return object; + }; + + /** + * Converts this ProductSnapshot to JSON. + * @function toJSON + * @memberof proto.Message.ProductMessage.ProductSnapshot + * @instance + * @returns {Object.} JSON object + */ + ProductSnapshot.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ProductSnapshot; + })(); + + return ProductMessage; + })(); + + Message.ProtocolMessage = (function() { + + /** + * Properties of a ProtocolMessage. + * @memberof proto.Message + * @interface IProtocolMessage + * @property {proto.IMessageKey|null} [key] ProtocolMessage key + * @property {proto.Message.ProtocolMessage.Type|null} [type] ProtocolMessage type + * @property {number|null} [ephemeralExpiration] ProtocolMessage ephemeralExpiration + * @property {number|Long|null} [ephemeralSettingTimestamp] ProtocolMessage ephemeralSettingTimestamp + * @property {proto.Message.IHistorySyncNotification|null} [historySyncNotification] ProtocolMessage historySyncNotification + * @property {proto.Message.IAppStateSyncKeyShare|null} [appStateSyncKeyShare] ProtocolMessage appStateSyncKeyShare + * @property {proto.Message.IAppStateSyncKeyRequest|null} [appStateSyncKeyRequest] ProtocolMessage appStateSyncKeyRequest + * @property {proto.Message.IInitialSecurityNotificationSettingSync|null} [initialSecurityNotificationSettingSync] ProtocolMessage initialSecurityNotificationSettingSync + * @property {proto.Message.IAppStateFatalExceptionNotification|null} [appStateFatalExceptionNotification] ProtocolMessage appStateFatalExceptionNotification + * @property {proto.IDisappearingMode|null} [disappearingMode] ProtocolMessage disappearingMode + * @property {proto.Message.IRequestMediaUploadMessage|null} [requestMediaUploadMessage] ProtocolMessage requestMediaUploadMessage + * @property {proto.Message.IRequestMediaUploadResponseMessage|null} [requestMediaUploadResponseMessage] ProtocolMessage requestMediaUploadResponseMessage + */ + + /** + * Constructs a new ProtocolMessage. + * @memberof proto.Message + * @classdesc Represents a ProtocolMessage. + * @implements IProtocolMessage + * @constructor + * @param {proto.Message.IProtocolMessage=} [properties] Properties to set + */ + function ProtocolMessage(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]]; + } + + /** + * ProtocolMessage key. + * @member {proto.IMessageKey|null|undefined} key + * @memberof proto.Message.ProtocolMessage + * @instance + */ + ProtocolMessage.prototype.key = null; + + /** + * ProtocolMessage type. + * @member {proto.Message.ProtocolMessage.Type} type + * @memberof proto.Message.ProtocolMessage + * @instance + */ + ProtocolMessage.prototype.type = 0; + + /** + * ProtocolMessage ephemeralExpiration. + * @member {number} ephemeralExpiration + * @memberof proto.Message.ProtocolMessage + * @instance + */ + ProtocolMessage.prototype.ephemeralExpiration = 0; + + /** + * ProtocolMessage ephemeralSettingTimestamp. + * @member {number|Long} ephemeralSettingTimestamp + * @memberof proto.Message.ProtocolMessage + * @instance + */ + ProtocolMessage.prototype.ephemeralSettingTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ProtocolMessage historySyncNotification. + * @member {proto.Message.IHistorySyncNotification|null|undefined} historySyncNotification + * @memberof proto.Message.ProtocolMessage + * @instance + */ + ProtocolMessage.prototype.historySyncNotification = null; + + /** + * ProtocolMessage appStateSyncKeyShare. + * @member {proto.Message.IAppStateSyncKeyShare|null|undefined} appStateSyncKeyShare + * @memberof proto.Message.ProtocolMessage + * @instance + */ + ProtocolMessage.prototype.appStateSyncKeyShare = null; + + /** + * ProtocolMessage appStateSyncKeyRequest. + * @member {proto.Message.IAppStateSyncKeyRequest|null|undefined} appStateSyncKeyRequest + * @memberof proto.Message.ProtocolMessage + * @instance + */ + ProtocolMessage.prototype.appStateSyncKeyRequest = null; + + /** + * ProtocolMessage initialSecurityNotificationSettingSync. + * @member {proto.Message.IInitialSecurityNotificationSettingSync|null|undefined} initialSecurityNotificationSettingSync + * @memberof proto.Message.ProtocolMessage + * @instance + */ + ProtocolMessage.prototype.initialSecurityNotificationSettingSync = null; + + /** + * ProtocolMessage appStateFatalExceptionNotification. + * @member {proto.Message.IAppStateFatalExceptionNotification|null|undefined} appStateFatalExceptionNotification + * @memberof proto.Message.ProtocolMessage + * @instance + */ + ProtocolMessage.prototype.appStateFatalExceptionNotification = null; + + /** + * ProtocolMessage disappearingMode. + * @member {proto.IDisappearingMode|null|undefined} disappearingMode + * @memberof proto.Message.ProtocolMessage + * @instance + */ + ProtocolMessage.prototype.disappearingMode = null; + + /** + * ProtocolMessage requestMediaUploadMessage. + * @member {proto.Message.IRequestMediaUploadMessage|null|undefined} requestMediaUploadMessage + * @memberof proto.Message.ProtocolMessage + * @instance + */ + ProtocolMessage.prototype.requestMediaUploadMessage = null; + + /** + * ProtocolMessage requestMediaUploadResponseMessage. + * @member {proto.Message.IRequestMediaUploadResponseMessage|null|undefined} requestMediaUploadResponseMessage + * @memberof proto.Message.ProtocolMessage + * @instance + */ + ProtocolMessage.prototype.requestMediaUploadResponseMessage = null; + + /** + * Creates a new ProtocolMessage instance using the specified properties. + * @function create + * @memberof proto.Message.ProtocolMessage + * @static + * @param {proto.Message.IProtocolMessage=} [properties] Properties to set + * @returns {proto.Message.ProtocolMessage} ProtocolMessage instance + */ + ProtocolMessage.create = function create(properties) { + return new ProtocolMessage(properties); + }; + + /** + * Encodes the specified ProtocolMessage message. Does not implicitly {@link proto.Message.ProtocolMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.ProtocolMessage + * @static + * @param {proto.Message.IProtocolMessage} message ProtocolMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProtocolMessage.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.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.ephemeralExpiration != null && Object.hasOwnProperty.call(message, "ephemeralExpiration")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.ephemeralExpiration); + if (message.ephemeralSettingTimestamp != null && Object.hasOwnProperty.call(message, "ephemeralSettingTimestamp")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.ephemeralSettingTimestamp); + if (message.historySyncNotification != null && Object.hasOwnProperty.call(message, "historySyncNotification")) + $root.proto.Message.HistorySyncNotification.encode(message.historySyncNotification, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.appStateSyncKeyShare != null && Object.hasOwnProperty.call(message, "appStateSyncKeyShare")) + $root.proto.Message.AppStateSyncKeyShare.encode(message.appStateSyncKeyShare, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.appStateSyncKeyRequest != null && Object.hasOwnProperty.call(message, "appStateSyncKeyRequest")) + $root.proto.Message.AppStateSyncKeyRequest.encode(message.appStateSyncKeyRequest, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.initialSecurityNotificationSettingSync != null && Object.hasOwnProperty.call(message, "initialSecurityNotificationSettingSync")) + $root.proto.Message.InitialSecurityNotificationSettingSync.encode(message.initialSecurityNotificationSettingSync, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.appStateFatalExceptionNotification != null && Object.hasOwnProperty.call(message, "appStateFatalExceptionNotification")) + $root.proto.Message.AppStateFatalExceptionNotification.encode(message.appStateFatalExceptionNotification, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.disappearingMode != null && Object.hasOwnProperty.call(message, "disappearingMode")) + $root.proto.DisappearingMode.encode(message.disappearingMode, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.requestMediaUploadMessage != null && Object.hasOwnProperty.call(message, "requestMediaUploadMessage")) + $root.proto.Message.RequestMediaUploadMessage.encode(message.requestMediaUploadMessage, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.requestMediaUploadResponseMessage != null && Object.hasOwnProperty.call(message, "requestMediaUploadResponseMessage")) + $root.proto.Message.RequestMediaUploadResponseMessage.encode(message.requestMediaUploadResponseMessage, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ProtocolMessage message, length delimited. Does not implicitly {@link proto.Message.ProtocolMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.ProtocolMessage + * @static + * @param {proto.Message.IProtocolMessage} message ProtocolMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProtocolMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProtocolMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.ProtocolMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.ProtocolMessage} ProtocolMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProtocolMessage.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.Message.ProtocolMessage(); + 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.type = reader.int32(); + break; + case 4: + message.ephemeralExpiration = reader.uint32(); + break; + case 5: + message.ephemeralSettingTimestamp = reader.int64(); + break; + case 6: + message.historySyncNotification = $root.proto.Message.HistorySyncNotification.decode(reader, reader.uint32()); + break; + case 7: + message.appStateSyncKeyShare = $root.proto.Message.AppStateSyncKeyShare.decode(reader, reader.uint32()); + break; + case 8: + message.appStateSyncKeyRequest = $root.proto.Message.AppStateSyncKeyRequest.decode(reader, reader.uint32()); + break; + case 9: + message.initialSecurityNotificationSettingSync = $root.proto.Message.InitialSecurityNotificationSettingSync.decode(reader, reader.uint32()); + break; + case 10: + message.appStateFatalExceptionNotification = $root.proto.Message.AppStateFatalExceptionNotification.decode(reader, reader.uint32()); + break; + case 11: + message.disappearingMode = $root.proto.DisappearingMode.decode(reader, reader.uint32()); + break; + case 12: + message.requestMediaUploadMessage = $root.proto.Message.RequestMediaUploadMessage.decode(reader, reader.uint32()); + break; + case 13: + message.requestMediaUploadResponseMessage = $root.proto.Message.RequestMediaUploadResponseMessage.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProtocolMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.ProtocolMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.ProtocolMessage} ProtocolMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProtocolMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProtocolMessage message. + * @function verify + * @memberof proto.Message.ProtocolMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProtocolMessage.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.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + 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.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.historySyncNotification != null && message.hasOwnProperty("historySyncNotification")) { + var error = $root.proto.Message.HistorySyncNotification.verify(message.historySyncNotification); + if (error) + return "historySyncNotification." + error; + } + if (message.appStateSyncKeyShare != null && message.hasOwnProperty("appStateSyncKeyShare")) { + var error = $root.proto.Message.AppStateSyncKeyShare.verify(message.appStateSyncKeyShare); + if (error) + return "appStateSyncKeyShare." + error; + } + if (message.appStateSyncKeyRequest != null && message.hasOwnProperty("appStateSyncKeyRequest")) { + var error = $root.proto.Message.AppStateSyncKeyRequest.verify(message.appStateSyncKeyRequest); + if (error) + return "appStateSyncKeyRequest." + error; + } + if (message.initialSecurityNotificationSettingSync != null && message.hasOwnProperty("initialSecurityNotificationSettingSync")) { + var error = $root.proto.Message.InitialSecurityNotificationSettingSync.verify(message.initialSecurityNotificationSettingSync); + if (error) + return "initialSecurityNotificationSettingSync." + error; + } + if (message.appStateFatalExceptionNotification != null && message.hasOwnProperty("appStateFatalExceptionNotification")) { + var error = $root.proto.Message.AppStateFatalExceptionNotification.verify(message.appStateFatalExceptionNotification); + if (error) + return "appStateFatalExceptionNotification." + error; + } + if (message.disappearingMode != null && message.hasOwnProperty("disappearingMode")) { + var error = $root.proto.DisappearingMode.verify(message.disappearingMode); + if (error) + return "disappearingMode." + error; + } + if (message.requestMediaUploadMessage != null && message.hasOwnProperty("requestMediaUploadMessage")) { + var error = $root.proto.Message.RequestMediaUploadMessage.verify(message.requestMediaUploadMessage); + if (error) + return "requestMediaUploadMessage." + error; + } + if (message.requestMediaUploadResponseMessage != null && message.hasOwnProperty("requestMediaUploadResponseMessage")) { + var error = $root.proto.Message.RequestMediaUploadResponseMessage.verify(message.requestMediaUploadResponseMessage); + if (error) + return "requestMediaUploadResponseMessage." + error; + } + return null; + }; + + /** + * Creates a ProtocolMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.ProtocolMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.ProtocolMessage} ProtocolMessage + */ + ProtocolMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.ProtocolMessage) + return object; + var message = new $root.proto.Message.ProtocolMessage(); + if (object.key != null) { + if (typeof object.key !== "object") + throw TypeError(".proto.Message.ProtocolMessage.key: object expected"); + message.key = $root.proto.MessageKey.fromObject(object.key); + } + switch (object.type) { + case "REVOKE": + case 0: + message.type = 0; + break; + case "EPHEMERAL_SETTING": + case 3: + message.type = 3; + break; + case "EPHEMERAL_SYNC_RESPONSE": + case 4: + message.type = 4; + break; + case "HISTORY_SYNC_NOTIFICATION": + case 5: + message.type = 5; + break; + case "APP_STATE_SYNC_KEY_SHARE": + case 6: + message.type = 6; + break; + case "APP_STATE_SYNC_KEY_REQUEST": + case 7: + message.type = 7; + break; + case "MSG_FANOUT_BACKFILL_REQUEST": + case 8: + message.type = 8; + break; + case "INITIAL_SECURITY_NOTIFICATION_SETTING_SYNC": + case 9: + message.type = 9; + break; + case "APP_STATE_FATAL_EXCEPTION_NOTIFICATION": + case 10: + message.type = 10; + break; + case "SHARE_PHONE_NUMBER": + case 11: + message.type = 11; + break; + case "REQUEST_MEDIA_UPLOAD_MESSAGE": + case 12: + message.type = 12; + break; + case "REQUEST_MEDIA_UPLOAD_RESPONSE_MESSAGE": + case 13: + message.type = 13; + break; + } + 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(); + if (object.historySyncNotification != null) { + if (typeof object.historySyncNotification !== "object") + throw TypeError(".proto.Message.ProtocolMessage.historySyncNotification: object expected"); + message.historySyncNotification = $root.proto.Message.HistorySyncNotification.fromObject(object.historySyncNotification); + } + if (object.appStateSyncKeyShare != null) { + if (typeof object.appStateSyncKeyShare !== "object") + throw TypeError(".proto.Message.ProtocolMessage.appStateSyncKeyShare: object expected"); + message.appStateSyncKeyShare = $root.proto.Message.AppStateSyncKeyShare.fromObject(object.appStateSyncKeyShare); + } + if (object.appStateSyncKeyRequest != null) { + if (typeof object.appStateSyncKeyRequest !== "object") + throw TypeError(".proto.Message.ProtocolMessage.appStateSyncKeyRequest: object expected"); + message.appStateSyncKeyRequest = $root.proto.Message.AppStateSyncKeyRequest.fromObject(object.appStateSyncKeyRequest); + } + if (object.initialSecurityNotificationSettingSync != null) { + if (typeof object.initialSecurityNotificationSettingSync !== "object") + throw TypeError(".proto.Message.ProtocolMessage.initialSecurityNotificationSettingSync: object expected"); + message.initialSecurityNotificationSettingSync = $root.proto.Message.InitialSecurityNotificationSettingSync.fromObject(object.initialSecurityNotificationSettingSync); + } + if (object.appStateFatalExceptionNotification != null) { + if (typeof object.appStateFatalExceptionNotification !== "object") + throw TypeError(".proto.Message.ProtocolMessage.appStateFatalExceptionNotification: object expected"); + message.appStateFatalExceptionNotification = $root.proto.Message.AppStateFatalExceptionNotification.fromObject(object.appStateFatalExceptionNotification); + } + if (object.disappearingMode != null) { + if (typeof object.disappearingMode !== "object") + throw TypeError(".proto.Message.ProtocolMessage.disappearingMode: object expected"); + message.disappearingMode = $root.proto.DisappearingMode.fromObject(object.disappearingMode); + } + if (object.requestMediaUploadMessage != null) { + if (typeof object.requestMediaUploadMessage !== "object") + throw TypeError(".proto.Message.ProtocolMessage.requestMediaUploadMessage: object expected"); + message.requestMediaUploadMessage = $root.proto.Message.RequestMediaUploadMessage.fromObject(object.requestMediaUploadMessage); + } + if (object.requestMediaUploadResponseMessage != null) { + if (typeof object.requestMediaUploadResponseMessage !== "object") + throw TypeError(".proto.Message.ProtocolMessage.requestMediaUploadResponseMessage: object expected"); + message.requestMediaUploadResponseMessage = $root.proto.Message.RequestMediaUploadResponseMessage.fromObject(object.requestMediaUploadResponseMessage); + } + return message; + }; + + /** + * Creates a plain object from a ProtocolMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.ProtocolMessage + * @static + * @param {proto.Message.ProtocolMessage} message ProtocolMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProtocolMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.key = null; + object.type = options.enums === String ? "REVOKE" : 0; + 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.historySyncNotification = null; + object.appStateSyncKeyShare = null; + object.appStateSyncKeyRequest = null; + object.initialSecurityNotificationSettingSync = null; + object.appStateFatalExceptionNotification = null; + object.disappearingMode = null; + object.requestMediaUploadMessage = null; + object.requestMediaUploadResponseMessage = null; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = $root.proto.MessageKey.toObject(message.key, options); + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.proto.Message.ProtocolMessage.Type[message.type] : message.type; + 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.historySyncNotification != null && message.hasOwnProperty("historySyncNotification")) + object.historySyncNotification = $root.proto.Message.HistorySyncNotification.toObject(message.historySyncNotification, options); + if (message.appStateSyncKeyShare != null && message.hasOwnProperty("appStateSyncKeyShare")) + object.appStateSyncKeyShare = $root.proto.Message.AppStateSyncKeyShare.toObject(message.appStateSyncKeyShare, options); + if (message.appStateSyncKeyRequest != null && message.hasOwnProperty("appStateSyncKeyRequest")) + object.appStateSyncKeyRequest = $root.proto.Message.AppStateSyncKeyRequest.toObject(message.appStateSyncKeyRequest, options); + if (message.initialSecurityNotificationSettingSync != null && message.hasOwnProperty("initialSecurityNotificationSettingSync")) + object.initialSecurityNotificationSettingSync = $root.proto.Message.InitialSecurityNotificationSettingSync.toObject(message.initialSecurityNotificationSettingSync, options); + if (message.appStateFatalExceptionNotification != null && message.hasOwnProperty("appStateFatalExceptionNotification")) + object.appStateFatalExceptionNotification = $root.proto.Message.AppStateFatalExceptionNotification.toObject(message.appStateFatalExceptionNotification, options); + if (message.disappearingMode != null && message.hasOwnProperty("disappearingMode")) + object.disappearingMode = $root.proto.DisappearingMode.toObject(message.disappearingMode, options); + if (message.requestMediaUploadMessage != null && message.hasOwnProperty("requestMediaUploadMessage")) + object.requestMediaUploadMessage = $root.proto.Message.RequestMediaUploadMessage.toObject(message.requestMediaUploadMessage, options); + if (message.requestMediaUploadResponseMessage != null && message.hasOwnProperty("requestMediaUploadResponseMessage")) + object.requestMediaUploadResponseMessage = $root.proto.Message.RequestMediaUploadResponseMessage.toObject(message.requestMediaUploadResponseMessage, options); + return object; + }; + + /** + * Converts this ProtocolMessage to JSON. + * @function toJSON + * @memberof proto.Message.ProtocolMessage + * @instance + * @returns {Object.} JSON object + */ + ProtocolMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name proto.Message.ProtocolMessage.Type + * @enum {number} + * @property {number} REVOKE=0 REVOKE value + * @property {number} EPHEMERAL_SETTING=3 EPHEMERAL_SETTING value + * @property {number} EPHEMERAL_SYNC_RESPONSE=4 EPHEMERAL_SYNC_RESPONSE value + * @property {number} HISTORY_SYNC_NOTIFICATION=5 HISTORY_SYNC_NOTIFICATION value + * @property {number} APP_STATE_SYNC_KEY_SHARE=6 APP_STATE_SYNC_KEY_SHARE value + * @property {number} APP_STATE_SYNC_KEY_REQUEST=7 APP_STATE_SYNC_KEY_REQUEST value + * @property {number} MSG_FANOUT_BACKFILL_REQUEST=8 MSG_FANOUT_BACKFILL_REQUEST value + * @property {number} INITIAL_SECURITY_NOTIFICATION_SETTING_SYNC=9 INITIAL_SECURITY_NOTIFICATION_SETTING_SYNC value + * @property {number} APP_STATE_FATAL_EXCEPTION_NOTIFICATION=10 APP_STATE_FATAL_EXCEPTION_NOTIFICATION value + * @property {number} SHARE_PHONE_NUMBER=11 SHARE_PHONE_NUMBER value + * @property {number} REQUEST_MEDIA_UPLOAD_MESSAGE=12 REQUEST_MEDIA_UPLOAD_MESSAGE value + * @property {number} REQUEST_MEDIA_UPLOAD_RESPONSE_MESSAGE=13 REQUEST_MEDIA_UPLOAD_RESPONSE_MESSAGE value + */ + ProtocolMessage.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REVOKE"] = 0; + values[valuesById[3] = "EPHEMERAL_SETTING"] = 3; + values[valuesById[4] = "EPHEMERAL_SYNC_RESPONSE"] = 4; + values[valuesById[5] = "HISTORY_SYNC_NOTIFICATION"] = 5; + values[valuesById[6] = "APP_STATE_SYNC_KEY_SHARE"] = 6; + values[valuesById[7] = "APP_STATE_SYNC_KEY_REQUEST"] = 7; + values[valuesById[8] = "MSG_FANOUT_BACKFILL_REQUEST"] = 8; + values[valuesById[9] = "INITIAL_SECURITY_NOTIFICATION_SETTING_SYNC"] = 9; + values[valuesById[10] = "APP_STATE_FATAL_EXCEPTION_NOTIFICATION"] = 10; + values[valuesById[11] = "SHARE_PHONE_NUMBER"] = 11; + values[valuesById[12] = "REQUEST_MEDIA_UPLOAD_MESSAGE"] = 12; + values[valuesById[13] = "REQUEST_MEDIA_UPLOAD_RESPONSE_MESSAGE"] = 13; + return values; + })(); + + return ProtocolMessage; + })(); + + Message.ReactionMessage = (function() { + + /** + * Properties of a ReactionMessage. + * @memberof proto.Message + * @interface IReactionMessage + * @property {proto.IMessageKey|null} [key] ReactionMessage key + * @property {string|null} [text] ReactionMessage text + * @property {string|null} [groupingKey] ReactionMessage groupingKey + * @property {number|Long|null} [senderTimestampMs] ReactionMessage senderTimestampMs + */ + + /** + * Constructs a new ReactionMessage. + * @memberof proto.Message + * @classdesc Represents a ReactionMessage. + * @implements IReactionMessage + * @constructor + * @param {proto.Message.IReactionMessage=} [properties] Properties to set + */ + function ReactionMessage(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]]; + } + + /** + * ReactionMessage key. + * @member {proto.IMessageKey|null|undefined} key + * @memberof proto.Message.ReactionMessage + * @instance + */ + ReactionMessage.prototype.key = null; + + /** + * ReactionMessage text. + * @member {string} text + * @memberof proto.Message.ReactionMessage + * @instance + */ + ReactionMessage.prototype.text = ""; + + /** + * ReactionMessage groupingKey. + * @member {string} groupingKey + * @memberof proto.Message.ReactionMessage + * @instance + */ + ReactionMessage.prototype.groupingKey = ""; + + /** + * ReactionMessage senderTimestampMs. + * @member {number|Long} senderTimestampMs + * @memberof proto.Message.ReactionMessage + * @instance + */ + ReactionMessage.prototype.senderTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new ReactionMessage instance using the specified properties. + * @function create + * @memberof proto.Message.ReactionMessage + * @static + * @param {proto.Message.IReactionMessage=} [properties] Properties to set + * @returns {proto.Message.ReactionMessage} ReactionMessage instance + */ + ReactionMessage.create = function create(properties) { + return new ReactionMessage(properties); + }; + + /** + * Encodes the specified ReactionMessage message. Does not implicitly {@link proto.Message.ReactionMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.ReactionMessage + * @static + * @param {proto.Message.IReactionMessage} message ReactionMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReactionMessage.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); + return writer; + }; + + /** + * Encodes the specified ReactionMessage message, length delimited. Does not implicitly {@link proto.Message.ReactionMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.ReactionMessage + * @static + * @param {proto.Message.IReactionMessage} message ReactionMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReactionMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReactionMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.ReactionMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.ReactionMessage} ReactionMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReactionMessage.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.Message.ReactionMessage(); + 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; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReactionMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.ReactionMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.ReactionMessage} ReactionMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReactionMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReactionMessage message. + * @function verify + * @memberof proto.Message.ReactionMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReactionMessage.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"; + return null; + }; + + /** + * Creates a ReactionMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.ReactionMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.ReactionMessage} ReactionMessage + */ + ReactionMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.ReactionMessage) + return object; + var message = new $root.proto.Message.ReactionMessage(); + if (object.key != null) { + if (typeof object.key !== "object") + throw TypeError(".proto.Message.ReactionMessage.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(); + return message; + }; + + /** + * Creates a plain object from a ReactionMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.ReactionMessage + * @static + * @param {proto.Message.ReactionMessage} message ReactionMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReactionMessage.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; + } + 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; + return object; + }; + + /** + * Converts this ReactionMessage to JSON. + * @function toJSON + * @memberof proto.Message.ReactionMessage + * @instance + * @returns {Object.} JSON object + */ + ReactionMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ReactionMessage; + })(); + + Message.RequestMediaUploadMessage = (function() { + + /** + * Properties of a RequestMediaUploadMessage. + * @memberof proto.Message + * @interface IRequestMediaUploadMessage + * @property {Array.|null} [fileSha256] RequestMediaUploadMessage fileSha256 + * @property {proto.Message.RmrSource|null} [rmrSource] RequestMediaUploadMessage rmrSource + */ + + /** + * Constructs a new RequestMediaUploadMessage. + * @memberof proto.Message + * @classdesc Represents a RequestMediaUploadMessage. + * @implements IRequestMediaUploadMessage + * @constructor + * @param {proto.Message.IRequestMediaUploadMessage=} [properties] Properties to set + */ + function RequestMediaUploadMessage(properties) { + this.fileSha256 = []; + 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]]; + } + + /** + * RequestMediaUploadMessage fileSha256. + * @member {Array.} fileSha256 + * @memberof proto.Message.RequestMediaUploadMessage + * @instance + */ + RequestMediaUploadMessage.prototype.fileSha256 = $util.emptyArray; + + /** + * RequestMediaUploadMessage rmrSource. + * @member {proto.Message.RmrSource} rmrSource + * @memberof proto.Message.RequestMediaUploadMessage + * @instance + */ + RequestMediaUploadMessage.prototype.rmrSource = 0; + + /** + * Creates a new RequestMediaUploadMessage instance using the specified properties. + * @function create + * @memberof proto.Message.RequestMediaUploadMessage + * @static + * @param {proto.Message.IRequestMediaUploadMessage=} [properties] Properties to set + * @returns {proto.Message.RequestMediaUploadMessage} RequestMediaUploadMessage instance + */ + RequestMediaUploadMessage.create = function create(properties) { + return new RequestMediaUploadMessage(properties); + }; + + /** + * Encodes the specified RequestMediaUploadMessage message. Does not implicitly {@link proto.Message.RequestMediaUploadMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.RequestMediaUploadMessage + * @static + * @param {proto.Message.IRequestMediaUploadMessage} message RequestMediaUploadMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestMediaUploadMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fileSha256 != null && message.fileSha256.length) + for (var i = 0; i < message.fileSha256.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fileSha256[i]); + if (message.rmrSource != null && Object.hasOwnProperty.call(message, "rmrSource")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.rmrSource); + return writer; + }; + + /** + * Encodes the specified RequestMediaUploadMessage message, length delimited. Does not implicitly {@link proto.Message.RequestMediaUploadMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.RequestMediaUploadMessage + * @static + * @param {proto.Message.IRequestMediaUploadMessage} message RequestMediaUploadMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestMediaUploadMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestMediaUploadMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.RequestMediaUploadMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.RequestMediaUploadMessage} RequestMediaUploadMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestMediaUploadMessage.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.Message.RequestMediaUploadMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.fileSha256 && message.fileSha256.length)) + message.fileSha256 = []; + message.fileSha256.push(reader.string()); + break; + case 2: + message.rmrSource = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestMediaUploadMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.RequestMediaUploadMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.RequestMediaUploadMessage} RequestMediaUploadMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestMediaUploadMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestMediaUploadMessage message. + * @function verify + * @memberof proto.Message.RequestMediaUploadMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestMediaUploadMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) { + if (!Array.isArray(message.fileSha256)) + return "fileSha256: array expected"; + for (var i = 0; i < message.fileSha256.length; ++i) + if (!$util.isString(message.fileSha256[i])) + return "fileSha256: string[] expected"; + } + if (message.rmrSource != null && message.hasOwnProperty("rmrSource")) + switch (message.rmrSource) { + default: + return "rmrSource: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates a RequestMediaUploadMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.RequestMediaUploadMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.RequestMediaUploadMessage} RequestMediaUploadMessage + */ + RequestMediaUploadMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.RequestMediaUploadMessage) + return object; + var message = new $root.proto.Message.RequestMediaUploadMessage(); + if (object.fileSha256) { + if (!Array.isArray(object.fileSha256)) + throw TypeError(".proto.Message.RequestMediaUploadMessage.fileSha256: array expected"); + message.fileSha256 = []; + for (var i = 0; i < object.fileSha256.length; ++i) + message.fileSha256[i] = String(object.fileSha256[i]); + } + switch (object.rmrSource) { + case "FAVORITE_STICKER": + case 0: + message.rmrSource = 0; + break; + case "RECENT_STICKER": + case 1: + message.rmrSource = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a RequestMediaUploadMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.RequestMediaUploadMessage + * @static + * @param {proto.Message.RequestMediaUploadMessage} message RequestMediaUploadMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestMediaUploadMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.fileSha256 = []; + if (options.defaults) + object.rmrSource = options.enums === String ? "FAVORITE_STICKER" : 0; + if (message.fileSha256 && message.fileSha256.length) { + object.fileSha256 = []; + for (var j = 0; j < message.fileSha256.length; ++j) + object.fileSha256[j] = message.fileSha256[j]; + } + if (message.rmrSource != null && message.hasOwnProperty("rmrSource")) + object.rmrSource = options.enums === String ? $root.proto.Message.RmrSource[message.rmrSource] : message.rmrSource; + return object; + }; + + /** + * Converts this RequestMediaUploadMessage to JSON. + * @function toJSON + * @memberof proto.Message.RequestMediaUploadMessage + * @instance + * @returns {Object.} JSON object + */ + RequestMediaUploadMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestMediaUploadMessage; + })(); + + Message.RequestMediaUploadResponseMessage = (function() { + + /** + * Properties of a RequestMediaUploadResponseMessage. + * @memberof proto.Message + * @interface IRequestMediaUploadResponseMessage + * @property {proto.Message.RmrSource|null} [rmrSource] RequestMediaUploadResponseMessage rmrSource + * @property {string|null} [stanzaId] RequestMediaUploadResponseMessage stanzaId + * @property {Array.|null} [reuploadResult] RequestMediaUploadResponseMessage reuploadResult + */ + + /** + * Constructs a new RequestMediaUploadResponseMessage. + * @memberof proto.Message + * @classdesc Represents a RequestMediaUploadResponseMessage. + * @implements IRequestMediaUploadResponseMessage + * @constructor + * @param {proto.Message.IRequestMediaUploadResponseMessage=} [properties] Properties to set + */ + function RequestMediaUploadResponseMessage(properties) { + this.reuploadResult = []; + 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]]; + } + + /** + * RequestMediaUploadResponseMessage rmrSource. + * @member {proto.Message.RmrSource} rmrSource + * @memberof proto.Message.RequestMediaUploadResponseMessage + * @instance + */ + RequestMediaUploadResponseMessage.prototype.rmrSource = 0; + + /** + * RequestMediaUploadResponseMessage stanzaId. + * @member {string} stanzaId + * @memberof proto.Message.RequestMediaUploadResponseMessage + * @instance + */ + RequestMediaUploadResponseMessage.prototype.stanzaId = ""; + + /** + * RequestMediaUploadResponseMessage reuploadResult. + * @member {Array.} reuploadResult + * @memberof proto.Message.RequestMediaUploadResponseMessage + * @instance + */ + RequestMediaUploadResponseMessage.prototype.reuploadResult = $util.emptyArray; + + /** + * Creates a new RequestMediaUploadResponseMessage instance using the specified properties. + * @function create + * @memberof proto.Message.RequestMediaUploadResponseMessage + * @static + * @param {proto.Message.IRequestMediaUploadResponseMessage=} [properties] Properties to set + * @returns {proto.Message.RequestMediaUploadResponseMessage} RequestMediaUploadResponseMessage instance + */ + RequestMediaUploadResponseMessage.create = function create(properties) { + return new RequestMediaUploadResponseMessage(properties); + }; + + /** + * Encodes the specified RequestMediaUploadResponseMessage message. Does not implicitly {@link proto.Message.RequestMediaUploadResponseMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.RequestMediaUploadResponseMessage + * @static + * @param {proto.Message.IRequestMediaUploadResponseMessage} message RequestMediaUploadResponseMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestMediaUploadResponseMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rmrSource != null && Object.hasOwnProperty.call(message, "rmrSource")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.rmrSource); + if (message.stanzaId != null && Object.hasOwnProperty.call(message, "stanzaId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.stanzaId); + if (message.reuploadResult != null && message.reuploadResult.length) + for (var i = 0; i < message.reuploadResult.length; ++i) + $root.proto.Message.RequestMediaUploadResponseMessage.RequestMediaUploadResult.encode(message.reuploadResult[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RequestMediaUploadResponseMessage message, length delimited. Does not implicitly {@link proto.Message.RequestMediaUploadResponseMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.RequestMediaUploadResponseMessage + * @static + * @param {proto.Message.IRequestMediaUploadResponseMessage} message RequestMediaUploadResponseMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestMediaUploadResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestMediaUploadResponseMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.RequestMediaUploadResponseMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.RequestMediaUploadResponseMessage} RequestMediaUploadResponseMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestMediaUploadResponseMessage.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.Message.RequestMediaUploadResponseMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.rmrSource = reader.int32(); + break; + case 2: + message.stanzaId = reader.string(); + break; + case 3: + if (!(message.reuploadResult && message.reuploadResult.length)) + message.reuploadResult = []; + message.reuploadResult.push($root.proto.Message.RequestMediaUploadResponseMessage.RequestMediaUploadResult.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestMediaUploadResponseMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.RequestMediaUploadResponseMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.RequestMediaUploadResponseMessage} RequestMediaUploadResponseMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestMediaUploadResponseMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestMediaUploadResponseMessage message. + * @function verify + * @memberof proto.Message.RequestMediaUploadResponseMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestMediaUploadResponseMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rmrSource != null && message.hasOwnProperty("rmrSource")) + switch (message.rmrSource) { + default: + return "rmrSource: enum value expected"; + case 0: + case 1: + break; + } + if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) + if (!$util.isString(message.stanzaId)) + return "stanzaId: string expected"; + if (message.reuploadResult != null && message.hasOwnProperty("reuploadResult")) { + if (!Array.isArray(message.reuploadResult)) + return "reuploadResult: array expected"; + for (var i = 0; i < message.reuploadResult.length; ++i) { + var error = $root.proto.Message.RequestMediaUploadResponseMessage.RequestMediaUploadResult.verify(message.reuploadResult[i]); + if (error) + return "reuploadResult." + error; + } + } + return null; + }; + + /** + * Creates a RequestMediaUploadResponseMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.RequestMediaUploadResponseMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.RequestMediaUploadResponseMessage} RequestMediaUploadResponseMessage + */ + RequestMediaUploadResponseMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.RequestMediaUploadResponseMessage) + return object; + var message = new $root.proto.Message.RequestMediaUploadResponseMessage(); + switch (object.rmrSource) { + case "FAVORITE_STICKER": + case 0: + message.rmrSource = 0; + break; + case "RECENT_STICKER": + case 1: + message.rmrSource = 1; + break; + } + if (object.stanzaId != null) + message.stanzaId = String(object.stanzaId); + if (object.reuploadResult) { + if (!Array.isArray(object.reuploadResult)) + throw TypeError(".proto.Message.RequestMediaUploadResponseMessage.reuploadResult: array expected"); + message.reuploadResult = []; + for (var i = 0; i < object.reuploadResult.length; ++i) { + if (typeof object.reuploadResult[i] !== "object") + throw TypeError(".proto.Message.RequestMediaUploadResponseMessage.reuploadResult: object expected"); + message.reuploadResult[i] = $root.proto.Message.RequestMediaUploadResponseMessage.RequestMediaUploadResult.fromObject(object.reuploadResult[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a RequestMediaUploadResponseMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.RequestMediaUploadResponseMessage + * @static + * @param {proto.Message.RequestMediaUploadResponseMessage} message RequestMediaUploadResponseMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestMediaUploadResponseMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.reuploadResult = []; + if (options.defaults) { + object.rmrSource = options.enums === String ? "FAVORITE_STICKER" : 0; + object.stanzaId = ""; + } + if (message.rmrSource != null && message.hasOwnProperty("rmrSource")) + object.rmrSource = options.enums === String ? $root.proto.Message.RmrSource[message.rmrSource] : message.rmrSource; + if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) + object.stanzaId = message.stanzaId; + if (message.reuploadResult && message.reuploadResult.length) { + object.reuploadResult = []; + for (var j = 0; j < message.reuploadResult.length; ++j) + object.reuploadResult[j] = $root.proto.Message.RequestMediaUploadResponseMessage.RequestMediaUploadResult.toObject(message.reuploadResult[j], options); + } + return object; + }; + + /** + * Converts this RequestMediaUploadResponseMessage to JSON. + * @function toJSON + * @memberof proto.Message.RequestMediaUploadResponseMessage + * @instance + * @returns {Object.} JSON object + */ + RequestMediaUploadResponseMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + RequestMediaUploadResponseMessage.RequestMediaUploadResult = (function() { + + /** + * Properties of a RequestMediaUploadResult. + * @memberof proto.Message.RequestMediaUploadResponseMessage + * @interface IRequestMediaUploadResult + * @property {string|null} [fileSha256] RequestMediaUploadResult fileSha256 + * @property {proto.MediaRetryNotification.ResultType|null} [mediaUploadResult] RequestMediaUploadResult mediaUploadResult + * @property {proto.Message.IStickerMessage|null} [stickerMessage] RequestMediaUploadResult stickerMessage + */ + + /** + * Constructs a new RequestMediaUploadResult. + * @memberof proto.Message.RequestMediaUploadResponseMessage + * @classdesc Represents a RequestMediaUploadResult. + * @implements IRequestMediaUploadResult + * @constructor + * @param {proto.Message.RequestMediaUploadResponseMessage.IRequestMediaUploadResult=} [properties] Properties to set + */ + function RequestMediaUploadResult(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]]; + } + + /** + * RequestMediaUploadResult fileSha256. + * @member {string} fileSha256 + * @memberof proto.Message.RequestMediaUploadResponseMessage.RequestMediaUploadResult + * @instance + */ + RequestMediaUploadResult.prototype.fileSha256 = ""; + + /** + * RequestMediaUploadResult mediaUploadResult. + * @member {proto.MediaRetryNotification.ResultType} mediaUploadResult + * @memberof proto.Message.RequestMediaUploadResponseMessage.RequestMediaUploadResult + * @instance + */ + RequestMediaUploadResult.prototype.mediaUploadResult = 0; + + /** + * RequestMediaUploadResult stickerMessage. + * @member {proto.Message.IStickerMessage|null|undefined} stickerMessage + * @memberof proto.Message.RequestMediaUploadResponseMessage.RequestMediaUploadResult + * @instance + */ + RequestMediaUploadResult.prototype.stickerMessage = null; + + /** + * Creates a new RequestMediaUploadResult instance using the specified properties. + * @function create + * @memberof proto.Message.RequestMediaUploadResponseMessage.RequestMediaUploadResult + * @static + * @param {proto.Message.RequestMediaUploadResponseMessage.IRequestMediaUploadResult=} [properties] Properties to set + * @returns {proto.Message.RequestMediaUploadResponseMessage.RequestMediaUploadResult} RequestMediaUploadResult instance + */ + RequestMediaUploadResult.create = function create(properties) { + return new RequestMediaUploadResult(properties); + }; + + /** + * Encodes the specified RequestMediaUploadResult message. Does not implicitly {@link proto.Message.RequestMediaUploadResponseMessage.RequestMediaUploadResult.verify|verify} messages. + * @function encode + * @memberof proto.Message.RequestMediaUploadResponseMessage.RequestMediaUploadResult + * @static + * @param {proto.Message.RequestMediaUploadResponseMessage.IRequestMediaUploadResult} message RequestMediaUploadResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestMediaUploadResult.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).string(message.fileSha256); + if (message.mediaUploadResult != null && Object.hasOwnProperty.call(message, "mediaUploadResult")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.mediaUploadResult); + if (message.stickerMessage != null && Object.hasOwnProperty.call(message, "stickerMessage")) + $root.proto.Message.StickerMessage.encode(message.stickerMessage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RequestMediaUploadResult message, length delimited. Does not implicitly {@link proto.Message.RequestMediaUploadResponseMessage.RequestMediaUploadResult.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.RequestMediaUploadResponseMessage.RequestMediaUploadResult + * @static + * @param {proto.Message.RequestMediaUploadResponseMessage.IRequestMediaUploadResult} message RequestMediaUploadResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestMediaUploadResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestMediaUploadResult message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.RequestMediaUploadResponseMessage.RequestMediaUploadResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.RequestMediaUploadResponseMessage.RequestMediaUploadResult} RequestMediaUploadResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestMediaUploadResult.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.Message.RequestMediaUploadResponseMessage.RequestMediaUploadResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.fileSha256 = reader.string(); + break; + case 2: + message.mediaUploadResult = reader.int32(); + break; + case 3: + message.stickerMessage = $root.proto.Message.StickerMessage.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestMediaUploadResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.RequestMediaUploadResponseMessage.RequestMediaUploadResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.RequestMediaUploadResponseMessage.RequestMediaUploadResult} RequestMediaUploadResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestMediaUploadResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestMediaUploadResult message. + * @function verify + * @memberof proto.Message.RequestMediaUploadResponseMessage.RequestMediaUploadResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestMediaUploadResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + if (!$util.isString(message.fileSha256)) + return "fileSha256: string expected"; + if (message.mediaUploadResult != null && message.hasOwnProperty("mediaUploadResult")) + switch (message.mediaUploadResult) { + default: + return "mediaUploadResult: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.stickerMessage != null && message.hasOwnProperty("stickerMessage")) { + var error = $root.proto.Message.StickerMessage.verify(message.stickerMessage); + if (error) + return "stickerMessage." + error; + } + return null; + }; + + /** + * Creates a RequestMediaUploadResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.RequestMediaUploadResponseMessage.RequestMediaUploadResult + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.RequestMediaUploadResponseMessage.RequestMediaUploadResult} RequestMediaUploadResult + */ + RequestMediaUploadResult.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.RequestMediaUploadResponseMessage.RequestMediaUploadResult) + return object; + var message = new $root.proto.Message.RequestMediaUploadResponseMessage.RequestMediaUploadResult(); + if (object.fileSha256 != null) + message.fileSha256 = String(object.fileSha256); + switch (object.mediaUploadResult) { + case "GENERAL_ERROR": + case 0: + message.mediaUploadResult = 0; + break; + case "SUCCESS": + case 1: + message.mediaUploadResult = 1; + break; + case "NOT_FOUND": + case 2: + message.mediaUploadResult = 2; + break; + case "DECRYPTION_ERROR": + case 3: + message.mediaUploadResult = 3; + break; + } + if (object.stickerMessage != null) { + if (typeof object.stickerMessage !== "object") + throw TypeError(".proto.Message.RequestMediaUploadResponseMessage.RequestMediaUploadResult.stickerMessage: object expected"); + message.stickerMessage = $root.proto.Message.StickerMessage.fromObject(object.stickerMessage); + } + return message; + }; + + /** + * Creates a plain object from a RequestMediaUploadResult message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.RequestMediaUploadResponseMessage.RequestMediaUploadResult + * @static + * @param {proto.Message.RequestMediaUploadResponseMessage.RequestMediaUploadResult} message RequestMediaUploadResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestMediaUploadResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fileSha256 = ""; + object.mediaUploadResult = options.enums === String ? "GENERAL_ERROR" : 0; + object.stickerMessage = null; + } + if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + object.fileSha256 = message.fileSha256; + if (message.mediaUploadResult != null && message.hasOwnProperty("mediaUploadResult")) + object.mediaUploadResult = options.enums === String ? $root.proto.MediaRetryNotification.ResultType[message.mediaUploadResult] : message.mediaUploadResult; + if (message.stickerMessage != null && message.hasOwnProperty("stickerMessage")) + object.stickerMessage = $root.proto.Message.StickerMessage.toObject(message.stickerMessage, options); + return object; + }; + + /** + * Converts this RequestMediaUploadResult to JSON. + * @function toJSON + * @memberof proto.Message.RequestMediaUploadResponseMessage.RequestMediaUploadResult + * @instance + * @returns {Object.} JSON object + */ + RequestMediaUploadResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestMediaUploadResult; + })(); + + return RequestMediaUploadResponseMessage; + })(); + + Message.RequestPaymentMessage = (function() { + + /** + * Properties of a RequestPaymentMessage. + * @memberof proto.Message + * @interface IRequestPaymentMessage + * @property {proto.IMessage|null} [noteMessage] RequestPaymentMessage noteMessage + * @property {string|null} [currencyCodeIso4217] RequestPaymentMessage currencyCodeIso4217 + * @property {number|Long|null} [amount1000] RequestPaymentMessage amount1000 + * @property {string|null} [requestFrom] RequestPaymentMessage requestFrom + * @property {number|Long|null} [expiryTimestamp] RequestPaymentMessage expiryTimestamp + * @property {proto.IMoney|null} [amount] RequestPaymentMessage amount + * @property {proto.IPaymentBackground|null} [background] RequestPaymentMessage background + */ + + /** + * Constructs a new RequestPaymentMessage. + * @memberof proto.Message + * @classdesc Represents a RequestPaymentMessage. + * @implements IRequestPaymentMessage + * @constructor + * @param {proto.Message.IRequestPaymentMessage=} [properties] Properties to set + */ + function RequestPaymentMessage(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]]; + } + + /** + * RequestPaymentMessage noteMessage. + * @member {proto.IMessage|null|undefined} noteMessage + * @memberof proto.Message.RequestPaymentMessage + * @instance + */ + RequestPaymentMessage.prototype.noteMessage = null; + + /** + * RequestPaymentMessage currencyCodeIso4217. + * @member {string} currencyCodeIso4217 + * @memberof proto.Message.RequestPaymentMessage + * @instance + */ + RequestPaymentMessage.prototype.currencyCodeIso4217 = ""; + + /** + * RequestPaymentMessage amount1000. + * @member {number|Long} amount1000 + * @memberof proto.Message.RequestPaymentMessage + * @instance + */ + RequestPaymentMessage.prototype.amount1000 = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * RequestPaymentMessage requestFrom. + * @member {string} requestFrom + * @memberof proto.Message.RequestPaymentMessage + * @instance + */ + RequestPaymentMessage.prototype.requestFrom = ""; + + /** + * RequestPaymentMessage expiryTimestamp. + * @member {number|Long} expiryTimestamp + * @memberof proto.Message.RequestPaymentMessage + * @instance + */ + RequestPaymentMessage.prototype.expiryTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * RequestPaymentMessage amount. + * @member {proto.IMoney|null|undefined} amount + * @memberof proto.Message.RequestPaymentMessage + * @instance + */ + RequestPaymentMessage.prototype.amount = null; + + /** + * RequestPaymentMessage background. + * @member {proto.IPaymentBackground|null|undefined} background + * @memberof proto.Message.RequestPaymentMessage + * @instance + */ + RequestPaymentMessage.prototype.background = null; + + /** + * Creates a new RequestPaymentMessage instance using the specified properties. + * @function create + * @memberof proto.Message.RequestPaymentMessage + * @static + * @param {proto.Message.IRequestPaymentMessage=} [properties] Properties to set + * @returns {proto.Message.RequestPaymentMessage} RequestPaymentMessage instance + */ + RequestPaymentMessage.create = function create(properties) { + return new RequestPaymentMessage(properties); + }; + + /** + * Encodes the specified RequestPaymentMessage message. Does not implicitly {@link proto.Message.RequestPaymentMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.RequestPaymentMessage + * @static + * @param {proto.Message.IRequestPaymentMessage} message RequestPaymentMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestPaymentMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.currencyCodeIso4217 != null && Object.hasOwnProperty.call(message, "currencyCodeIso4217")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.currencyCodeIso4217); + if (message.amount1000 != null && Object.hasOwnProperty.call(message, "amount1000")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.amount1000); + if (message.requestFrom != null && Object.hasOwnProperty.call(message, "requestFrom")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestFrom); + if (message.noteMessage != null && Object.hasOwnProperty.call(message, "noteMessage")) + $root.proto.Message.encode(message.noteMessage, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.expiryTimestamp != null && Object.hasOwnProperty.call(message, "expiryTimestamp")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.expiryTimestamp); + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + $root.proto.Money.encode(message.amount, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.background != null && Object.hasOwnProperty.call(message, "background")) + $root.proto.PaymentBackground.encode(message.background, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RequestPaymentMessage message, length delimited. Does not implicitly {@link proto.Message.RequestPaymentMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.RequestPaymentMessage + * @static + * @param {proto.Message.IRequestPaymentMessage} message RequestPaymentMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestPaymentMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestPaymentMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.RequestPaymentMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.RequestPaymentMessage} RequestPaymentMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestPaymentMessage.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.Message.RequestPaymentMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: + message.noteMessage = $root.proto.Message.decode(reader, reader.uint32()); + break; + case 1: + message.currencyCodeIso4217 = reader.string(); + break; + case 2: + message.amount1000 = reader.uint64(); + break; + case 3: + message.requestFrom = reader.string(); + break; + case 5: + message.expiryTimestamp = reader.int64(); + break; + case 6: + message.amount = $root.proto.Money.decode(reader, reader.uint32()); + break; + case 7: + message.background = $root.proto.PaymentBackground.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestPaymentMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.RequestPaymentMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.RequestPaymentMessage} RequestPaymentMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestPaymentMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestPaymentMessage message. + * @function verify + * @memberof proto.Message.RequestPaymentMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestPaymentMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.noteMessage != null && message.hasOwnProperty("noteMessage")) { + var error = $root.proto.Message.verify(message.noteMessage); + if (error) + return "noteMessage." + error; + } + if (message.currencyCodeIso4217 != null && message.hasOwnProperty("currencyCodeIso4217")) + if (!$util.isString(message.currencyCodeIso4217)) + return "currencyCodeIso4217: string expected"; + 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.requestFrom != null && message.hasOwnProperty("requestFrom")) + if (!$util.isString(message.requestFrom)) + return "requestFrom: string expected"; + 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.amount != null && message.hasOwnProperty("amount")) { + var error = $root.proto.Money.verify(message.amount); + if (error) + return "amount." + error; + } + if (message.background != null && message.hasOwnProperty("background")) { + var error = $root.proto.PaymentBackground.verify(message.background); + if (error) + return "background." + error; + } + return null; + }; + + /** + * Creates a RequestPaymentMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.RequestPaymentMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.RequestPaymentMessage} RequestPaymentMessage + */ + RequestPaymentMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.RequestPaymentMessage) + return object; + var message = new $root.proto.Message.RequestPaymentMessage(); + if (object.noteMessage != null) { + if (typeof object.noteMessage !== "object") + throw TypeError(".proto.Message.RequestPaymentMessage.noteMessage: object expected"); + message.noteMessage = $root.proto.Message.fromObject(object.noteMessage); + } + if (object.currencyCodeIso4217 != null) + message.currencyCodeIso4217 = String(object.currencyCodeIso4217); + 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.requestFrom != null) + message.requestFrom = String(object.requestFrom); + if (object.expiryTimestamp != null) + if ($util.Long) + (message.expiryTimestamp = $util.Long.fromValue(object.expiryTimestamp)).unsigned = false; + 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(); + if (object.amount != null) { + if (typeof object.amount !== "object") + throw TypeError(".proto.Message.RequestPaymentMessage.amount: object expected"); + message.amount = $root.proto.Money.fromObject(object.amount); + } + if (object.background != null) { + if (typeof object.background !== "object") + throw TypeError(".proto.Message.RequestPaymentMessage.background: object expected"); + message.background = $root.proto.PaymentBackground.fromObject(object.background); + } + return message; + }; + + /** + * Creates a plain object from a RequestPaymentMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.RequestPaymentMessage + * @static + * @param {proto.Message.RequestPaymentMessage} message RequestPaymentMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestPaymentMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.currencyCodeIso4217 = ""; + 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.requestFrom = ""; + object.noteMessage = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.expiryTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.expiryTimestamp = options.longs === String ? "0" : 0; + object.amount = null; + object.background = null; + } + if (message.currencyCodeIso4217 != null && message.hasOwnProperty("currencyCodeIso4217")) + object.currencyCodeIso4217 = message.currencyCodeIso4217; + 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.requestFrom != null && message.hasOwnProperty("requestFrom")) + object.requestFrom = message.requestFrom; + if (message.noteMessage != null && message.hasOwnProperty("noteMessage")) + object.noteMessage = $root.proto.Message.toObject(message.noteMessage, 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() : message.expiryTimestamp; + if (message.amount != null && message.hasOwnProperty("amount")) + object.amount = $root.proto.Money.toObject(message.amount, options); + if (message.background != null && message.hasOwnProperty("background")) + object.background = $root.proto.PaymentBackground.toObject(message.background, options); + return object; + }; + + /** + * Converts this RequestPaymentMessage to JSON. + * @function toJSON + * @memberof proto.Message.RequestPaymentMessage + * @instance + * @returns {Object.} JSON object + */ + RequestPaymentMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestPaymentMessage; + })(); + + Message.RequestPhoneNumberMessage = (function() { + + /** + * Properties of a RequestPhoneNumberMessage. + * @memberof proto.Message + * @interface IRequestPhoneNumberMessage + * @property {proto.IContextInfo|null} [contextInfo] RequestPhoneNumberMessage contextInfo + */ + + /** + * Constructs a new RequestPhoneNumberMessage. + * @memberof proto.Message + * @classdesc Represents a RequestPhoneNumberMessage. + * @implements IRequestPhoneNumberMessage + * @constructor + * @param {proto.Message.IRequestPhoneNumberMessage=} [properties] Properties to set + */ + function RequestPhoneNumberMessage(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]]; + } + + /** + * RequestPhoneNumberMessage contextInfo. + * @member {proto.IContextInfo|null|undefined} contextInfo + * @memberof proto.Message.RequestPhoneNumberMessage + * @instance + */ + RequestPhoneNumberMessage.prototype.contextInfo = null; + + /** + * Creates a new RequestPhoneNumberMessage instance using the specified properties. + * @function create + * @memberof proto.Message.RequestPhoneNumberMessage + * @static + * @param {proto.Message.IRequestPhoneNumberMessage=} [properties] Properties to set + * @returns {proto.Message.RequestPhoneNumberMessage} RequestPhoneNumberMessage instance + */ + RequestPhoneNumberMessage.create = function create(properties) { + return new RequestPhoneNumberMessage(properties); + }; + + /** + * Encodes the specified RequestPhoneNumberMessage message. Does not implicitly {@link proto.Message.RequestPhoneNumberMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.RequestPhoneNumberMessage + * @static + * @param {proto.Message.IRequestPhoneNumberMessage} message RequestPhoneNumberMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestPhoneNumberMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) + $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RequestPhoneNumberMessage message, length delimited. Does not implicitly {@link proto.Message.RequestPhoneNumberMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.RequestPhoneNumberMessage + * @static + * @param {proto.Message.IRequestPhoneNumberMessage} message RequestPhoneNumberMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestPhoneNumberMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestPhoneNumberMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.RequestPhoneNumberMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.RequestPhoneNumberMessage} RequestPhoneNumberMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestPhoneNumberMessage.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.Message.RequestPhoneNumberMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestPhoneNumberMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.RequestPhoneNumberMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.RequestPhoneNumberMessage} RequestPhoneNumberMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestPhoneNumberMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestPhoneNumberMessage message. + * @function verify + * @memberof proto.Message.RequestPhoneNumberMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestPhoneNumberMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } + return null; + }; + + /** + * Creates a RequestPhoneNumberMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.RequestPhoneNumberMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.RequestPhoneNumberMessage} RequestPhoneNumberMessage + */ + RequestPhoneNumberMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.RequestPhoneNumberMessage) + return object; + var message = new $root.proto.Message.RequestPhoneNumberMessage(); + if (object.contextInfo != null) { + if (typeof object.contextInfo !== "object") + throw TypeError(".proto.Message.RequestPhoneNumberMessage.contextInfo: object expected"); + message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); + } + return message; + }; + + /** + * Creates a plain object from a RequestPhoneNumberMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.RequestPhoneNumberMessage + * @static + * @param {proto.Message.RequestPhoneNumberMessage} message RequestPhoneNumberMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestPhoneNumberMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.contextInfo = null; + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) + object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + return object; + }; + + /** + * Converts this RequestPhoneNumberMessage to JSON. + * @function toJSON + * @memberof proto.Message.RequestPhoneNumberMessage + * @instance + * @returns {Object.} JSON object + */ + RequestPhoneNumberMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestPhoneNumberMessage; + })(); + + /** + * RmrSource enum. + * @name proto.Message.RmrSource + * @enum {number} + * @property {number} FAVORITE_STICKER=0 FAVORITE_STICKER value + * @property {number} RECENT_STICKER=1 RECENT_STICKER value + */ + Message.RmrSource = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FAVORITE_STICKER"] = 0; + values[valuesById[1] = "RECENT_STICKER"] = 1; + return values; + })(); + + Message.SendPaymentMessage = (function() { + + /** + * Properties of a SendPaymentMessage. + * @memberof proto.Message + * @interface ISendPaymentMessage + * @property {proto.IMessage|null} [noteMessage] SendPaymentMessage noteMessage + * @property {proto.IMessageKey|null} [requestMessageKey] SendPaymentMessage requestMessageKey + * @property {proto.IPaymentBackground|null} [background] SendPaymentMessage background + */ + + /** + * Constructs a new SendPaymentMessage. + * @memberof proto.Message + * @classdesc Represents a SendPaymentMessage. + * @implements ISendPaymentMessage + * @constructor + * @param {proto.Message.ISendPaymentMessage=} [properties] Properties to set + */ + function SendPaymentMessage(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]]; + } + + /** + * SendPaymentMessage noteMessage. + * @member {proto.IMessage|null|undefined} noteMessage + * @memberof proto.Message.SendPaymentMessage + * @instance + */ + SendPaymentMessage.prototype.noteMessage = null; + + /** + * SendPaymentMessage requestMessageKey. + * @member {proto.IMessageKey|null|undefined} requestMessageKey + * @memberof proto.Message.SendPaymentMessage + * @instance + */ + SendPaymentMessage.prototype.requestMessageKey = null; + + /** + * SendPaymentMessage background. + * @member {proto.IPaymentBackground|null|undefined} background + * @memberof proto.Message.SendPaymentMessage + * @instance + */ + SendPaymentMessage.prototype.background = null; + + /** + * Creates a new SendPaymentMessage instance using the specified properties. + * @function create + * @memberof proto.Message.SendPaymentMessage + * @static + * @param {proto.Message.ISendPaymentMessage=} [properties] Properties to set + * @returns {proto.Message.SendPaymentMessage} SendPaymentMessage instance + */ + SendPaymentMessage.create = function create(properties) { + return new SendPaymentMessage(properties); + }; + + /** + * Encodes the specified SendPaymentMessage message. Does not implicitly {@link proto.Message.SendPaymentMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.SendPaymentMessage + * @static + * @param {proto.Message.ISendPaymentMessage} message SendPaymentMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SendPaymentMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.noteMessage != null && Object.hasOwnProperty.call(message, "noteMessage")) + $root.proto.Message.encode(message.noteMessage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.requestMessageKey != null && Object.hasOwnProperty.call(message, "requestMessageKey")) + $root.proto.MessageKey.encode(message.requestMessageKey, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.background != null && Object.hasOwnProperty.call(message, "background")) + $root.proto.PaymentBackground.encode(message.background, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SendPaymentMessage message, length delimited. Does not implicitly {@link proto.Message.SendPaymentMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.SendPaymentMessage + * @static + * @param {proto.Message.ISendPaymentMessage} message SendPaymentMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SendPaymentMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SendPaymentMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.SendPaymentMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.SendPaymentMessage} SendPaymentMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SendPaymentMessage.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.Message.SendPaymentMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.noteMessage = $root.proto.Message.decode(reader, reader.uint32()); + break; + case 3: + message.requestMessageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + case 4: + message.background = $root.proto.PaymentBackground.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SendPaymentMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.SendPaymentMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.SendPaymentMessage} SendPaymentMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SendPaymentMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SendPaymentMessage message. + * @function verify + * @memberof proto.Message.SendPaymentMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SendPaymentMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.noteMessage != null && message.hasOwnProperty("noteMessage")) { + var error = $root.proto.Message.verify(message.noteMessage); + if (error) + return "noteMessage." + error; + } + if (message.requestMessageKey != null && message.hasOwnProperty("requestMessageKey")) { + var error = $root.proto.MessageKey.verify(message.requestMessageKey); + if (error) + return "requestMessageKey." + error; + } + if (message.background != null && message.hasOwnProperty("background")) { + var error = $root.proto.PaymentBackground.verify(message.background); + if (error) + return "background." + error; + } + return null; + }; + + /** + * Creates a SendPaymentMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.SendPaymentMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.SendPaymentMessage} SendPaymentMessage + */ + SendPaymentMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.SendPaymentMessage) + return object; + var message = new $root.proto.Message.SendPaymentMessage(); + if (object.noteMessage != null) { + if (typeof object.noteMessage !== "object") + throw TypeError(".proto.Message.SendPaymentMessage.noteMessage: object expected"); + message.noteMessage = $root.proto.Message.fromObject(object.noteMessage); + } + if (object.requestMessageKey != null) { + if (typeof object.requestMessageKey !== "object") + throw TypeError(".proto.Message.SendPaymentMessage.requestMessageKey: object expected"); + message.requestMessageKey = $root.proto.MessageKey.fromObject(object.requestMessageKey); + } + if (object.background != null) { + if (typeof object.background !== "object") + throw TypeError(".proto.Message.SendPaymentMessage.background: object expected"); + message.background = $root.proto.PaymentBackground.fromObject(object.background); + } + return message; + }; + + /** + * Creates a plain object from a SendPaymentMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.SendPaymentMessage + * @static + * @param {proto.Message.SendPaymentMessage} message SendPaymentMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SendPaymentMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.noteMessage = null; + object.requestMessageKey = null; + object.background = null; + } + if (message.noteMessage != null && message.hasOwnProperty("noteMessage")) + object.noteMessage = $root.proto.Message.toObject(message.noteMessage, options); + if (message.requestMessageKey != null && message.hasOwnProperty("requestMessageKey")) + object.requestMessageKey = $root.proto.MessageKey.toObject(message.requestMessageKey, options); + if (message.background != null && message.hasOwnProperty("background")) + object.background = $root.proto.PaymentBackground.toObject(message.background, options); + return object; + }; + + /** + * Converts this SendPaymentMessage to JSON. + * @function toJSON + * @memberof proto.Message.SendPaymentMessage + * @instance + * @returns {Object.} JSON object + */ + SendPaymentMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SendPaymentMessage; + })(); + + Message.SenderKeyDistributionMessage = (function() { + + /** + * Properties of a SenderKeyDistributionMessage. + * @memberof proto.Message + * @interface ISenderKeyDistributionMessage + * @property {string|null} [groupId] SenderKeyDistributionMessage groupId + * @property {Uint8Array|null} [axolotlSenderKeyDistributionMessage] SenderKeyDistributionMessage axolotlSenderKeyDistributionMessage + */ + + /** + * Constructs a new SenderKeyDistributionMessage. + * @memberof proto.Message + * @classdesc Represents a SenderKeyDistributionMessage. + * @implements ISenderKeyDistributionMessage + * @constructor + * @param {proto.Message.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.Message.SenderKeyDistributionMessage + * @instance + */ + SenderKeyDistributionMessage.prototype.groupId = ""; + + /** + * SenderKeyDistributionMessage axolotlSenderKeyDistributionMessage. + * @member {Uint8Array} axolotlSenderKeyDistributionMessage + * @memberof proto.Message.SenderKeyDistributionMessage + * @instance + */ + SenderKeyDistributionMessage.prototype.axolotlSenderKeyDistributionMessage = $util.newBuffer([]); + + /** + * Creates a new SenderKeyDistributionMessage instance using the specified properties. + * @function create + * @memberof proto.Message.SenderKeyDistributionMessage + * @static + * @param {proto.Message.ISenderKeyDistributionMessage=} [properties] Properties to set + * @returns {proto.Message.SenderKeyDistributionMessage} SenderKeyDistributionMessage instance + */ + SenderKeyDistributionMessage.create = function create(properties) { + return new SenderKeyDistributionMessage(properties); + }; + + /** + * Encodes the specified SenderKeyDistributionMessage message. Does not implicitly {@link proto.Message.SenderKeyDistributionMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.SenderKeyDistributionMessage + * @static + * @param {proto.Message.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.Message.SenderKeyDistributionMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.SenderKeyDistributionMessage + * @static + * @param {proto.Message.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.Message.SenderKeyDistributionMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.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.Message.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.Message.SenderKeyDistributionMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.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.Message.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.Message.SenderKeyDistributionMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.SenderKeyDistributionMessage} SenderKeyDistributionMessage + */ + SenderKeyDistributionMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.SenderKeyDistributionMessage) + return object; + var message = new $root.proto.Message.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.Message.SenderKeyDistributionMessage + * @static + * @param {proto.Message.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.Message.SenderKeyDistributionMessage + * @instance + * @returns {Object.} JSON object + */ + SenderKeyDistributionMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SenderKeyDistributionMessage; + })(); + + Message.StickerMessage = (function() { + + /** + * Properties of a StickerMessage. + * @memberof proto.Message + * @interface IStickerMessage + * @property {string|null} [url] StickerMessage url + * @property {Uint8Array|null} [fileSha256] StickerMessage fileSha256 + * @property {Uint8Array|null} [fileEncSha256] StickerMessage fileEncSha256 + * @property {Uint8Array|null} [mediaKey] StickerMessage mediaKey + * @property {string|null} [mimetype] StickerMessage mimetype + * @property {number|null} [height] StickerMessage height + * @property {number|null} [width] StickerMessage width + * @property {string|null} [directPath] StickerMessage directPath + * @property {number|Long|null} [fileLength] StickerMessage fileLength + * @property {number|Long|null} [mediaKeyTimestamp] StickerMessage mediaKeyTimestamp + * @property {number|null} [firstFrameLength] StickerMessage firstFrameLength + * @property {Uint8Array|null} [firstFrameSidecar] StickerMessage firstFrameSidecar + * @property {boolean|null} [isAnimated] StickerMessage isAnimated + * @property {Uint8Array|null} [pngThumbnail] StickerMessage pngThumbnail + * @property {proto.IContextInfo|null} [contextInfo] StickerMessage contextInfo + */ + + /** + * Constructs a new StickerMessage. + * @memberof proto.Message + * @classdesc Represents a StickerMessage. + * @implements IStickerMessage + * @constructor + * @param {proto.Message.IStickerMessage=} [properties] Properties to set + */ + function StickerMessage(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]]; + } + + /** + * StickerMessage url. + * @member {string} url + * @memberof proto.Message.StickerMessage + * @instance + */ + StickerMessage.prototype.url = ""; + + /** + * StickerMessage fileSha256. + * @member {Uint8Array} fileSha256 + * @memberof proto.Message.StickerMessage + * @instance + */ + StickerMessage.prototype.fileSha256 = $util.newBuffer([]); + + /** + * StickerMessage fileEncSha256. + * @member {Uint8Array} fileEncSha256 + * @memberof proto.Message.StickerMessage + * @instance + */ + StickerMessage.prototype.fileEncSha256 = $util.newBuffer([]); + + /** + * StickerMessage mediaKey. + * @member {Uint8Array} mediaKey + * @memberof proto.Message.StickerMessage + * @instance + */ + StickerMessage.prototype.mediaKey = $util.newBuffer([]); + + /** + * StickerMessage mimetype. + * @member {string} mimetype + * @memberof proto.Message.StickerMessage + * @instance + */ + StickerMessage.prototype.mimetype = ""; + + /** + * StickerMessage height. + * @member {number} height + * @memberof proto.Message.StickerMessage + * @instance + */ + StickerMessage.prototype.height = 0; + + /** + * StickerMessage width. + * @member {number} width + * @memberof proto.Message.StickerMessage + * @instance + */ + StickerMessage.prototype.width = 0; + + /** + * StickerMessage directPath. + * @member {string} directPath + * @memberof proto.Message.StickerMessage + * @instance + */ + StickerMessage.prototype.directPath = ""; + + /** + * StickerMessage fileLength. + * @member {number|Long} fileLength + * @memberof proto.Message.StickerMessage + * @instance + */ + StickerMessage.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * StickerMessage mediaKeyTimestamp. + * @member {number|Long} mediaKeyTimestamp + * @memberof proto.Message.StickerMessage + * @instance + */ + StickerMessage.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * StickerMessage firstFrameLength. + * @member {number} firstFrameLength + * @memberof proto.Message.StickerMessage + * @instance + */ + StickerMessage.prototype.firstFrameLength = 0; + + /** + * StickerMessage firstFrameSidecar. + * @member {Uint8Array} firstFrameSidecar + * @memberof proto.Message.StickerMessage + * @instance + */ + StickerMessage.prototype.firstFrameSidecar = $util.newBuffer([]); + + /** + * StickerMessage isAnimated. + * @member {boolean} isAnimated + * @memberof proto.Message.StickerMessage + * @instance + */ + StickerMessage.prototype.isAnimated = false; + + /** + * StickerMessage pngThumbnail. + * @member {Uint8Array} pngThumbnail + * @memberof proto.Message.StickerMessage + * @instance + */ + StickerMessage.prototype.pngThumbnail = $util.newBuffer([]); + + /** + * StickerMessage contextInfo. + * @member {proto.IContextInfo|null|undefined} contextInfo + * @memberof proto.Message.StickerMessage + * @instance + */ + StickerMessage.prototype.contextInfo = null; + + /** + * Creates a new StickerMessage instance using the specified properties. + * @function create + * @memberof proto.Message.StickerMessage + * @static + * @param {proto.Message.IStickerMessage=} [properties] Properties to set + * @returns {proto.Message.StickerMessage} StickerMessage instance + */ + StickerMessage.create = function create(properties) { + return new StickerMessage(properties); + }; + + /** + * Encodes the specified StickerMessage message. Does not implicitly {@link proto.Message.StickerMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.StickerMessage + * @static + * @param {proto.Message.IStickerMessage} message StickerMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StickerMessage.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.fileSha256 != null && Object.hasOwnProperty.call(message, "fileSha256")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.fileSha256); + if (message.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.fileEncSha256); + if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.mediaKey); + if (message.mimetype != null && Object.hasOwnProperty.call(message, "mimetype")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.mimetype); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.height); + if (message.width != null && Object.hasOwnProperty.call(message, "width")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.width); + if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.directPath); + if (message.fileLength != null && Object.hasOwnProperty.call(message, "fileLength")) + writer.uint32(/* id 9, wireType 0 =*/72).uint64(message.fileLength); + if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp")) + writer.uint32(/* id 10, wireType 0 =*/80).int64(message.mediaKeyTimestamp); + if (message.firstFrameLength != null && Object.hasOwnProperty.call(message, "firstFrameLength")) + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.firstFrameLength); + if (message.firstFrameSidecar != null && Object.hasOwnProperty.call(message, "firstFrameSidecar")) + writer.uint32(/* id 12, wireType 2 =*/98).bytes(message.firstFrameSidecar); + if (message.isAnimated != null && Object.hasOwnProperty.call(message, "isAnimated")) + writer.uint32(/* id 13, wireType 0 =*/104).bool(message.isAnimated); + if (message.pngThumbnail != null && Object.hasOwnProperty.call(message, "pngThumbnail")) + writer.uint32(/* id 16, wireType 2 =*/130).bytes(message.pngThumbnail); + if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) + $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified StickerMessage message, length delimited. Does not implicitly {@link proto.Message.StickerMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.StickerMessage + * @static + * @param {proto.Message.IStickerMessage} message StickerMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StickerMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StickerMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.StickerMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.StickerMessage} StickerMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StickerMessage.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.Message.StickerMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.url = reader.string(); + break; + case 2: + message.fileSha256 = reader.bytes(); + break; + case 3: + message.fileEncSha256 = reader.bytes(); + break; + case 4: + message.mediaKey = reader.bytes(); + break; + case 5: + message.mimetype = reader.string(); + break; + case 6: + message.height = reader.uint32(); + break; + case 7: + message.width = reader.uint32(); + break; + case 8: + message.directPath = reader.string(); + break; + case 9: + message.fileLength = reader.uint64(); + break; + case 10: + message.mediaKeyTimestamp = reader.int64(); + break; + case 11: + message.firstFrameLength = reader.uint32(); + break; + case 12: + message.firstFrameSidecar = reader.bytes(); + break; + case 13: + message.isAnimated = reader.bool(); + break; + case 16: + message.pngThumbnail = reader.bytes(); + break; + case 17: + message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StickerMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.StickerMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.StickerMessage} StickerMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StickerMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StickerMessage message. + * @function verify + * @memberof proto.Message.StickerMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StickerMessage.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.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.mediaKey != null && message.hasOwnProperty("mediaKey")) + if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey))) + return "mediaKey: buffer expected"; + if (message.mimetype != null && message.hasOwnProperty("mimetype")) + if (!$util.isString(message.mimetype)) + return "mimetype: string 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.directPath != null && message.hasOwnProperty("directPath")) + if (!$util.isString(message.directPath)) + return "directPath: string 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.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.firstFrameLength != null && message.hasOwnProperty("firstFrameLength")) + if (!$util.isInteger(message.firstFrameLength)) + return "firstFrameLength: integer expected"; + if (message.firstFrameSidecar != null && message.hasOwnProperty("firstFrameSidecar")) + if (!(message.firstFrameSidecar && typeof message.firstFrameSidecar.length === "number" || $util.isString(message.firstFrameSidecar))) + return "firstFrameSidecar: buffer expected"; + if (message.isAnimated != null && message.hasOwnProperty("isAnimated")) + if (typeof message.isAnimated !== "boolean") + return "isAnimated: boolean expected"; + if (message.pngThumbnail != null && message.hasOwnProperty("pngThumbnail")) + if (!(message.pngThumbnail && typeof message.pngThumbnail.length === "number" || $util.isString(message.pngThumbnail))) + return "pngThumbnail: buffer expected"; + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } + return null; + }; + + /** + * Creates a StickerMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.StickerMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.StickerMessage} StickerMessage + */ + StickerMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.StickerMessage) + return object; + var message = new $root.proto.Message.StickerMessage(); + if (object.url != null) + message.url = String(object.url); + 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.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.mimetype != null) + message.mimetype = String(object.mimetype); + if (object.height != null) + message.height = object.height >>> 0; + if (object.width != null) + message.width = object.width >>> 0; + if (object.directPath != null) + message.directPath = String(object.directPath); + 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.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.firstFrameLength != null) + message.firstFrameLength = object.firstFrameLength >>> 0; + if (object.firstFrameSidecar != null) + if (typeof object.firstFrameSidecar === "string") + $util.base64.decode(object.firstFrameSidecar, message.firstFrameSidecar = $util.newBuffer($util.base64.length(object.firstFrameSidecar)), 0); + else if (object.firstFrameSidecar.length) + message.firstFrameSidecar = object.firstFrameSidecar; + if (object.isAnimated != null) + message.isAnimated = Boolean(object.isAnimated); + if (object.pngThumbnail != null) + if (typeof object.pngThumbnail === "string") + $util.base64.decode(object.pngThumbnail, message.pngThumbnail = $util.newBuffer($util.base64.length(object.pngThumbnail)), 0); + else if (object.pngThumbnail.length) + message.pngThumbnail = object.pngThumbnail; + if (object.contextInfo != null) { + if (typeof object.contextInfo !== "object") + throw TypeError(".proto.Message.StickerMessage.contextInfo: object expected"); + message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); + } + return message; + }; + + /** + * Creates a plain object from a StickerMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.StickerMessage + * @static + * @param {proto.Message.StickerMessage} message StickerMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StickerMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.url = ""; + 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 (options.bytes === String) + object.mediaKey = ""; + else { + object.mediaKey = []; + if (options.bytes !== Array) + object.mediaKey = $util.newBuffer(object.mediaKey); + } + object.mimetype = ""; + object.height = 0; + object.width = 0; + object.directPath = ""; + 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 ($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.firstFrameLength = 0; + if (options.bytes === String) + object.firstFrameSidecar = ""; + else { + object.firstFrameSidecar = []; + if (options.bytes !== Array) + object.firstFrameSidecar = $util.newBuffer(object.firstFrameSidecar); + } + object.isAnimated = false; + if (options.bytes === String) + object.pngThumbnail = ""; + else { + object.pngThumbnail = []; + if (options.bytes !== Array) + object.pngThumbnail = $util.newBuffer(object.pngThumbnail); + } + object.contextInfo = null; + } + if (message.url != null && message.hasOwnProperty("url")) + object.url = message.url; + 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.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.mimetype != null && message.hasOwnProperty("mimetype")) + object.mimetype = message.mimetype; + if (message.height != null && message.hasOwnProperty("height")) + object.height = message.height; + if (message.width != null && message.hasOwnProperty("width")) + object.width = message.width; + if (message.directPath != null && message.hasOwnProperty("directPath")) + object.directPath = message.directPath; + 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.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.firstFrameLength != null && message.hasOwnProperty("firstFrameLength")) + object.firstFrameLength = message.firstFrameLength; + if (message.firstFrameSidecar != null && message.hasOwnProperty("firstFrameSidecar")) + object.firstFrameSidecar = options.bytes === String ? $util.base64.encode(message.firstFrameSidecar, 0, message.firstFrameSidecar.length) : options.bytes === Array ? Array.prototype.slice.call(message.firstFrameSidecar) : message.firstFrameSidecar; + if (message.isAnimated != null && message.hasOwnProperty("isAnimated")) + object.isAnimated = message.isAnimated; + if (message.pngThumbnail != null && message.hasOwnProperty("pngThumbnail")) + object.pngThumbnail = options.bytes === String ? $util.base64.encode(message.pngThumbnail, 0, message.pngThumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.pngThumbnail) : message.pngThumbnail; + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) + object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + return object; + }; + + /** + * Converts this StickerMessage to JSON. + * @function toJSON + * @memberof proto.Message.StickerMessage + * @instance + * @returns {Object.} JSON object + */ + StickerMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return StickerMessage; + })(); + + Message.StickerSyncRMRMessage = (function() { + + /** + * Properties of a StickerSyncRMRMessage. + * @memberof proto.Message + * @interface IStickerSyncRMRMessage + * @property {Array.|null} [filehash] StickerSyncRMRMessage filehash + * @property {string|null} [rmrSource] StickerSyncRMRMessage rmrSource + * @property {number|Long|null} [requestTimestamp] StickerSyncRMRMessage requestTimestamp + */ + + /** + * Constructs a new StickerSyncRMRMessage. + * @memberof proto.Message + * @classdesc Represents a StickerSyncRMRMessage. + * @implements IStickerSyncRMRMessage + * @constructor + * @param {proto.Message.IStickerSyncRMRMessage=} [properties] Properties to set + */ + function StickerSyncRMRMessage(properties) { + this.filehash = []; + 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]]; + } + + /** + * StickerSyncRMRMessage filehash. + * @member {Array.} filehash + * @memberof proto.Message.StickerSyncRMRMessage + * @instance + */ + StickerSyncRMRMessage.prototype.filehash = $util.emptyArray; + + /** + * StickerSyncRMRMessage rmrSource. + * @member {string} rmrSource + * @memberof proto.Message.StickerSyncRMRMessage + * @instance + */ + StickerSyncRMRMessage.prototype.rmrSource = ""; + + /** + * StickerSyncRMRMessage requestTimestamp. + * @member {number|Long} requestTimestamp + * @memberof proto.Message.StickerSyncRMRMessage + * @instance + */ + StickerSyncRMRMessage.prototype.requestTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new StickerSyncRMRMessage instance using the specified properties. + * @function create + * @memberof proto.Message.StickerSyncRMRMessage + * @static + * @param {proto.Message.IStickerSyncRMRMessage=} [properties] Properties to set + * @returns {proto.Message.StickerSyncRMRMessage} StickerSyncRMRMessage instance + */ + StickerSyncRMRMessage.create = function create(properties) { + return new StickerSyncRMRMessage(properties); + }; + + /** + * Encodes the specified StickerSyncRMRMessage message. Does not implicitly {@link proto.Message.StickerSyncRMRMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.StickerSyncRMRMessage + * @static + * @param {proto.Message.IStickerSyncRMRMessage} message StickerSyncRMRMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StickerSyncRMRMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filehash != null && message.filehash.length) + for (var i = 0; i < message.filehash.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filehash[i]); + if (message.rmrSource != null && Object.hasOwnProperty.call(message, "rmrSource")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.rmrSource); + if (message.requestTimestamp != null && Object.hasOwnProperty.call(message, "requestTimestamp")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.requestTimestamp); + return writer; + }; + + /** + * Encodes the specified StickerSyncRMRMessage message, length delimited. Does not implicitly {@link proto.Message.StickerSyncRMRMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.StickerSyncRMRMessage + * @static + * @param {proto.Message.IStickerSyncRMRMessage} message StickerSyncRMRMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StickerSyncRMRMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StickerSyncRMRMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.StickerSyncRMRMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.StickerSyncRMRMessage} StickerSyncRMRMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StickerSyncRMRMessage.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.Message.StickerSyncRMRMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.filehash && message.filehash.length)) + message.filehash = []; + message.filehash.push(reader.string()); + break; + case 2: + message.rmrSource = reader.string(); + break; + case 3: + message.requestTimestamp = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StickerSyncRMRMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.StickerSyncRMRMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.StickerSyncRMRMessage} StickerSyncRMRMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StickerSyncRMRMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StickerSyncRMRMessage message. + * @function verify + * @memberof proto.Message.StickerSyncRMRMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StickerSyncRMRMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.filehash != null && message.hasOwnProperty("filehash")) { + if (!Array.isArray(message.filehash)) + return "filehash: array expected"; + for (var i = 0; i < message.filehash.length; ++i) + if (!$util.isString(message.filehash[i])) + return "filehash: string[] expected"; + } + if (message.rmrSource != null && message.hasOwnProperty("rmrSource")) + if (!$util.isString(message.rmrSource)) + return "rmrSource: string expected"; + if (message.requestTimestamp != null && message.hasOwnProperty("requestTimestamp")) + if (!$util.isInteger(message.requestTimestamp) && !(message.requestTimestamp && $util.isInteger(message.requestTimestamp.low) && $util.isInteger(message.requestTimestamp.high))) + return "requestTimestamp: integer|Long expected"; + return null; + }; + + /** + * Creates a StickerSyncRMRMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.StickerSyncRMRMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.StickerSyncRMRMessage} StickerSyncRMRMessage + */ + StickerSyncRMRMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.StickerSyncRMRMessage) + return object; + var message = new $root.proto.Message.StickerSyncRMRMessage(); + if (object.filehash) { + if (!Array.isArray(object.filehash)) + throw TypeError(".proto.Message.StickerSyncRMRMessage.filehash: array expected"); + message.filehash = []; + for (var i = 0; i < object.filehash.length; ++i) + message.filehash[i] = String(object.filehash[i]); + } + if (object.rmrSource != null) + message.rmrSource = String(object.rmrSource); + if (object.requestTimestamp != null) + if ($util.Long) + (message.requestTimestamp = $util.Long.fromValue(object.requestTimestamp)).unsigned = false; + else if (typeof object.requestTimestamp === "string") + message.requestTimestamp = parseInt(object.requestTimestamp, 10); + else if (typeof object.requestTimestamp === "number") + message.requestTimestamp = object.requestTimestamp; + else if (typeof object.requestTimestamp === "object") + message.requestTimestamp = new $util.LongBits(object.requestTimestamp.low >>> 0, object.requestTimestamp.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a StickerSyncRMRMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.StickerSyncRMRMessage + * @static + * @param {proto.Message.StickerSyncRMRMessage} message StickerSyncRMRMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StickerSyncRMRMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.filehash = []; + if (options.defaults) { + object.rmrSource = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.requestTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.requestTimestamp = options.longs === String ? "0" : 0; + } + if (message.filehash && message.filehash.length) { + object.filehash = []; + for (var j = 0; j < message.filehash.length; ++j) + object.filehash[j] = message.filehash[j]; + } + if (message.rmrSource != null && message.hasOwnProperty("rmrSource")) + object.rmrSource = message.rmrSource; + if (message.requestTimestamp != null && message.hasOwnProperty("requestTimestamp")) + if (typeof message.requestTimestamp === "number") + object.requestTimestamp = options.longs === String ? String(message.requestTimestamp) : message.requestTimestamp; + else + object.requestTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.requestTimestamp) : options.longs === Number ? new $util.LongBits(message.requestTimestamp.low >>> 0, message.requestTimestamp.high >>> 0).toNumber() : message.requestTimestamp; + return object; + }; + + /** + * Converts this StickerSyncRMRMessage to JSON. + * @function toJSON + * @memberof proto.Message.StickerSyncRMRMessage + * @instance + * @returns {Object.} JSON object + */ + StickerSyncRMRMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return StickerSyncRMRMessage; + })(); + + Message.TemplateButtonReplyMessage = (function() { + + /** + * Properties of a TemplateButtonReplyMessage. + * @memberof proto.Message + * @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.Message + * @classdesc Represents a TemplateButtonReplyMessage. + * @implements ITemplateButtonReplyMessage + * @constructor + * @param {proto.Message.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.Message.TemplateButtonReplyMessage + * @instance + */ + TemplateButtonReplyMessage.prototype.selectedId = ""; + + /** + * TemplateButtonReplyMessage selectedDisplayText. + * @member {string} selectedDisplayText + * @memberof proto.Message.TemplateButtonReplyMessage + * @instance + */ + TemplateButtonReplyMessage.prototype.selectedDisplayText = ""; + + /** + * TemplateButtonReplyMessage contextInfo. + * @member {proto.IContextInfo|null|undefined} contextInfo + * @memberof proto.Message.TemplateButtonReplyMessage + * @instance + */ + TemplateButtonReplyMessage.prototype.contextInfo = null; + + /** + * TemplateButtonReplyMessage selectedIndex. + * @member {number} selectedIndex + * @memberof proto.Message.TemplateButtonReplyMessage + * @instance + */ + TemplateButtonReplyMessage.prototype.selectedIndex = 0; + + /** + * Creates a new TemplateButtonReplyMessage instance using the specified properties. + * @function create + * @memberof proto.Message.TemplateButtonReplyMessage + * @static + * @param {proto.Message.ITemplateButtonReplyMessage=} [properties] Properties to set + * @returns {proto.Message.TemplateButtonReplyMessage} TemplateButtonReplyMessage instance + */ + TemplateButtonReplyMessage.create = function create(properties) { + return new TemplateButtonReplyMessage(properties); + }; + + /** + * Encodes the specified TemplateButtonReplyMessage message. Does not implicitly {@link proto.Message.TemplateButtonReplyMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.TemplateButtonReplyMessage + * @static + * @param {proto.Message.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.Message.TemplateButtonReplyMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.TemplateButtonReplyMessage + * @static + * @param {proto.Message.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.Message.TemplateButtonReplyMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.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.Message.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.Message.TemplateButtonReplyMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.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.Message.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.Message.TemplateButtonReplyMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.TemplateButtonReplyMessage} TemplateButtonReplyMessage + */ + TemplateButtonReplyMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.TemplateButtonReplyMessage) + return object; + var message = new $root.proto.Message.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.Message.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.Message.TemplateButtonReplyMessage + * @static + * @param {proto.Message.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.Message.TemplateButtonReplyMessage + * @instance + * @returns {Object.} JSON object + */ + TemplateButtonReplyMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TemplateButtonReplyMessage; + })(); + + Message.TemplateMessage = (function() { + + /** + * Properties of a TemplateMessage. + * @memberof proto.Message + * @interface ITemplateMessage + * @property {proto.IContextInfo|null} [contextInfo] TemplateMessage contextInfo + * @property {proto.Message.TemplateMessage.IHydratedFourRowTemplate|null} [hydratedTemplate] TemplateMessage hydratedTemplate + * @property {proto.Message.TemplateMessage.IFourRowTemplate|null} [fourRowTemplate] TemplateMessage fourRowTemplate + * @property {proto.Message.TemplateMessage.IHydratedFourRowTemplate|null} [hydratedFourRowTemplate] TemplateMessage hydratedFourRowTemplate + */ + + /** + * Constructs a new TemplateMessage. + * @memberof proto.Message + * @classdesc Represents a TemplateMessage. + * @implements ITemplateMessage + * @constructor + * @param {proto.Message.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.Message.TemplateMessage + * @instance + */ + TemplateMessage.prototype.contextInfo = null; + + /** + * TemplateMessage hydratedTemplate. + * @member {proto.Message.TemplateMessage.IHydratedFourRowTemplate|null|undefined} hydratedTemplate + * @memberof proto.Message.TemplateMessage + * @instance + */ + TemplateMessage.prototype.hydratedTemplate = null; + + /** + * TemplateMessage fourRowTemplate. + * @member {proto.Message.TemplateMessage.IFourRowTemplate|null|undefined} fourRowTemplate + * @memberof proto.Message.TemplateMessage + * @instance + */ + TemplateMessage.prototype.fourRowTemplate = null; + + /** + * TemplateMessage hydratedFourRowTemplate. + * @member {proto.Message.TemplateMessage.IHydratedFourRowTemplate|null|undefined} hydratedFourRowTemplate + * @memberof proto.Message.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.Message.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.Message.TemplateMessage + * @static + * @param {proto.Message.ITemplateMessage=} [properties] Properties to set + * @returns {proto.Message.TemplateMessage} TemplateMessage instance + */ + TemplateMessage.create = function create(properties) { + return new TemplateMessage(properties); + }; + + /** + * Encodes the specified TemplateMessage message. Does not implicitly {@link proto.Message.TemplateMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.TemplateMessage + * @static + * @param {proto.Message.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.Message.TemplateMessage.FourRowTemplate.encode(message.fourRowTemplate, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.hydratedFourRowTemplate != null && Object.hasOwnProperty.call(message, "hydratedFourRowTemplate")) + $root.proto.Message.TemplateMessage.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.Message.TemplateMessage.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.Message.TemplateMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.TemplateMessage + * @static + * @param {proto.Message.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.Message.TemplateMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.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.Message.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.Message.TemplateMessage.HydratedFourRowTemplate.decode(reader, reader.uint32()); + break; + case 1: + message.fourRowTemplate = $root.proto.Message.TemplateMessage.FourRowTemplate.decode(reader, reader.uint32()); + break; + case 2: + message.hydratedFourRowTemplate = $root.proto.Message.TemplateMessage.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.Message.TemplateMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.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.Message.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.Message.TemplateMessage.HydratedFourRowTemplate.verify(message.hydratedTemplate); + if (error) + return "hydratedTemplate." + error; + } + if (message.fourRowTemplate != null && message.hasOwnProperty("fourRowTemplate")) { + properties.format = 1; + { + var error = $root.proto.Message.TemplateMessage.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.Message.TemplateMessage.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.Message.TemplateMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.TemplateMessage} TemplateMessage + */ + TemplateMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.TemplateMessage) + return object; + var message = new $root.proto.Message.TemplateMessage(); + if (object.contextInfo != null) { + if (typeof object.contextInfo !== "object") + throw TypeError(".proto.Message.TemplateMessage.contextInfo: object expected"); + message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); + } + if (object.hydratedTemplate != null) { + if (typeof object.hydratedTemplate !== "object") + throw TypeError(".proto.Message.TemplateMessage.hydratedTemplate: object expected"); + message.hydratedTemplate = $root.proto.Message.TemplateMessage.HydratedFourRowTemplate.fromObject(object.hydratedTemplate); + } + if (object.fourRowTemplate != null) { + if (typeof object.fourRowTemplate !== "object") + throw TypeError(".proto.Message.TemplateMessage.fourRowTemplate: object expected"); + message.fourRowTemplate = $root.proto.Message.TemplateMessage.FourRowTemplate.fromObject(object.fourRowTemplate); + } + if (object.hydratedFourRowTemplate != null) { + if (typeof object.hydratedFourRowTemplate !== "object") + throw TypeError(".proto.Message.TemplateMessage.hydratedFourRowTemplate: object expected"); + message.hydratedFourRowTemplate = $root.proto.Message.TemplateMessage.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.Message.TemplateMessage + * @static + * @param {proto.Message.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.Message.TemplateMessage.FourRowTemplate.toObject(message.fourRowTemplate, options); + if (options.oneofs) + object.format = "fourRowTemplate"; + } + if (message.hydratedFourRowTemplate != null && message.hasOwnProperty("hydratedFourRowTemplate")) { + object.hydratedFourRowTemplate = $root.proto.Message.TemplateMessage.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.Message.TemplateMessage.HydratedFourRowTemplate.toObject(message.hydratedTemplate, options); + return object; + }; + + /** + * Converts this TemplateMessage to JSON. + * @function toJSON + * @memberof proto.Message.TemplateMessage + * @instance + * @returns {Object.} JSON object + */ + TemplateMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + TemplateMessage.FourRowTemplate = (function() { + + /** + * Properties of a FourRowTemplate. + * @memberof proto.Message.TemplateMessage + * @interface IFourRowTemplate + * @property {proto.Message.IHighlyStructuredMessage|null} [content] FourRowTemplate content + * @property {proto.Message.IHighlyStructuredMessage|null} [footer] FourRowTemplate footer + * @property {Array.|null} [buttons] FourRowTemplate buttons + * @property {proto.Message.IDocumentMessage|null} [documentMessage] FourRowTemplate documentMessage + * @property {proto.Message.IHighlyStructuredMessage|null} [highlyStructuredMessage] FourRowTemplate highlyStructuredMessage + * @property {proto.Message.IImageMessage|null} [imageMessage] FourRowTemplate imageMessage + * @property {proto.Message.IVideoMessage|null} [videoMessage] FourRowTemplate videoMessage + * @property {proto.Message.ILocationMessage|null} [locationMessage] FourRowTemplate locationMessage + */ + + /** + * Constructs a new FourRowTemplate. + * @memberof proto.Message.TemplateMessage + * @classdesc Represents a FourRowTemplate. + * @implements IFourRowTemplate + * @constructor + * @param {proto.Message.TemplateMessage.IFourRowTemplate=} [properties] Properties to set + */ + function FourRowTemplate(properties) { + this.buttons = []; + 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]]; + } + + /** + * FourRowTemplate content. + * @member {proto.Message.IHighlyStructuredMessage|null|undefined} content + * @memberof proto.Message.TemplateMessage.FourRowTemplate + * @instance + */ + FourRowTemplate.prototype.content = null; + + /** + * FourRowTemplate footer. + * @member {proto.Message.IHighlyStructuredMessage|null|undefined} footer + * @memberof proto.Message.TemplateMessage.FourRowTemplate + * @instance + */ + FourRowTemplate.prototype.footer = null; + + /** + * FourRowTemplate buttons. + * @member {Array.} buttons + * @memberof proto.Message.TemplateMessage.FourRowTemplate + * @instance + */ + FourRowTemplate.prototype.buttons = $util.emptyArray; + + /** + * FourRowTemplate documentMessage. + * @member {proto.Message.IDocumentMessage|null|undefined} documentMessage + * @memberof proto.Message.TemplateMessage.FourRowTemplate + * @instance + */ + FourRowTemplate.prototype.documentMessage = null; + + /** + * FourRowTemplate highlyStructuredMessage. + * @member {proto.Message.IHighlyStructuredMessage|null|undefined} highlyStructuredMessage + * @memberof proto.Message.TemplateMessage.FourRowTemplate + * @instance + */ + FourRowTemplate.prototype.highlyStructuredMessage = null; + + /** + * FourRowTemplate imageMessage. + * @member {proto.Message.IImageMessage|null|undefined} imageMessage + * @memberof proto.Message.TemplateMessage.FourRowTemplate + * @instance + */ + FourRowTemplate.prototype.imageMessage = null; + + /** + * FourRowTemplate videoMessage. + * @member {proto.Message.IVideoMessage|null|undefined} videoMessage + * @memberof proto.Message.TemplateMessage.FourRowTemplate + * @instance + */ + FourRowTemplate.prototype.videoMessage = null; + + /** + * FourRowTemplate locationMessage. + * @member {proto.Message.ILocationMessage|null|undefined} locationMessage + * @memberof proto.Message.TemplateMessage.FourRowTemplate + * @instance + */ + FourRowTemplate.prototype.locationMessage = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FourRowTemplate title. + * @member {"documentMessage"|"highlyStructuredMessage"|"imageMessage"|"videoMessage"|"locationMessage"|undefined} title + * @memberof proto.Message.TemplateMessage.FourRowTemplate + * @instance + */ + Object.defineProperty(FourRowTemplate.prototype, "title", { + get: $util.oneOfGetter($oneOfFields = ["documentMessage", "highlyStructuredMessage", "imageMessage", "videoMessage", "locationMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FourRowTemplate instance using the specified properties. + * @function create + * @memberof proto.Message.TemplateMessage.FourRowTemplate + * @static + * @param {proto.Message.TemplateMessage.IFourRowTemplate=} [properties] Properties to set + * @returns {proto.Message.TemplateMessage.FourRowTemplate} FourRowTemplate instance + */ + FourRowTemplate.create = function create(properties) { + return new FourRowTemplate(properties); + }; + + /** + * Encodes the specified FourRowTemplate message. Does not implicitly {@link proto.Message.TemplateMessage.FourRowTemplate.verify|verify} messages. + * @function encode + * @memberof proto.Message.TemplateMessage.FourRowTemplate + * @static + * @param {proto.Message.TemplateMessage.IFourRowTemplate} message FourRowTemplate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FourRowTemplate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.documentMessage != null && Object.hasOwnProperty.call(message, "documentMessage")) + $root.proto.Message.DocumentMessage.encode(message.documentMessage, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.highlyStructuredMessage != null && Object.hasOwnProperty.call(message, "highlyStructuredMessage")) + $root.proto.Message.HighlyStructuredMessage.encode(message.highlyStructuredMessage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.imageMessage != null && Object.hasOwnProperty.call(message, "imageMessage")) + $root.proto.Message.ImageMessage.encode(message.imageMessage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.videoMessage != null && Object.hasOwnProperty.call(message, "videoMessage")) + $root.proto.Message.VideoMessage.encode(message.videoMessage, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.locationMessage != null && Object.hasOwnProperty.call(message, "locationMessage")) + $root.proto.Message.LocationMessage.encode(message.locationMessage, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + $root.proto.Message.HighlyStructuredMessage.encode(message.content, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.footer != null && Object.hasOwnProperty.call(message, "footer")) + $root.proto.Message.HighlyStructuredMessage.encode(message.footer, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.buttons != null && message.buttons.length) + for (var i = 0; i < message.buttons.length; ++i) + $root.proto.TemplateButton.encode(message.buttons[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FourRowTemplate message, length delimited. Does not implicitly {@link proto.Message.TemplateMessage.FourRowTemplate.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.TemplateMessage.FourRowTemplate + * @static + * @param {proto.Message.TemplateMessage.IFourRowTemplate} message FourRowTemplate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FourRowTemplate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FourRowTemplate message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.TemplateMessage.FourRowTemplate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.TemplateMessage.FourRowTemplate} FourRowTemplate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FourRowTemplate.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.Message.TemplateMessage.FourRowTemplate(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 6: + message.content = $root.proto.Message.HighlyStructuredMessage.decode(reader, reader.uint32()); + break; + case 7: + message.footer = $root.proto.Message.HighlyStructuredMessage.decode(reader, reader.uint32()); + break; + case 8: + if (!(message.buttons && message.buttons.length)) + message.buttons = []; + message.buttons.push($root.proto.TemplateButton.decode(reader, reader.uint32())); + break; + case 1: + message.documentMessage = $root.proto.Message.DocumentMessage.decode(reader, reader.uint32()); + break; + case 2: + message.highlyStructuredMessage = $root.proto.Message.HighlyStructuredMessage.decode(reader, reader.uint32()); + break; + case 3: + message.imageMessage = $root.proto.Message.ImageMessage.decode(reader, reader.uint32()); + break; + case 4: + message.videoMessage = $root.proto.Message.VideoMessage.decode(reader, reader.uint32()); + break; + case 5: + message.locationMessage = $root.proto.Message.LocationMessage.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FourRowTemplate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.TemplateMessage.FourRowTemplate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.TemplateMessage.FourRowTemplate} FourRowTemplate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FourRowTemplate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FourRowTemplate message. + * @function verify + * @memberof proto.Message.TemplateMessage.FourRowTemplate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FourRowTemplate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.content != null && message.hasOwnProperty("content")) { + var error = $root.proto.Message.HighlyStructuredMessage.verify(message.content); + if (error) + return "content." + error; + } + if (message.footer != null && message.hasOwnProperty("footer")) { + var error = $root.proto.Message.HighlyStructuredMessage.verify(message.footer); + if (error) + return "footer." + error; + } + if (message.buttons != null && message.hasOwnProperty("buttons")) { + if (!Array.isArray(message.buttons)) + return "buttons: array expected"; + for (var i = 0; i < message.buttons.length; ++i) { + var error = $root.proto.TemplateButton.verify(message.buttons[i]); + if (error) + return "buttons." + error; + } + } + if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) { + properties.title = 1; + { + var error = $root.proto.Message.DocumentMessage.verify(message.documentMessage); + if (error) + return "documentMessage." + error; + } + } + if (message.highlyStructuredMessage != null && message.hasOwnProperty("highlyStructuredMessage")) { + if (properties.title === 1) + return "title: multiple values"; + properties.title = 1; + { + var error = $root.proto.Message.HighlyStructuredMessage.verify(message.highlyStructuredMessage); + if (error) + return "highlyStructuredMessage." + error; + } + } + if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) { + if (properties.title === 1) + return "title: multiple values"; + properties.title = 1; + { + var error = $root.proto.Message.ImageMessage.verify(message.imageMessage); + if (error) + return "imageMessage." + error; + } + } + if (message.videoMessage != null && message.hasOwnProperty("videoMessage")) { + if (properties.title === 1) + return "title: multiple values"; + properties.title = 1; + { + var error = $root.proto.Message.VideoMessage.verify(message.videoMessage); + if (error) + return "videoMessage." + error; + } + } + if (message.locationMessage != null && message.hasOwnProperty("locationMessage")) { + if (properties.title === 1) + return "title: multiple values"; + properties.title = 1; + { + var error = $root.proto.Message.LocationMessage.verify(message.locationMessage); + if (error) + return "locationMessage." + error; + } + } + return null; + }; + + /** + * Creates a FourRowTemplate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.TemplateMessage.FourRowTemplate + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.TemplateMessage.FourRowTemplate} FourRowTemplate + */ + FourRowTemplate.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.TemplateMessage.FourRowTemplate) + return object; + var message = new $root.proto.Message.TemplateMessage.FourRowTemplate(); + if (object.content != null) { + if (typeof object.content !== "object") + throw TypeError(".proto.Message.TemplateMessage.FourRowTemplate.content: object expected"); + message.content = $root.proto.Message.HighlyStructuredMessage.fromObject(object.content); + } + if (object.footer != null) { + if (typeof object.footer !== "object") + throw TypeError(".proto.Message.TemplateMessage.FourRowTemplate.footer: object expected"); + message.footer = $root.proto.Message.HighlyStructuredMessage.fromObject(object.footer); + } + if (object.buttons) { + if (!Array.isArray(object.buttons)) + throw TypeError(".proto.Message.TemplateMessage.FourRowTemplate.buttons: array expected"); + message.buttons = []; + for (var i = 0; i < object.buttons.length; ++i) { + if (typeof object.buttons[i] !== "object") + throw TypeError(".proto.Message.TemplateMessage.FourRowTemplate.buttons: object expected"); + message.buttons[i] = $root.proto.TemplateButton.fromObject(object.buttons[i]); + } + } + if (object.documentMessage != null) { + if (typeof object.documentMessage !== "object") + throw TypeError(".proto.Message.TemplateMessage.FourRowTemplate.documentMessage: object expected"); + message.documentMessage = $root.proto.Message.DocumentMessage.fromObject(object.documentMessage); + } + if (object.highlyStructuredMessage != null) { + if (typeof object.highlyStructuredMessage !== "object") + throw TypeError(".proto.Message.TemplateMessage.FourRowTemplate.highlyStructuredMessage: object expected"); + message.highlyStructuredMessage = $root.proto.Message.HighlyStructuredMessage.fromObject(object.highlyStructuredMessage); + } + if (object.imageMessage != null) { + if (typeof object.imageMessage !== "object") + throw TypeError(".proto.Message.TemplateMessage.FourRowTemplate.imageMessage: object expected"); + message.imageMessage = $root.proto.Message.ImageMessage.fromObject(object.imageMessage); + } + if (object.videoMessage != null) { + if (typeof object.videoMessage !== "object") + throw TypeError(".proto.Message.TemplateMessage.FourRowTemplate.videoMessage: object expected"); + message.videoMessage = $root.proto.Message.VideoMessage.fromObject(object.videoMessage); + } + if (object.locationMessage != null) { + if (typeof object.locationMessage !== "object") + throw TypeError(".proto.Message.TemplateMessage.FourRowTemplate.locationMessage: object expected"); + message.locationMessage = $root.proto.Message.LocationMessage.fromObject(object.locationMessage); + } + return message; + }; + + /** + * Creates a plain object from a FourRowTemplate message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.TemplateMessage.FourRowTemplate + * @static + * @param {proto.Message.TemplateMessage.FourRowTemplate} message FourRowTemplate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FourRowTemplate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.buttons = []; + if (options.defaults) { + object.content = null; + object.footer = null; + } + if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) { + object.documentMessage = $root.proto.Message.DocumentMessage.toObject(message.documentMessage, options); + if (options.oneofs) + object.title = "documentMessage"; + } + if (message.highlyStructuredMessage != null && message.hasOwnProperty("highlyStructuredMessage")) { + object.highlyStructuredMessage = $root.proto.Message.HighlyStructuredMessage.toObject(message.highlyStructuredMessage, options); + if (options.oneofs) + object.title = "highlyStructuredMessage"; + } + if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) { + object.imageMessage = $root.proto.Message.ImageMessage.toObject(message.imageMessage, options); + if (options.oneofs) + object.title = "imageMessage"; + } + if (message.videoMessage != null && message.hasOwnProperty("videoMessage")) { + object.videoMessage = $root.proto.Message.VideoMessage.toObject(message.videoMessage, options); + if (options.oneofs) + object.title = "videoMessage"; + } + if (message.locationMessage != null && message.hasOwnProperty("locationMessage")) { + object.locationMessage = $root.proto.Message.LocationMessage.toObject(message.locationMessage, options); + if (options.oneofs) + object.title = "locationMessage"; + } + if (message.content != null && message.hasOwnProperty("content")) + object.content = $root.proto.Message.HighlyStructuredMessage.toObject(message.content, options); + if (message.footer != null && message.hasOwnProperty("footer")) + object.footer = $root.proto.Message.HighlyStructuredMessage.toObject(message.footer, options); + if (message.buttons && message.buttons.length) { + object.buttons = []; + for (var j = 0; j < message.buttons.length; ++j) + object.buttons[j] = $root.proto.TemplateButton.toObject(message.buttons[j], options); + } + return object; + }; + + /** + * Converts this FourRowTemplate to JSON. + * @function toJSON + * @memberof proto.Message.TemplateMessage.FourRowTemplate + * @instance + * @returns {Object.} JSON object + */ + FourRowTemplate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FourRowTemplate; + })(); + + TemplateMessage.HydratedFourRowTemplate = (function() { + + /** + * Properties of a HydratedFourRowTemplate. + * @memberof proto.Message.TemplateMessage + * @interface IHydratedFourRowTemplate + * @property {string|null} [hydratedContentText] HydratedFourRowTemplate hydratedContentText + * @property {string|null} [hydratedFooterText] HydratedFourRowTemplate hydratedFooterText + * @property {Array.|null} [hydratedButtons] HydratedFourRowTemplate hydratedButtons + * @property {string|null} [templateId] HydratedFourRowTemplate templateId + * @property {proto.Message.IDocumentMessage|null} [documentMessage] HydratedFourRowTemplate documentMessage + * @property {string|null} [hydratedTitleText] HydratedFourRowTemplate hydratedTitleText + * @property {proto.Message.IImageMessage|null} [imageMessage] HydratedFourRowTemplate imageMessage + * @property {proto.Message.IVideoMessage|null} [videoMessage] HydratedFourRowTemplate videoMessage + * @property {proto.Message.ILocationMessage|null} [locationMessage] HydratedFourRowTemplate locationMessage + */ + + /** + * Constructs a new HydratedFourRowTemplate. + * @memberof proto.Message.TemplateMessage + * @classdesc Represents a HydratedFourRowTemplate. + * @implements IHydratedFourRowTemplate + * @constructor + * @param {proto.Message.TemplateMessage.IHydratedFourRowTemplate=} [properties] Properties to set + */ + function HydratedFourRowTemplate(properties) { + this.hydratedButtons = []; + 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]]; + } + + /** + * HydratedFourRowTemplate hydratedContentText. + * @member {string} hydratedContentText + * @memberof proto.Message.TemplateMessage.HydratedFourRowTemplate + * @instance + */ + HydratedFourRowTemplate.prototype.hydratedContentText = ""; + + /** + * HydratedFourRowTemplate hydratedFooterText. + * @member {string} hydratedFooterText + * @memberof proto.Message.TemplateMessage.HydratedFourRowTemplate + * @instance + */ + HydratedFourRowTemplate.prototype.hydratedFooterText = ""; + + /** + * HydratedFourRowTemplate hydratedButtons. + * @member {Array.} hydratedButtons + * @memberof proto.Message.TemplateMessage.HydratedFourRowTemplate + * @instance + */ + HydratedFourRowTemplate.prototype.hydratedButtons = $util.emptyArray; + + /** + * HydratedFourRowTemplate templateId. + * @member {string} templateId + * @memberof proto.Message.TemplateMessage.HydratedFourRowTemplate + * @instance + */ + HydratedFourRowTemplate.prototype.templateId = ""; + + /** + * HydratedFourRowTemplate documentMessage. + * @member {proto.Message.IDocumentMessage|null|undefined} documentMessage + * @memberof proto.Message.TemplateMessage.HydratedFourRowTemplate + * @instance + */ + HydratedFourRowTemplate.prototype.documentMessage = null; + + /** + * HydratedFourRowTemplate hydratedTitleText. + * @member {string|null|undefined} hydratedTitleText + * @memberof proto.Message.TemplateMessage.HydratedFourRowTemplate + * @instance + */ + HydratedFourRowTemplate.prototype.hydratedTitleText = null; + + /** + * HydratedFourRowTemplate imageMessage. + * @member {proto.Message.IImageMessage|null|undefined} imageMessage + * @memberof proto.Message.TemplateMessage.HydratedFourRowTemplate + * @instance + */ + HydratedFourRowTemplate.prototype.imageMessage = null; + + /** + * HydratedFourRowTemplate videoMessage. + * @member {proto.Message.IVideoMessage|null|undefined} videoMessage + * @memberof proto.Message.TemplateMessage.HydratedFourRowTemplate + * @instance + */ + HydratedFourRowTemplate.prototype.videoMessage = null; + + /** + * HydratedFourRowTemplate locationMessage. + * @member {proto.Message.ILocationMessage|null|undefined} locationMessage + * @memberof proto.Message.TemplateMessage.HydratedFourRowTemplate + * @instance + */ + HydratedFourRowTemplate.prototype.locationMessage = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HydratedFourRowTemplate title. + * @member {"documentMessage"|"hydratedTitleText"|"imageMessage"|"videoMessage"|"locationMessage"|undefined} title + * @memberof proto.Message.TemplateMessage.HydratedFourRowTemplate + * @instance + */ + Object.defineProperty(HydratedFourRowTemplate.prototype, "title", { + get: $util.oneOfGetter($oneOfFields = ["documentMessage", "hydratedTitleText", "imageMessage", "videoMessage", "locationMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HydratedFourRowTemplate instance using the specified properties. + * @function create + * @memberof proto.Message.TemplateMessage.HydratedFourRowTemplate + * @static + * @param {proto.Message.TemplateMessage.IHydratedFourRowTemplate=} [properties] Properties to set + * @returns {proto.Message.TemplateMessage.HydratedFourRowTemplate} HydratedFourRowTemplate instance + */ + HydratedFourRowTemplate.create = function create(properties) { + return new HydratedFourRowTemplate(properties); + }; + + /** + * Encodes the specified HydratedFourRowTemplate message. Does not implicitly {@link proto.Message.TemplateMessage.HydratedFourRowTemplate.verify|verify} messages. + * @function encode + * @memberof proto.Message.TemplateMessage.HydratedFourRowTemplate + * @static + * @param {proto.Message.TemplateMessage.IHydratedFourRowTemplate} message HydratedFourRowTemplate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HydratedFourRowTemplate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.documentMessage != null && Object.hasOwnProperty.call(message, "documentMessage")) + $root.proto.Message.DocumentMessage.encode(message.documentMessage, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.hydratedTitleText != null && Object.hasOwnProperty.call(message, "hydratedTitleText")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.hydratedTitleText); + if (message.imageMessage != null && Object.hasOwnProperty.call(message, "imageMessage")) + $root.proto.Message.ImageMessage.encode(message.imageMessage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.videoMessage != null && Object.hasOwnProperty.call(message, "videoMessage")) + $root.proto.Message.VideoMessage.encode(message.videoMessage, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.locationMessage != null && Object.hasOwnProperty.call(message, "locationMessage")) + $root.proto.Message.LocationMessage.encode(message.locationMessage, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.hydratedContentText != null && Object.hasOwnProperty.call(message, "hydratedContentText")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.hydratedContentText); + if (message.hydratedFooterText != null && Object.hasOwnProperty.call(message, "hydratedFooterText")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.hydratedFooterText); + if (message.hydratedButtons != null && message.hydratedButtons.length) + for (var i = 0; i < message.hydratedButtons.length; ++i) + $root.proto.HydratedTemplateButton.encode(message.hydratedButtons[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.templateId != null && Object.hasOwnProperty.call(message, "templateId")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.templateId); + return writer; + }; + + /** + * Encodes the specified HydratedFourRowTemplate message, length delimited. Does not implicitly {@link proto.Message.TemplateMessage.HydratedFourRowTemplate.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.TemplateMessage.HydratedFourRowTemplate + * @static + * @param {proto.Message.TemplateMessage.IHydratedFourRowTemplate} message HydratedFourRowTemplate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HydratedFourRowTemplate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HydratedFourRowTemplate message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.TemplateMessage.HydratedFourRowTemplate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.TemplateMessage.HydratedFourRowTemplate} HydratedFourRowTemplate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HydratedFourRowTemplate.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.Message.TemplateMessage.HydratedFourRowTemplate(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 6: + message.hydratedContentText = reader.string(); + break; + case 7: + message.hydratedFooterText = reader.string(); + break; + case 8: + if (!(message.hydratedButtons && message.hydratedButtons.length)) + message.hydratedButtons = []; + message.hydratedButtons.push($root.proto.HydratedTemplateButton.decode(reader, reader.uint32())); + break; + case 9: + message.templateId = reader.string(); + break; + case 1: + message.documentMessage = $root.proto.Message.DocumentMessage.decode(reader, reader.uint32()); + break; + case 2: + message.hydratedTitleText = reader.string(); + break; + case 3: + message.imageMessage = $root.proto.Message.ImageMessage.decode(reader, reader.uint32()); + break; + case 4: + message.videoMessage = $root.proto.Message.VideoMessage.decode(reader, reader.uint32()); + break; + case 5: + message.locationMessage = $root.proto.Message.LocationMessage.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HydratedFourRowTemplate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.TemplateMessage.HydratedFourRowTemplate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.TemplateMessage.HydratedFourRowTemplate} HydratedFourRowTemplate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HydratedFourRowTemplate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HydratedFourRowTemplate message. + * @function verify + * @memberof proto.Message.TemplateMessage.HydratedFourRowTemplate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HydratedFourRowTemplate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.hydratedContentText != null && message.hasOwnProperty("hydratedContentText")) + if (!$util.isString(message.hydratedContentText)) + return "hydratedContentText: string expected"; + if (message.hydratedFooterText != null && message.hasOwnProperty("hydratedFooterText")) + if (!$util.isString(message.hydratedFooterText)) + return "hydratedFooterText: string expected"; + if (message.hydratedButtons != null && message.hasOwnProperty("hydratedButtons")) { + if (!Array.isArray(message.hydratedButtons)) + return "hydratedButtons: array expected"; + for (var i = 0; i < message.hydratedButtons.length; ++i) { + var error = $root.proto.HydratedTemplateButton.verify(message.hydratedButtons[i]); + if (error) + return "hydratedButtons." + error; + } + } + if (message.templateId != null && message.hasOwnProperty("templateId")) + if (!$util.isString(message.templateId)) + return "templateId: string expected"; + if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) { + properties.title = 1; + { + var error = $root.proto.Message.DocumentMessage.verify(message.documentMessage); + if (error) + return "documentMessage." + error; + } + } + if (message.hydratedTitleText != null && message.hasOwnProperty("hydratedTitleText")) { + if (properties.title === 1) + return "title: multiple values"; + properties.title = 1; + if (!$util.isString(message.hydratedTitleText)) + return "hydratedTitleText: string expected"; + } + if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) { + if (properties.title === 1) + return "title: multiple values"; + properties.title = 1; + { + var error = $root.proto.Message.ImageMessage.verify(message.imageMessage); + if (error) + return "imageMessage." + error; + } + } + if (message.videoMessage != null && message.hasOwnProperty("videoMessage")) { + if (properties.title === 1) + return "title: multiple values"; + properties.title = 1; + { + var error = $root.proto.Message.VideoMessage.verify(message.videoMessage); + if (error) + return "videoMessage." + error; + } + } + if (message.locationMessage != null && message.hasOwnProperty("locationMessage")) { + if (properties.title === 1) + return "title: multiple values"; + properties.title = 1; + { + var error = $root.proto.Message.LocationMessage.verify(message.locationMessage); + if (error) + return "locationMessage." + error; + } + } + return null; + }; + + /** + * Creates a HydratedFourRowTemplate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.TemplateMessage.HydratedFourRowTemplate + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.TemplateMessage.HydratedFourRowTemplate} HydratedFourRowTemplate + */ + HydratedFourRowTemplate.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.TemplateMessage.HydratedFourRowTemplate) + return object; + var message = new $root.proto.Message.TemplateMessage.HydratedFourRowTemplate(); + if (object.hydratedContentText != null) + message.hydratedContentText = String(object.hydratedContentText); + if (object.hydratedFooterText != null) + message.hydratedFooterText = String(object.hydratedFooterText); + if (object.hydratedButtons) { + if (!Array.isArray(object.hydratedButtons)) + throw TypeError(".proto.Message.TemplateMessage.HydratedFourRowTemplate.hydratedButtons: array expected"); + message.hydratedButtons = []; + for (var i = 0; i < object.hydratedButtons.length; ++i) { + if (typeof object.hydratedButtons[i] !== "object") + throw TypeError(".proto.Message.TemplateMessage.HydratedFourRowTemplate.hydratedButtons: object expected"); + message.hydratedButtons[i] = $root.proto.HydratedTemplateButton.fromObject(object.hydratedButtons[i]); + } + } + if (object.templateId != null) + message.templateId = String(object.templateId); + if (object.documentMessage != null) { + if (typeof object.documentMessage !== "object") + throw TypeError(".proto.Message.TemplateMessage.HydratedFourRowTemplate.documentMessage: object expected"); + message.documentMessage = $root.proto.Message.DocumentMessage.fromObject(object.documentMessage); + } + if (object.hydratedTitleText != null) + message.hydratedTitleText = String(object.hydratedTitleText); + if (object.imageMessage != null) { + if (typeof object.imageMessage !== "object") + throw TypeError(".proto.Message.TemplateMessage.HydratedFourRowTemplate.imageMessage: object expected"); + message.imageMessage = $root.proto.Message.ImageMessage.fromObject(object.imageMessage); + } + if (object.videoMessage != null) { + if (typeof object.videoMessage !== "object") + throw TypeError(".proto.Message.TemplateMessage.HydratedFourRowTemplate.videoMessage: object expected"); + message.videoMessage = $root.proto.Message.VideoMessage.fromObject(object.videoMessage); + } + if (object.locationMessage != null) { + if (typeof object.locationMessage !== "object") + throw TypeError(".proto.Message.TemplateMessage.HydratedFourRowTemplate.locationMessage: object expected"); + message.locationMessage = $root.proto.Message.LocationMessage.fromObject(object.locationMessage); + } + return message; + }; + + /** + * Creates a plain object from a HydratedFourRowTemplate message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.TemplateMessage.HydratedFourRowTemplate + * @static + * @param {proto.Message.TemplateMessage.HydratedFourRowTemplate} message HydratedFourRowTemplate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HydratedFourRowTemplate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.hydratedButtons = []; + if (options.defaults) { + object.hydratedContentText = ""; + object.hydratedFooterText = ""; + object.templateId = ""; + } + if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) { + object.documentMessage = $root.proto.Message.DocumentMessage.toObject(message.documentMessage, options); + if (options.oneofs) + object.title = "documentMessage"; + } + if (message.hydratedTitleText != null && message.hasOwnProperty("hydratedTitleText")) { + object.hydratedTitleText = message.hydratedTitleText; + if (options.oneofs) + object.title = "hydratedTitleText"; + } + if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) { + object.imageMessage = $root.proto.Message.ImageMessage.toObject(message.imageMessage, options); + if (options.oneofs) + object.title = "imageMessage"; + } + if (message.videoMessage != null && message.hasOwnProperty("videoMessage")) { + object.videoMessage = $root.proto.Message.VideoMessage.toObject(message.videoMessage, options); + if (options.oneofs) + object.title = "videoMessage"; + } + if (message.locationMessage != null && message.hasOwnProperty("locationMessage")) { + object.locationMessage = $root.proto.Message.LocationMessage.toObject(message.locationMessage, options); + if (options.oneofs) + object.title = "locationMessage"; + } + if (message.hydratedContentText != null && message.hasOwnProperty("hydratedContentText")) + object.hydratedContentText = message.hydratedContentText; + if (message.hydratedFooterText != null && message.hasOwnProperty("hydratedFooterText")) + object.hydratedFooterText = message.hydratedFooterText; + if (message.hydratedButtons && message.hydratedButtons.length) { + object.hydratedButtons = []; + for (var j = 0; j < message.hydratedButtons.length; ++j) + object.hydratedButtons[j] = $root.proto.HydratedTemplateButton.toObject(message.hydratedButtons[j], options); + } + if (message.templateId != null && message.hasOwnProperty("templateId")) + object.templateId = message.templateId; + return object; + }; + + /** + * Converts this HydratedFourRowTemplate to JSON. + * @function toJSON + * @memberof proto.Message.TemplateMessage.HydratedFourRowTemplate + * @instance + * @returns {Object.} JSON object + */ + HydratedFourRowTemplate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HydratedFourRowTemplate; + })(); + + return TemplateMessage; + })(); + + Message.VideoMessage = (function() { + + /** + * Properties of a VideoMessage. + * @memberof proto.Message + * @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.Message.VideoMessage.Attribution|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.Message + * @classdesc Represents a VideoMessage. + * @implements IVideoMessage + * @constructor + * @param {proto.Message.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.Message.VideoMessage + * @instance + */ + VideoMessage.prototype.url = ""; + + /** + * VideoMessage mimetype. + * @member {string} mimetype + * @memberof proto.Message.VideoMessage + * @instance + */ + VideoMessage.prototype.mimetype = ""; + + /** + * VideoMessage fileSha256. + * @member {Uint8Array} fileSha256 + * @memberof proto.Message.VideoMessage + * @instance + */ + VideoMessage.prototype.fileSha256 = $util.newBuffer([]); + + /** + * VideoMessage fileLength. + * @member {number|Long} fileLength + * @memberof proto.Message.VideoMessage + * @instance + */ + VideoMessage.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * VideoMessage seconds. + * @member {number} seconds + * @memberof proto.Message.VideoMessage + * @instance + */ + VideoMessage.prototype.seconds = 0; + + /** + * VideoMessage mediaKey. + * @member {Uint8Array} mediaKey + * @memberof proto.Message.VideoMessage + * @instance + */ + VideoMessage.prototype.mediaKey = $util.newBuffer([]); + + /** + * VideoMessage caption. + * @member {string} caption + * @memberof proto.Message.VideoMessage + * @instance + */ + VideoMessage.prototype.caption = ""; + + /** + * VideoMessage gifPlayback. + * @member {boolean} gifPlayback + * @memberof proto.Message.VideoMessage + * @instance + */ + VideoMessage.prototype.gifPlayback = false; + + /** + * VideoMessage height. + * @member {number} height + * @memberof proto.Message.VideoMessage + * @instance + */ + VideoMessage.prototype.height = 0; + + /** + * VideoMessage width. + * @member {number} width + * @memberof proto.Message.VideoMessage + * @instance + */ + VideoMessage.prototype.width = 0; + + /** + * VideoMessage fileEncSha256. + * @member {Uint8Array} fileEncSha256 + * @memberof proto.Message.VideoMessage + * @instance + */ + VideoMessage.prototype.fileEncSha256 = $util.newBuffer([]); + + /** + * VideoMessage interactiveAnnotations. + * @member {Array.} interactiveAnnotations + * @memberof proto.Message.VideoMessage + * @instance + */ + VideoMessage.prototype.interactiveAnnotations = $util.emptyArray; + + /** + * VideoMessage directPath. + * @member {string} directPath + * @memberof proto.Message.VideoMessage + * @instance + */ + VideoMessage.prototype.directPath = ""; + + /** + * VideoMessage mediaKeyTimestamp. + * @member {number|Long} mediaKeyTimestamp + * @memberof proto.Message.VideoMessage + * @instance + */ + VideoMessage.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * VideoMessage jpegThumbnail. + * @member {Uint8Array} jpegThumbnail + * @memberof proto.Message.VideoMessage + * @instance + */ + VideoMessage.prototype.jpegThumbnail = $util.newBuffer([]); + + /** + * VideoMessage contextInfo. + * @member {proto.IContextInfo|null|undefined} contextInfo + * @memberof proto.Message.VideoMessage + * @instance + */ + VideoMessage.prototype.contextInfo = null; + + /** + * VideoMessage streamingSidecar. + * @member {Uint8Array} streamingSidecar + * @memberof proto.Message.VideoMessage + * @instance + */ + VideoMessage.prototype.streamingSidecar = $util.newBuffer([]); + + /** + * VideoMessage gifAttribution. + * @member {proto.Message.VideoMessage.Attribution} gifAttribution + * @memberof proto.Message.VideoMessage + * @instance + */ + VideoMessage.prototype.gifAttribution = 0; + + /** + * VideoMessage viewOnce. + * @member {boolean} viewOnce + * @memberof proto.Message.VideoMessage + * @instance + */ + VideoMessage.prototype.viewOnce = false; + + /** + * VideoMessage thumbnailDirectPath. + * @member {string} thumbnailDirectPath + * @memberof proto.Message.VideoMessage + * @instance + */ + VideoMessage.prototype.thumbnailDirectPath = ""; + + /** + * VideoMessage thumbnailSha256. + * @member {Uint8Array} thumbnailSha256 + * @memberof proto.Message.VideoMessage + * @instance + */ + VideoMessage.prototype.thumbnailSha256 = $util.newBuffer([]); + + /** + * VideoMessage thumbnailEncSha256. + * @member {Uint8Array} thumbnailEncSha256 + * @memberof proto.Message.VideoMessage + * @instance + */ + VideoMessage.prototype.thumbnailEncSha256 = $util.newBuffer([]); + + /** + * VideoMessage staticUrl. + * @member {string} staticUrl + * @memberof proto.Message.VideoMessage + * @instance + */ + VideoMessage.prototype.staticUrl = ""; + + /** + * Creates a new VideoMessage instance using the specified properties. + * @function create + * @memberof proto.Message.VideoMessage + * @static + * @param {proto.Message.IVideoMessage=} [properties] Properties to set + * @returns {proto.Message.VideoMessage} VideoMessage instance + */ + VideoMessage.create = function create(properties) { + return new VideoMessage(properties); + }; + + /** + * Encodes the specified VideoMessage message. Does not implicitly {@link proto.Message.VideoMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.VideoMessage + * @static + * @param {proto.Message.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.Message.VideoMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.VideoMessage + * @static + * @param {proto.Message.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.Message.VideoMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.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.Message.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.Message.VideoMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.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.Message.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.Message.VideoMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.VideoMessage} VideoMessage + */ + VideoMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.VideoMessage) + return object; + var message = new $root.proto.Message.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.Message.VideoMessage.interactiveAnnotations: array expected"); + message.interactiveAnnotations = []; + for (var i = 0; i < object.interactiveAnnotations.length; ++i) { + if (typeof object.interactiveAnnotations[i] !== "object") + throw TypeError(".proto.Message.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.Message.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.Message.VideoMessage + * @static + * @param {proto.Message.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.Message.VideoMessage.Attribution[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.Message.VideoMessage + * @instance + * @returns {Object.} JSON object + */ + VideoMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Attribution enum. + * @name proto.Message.VideoMessage.Attribution + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} GIPHY=1 GIPHY value + * @property {number} TENOR=2 TENOR value + */ + VideoMessage.Attribution = (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 Message; })(); @@ -36540,9 +46174,12 @@ $root.proto = (function() { * @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 {Array.|null} [pollOptions] MsgOpaqueData pollOptions * @property {number|null} [pollSelectableOptionsCount] MsgOpaqueData pollSelectableOptionsCount * @property {Uint8Array|null} [messageSecret] MsgOpaqueData messageSecret + * @property {number|Long|null} [senderTimestampMs] MsgOpaqueData senderTimestampMs + * @property {string|null} [pollUpdateParentKey] MsgOpaqueData pollUpdateParentKey + * @property {proto.IPollEncValue|null} [encPollVote] MsgOpaqueData encPollVote */ /** @@ -36683,7 +46320,7 @@ $root.proto = (function() { /** * MsgOpaqueData pollOptions. - * @member {Array.} pollOptions + * @member {Array.} pollOptions * @memberof proto.MsgOpaqueData * @instance */ @@ -36705,6 +46342,30 @@ $root.proto = (function() { */ MsgOpaqueData.prototype.messageSecret = $util.newBuffer([]); + /** + * MsgOpaqueData senderTimestampMs. + * @member {number|Long} senderTimestampMs + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.senderTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * MsgOpaqueData pollUpdateParentKey. + * @member {string} pollUpdateParentKey + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.pollUpdateParentKey = ""; + + /** + * MsgOpaqueData encPollVote. + * @member {proto.IPollEncValue|null|undefined} encPollVote + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.encPollVote = null; + /** * Creates a new MsgOpaqueData instance using the specified properties. * @function create @@ -36761,11 +46422,17 @@ $root.proto = (function() { 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(); + $root.proto.MsgOpaqueData.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); + if (message.senderTimestampMs != null && Object.hasOwnProperty.call(message, "senderTimestampMs")) + writer.uint32(/* id 22, wireType 0 =*/176).int64(message.senderTimestampMs); + if (message.pollUpdateParentKey != null && Object.hasOwnProperty.call(message, "pollUpdateParentKey")) + writer.uint32(/* id 23, wireType 2 =*/186).string(message.pollUpdateParentKey); + if (message.encPollVote != null && Object.hasOwnProperty.call(message, "encPollVote")) + $root.proto.PollEncValue.encode(message.encPollVote, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); return writer; }; @@ -36848,7 +46515,7 @@ $root.proto = (function() { case 18: if (!(message.pollOptions && message.pollOptions.length)) message.pollOptions = []; - message.pollOptions.push($root.proto.PollOption.decode(reader, reader.uint32())); + message.pollOptions.push($root.proto.MsgOpaqueData.PollOption.decode(reader, reader.uint32())); break; case 20: message.pollSelectableOptionsCount = reader.uint32(); @@ -36856,6 +46523,15 @@ $root.proto = (function() { case 21: message.messageSecret = reader.bytes(); break; + case 22: + message.senderTimestampMs = reader.int64(); + break; + case 23: + message.pollUpdateParentKey = reader.string(); + break; + case 24: + message.encPollVote = $root.proto.PollEncValue.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -36940,7 +46616,7 @@ $root.proto = (function() { 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]); + var error = $root.proto.MsgOpaqueData.PollOption.verify(message.pollOptions[i]); if (error) return "pollOptions." + error; } @@ -36951,6 +46627,17 @@ $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.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.pollUpdateParentKey != null && message.hasOwnProperty("pollUpdateParentKey")) + if (!$util.isString(message.pollUpdateParentKey)) + return "pollUpdateParentKey: string expected"; + if (message.encPollVote != null && message.hasOwnProperty("encPollVote")) { + var error = $root.proto.PollEncValue.verify(message.encPollVote); + if (error) + return "encPollVote." + error; + } return null; }; @@ -37006,7 +46693,7 @@ $root.proto = (function() { 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]); + message.pollOptions[i] = $root.proto.MsgOpaqueData.PollOption.fromObject(object.pollOptions[i]); } } if (object.pollSelectableOptionsCount != null) @@ -37016,6 +46703,22 @@ $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.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.pollUpdateParentKey != null) + message.pollUpdateParentKey = String(object.pollUpdateParentKey); + if (object.encPollVote != null) { + if (typeof object.encPollVote !== "object") + throw TypeError(".proto.MsgOpaqueData.encPollVote: object expected"); + message.encPollVote = $root.proto.PollEncValue.fromObject(object.encPollVote); + } return message; }; @@ -37064,6 +46767,13 @@ $root.proto = (function() { if (options.bytes !== Array) object.messageSecret = $util.newBuffer(object.messageSecret); } + 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.pollUpdateParentKey = ""; + object.encPollVote = null; } if (message.body != null && message.hasOwnProperty("body")) object.body = message.body; @@ -37098,12 +46808,21 @@ $root.proto = (function() { 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); + object.pollOptions[j] = $root.proto.MsgOpaqueData.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; + 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.pollUpdateParentKey != null && message.hasOwnProperty("pollUpdateParentKey")) + object.pollUpdateParentKey = message.pollUpdateParentKey; + if (message.encPollVote != null && message.hasOwnProperty("encPollVote")) + object.encPollVote = $root.proto.PollEncValue.toObject(message.encPollVote, options); return object; }; @@ -37118,6 +46837,193 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + MsgOpaqueData.PollOption = (function() { + + /** + * Properties of a PollOption. + * @memberof proto.MsgOpaqueData + * @interface IPollOption + * @property {string|null} [name] PollOption name + */ + + /** + * Constructs a new PollOption. + * @memberof proto.MsgOpaqueData + * @classdesc Represents a PollOption. + * @implements IPollOption + * @constructor + * @param {proto.MsgOpaqueData.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.MsgOpaqueData.PollOption + * @instance + */ + PollOption.prototype.name = ""; + + /** + * Creates a new PollOption instance using the specified properties. + * @function create + * @memberof proto.MsgOpaqueData.PollOption + * @static + * @param {proto.MsgOpaqueData.IPollOption=} [properties] Properties to set + * @returns {proto.MsgOpaqueData.PollOption} PollOption instance + */ + PollOption.create = function create(properties) { + return new PollOption(properties); + }; + + /** + * Encodes the specified PollOption message. Does not implicitly {@link proto.MsgOpaqueData.PollOption.verify|verify} messages. + * @function encode + * @memberof proto.MsgOpaqueData.PollOption + * @static + * @param {proto.MsgOpaqueData.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.MsgOpaqueData.PollOption.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.MsgOpaqueData.PollOption + * @static + * @param {proto.MsgOpaqueData.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.MsgOpaqueData.PollOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.MsgOpaqueData.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.MsgOpaqueData.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.MsgOpaqueData.PollOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.MsgOpaqueData.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.MsgOpaqueData.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.MsgOpaqueData.PollOption + * @static + * @param {Object.} object Plain object + * @returns {proto.MsgOpaqueData.PollOption} PollOption + */ + PollOption.fromObject = function fromObject(object) { + if (object instanceof $root.proto.MsgOpaqueData.PollOption) + return object; + var message = new $root.proto.MsgOpaqueData.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.MsgOpaqueData.PollOption + * @static + * @param {proto.MsgOpaqueData.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.MsgOpaqueData.PollOption + * @instance + * @returns {Object.} JSON object + */ + PollOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PollOption; + })(); + return MsgOpaqueData; })(); @@ -37341,1136 +47247,6 @@ $root.proto = (function() { 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() { - - /** - * Properties of a NativeFlowButton. - * @memberof proto - * @interface INativeFlowButton - * @property {string|null} [name] NativeFlowButton name - * @property {string|null} [buttonParamsJson] NativeFlowButton buttonParamsJson - */ - - /** - * Constructs a new NativeFlowButton. - * @memberof proto - * @classdesc Represents a NativeFlowButton. - * @implements INativeFlowButton - * @constructor - * @param {proto.INativeFlowButton=} [properties] Properties to set - */ - function NativeFlowButton(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]]; - } - - /** - * NativeFlowButton name. - * @member {string} name - * @memberof proto.NativeFlowButton - * @instance - */ - NativeFlowButton.prototype.name = ""; - - /** - * NativeFlowButton buttonParamsJson. - * @member {string} buttonParamsJson - * @memberof proto.NativeFlowButton - * @instance - */ - NativeFlowButton.prototype.buttonParamsJson = ""; - - /** - * Creates a new NativeFlowButton instance using the specified properties. - * @function create - * @memberof proto.NativeFlowButton - * @static - * @param {proto.INativeFlowButton=} [properties] Properties to set - * @returns {proto.NativeFlowButton} NativeFlowButton instance - */ - NativeFlowButton.create = function create(properties) { - return new NativeFlowButton(properties); - }; - - /** - * Encodes the specified NativeFlowButton message. Does not implicitly {@link proto.NativeFlowButton.verify|verify} messages. - * @function encode - * @memberof proto.NativeFlowButton - * @static - * @param {proto.INativeFlowButton} message NativeFlowButton message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NativeFlowButton.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.buttonParamsJson != null && Object.hasOwnProperty.call(message, "buttonParamsJson")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.buttonParamsJson); - return writer; - }; - - /** - * Encodes the specified NativeFlowButton message, length delimited. Does not implicitly {@link proto.NativeFlowButton.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.NativeFlowButton - * @static - * @param {proto.INativeFlowButton} message NativeFlowButton message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NativeFlowButton.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NativeFlowButton message from the specified reader or buffer. - * @function decode - * @memberof proto.NativeFlowButton - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.NativeFlowButton} NativeFlowButton - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NativeFlowButton.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.NativeFlowButton(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.buttonParamsJson = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NativeFlowButton message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.NativeFlowButton - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.NativeFlowButton} NativeFlowButton - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NativeFlowButton.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NativeFlowButton message. - * @function verify - * @memberof proto.NativeFlowButton - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NativeFlowButton.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.buttonParamsJson != null && message.hasOwnProperty("buttonParamsJson")) - if (!$util.isString(message.buttonParamsJson)) - return "buttonParamsJson: string expected"; - return null; - }; - - /** - * Creates a NativeFlowButton message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.NativeFlowButton - * @static - * @param {Object.} object Plain object - * @returns {proto.NativeFlowButton} NativeFlowButton - */ - NativeFlowButton.fromObject = function fromObject(object) { - if (object instanceof $root.proto.NativeFlowButton) - return object; - var message = new $root.proto.NativeFlowButton(); - if (object.name != null) - message.name = String(object.name); - if (object.buttonParamsJson != null) - message.buttonParamsJson = String(object.buttonParamsJson); - return message; - }; - - /** - * Creates a plain object from a NativeFlowButton message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.NativeFlowButton - * @static - * @param {proto.NativeFlowButton} message NativeFlowButton - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NativeFlowButton.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.buttonParamsJson = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.buttonParamsJson != null && message.hasOwnProperty("buttonParamsJson")) - object.buttonParamsJson = message.buttonParamsJson; - return object; - }; - - /** - * Converts this NativeFlowButton to JSON. - * @function toJSON - * @memberof proto.NativeFlowButton - * @instance - * @returns {Object.} JSON object - */ - NativeFlowButton.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return NativeFlowButton; - })(); - - proto.NativeFlowInfo = (function() { - - /** - * Properties of a NativeFlowInfo. - * @memberof proto - * @interface INativeFlowInfo - * @property {string|null} [name] NativeFlowInfo name - * @property {string|null} [paramsJson] NativeFlowInfo paramsJson - */ - - /** - * Constructs a new NativeFlowInfo. - * @memberof proto - * @classdesc Represents a NativeFlowInfo. - * @implements INativeFlowInfo - * @constructor - * @param {proto.INativeFlowInfo=} [properties] Properties to set - */ - function NativeFlowInfo(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]]; - } - - /** - * NativeFlowInfo name. - * @member {string} name - * @memberof proto.NativeFlowInfo - * @instance - */ - NativeFlowInfo.prototype.name = ""; - - /** - * NativeFlowInfo paramsJson. - * @member {string} paramsJson - * @memberof proto.NativeFlowInfo - * @instance - */ - NativeFlowInfo.prototype.paramsJson = ""; - - /** - * Creates a new NativeFlowInfo instance using the specified properties. - * @function create - * @memberof proto.NativeFlowInfo - * @static - * @param {proto.INativeFlowInfo=} [properties] Properties to set - * @returns {proto.NativeFlowInfo} NativeFlowInfo instance - */ - NativeFlowInfo.create = function create(properties) { - return new NativeFlowInfo(properties); - }; - - /** - * Encodes the specified NativeFlowInfo message. Does not implicitly {@link proto.NativeFlowInfo.verify|verify} messages. - * @function encode - * @memberof proto.NativeFlowInfo - * @static - * @param {proto.INativeFlowInfo} message NativeFlowInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NativeFlowInfo.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.paramsJson != null && Object.hasOwnProperty.call(message, "paramsJson")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.paramsJson); - return writer; - }; - - /** - * Encodes the specified NativeFlowInfo message, length delimited. Does not implicitly {@link proto.NativeFlowInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.NativeFlowInfo - * @static - * @param {proto.INativeFlowInfo} message NativeFlowInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NativeFlowInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NativeFlowInfo message from the specified reader or buffer. - * @function decode - * @memberof proto.NativeFlowInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.NativeFlowInfo} NativeFlowInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NativeFlowInfo.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.NativeFlowInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.paramsJson = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NativeFlowInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.NativeFlowInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.NativeFlowInfo} NativeFlowInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NativeFlowInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NativeFlowInfo message. - * @function verify - * @memberof proto.NativeFlowInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NativeFlowInfo.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.paramsJson != null && message.hasOwnProperty("paramsJson")) - if (!$util.isString(message.paramsJson)) - return "paramsJson: string expected"; - return null; - }; - - /** - * Creates a NativeFlowInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.NativeFlowInfo - * @static - * @param {Object.} object Plain object - * @returns {proto.NativeFlowInfo} NativeFlowInfo - */ - NativeFlowInfo.fromObject = function fromObject(object) { - if (object instanceof $root.proto.NativeFlowInfo) - return object; - var message = new $root.proto.NativeFlowInfo(); - if (object.name != null) - message.name = String(object.name); - if (object.paramsJson != null) - message.paramsJson = String(object.paramsJson); - return message; - }; - - /** - * Creates a plain object from a NativeFlowInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.NativeFlowInfo - * @static - * @param {proto.NativeFlowInfo} message NativeFlowInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NativeFlowInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.paramsJson = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.paramsJson != null && message.hasOwnProperty("paramsJson")) - object.paramsJson = message.paramsJson; - return object; - }; - - /** - * Converts this NativeFlowInfo to JSON. - * @function toJSON - * @memberof proto.NativeFlowInfo - * @instance - * @returns {Object.} JSON object - */ - NativeFlowInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return NativeFlowInfo; - })(); - - proto.NativeFlowMessage = (function() { - - /** - * Properties of a NativeFlowMessage. - * @memberof proto - * @interface INativeFlowMessage - * @property {Array.|null} [buttons] NativeFlowMessage buttons - * @property {string|null} [messageParamsJson] NativeFlowMessage messageParamsJson - * @property {number|null} [messageVersion] NativeFlowMessage messageVersion - */ - - /** - * Constructs a new NativeFlowMessage. - * @memberof proto - * @classdesc Represents a NativeFlowMessage. - * @implements INativeFlowMessage - * @constructor - * @param {proto.INativeFlowMessage=} [properties] Properties to set - */ - function NativeFlowMessage(properties) { - this.buttons = []; - 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]]; - } - - /** - * NativeFlowMessage buttons. - * @member {Array.} buttons - * @memberof proto.NativeFlowMessage - * @instance - */ - NativeFlowMessage.prototype.buttons = $util.emptyArray; - - /** - * NativeFlowMessage messageParamsJson. - * @member {string} messageParamsJson - * @memberof proto.NativeFlowMessage - * @instance - */ - NativeFlowMessage.prototype.messageParamsJson = ""; - - /** - * NativeFlowMessage messageVersion. - * @member {number} messageVersion - * @memberof proto.NativeFlowMessage - * @instance - */ - NativeFlowMessage.prototype.messageVersion = 0; - - /** - * Creates a new NativeFlowMessage instance using the specified properties. - * @function create - * @memberof proto.NativeFlowMessage - * @static - * @param {proto.INativeFlowMessage=} [properties] Properties to set - * @returns {proto.NativeFlowMessage} NativeFlowMessage instance - */ - NativeFlowMessage.create = function create(properties) { - return new NativeFlowMessage(properties); - }; - - /** - * Encodes the specified NativeFlowMessage message. Does not implicitly {@link proto.NativeFlowMessage.verify|verify} messages. - * @function encode - * @memberof proto.NativeFlowMessage - * @static - * @param {proto.INativeFlowMessage} message NativeFlowMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NativeFlowMessage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.buttons != null && message.buttons.length) - for (var i = 0; i < message.buttons.length; ++i) - $root.proto.NativeFlowButton.encode(message.buttons[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.messageParamsJson != null && Object.hasOwnProperty.call(message, "messageParamsJson")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.messageParamsJson); - if (message.messageVersion != null && Object.hasOwnProperty.call(message, "messageVersion")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.messageVersion); - return writer; - }; - - /** - * Encodes the specified NativeFlowMessage message, length delimited. Does not implicitly {@link proto.NativeFlowMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.NativeFlowMessage - * @static - * @param {proto.INativeFlowMessage} message NativeFlowMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NativeFlowMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NativeFlowMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.NativeFlowMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.NativeFlowMessage} NativeFlowMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NativeFlowMessage.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.NativeFlowMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.buttons && message.buttons.length)) - message.buttons = []; - message.buttons.push($root.proto.NativeFlowButton.decode(reader, reader.uint32())); - break; - case 2: - message.messageParamsJson = reader.string(); - break; - case 3: - message.messageVersion = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NativeFlowMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.NativeFlowMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.NativeFlowMessage} NativeFlowMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NativeFlowMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NativeFlowMessage message. - * @function verify - * @memberof proto.NativeFlowMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NativeFlowMessage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.buttons != null && message.hasOwnProperty("buttons")) { - if (!Array.isArray(message.buttons)) - return "buttons: array expected"; - for (var i = 0; i < message.buttons.length; ++i) { - var error = $root.proto.NativeFlowButton.verify(message.buttons[i]); - if (error) - return "buttons." + error; - } - } - if (message.messageParamsJson != null && message.hasOwnProperty("messageParamsJson")) - if (!$util.isString(message.messageParamsJson)) - return "messageParamsJson: string expected"; - if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) - if (!$util.isInteger(message.messageVersion)) - return "messageVersion: integer expected"; - return null; - }; - - /** - * Creates a NativeFlowMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.NativeFlowMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.NativeFlowMessage} NativeFlowMessage - */ - NativeFlowMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.NativeFlowMessage) - return object; - var message = new $root.proto.NativeFlowMessage(); - if (object.buttons) { - if (!Array.isArray(object.buttons)) - throw TypeError(".proto.NativeFlowMessage.buttons: array expected"); - message.buttons = []; - for (var i = 0; i < object.buttons.length; ++i) { - if (typeof object.buttons[i] !== "object") - throw TypeError(".proto.NativeFlowMessage.buttons: object expected"); - message.buttons[i] = $root.proto.NativeFlowButton.fromObject(object.buttons[i]); - } - } - if (object.messageParamsJson != null) - message.messageParamsJson = String(object.messageParamsJson); - if (object.messageVersion != null) - message.messageVersion = object.messageVersion | 0; - return message; - }; - - /** - * Creates a plain object from a NativeFlowMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.NativeFlowMessage - * @static - * @param {proto.NativeFlowMessage} message NativeFlowMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NativeFlowMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.buttons = []; - if (options.defaults) { - object.messageParamsJson = ""; - object.messageVersion = 0; - } - if (message.buttons && message.buttons.length) { - object.buttons = []; - for (var j = 0; j < message.buttons.length; ++j) - object.buttons[j] = $root.proto.NativeFlowButton.toObject(message.buttons[j], options); - } - if (message.messageParamsJson != null && message.hasOwnProperty("messageParamsJson")) - object.messageParamsJson = message.messageParamsJson; - if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) - object.messageVersion = message.messageVersion; - return object; - }; - - /** - * Converts this NativeFlowMessage to JSON. - * @function toJSON - * @memberof proto.NativeFlowMessage - * @instance - * @returns {Object.} JSON object - */ - NativeFlowMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return NativeFlowMessage; - })(); - - proto.NativeFlowResponseMessage = (function() { - - /** - * Properties of a NativeFlowResponseMessage. - * @memberof proto - * @interface INativeFlowResponseMessage - * @property {string|null} [name] NativeFlowResponseMessage name - * @property {string|null} [paramsJson] NativeFlowResponseMessage paramsJson - * @property {number|null} [version] NativeFlowResponseMessage version - */ - - /** - * Constructs a new NativeFlowResponseMessage. - * @memberof proto - * @classdesc Represents a NativeFlowResponseMessage. - * @implements INativeFlowResponseMessage - * @constructor - * @param {proto.INativeFlowResponseMessage=} [properties] Properties to set - */ - function NativeFlowResponseMessage(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]]; - } - - /** - * NativeFlowResponseMessage name. - * @member {string} name - * @memberof proto.NativeFlowResponseMessage - * @instance - */ - NativeFlowResponseMessage.prototype.name = ""; - - /** - * NativeFlowResponseMessage paramsJson. - * @member {string} paramsJson - * @memberof proto.NativeFlowResponseMessage - * @instance - */ - NativeFlowResponseMessage.prototype.paramsJson = ""; - - /** - * NativeFlowResponseMessage version. - * @member {number} version - * @memberof proto.NativeFlowResponseMessage - * @instance - */ - NativeFlowResponseMessage.prototype.version = 0; - - /** - * Creates a new NativeFlowResponseMessage instance using the specified properties. - * @function create - * @memberof proto.NativeFlowResponseMessage - * @static - * @param {proto.INativeFlowResponseMessage=} [properties] Properties to set - * @returns {proto.NativeFlowResponseMessage} NativeFlowResponseMessage instance - */ - NativeFlowResponseMessage.create = function create(properties) { - return new NativeFlowResponseMessage(properties); - }; - - /** - * Encodes the specified NativeFlowResponseMessage message. Does not implicitly {@link proto.NativeFlowResponseMessage.verify|verify} messages. - * @function encode - * @memberof proto.NativeFlowResponseMessage - * @static - * @param {proto.INativeFlowResponseMessage} message NativeFlowResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NativeFlowResponseMessage.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.paramsJson != null && Object.hasOwnProperty.call(message, "paramsJson")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.paramsJson); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.version); - return writer; - }; - - /** - * Encodes the specified NativeFlowResponseMessage message, length delimited. Does not implicitly {@link proto.NativeFlowResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.NativeFlowResponseMessage - * @static - * @param {proto.INativeFlowResponseMessage} message NativeFlowResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NativeFlowResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NativeFlowResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.NativeFlowResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.NativeFlowResponseMessage} NativeFlowResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NativeFlowResponseMessage.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.NativeFlowResponseMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.paramsJson = reader.string(); - break; - case 3: - message.version = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NativeFlowResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.NativeFlowResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.NativeFlowResponseMessage} NativeFlowResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NativeFlowResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NativeFlowResponseMessage message. - * @function verify - * @memberof proto.NativeFlowResponseMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NativeFlowResponseMessage.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.paramsJson != null && message.hasOwnProperty("paramsJson")) - if (!$util.isString(message.paramsJson)) - return "paramsJson: string expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isInteger(message.version)) - return "version: integer expected"; - return null; - }; - - /** - * Creates a NativeFlowResponseMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.NativeFlowResponseMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.NativeFlowResponseMessage} NativeFlowResponseMessage - */ - NativeFlowResponseMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.NativeFlowResponseMessage) - return object; - var message = new $root.proto.NativeFlowResponseMessage(); - if (object.name != null) - message.name = String(object.name); - if (object.paramsJson != null) - message.paramsJson = String(object.paramsJson); - if (object.version != null) - message.version = object.version | 0; - return message; - }; - - /** - * Creates a plain object from a NativeFlowResponseMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.NativeFlowResponseMessage - * @static - * @param {proto.NativeFlowResponseMessage} message NativeFlowResponseMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NativeFlowResponseMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.paramsJson = ""; - object.version = 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.paramsJson != null && message.hasOwnProperty("paramsJson")) - object.paramsJson = message.paramsJson; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - return object; - }; - - /** - * Converts this NativeFlowResponseMessage to JSON. - * @function toJSON - * @memberof proto.NativeFlowResponseMessage - * @instance - * @returns {Object.} JSON object - */ - NativeFlowResponseMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return NativeFlowResponseMessage; - })(); - proto.NoiseCertificate = (function() { /** @@ -38696,306 +47472,306 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return NoiseCertificate; - })(); + NoiseCertificate.Details = (function() { - proto.NoiseCertificateDetails = (function() { + /** + * Properties of a Details. + * @memberof proto.NoiseCertificate + * @interface IDetails + * @property {number|null} [serial] Details serial + * @property {string|null} [issuer] Details issuer + * @property {number|Long|null} [expires] Details expires + * @property {string|null} [subject] Details subject + * @property {Uint8Array|null} [key] Details key + */ - /** - * 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; - } + /** + * Constructs a new Details. + * @memberof proto.NoiseCertificate + * @classdesc Represents a Details. + * @implements IDetails + * @constructor + * @param {proto.NoiseCertificate.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]]; } - 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()); - }; + /** + * Details serial. + * @member {number} serial + * @memberof proto.NoiseCertificate.Details + * @instance + */ + Details.prototype.serial = 0; - /** - * 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; - }; + /** + * Details issuer. + * @member {string} issuer + * @memberof proto.NoiseCertificate.Details + * @instance + */ + Details.prototype.issuer = ""; - /** - * 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) + /** + * Details expires. + * @member {number|Long} expires + * @memberof proto.NoiseCertificate.Details + * @instance + */ + Details.prototype.expires = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Details subject. + * @member {string} subject + * @memberof proto.NoiseCertificate.Details + * @instance + */ + Details.prototype.subject = ""; + + /** + * Details key. + * @member {Uint8Array} key + * @memberof proto.NoiseCertificate.Details + * @instance + */ + Details.prototype.key = $util.newBuffer([]); + + /** + * Creates a new Details instance using the specified properties. + * @function create + * @memberof proto.NoiseCertificate.Details + * @static + * @param {proto.NoiseCertificate.IDetails=} [properties] Properties to set + * @returns {proto.NoiseCertificate.Details} Details instance + */ + Details.create = function create(properties) { + return new Details(properties); + }; + + /** + * Encodes the specified Details message. Does not implicitly {@link proto.NoiseCertificate.Details.verify|verify} messages. + * @function encode + * @memberof proto.NoiseCertificate.Details + * @static + * @param {proto.NoiseCertificate.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.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 Details message, length delimited. Does not implicitly {@link proto.NoiseCertificate.Details.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.NoiseCertificate.Details + * @static + * @param {proto.NoiseCertificate.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.NoiseCertificate.Details + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.NoiseCertificate.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.NoiseCertificate.Details(); + 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 Details message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.NoiseCertificate.Details + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.NoiseCertificate.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.NoiseCertificate.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.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 Details message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.NoiseCertificate.Details + * @static + * @param {Object.} object Plain object + * @returns {proto.NoiseCertificate.Details} Details + */ + Details.fromObject = function fromObject(object) { + if (object instanceof $root.proto.NoiseCertificate.Details) + return object; + var message = new $root.proto.NoiseCertificate.Details(); + 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 Details message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.NoiseCertificate.Details + * @static + * @param {proto.NoiseCertificate.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.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; - 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 Details to JSON. + * @function toJSON + * @memberof proto.NoiseCertificate.Details + * @instance + * @returns {Object.} JSON object + */ + Details.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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 Details; + })(); - return NoiseCertificateDetails; + return NoiseCertificate; })(); proto.NotificationMessageInfo = (function() { @@ -39276,24 +48052,26 @@ $root.proto = (function() { return NotificationMessageInfo; })(); - proto.NuxAction = (function() { + proto.PastParticipant = (function() { /** - * Properties of a NuxAction. + * Properties of a PastParticipant. * @memberof proto - * @interface INuxAction - * @property {boolean|null} [acknowledged] NuxAction acknowledged + * @interface IPastParticipant + * @property {string} userJid PastParticipant userJid + * @property {proto.PastParticipant.LeaveReason} leaveReason PastParticipant leaveReason + * @property {number|Long} leaveTs PastParticipant leaveTs */ /** - * Constructs a new NuxAction. + * Constructs a new PastParticipant. * @memberof proto - * @classdesc Represents a NuxAction. - * @implements INuxAction + * @classdesc Represents a PastParticipant. + * @implements IPastParticipant * @constructor - * @param {proto.INuxAction=} [properties] Properties to set + * @param {proto.IPastParticipant=} [properties] Properties to set */ - function NuxAction(properties) { + function PastParticipant(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39301,875 +48079,272 @@ $root.proto = (function() { } /** - * NuxAction acknowledged. - * @member {boolean} acknowledged - * @memberof proto.NuxAction + * PastParticipant userJid. + * @member {string} userJid + * @memberof proto.PastParticipant * @instance */ - NuxAction.prototype.acknowledged = false; + PastParticipant.prototype.userJid = ""; /** - * Creates a new NuxAction instance using the specified properties. - * @function create - * @memberof proto.NuxAction - * @static - * @param {proto.INuxAction=} [properties] Properties to set - * @returns {proto.NuxAction} NuxAction instance + * PastParticipant leaveReason. + * @member {proto.PastParticipant.LeaveReason} leaveReason + * @memberof proto.PastParticipant + * @instance */ - NuxAction.create = function create(properties) { - return new NuxAction(properties); + PastParticipant.prototype.leaveReason = 0; + + /** + * PastParticipant leaveTs. + * @member {number|Long} leaveTs + * @memberof proto.PastParticipant + * @instance + */ + PastParticipant.prototype.leaveTs = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new PastParticipant instance using the specified properties. + * @function create + * @memberof proto.PastParticipant + * @static + * @param {proto.IPastParticipant=} [properties] Properties to set + * @returns {proto.PastParticipant} PastParticipant instance + */ + PastParticipant.create = function create(properties) { + return new PastParticipant(properties); }; /** - * Encodes the specified NuxAction message. Does not implicitly {@link proto.NuxAction.verify|verify} messages. + * Encodes the specified PastParticipant message. Does not implicitly {@link proto.PastParticipant.verify|verify} messages. * @function encode - * @memberof proto.NuxAction + * @memberof proto.PastParticipant * @static - * @param {proto.INuxAction} message NuxAction message or plain object to encode + * @param {proto.IPastParticipant} message PastParticipant message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NuxAction.encode = function encode(message, writer) { + PastParticipant.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.acknowledged != null && Object.hasOwnProperty.call(message, "acknowledged")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.acknowledged); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.userJid); + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.leaveReason); + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.leaveTs); return writer; }; /** - * Encodes the specified NuxAction message, length delimited. Does not implicitly {@link proto.NuxAction.verify|verify} messages. + * Encodes the specified PastParticipant message, length delimited. Does not implicitly {@link proto.PastParticipant.verify|verify} messages. * @function encodeDelimited - * @memberof proto.NuxAction + * @memberof proto.PastParticipant * @static - * @param {proto.INuxAction} message NuxAction message or plain object to encode + * @param {proto.IPastParticipant} message PastParticipant message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NuxAction.encodeDelimited = function encodeDelimited(message, writer) { + PastParticipant.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NuxAction message from the specified reader or buffer. + * Decodes a PastParticipant message from the specified reader or buffer. * @function decode - * @memberof proto.NuxAction + * @memberof proto.PastParticipant * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.NuxAction} NuxAction + * @returns {proto.PastParticipant} PastParticipant * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NuxAction.decode = function decode(reader, length) { + PastParticipant.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.NuxAction(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.PastParticipant(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.acknowledged = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NuxAction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.NuxAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.NuxAction} NuxAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NuxAction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NuxAction message. - * @function verify - * @memberof proto.NuxAction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NuxAction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.acknowledged != null && message.hasOwnProperty("acknowledged")) - if (typeof message.acknowledged !== "boolean") - return "acknowledged: boolean expected"; - return null; - }; - - /** - * Creates a NuxAction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.NuxAction - * @static - * @param {Object.} object Plain object - * @returns {proto.NuxAction} NuxAction - */ - NuxAction.fromObject = function fromObject(object) { - if (object instanceof $root.proto.NuxAction) - return object; - var message = new $root.proto.NuxAction(); - if (object.acknowledged != null) - message.acknowledged = Boolean(object.acknowledged); - return message; - }; - - /** - * Creates a plain object from a NuxAction message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.NuxAction - * @static - * @param {proto.NuxAction} message NuxAction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NuxAction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.acknowledged = false; - if (message.acknowledged != null && message.hasOwnProperty("acknowledged")) - object.acknowledged = message.acknowledged; - return object; - }; - - /** - * Converts this NuxAction to JSON. - * @function toJSON - * @memberof proto.NuxAction - * @instance - * @returns {Object.} JSON object - */ - NuxAction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return NuxAction; - })(); - - proto.Option = (function() { - - /** - * Properties of an Option. - * @memberof proto - * @interface IOption - * @property {string|null} [optionName] Option optionName - */ - - /** - * Constructs a new Option. - * @memberof proto - * @classdesc Represents an Option. - * @implements IOption - * @constructor - * @param {proto.IOption=} [properties] Properties to set - */ - function Option(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]]; - } - - /** - * Option optionName. - * @member {string} optionName - * @memberof proto.Option - * @instance - */ - Option.prototype.optionName = ""; - - /** - * Creates a new Option instance using the specified properties. - * @function create - * @memberof proto.Option - * @static - * @param {proto.IOption=} [properties] Properties to set - * @returns {proto.Option} Option instance - */ - Option.create = function create(properties) { - return new Option(properties); - }; - - /** - * Encodes the specified Option message. Does not implicitly {@link proto.Option.verify|verify} messages. - * @function encode - * @memberof proto.Option - * @static - * @param {proto.IOption} message Option message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Option.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.optionName != null && Object.hasOwnProperty.call(message, "optionName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.optionName); - return writer; - }; - - /** - * Encodes the specified Option message, length delimited. Does not implicitly {@link proto.Option.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.Option - * @static - * @param {proto.IOption} message Option message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Option.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Option message from the specified reader or buffer. - * @function decode - * @memberof proto.Option - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.Option} Option - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Option.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.Option(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.optionName = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Option message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.Option - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Option} Option - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Option.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Option message. - * @function verify - * @memberof proto.Option - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Option.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.optionName != null && message.hasOwnProperty("optionName")) - if (!$util.isString(message.optionName)) - return "optionName: string expected"; - return null; - }; - - /** - * Creates an Option message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.Option - * @static - * @param {Object.} object Plain object - * @returns {proto.Option} Option - */ - Option.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Option) - return object; - var message = new $root.proto.Option(); - if (object.optionName != null) - message.optionName = String(object.optionName); - return message; - }; - - /** - * Creates a plain object from an Option message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.Option - * @static - * @param {proto.Option} message Option - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Option.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.optionName = ""; - if (message.optionName != null && message.hasOwnProperty("optionName")) - object.optionName = message.optionName; - return object; - }; - - /** - * Converts this Option to JSON. - * @function toJSON - * @memberof proto.Option - * @instance - * @returns {Object.} JSON object - */ - Option.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Option; - })(); - - proto.OrderMessage = (function() { - - /** - * Properties of an OrderMessage. - * @memberof proto - * @interface IOrderMessage - * @property {string|null} [orderId] OrderMessage orderId - * @property {Uint8Array|null} [thumbnail] OrderMessage thumbnail - * @property {number|null} [itemCount] OrderMessage itemCount - * @property {proto.OrderMessage.OrderMessageOrderStatus|null} [status] OrderMessage status - * @property {proto.OrderMessage.OrderMessageOrderSurface|null} [surface] OrderMessage surface - * @property {string|null} [message] OrderMessage message - * @property {string|null} [orderTitle] OrderMessage orderTitle - * @property {string|null} [sellerJid] OrderMessage sellerJid - * @property {string|null} [token] OrderMessage token - * @property {number|Long|null} [totalAmount1000] OrderMessage totalAmount1000 - * @property {string|null} [totalCurrencyCode] OrderMessage totalCurrencyCode - * @property {proto.IContextInfo|null} [contextInfo] OrderMessage contextInfo - */ - - /** - * Constructs a new OrderMessage. - * @memberof proto - * @classdesc Represents an OrderMessage. - * @implements IOrderMessage - * @constructor - * @param {proto.IOrderMessage=} [properties] Properties to set - */ - function OrderMessage(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]]; - } - - /** - * OrderMessage orderId. - * @member {string} orderId - * @memberof proto.OrderMessage - * @instance - */ - OrderMessage.prototype.orderId = ""; - - /** - * OrderMessage thumbnail. - * @member {Uint8Array} thumbnail - * @memberof proto.OrderMessage - * @instance - */ - OrderMessage.prototype.thumbnail = $util.newBuffer([]); - - /** - * OrderMessage itemCount. - * @member {number} itemCount - * @memberof proto.OrderMessage - * @instance - */ - OrderMessage.prototype.itemCount = 0; - - /** - * OrderMessage status. - * @member {proto.OrderMessage.OrderMessageOrderStatus} status - * @memberof proto.OrderMessage - * @instance - */ - OrderMessage.prototype.status = 1; - - /** - * OrderMessage surface. - * @member {proto.OrderMessage.OrderMessageOrderSurface} surface - * @memberof proto.OrderMessage - * @instance - */ - OrderMessage.prototype.surface = 1; - - /** - * OrderMessage message. - * @member {string} message - * @memberof proto.OrderMessage - * @instance - */ - OrderMessage.prototype.message = ""; - - /** - * OrderMessage orderTitle. - * @member {string} orderTitle - * @memberof proto.OrderMessage - * @instance - */ - OrderMessage.prototype.orderTitle = ""; - - /** - * OrderMessage sellerJid. - * @member {string} sellerJid - * @memberof proto.OrderMessage - * @instance - */ - OrderMessage.prototype.sellerJid = ""; - - /** - * OrderMessage token. - * @member {string} token - * @memberof proto.OrderMessage - * @instance - */ - OrderMessage.prototype.token = ""; - - /** - * OrderMessage totalAmount1000. - * @member {number|Long} totalAmount1000 - * @memberof proto.OrderMessage - * @instance - */ - OrderMessage.prototype.totalAmount1000 = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * OrderMessage totalCurrencyCode. - * @member {string} totalCurrencyCode - * @memberof proto.OrderMessage - * @instance - */ - OrderMessage.prototype.totalCurrencyCode = ""; - - /** - * OrderMessage contextInfo. - * @member {proto.IContextInfo|null|undefined} contextInfo - * @memberof proto.OrderMessage - * @instance - */ - OrderMessage.prototype.contextInfo = null; - - /** - * Creates a new OrderMessage instance using the specified properties. - * @function create - * @memberof proto.OrderMessage - * @static - * @param {proto.IOrderMessage=} [properties] Properties to set - * @returns {proto.OrderMessage} OrderMessage instance - */ - OrderMessage.create = function create(properties) { - return new OrderMessage(properties); - }; - - /** - * Encodes the specified OrderMessage message. Does not implicitly {@link proto.OrderMessage.verify|verify} messages. - * @function encode - * @memberof proto.OrderMessage - * @static - * @param {proto.IOrderMessage} message OrderMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OrderMessage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.orderId != null && Object.hasOwnProperty.call(message, "orderId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.orderId); - if (message.thumbnail != null && Object.hasOwnProperty.call(message, "thumbnail")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.thumbnail); - if (message.itemCount != null && Object.hasOwnProperty.call(message, "itemCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.itemCount); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.status); - if (message.surface != null && Object.hasOwnProperty.call(message, "surface")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.surface); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.message); - if (message.orderTitle != null && Object.hasOwnProperty.call(message, "orderTitle")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.orderTitle); - if (message.sellerJid != null && Object.hasOwnProperty.call(message, "sellerJid")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.sellerJid); - if (message.token != null && Object.hasOwnProperty.call(message, "token")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.token); - if (message.totalAmount1000 != null && Object.hasOwnProperty.call(message, "totalAmount1000")) - writer.uint32(/* id 10, wireType 0 =*/80).int64(message.totalAmount1000); - if (message.totalCurrencyCode != null && Object.hasOwnProperty.call(message, "totalCurrencyCode")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.totalCurrencyCode); - if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) - $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OrderMessage message, length delimited. Does not implicitly {@link proto.OrderMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.OrderMessage - * @static - * @param {proto.IOrderMessage} message OrderMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OrderMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OrderMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.OrderMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.OrderMessage} OrderMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OrderMessage.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.OrderMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.orderId = reader.string(); + message.userJid = reader.string(); break; case 2: - message.thumbnail = reader.bytes(); + message.leaveReason = reader.int32(); break; case 3: - message.itemCount = reader.int32(); - break; - case 4: - message.status = reader.int32(); - break; - case 5: - message.surface = reader.int32(); - break; - case 6: - message.message = reader.string(); - break; - case 7: - message.orderTitle = reader.string(); - break; - case 8: - message.sellerJid = reader.string(); - break; - case 9: - message.token = reader.string(); - break; - case 10: - message.totalAmount1000 = reader.int64(); - break; - case 11: - message.totalCurrencyCode = reader.string(); - break; - case 17: - message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); + message.leaveTs = reader.uint64(); break; default: reader.skipType(tag & 7); break; } } + if (!message.hasOwnProperty("userJid")) + throw $util.ProtocolError("missing required 'userJid'", { instance: message }); + if (!message.hasOwnProperty("leaveReason")) + throw $util.ProtocolError("missing required 'leaveReason'", { instance: message }); + if (!message.hasOwnProperty("leaveTs")) + throw $util.ProtocolError("missing required 'leaveTs'", { instance: message }); return message; }; /** - * Decodes an OrderMessage message from the specified reader or buffer, length delimited. + * Decodes a PastParticipant message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.OrderMessage + * @memberof proto.PastParticipant * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.OrderMessage} OrderMessage + * @returns {proto.PastParticipant} PastParticipant * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OrderMessage.decodeDelimited = function decodeDelimited(reader) { + PastParticipant.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OrderMessage message. + * Verifies a PastParticipant message. * @function verify - * @memberof proto.OrderMessage + * @memberof proto.PastParticipant * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OrderMessage.verify = function verify(message) { + PastParticipant.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.orderId != null && message.hasOwnProperty("orderId")) - if (!$util.isString(message.orderId)) - return "orderId: string expected"; - if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) - if (!(message.thumbnail && typeof message.thumbnail.length === "number" || $util.isString(message.thumbnail))) - return "thumbnail: buffer expected"; - if (message.itemCount != null && message.hasOwnProperty("itemCount")) - if (!$util.isInteger(message.itemCount)) - return "itemCount: integer expected"; - if (message.status != null && message.hasOwnProperty("status")) - switch (message.status) { - default: - return "status: enum value expected"; - case 1: - break; - } - if (message.surface != null && message.hasOwnProperty("surface")) - switch (message.surface) { - default: - return "surface: enum value expected"; - case 1: - break; - } - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.orderTitle != null && message.hasOwnProperty("orderTitle")) - if (!$util.isString(message.orderTitle)) - return "orderTitle: string expected"; - if (message.sellerJid != null && message.hasOwnProperty("sellerJid")) - if (!$util.isString(message.sellerJid)) - return "sellerJid: string expected"; - if (message.token != null && message.hasOwnProperty("token")) - if (!$util.isString(message.token)) - return "token: string expected"; - if (message.totalAmount1000 != null && message.hasOwnProperty("totalAmount1000")) - if (!$util.isInteger(message.totalAmount1000) && !(message.totalAmount1000 && $util.isInteger(message.totalAmount1000.low) && $util.isInteger(message.totalAmount1000.high))) - return "totalAmount1000: integer|Long expected"; - if (message.totalCurrencyCode != null && message.hasOwnProperty("totalCurrencyCode")) - if (!$util.isString(message.totalCurrencyCode)) - return "totalCurrencyCode: string expected"; - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { - var error = $root.proto.ContextInfo.verify(message.contextInfo); - if (error) - return "contextInfo." + error; + if (!$util.isString(message.userJid)) + return "userJid: string expected"; + switch (message.leaveReason) { + default: + return "leaveReason: enum value expected"; + case 0: + case 1: + break; } + if (!$util.isInteger(message.leaveTs) && !(message.leaveTs && $util.isInteger(message.leaveTs.low) && $util.isInteger(message.leaveTs.high))) + return "leaveTs: integer|Long expected"; return null; }; /** - * Creates an OrderMessage message from a plain object. Also converts values to their respective internal types. + * Creates a PastParticipant message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.OrderMessage + * @memberof proto.PastParticipant * @static * @param {Object.} object Plain object - * @returns {proto.OrderMessage} OrderMessage + * @returns {proto.PastParticipant} PastParticipant */ - OrderMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.OrderMessage) + PastParticipant.fromObject = function fromObject(object) { + if (object instanceof $root.proto.PastParticipant) return object; - var message = new $root.proto.OrderMessage(); - if (object.orderId != null) - message.orderId = String(object.orderId); - if (object.thumbnail != null) - if (typeof object.thumbnail === "string") - $util.base64.decode(object.thumbnail, message.thumbnail = $util.newBuffer($util.base64.length(object.thumbnail)), 0); - else if (object.thumbnail.length) - message.thumbnail = object.thumbnail; - if (object.itemCount != null) - message.itemCount = object.itemCount | 0; - switch (object.status) { - case "INQUIRY": + var message = new $root.proto.PastParticipant(); + if (object.userJid != null) + message.userJid = String(object.userJid); + switch (object.leaveReason) { + case "LEFT": + case 0: + message.leaveReason = 0; + break; + case "REMOVED": case 1: - message.status = 1; + message.leaveReason = 1; break; } - switch (object.surface) { - case "CATALOG": - case 1: - message.surface = 1; - break; - } - if (object.message != null) - message.message = String(object.message); - if (object.orderTitle != null) - message.orderTitle = String(object.orderTitle); - if (object.sellerJid != null) - message.sellerJid = String(object.sellerJid); - if (object.token != null) - message.token = String(object.token); - if (object.totalAmount1000 != null) + if (object.leaveTs != null) if ($util.Long) - (message.totalAmount1000 = $util.Long.fromValue(object.totalAmount1000)).unsigned = false; - else if (typeof object.totalAmount1000 === "string") - message.totalAmount1000 = parseInt(object.totalAmount1000, 10); - else if (typeof object.totalAmount1000 === "number") - message.totalAmount1000 = object.totalAmount1000; - else if (typeof object.totalAmount1000 === "object") - message.totalAmount1000 = new $util.LongBits(object.totalAmount1000.low >>> 0, object.totalAmount1000.high >>> 0).toNumber(); - if (object.totalCurrencyCode != null) - message.totalCurrencyCode = String(object.totalCurrencyCode); - if (object.contextInfo != null) { - if (typeof object.contextInfo !== "object") - throw TypeError(".proto.OrderMessage.contextInfo: object expected"); - message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); - } + (message.leaveTs = $util.Long.fromValue(object.leaveTs)).unsigned = true; + else if (typeof object.leaveTs === "string") + message.leaveTs = parseInt(object.leaveTs, 10); + else if (typeof object.leaveTs === "number") + message.leaveTs = object.leaveTs; + else if (typeof object.leaveTs === "object") + message.leaveTs = new $util.LongBits(object.leaveTs.low >>> 0, object.leaveTs.high >>> 0).toNumber(true); return message; }; /** - * Creates a plain object from an OrderMessage message. Also converts values to other types if specified. + * Creates a plain object from a PastParticipant message. Also converts values to other types if specified. * @function toObject - * @memberof proto.OrderMessage + * @memberof proto.PastParticipant * @static - * @param {proto.OrderMessage} message OrderMessage + * @param {proto.PastParticipant} message PastParticipant * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OrderMessage.toObject = function toObject(message, options) { + PastParticipant.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.orderId = ""; - if (options.bytes === String) - object.thumbnail = ""; - else { - object.thumbnail = []; - if (options.bytes !== Array) - object.thumbnail = $util.newBuffer(object.thumbnail); - } - object.itemCount = 0; - object.status = options.enums === String ? "INQUIRY" : 1; - object.surface = options.enums === String ? "CATALOG" : 1; - object.message = ""; - object.orderTitle = ""; - object.sellerJid = ""; - object.token = ""; + object.userJid = ""; + object.leaveReason = options.enums === String ? "LEFT" : 0; if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.totalAmount1000 = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + var long = new $util.Long(0, 0, true); + object.leaveTs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.totalAmount1000 = options.longs === String ? "0" : 0; - object.totalCurrencyCode = ""; - object.contextInfo = null; + object.leaveTs = options.longs === String ? "0" : 0; } - if (message.orderId != null && message.hasOwnProperty("orderId")) - object.orderId = message.orderId; - if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) - object.thumbnail = options.bytes === String ? $util.base64.encode(message.thumbnail, 0, message.thumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.thumbnail) : message.thumbnail; - if (message.itemCount != null && message.hasOwnProperty("itemCount")) - object.itemCount = message.itemCount; - if (message.status != null && message.hasOwnProperty("status")) - object.status = options.enums === String ? $root.proto.OrderMessage.OrderMessageOrderStatus[message.status] : message.status; - if (message.surface != null && message.hasOwnProperty("surface")) - object.surface = options.enums === String ? $root.proto.OrderMessage.OrderMessageOrderSurface[message.surface] : message.surface; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.orderTitle != null && message.hasOwnProperty("orderTitle")) - object.orderTitle = message.orderTitle; - if (message.sellerJid != null && message.hasOwnProperty("sellerJid")) - object.sellerJid = message.sellerJid; - if (message.token != null && message.hasOwnProperty("token")) - object.token = message.token; - if (message.totalAmount1000 != null && message.hasOwnProperty("totalAmount1000")) - if (typeof message.totalAmount1000 === "number") - object.totalAmount1000 = options.longs === String ? String(message.totalAmount1000) : message.totalAmount1000; + if (message.userJid != null && message.hasOwnProperty("userJid")) + object.userJid = message.userJid; + if (message.leaveReason != null && message.hasOwnProperty("leaveReason")) + object.leaveReason = options.enums === String ? $root.proto.PastParticipant.LeaveReason[message.leaveReason] : message.leaveReason; + if (message.leaveTs != null && message.hasOwnProperty("leaveTs")) + if (typeof message.leaveTs === "number") + object.leaveTs = options.longs === String ? String(message.leaveTs) : message.leaveTs; else - object.totalAmount1000 = options.longs === String ? $util.Long.prototype.toString.call(message.totalAmount1000) : options.longs === Number ? new $util.LongBits(message.totalAmount1000.low >>> 0, message.totalAmount1000.high >>> 0).toNumber() : message.totalAmount1000; - if (message.totalCurrencyCode != null && message.hasOwnProperty("totalCurrencyCode")) - object.totalCurrencyCode = message.totalCurrencyCode; - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) - object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + object.leaveTs = options.longs === String ? $util.Long.prototype.toString.call(message.leaveTs) : options.longs === Number ? new $util.LongBits(message.leaveTs.low >>> 0, message.leaveTs.high >>> 0).toNumber(true) : message.leaveTs; return object; }; /** - * Converts this OrderMessage to JSON. + * Converts this PastParticipant to JSON. * @function toJSON - * @memberof proto.OrderMessage + * @memberof proto.PastParticipant * @instance * @returns {Object.} JSON object */ - OrderMessage.prototype.toJSON = function toJSON() { + PastParticipant.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * OrderMessageOrderStatus enum. - * @name proto.OrderMessage.OrderMessageOrderStatus + * LeaveReason enum. + * @name proto.PastParticipant.LeaveReason * @enum {number} - * @property {number} INQUIRY=1 INQUIRY value + * @property {number} LEFT=0 LEFT value + * @property {number} REMOVED=1 REMOVED value */ - OrderMessage.OrderMessageOrderStatus = (function() { + PastParticipant.LeaveReason = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "INQUIRY"] = 1; + values[valuesById[0] = "LEFT"] = 0; + values[valuesById[1] = "REMOVED"] = 1; return values; })(); - /** - * OrderMessageOrderSurface enum. - * @name proto.OrderMessage.OrderMessageOrderSurface - * @enum {number} - * @property {number} CATALOG=1 CATALOG value - */ - OrderMessage.OrderMessageOrderSurface = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "CATALOG"] = 1; - return values; - })(); - - return OrderMessage; + return PastParticipant; })(); - proto.PBMediaData = (function() { + proto.PastParticipants = (function() { /** - * Properties of a PBMediaData. + * Properties of a PastParticipants. * @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 IPastParticipants + * @property {string} groupJid PastParticipants groupJid + * @property {Array.|null} [pastParticipants] PastParticipants pastParticipants */ /** - * Constructs a new PBMediaData. + * Constructs a new PastParticipants. * @memberof proto - * @classdesc Represents a PBMediaData. - * @implements IPBMediaData + * @classdesc Represents a PastParticipants. + * @implements IPastParticipants * @constructor - * @param {proto.IPBMediaData=} [properties] Properties to set + * @param {proto.IPastParticipants=} [properties] Properties to set */ - function PBMediaData(properties) { + function PastParticipants(properties) { + this.pastParticipants = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -40177,292 +48352,208 @@ $root.proto = (function() { } /** - * PBMediaData mediaKey. - * @member {Uint8Array} mediaKey - * @memberof proto.PBMediaData + * PastParticipants groupJid. + * @member {string} groupJid + * @memberof proto.PastParticipants * @instance */ - PBMediaData.prototype.mediaKey = $util.newBuffer([]); + PastParticipants.prototype.groupJid = ""; /** - * PBMediaData mediaKeyTimestamp. - * @member {number|Long} mediaKeyTimestamp - * @memberof proto.PBMediaData + * PastParticipants pastParticipants. + * @member {Array.} pastParticipants + * @memberof proto.PastParticipants * @instance */ - PBMediaData.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + PastParticipants.prototype.pastParticipants = $util.emptyArray; /** - * 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. + * Creates a new PastParticipants instance using the specified properties. * @function create - * @memberof proto.PBMediaData + * @memberof proto.PastParticipants * @static - * @param {proto.IPBMediaData=} [properties] Properties to set - * @returns {proto.PBMediaData} PBMediaData instance + * @param {proto.IPastParticipants=} [properties] Properties to set + * @returns {proto.PastParticipants} PastParticipants instance */ - PBMediaData.create = function create(properties) { - return new PBMediaData(properties); + PastParticipants.create = function create(properties) { + return new PastParticipants(properties); }; /** - * Encodes the specified PBMediaData message. Does not implicitly {@link proto.PBMediaData.verify|verify} messages. + * Encodes the specified PastParticipants message. Does not implicitly {@link proto.PastParticipants.verify|verify} messages. * @function encode - * @memberof proto.PBMediaData + * @memberof proto.PastParticipants * @static - * @param {proto.IPBMediaData} message PBMediaData message or plain object to encode + * @param {proto.IPastParticipants} message PastParticipants message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PBMediaData.encode = function encode(message, writer) { + PastParticipants.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); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.groupJid); + if (message.pastParticipants != null && message.pastParticipants.length) + for (var i = 0; i < message.pastParticipants.length; ++i) + $root.proto.PastParticipant.encode(message.pastParticipants[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified PBMediaData message, length delimited. Does not implicitly {@link proto.PBMediaData.verify|verify} messages. + * Encodes the specified PastParticipants message, length delimited. Does not implicitly {@link proto.PastParticipants.verify|verify} messages. * @function encodeDelimited - * @memberof proto.PBMediaData + * @memberof proto.PastParticipants * @static - * @param {proto.IPBMediaData} message PBMediaData message or plain object to encode + * @param {proto.IPastParticipants} message PastParticipants message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PBMediaData.encodeDelimited = function encodeDelimited(message, writer) { + PastParticipants.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PBMediaData message from the specified reader or buffer. + * Decodes a PastParticipants message from the specified reader or buffer. * @function decode - * @memberof proto.PBMediaData + * @memberof proto.PastParticipants * @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.PastParticipants} PastParticipants * @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) { + PastParticipants.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.PastParticipants(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.mediaKey = reader.bytes(); + message.groupJid = reader.string(); 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(); + if (!(message.pastParticipants && message.pastParticipants.length)) + message.pastParticipants = []; + message.pastParticipants.push($root.proto.PastParticipant.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } + if (!message.hasOwnProperty("groupJid")) + throw $util.ProtocolError("missing required 'groupJid'", { instance: message }); return message; }; /** - * Decodes a PBMediaData message from the specified reader or buffer, length delimited. + * Decodes a PastParticipants message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.PBMediaData + * @memberof proto.PastParticipants * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.PBMediaData} PBMediaData + * @returns {proto.PastParticipants} PastParticipants * @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) { + PastParticipants.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PBMediaData message. + * Verifies a PastParticipants message. * @function verify - * @memberof proto.PBMediaData + * @memberof proto.PastParticipants * @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) { + PastParticipants.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 (!$util.isString(message.groupJid)) + return "groupJid: string expected"; + if (message.pastParticipants != null && message.hasOwnProperty("pastParticipants")) { + if (!Array.isArray(message.pastParticipants)) + return "pastParticipants: array expected"; + for (var i = 0; i < message.pastParticipants.length; ++i) { + var error = $root.proto.PastParticipant.verify(message.pastParticipants[i]); + if (error) + return "pastParticipants." + error; + } + } return null; }; /** - * Creates a PBMediaData message from a plain object. Also converts values to their respective internal types. + * Creates a PastParticipants message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.PBMediaData + * @memberof proto.PastParticipants * @static * @param {Object.} object Plain object - * @returns {proto.PBMediaData} PBMediaData + * @returns {proto.PastParticipants} PastParticipants */ - PBMediaData.fromObject = function fromObject(object) { - if (object instanceof $root.proto.PBMediaData) + PastParticipants.fromObject = function fromObject(object) { + if (object instanceof $root.proto.PastParticipants) 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.PastParticipants(); + if (object.groupJid != null) + message.groupJid = String(object.groupJid); + if (object.pastParticipants) { + if (!Array.isArray(object.pastParticipants)) + throw TypeError(".proto.PastParticipants.pastParticipants: array expected"); + message.pastParticipants = []; + for (var i = 0; i < object.pastParticipants.length; ++i) { + if (typeof object.pastParticipants[i] !== "object") + throw TypeError(".proto.PastParticipants.pastParticipants: object expected"); + message.pastParticipants[i] = $root.proto.PastParticipant.fromObject(object.pastParticipants[i]); + } + } return message; }; /** - * Creates a plain object from a PBMediaData message. Also converts values to other types if specified. + * Creates a plain object from a PastParticipants message. Also converts values to other types if specified. * @function toObject - * @memberof proto.PBMediaData + * @memberof proto.PastParticipants * @static - * @param {proto.PBMediaData} message PBMediaData + * @param {proto.PastParticipants} message PastParticipants * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PBMediaData.toObject = function toObject(message, options) { + PastParticipants.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 (options.arrays || options.defaults) + object.pastParticipants = []; + if (options.defaults) + object.groupJid = ""; + if (message.groupJid != null && message.hasOwnProperty("groupJid")) + object.groupJid = message.groupJid; + if (message.pastParticipants && message.pastParticipants.length) { + object.pastParticipants = []; + for (var j = 0; j < message.pastParticipants.length; ++j) + object.pastParticipants[j] = $root.proto.PastParticipant.toObject(message.pastParticipants[j], options); } - 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. + * Converts this PastParticipants to JSON. * @function toJSON - * @memberof proto.PBMediaData + * @memberof proto.PastParticipants * @instance * @returns {Object.} JSON object */ - PBMediaData.prototype.toJSON = function toJSON() { + PastParticipants.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return PBMediaData; + return PastParticipants; })(); proto.PaymentBackground = (function() { @@ -40479,8 +48570,8 @@ $root.proto = (function() { * @property {number|null} [placeholderArgb] PaymentBackground placeholderArgb * @property {number|null} [textArgb] PaymentBackground textArgb * @property {number|null} [subtextArgb] PaymentBackground subtextArgb - * @property {proto.IPBMediaData|null} [mediaData] PaymentBackground mediaData - * @property {proto.PaymentBackground.PaymentBackgroundType|null} [type] PaymentBackground type + * @property {proto.PaymentBackground.IMediaData|null} [mediaData] PaymentBackground mediaData + * @property {proto.PaymentBackground.Type|null} [type] PaymentBackground type */ /** @@ -40564,7 +48655,7 @@ $root.proto = (function() { /** * PaymentBackground mediaData. - * @member {proto.IPBMediaData|null|undefined} mediaData + * @member {proto.PaymentBackground.IMediaData|null|undefined} mediaData * @memberof proto.PaymentBackground * @instance */ @@ -40572,7 +48663,7 @@ $root.proto = (function() { /** * PaymentBackground type. - * @member {proto.PaymentBackground.PaymentBackgroundType} type + * @member {proto.PaymentBackground.Type} type * @memberof proto.PaymentBackground * @instance */ @@ -40619,7 +48710,7 @@ $root.proto = (function() { if (message.subtextArgb != null && Object.hasOwnProperty.call(message, "subtextArgb")) writer.uint32(/* id 8, wireType 5 =*/69).fixed32(message.subtextArgb); if (message.mediaData != null && Object.hasOwnProperty.call(message, "mediaData")) - $root.proto.PBMediaData.encode(message.mediaData, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + $root.proto.PaymentBackground.MediaData.encode(message.mediaData, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 10, wireType 0 =*/80).int32(message.type); return writer; @@ -40681,7 +48772,7 @@ $root.proto = (function() { message.subtextArgb = reader.fixed32(); break; case 9: - message.mediaData = $root.proto.PBMediaData.decode(reader, reader.uint32()); + message.mediaData = $root.proto.PaymentBackground.MediaData.decode(reader, reader.uint32()); break; case 10: message.type = reader.int32(); @@ -40746,7 +48837,7 @@ $root.proto = (function() { if (!$util.isInteger(message.subtextArgb)) return "subtextArgb: integer expected"; if (message.mediaData != null && message.hasOwnProperty("mediaData")) { - var error = $root.proto.PBMediaData.verify(message.mediaData); + var error = $root.proto.PaymentBackground.MediaData.verify(message.mediaData); if (error) return "mediaData." + error; } @@ -40799,7 +48890,7 @@ $root.proto = (function() { if (object.mediaData != null) { if (typeof object.mediaData !== "object") throw TypeError(".proto.PaymentBackground.mediaData: object expected"); - message.mediaData = $root.proto.PBMediaData.fromObject(object.mediaData); + message.mediaData = $root.proto.PaymentBackground.MediaData.fromObject(object.mediaData); } switch (object.type) { case "UNKNOWN": @@ -40863,9 +48954,9 @@ $root.proto = (function() { if (message.subtextArgb != null && message.hasOwnProperty("subtextArgb")) object.subtextArgb = message.subtextArgb; if (message.mediaData != null && message.hasOwnProperty("mediaData")) - object.mediaData = $root.proto.PBMediaData.toObject(message.mediaData, options); + object.mediaData = $root.proto.PaymentBackground.MediaData.toObject(message.mediaData, options); if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.proto.PaymentBackground.PaymentBackgroundType[message.type] : message.type; + object.type = options.enums === String ? $root.proto.PaymentBackground.Type[message.type] : message.type; return object; }; @@ -40880,14 +48971,331 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + PaymentBackground.MediaData = (function() { + + /** + * Properties of a MediaData. + * @memberof proto.PaymentBackground + * @interface IMediaData + * @property {Uint8Array|null} [mediaKey] MediaData mediaKey + * @property {number|Long|null} [mediaKeyTimestamp] MediaData mediaKeyTimestamp + * @property {Uint8Array|null} [fileSha256] MediaData fileSha256 + * @property {Uint8Array|null} [fileEncSha256] MediaData fileEncSha256 + * @property {string|null} [directPath] MediaData directPath + */ + + /** + * Constructs a new MediaData. + * @memberof proto.PaymentBackground + * @classdesc Represents a MediaData. + * @implements IMediaData + * @constructor + * @param {proto.PaymentBackground.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 mediaKey. + * @member {Uint8Array} mediaKey + * @memberof proto.PaymentBackground.MediaData + * @instance + */ + MediaData.prototype.mediaKey = $util.newBuffer([]); + + /** + * MediaData mediaKeyTimestamp. + * @member {number|Long} mediaKeyTimestamp + * @memberof proto.PaymentBackground.MediaData + * @instance + */ + MediaData.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * MediaData fileSha256. + * @member {Uint8Array} fileSha256 + * @memberof proto.PaymentBackground.MediaData + * @instance + */ + MediaData.prototype.fileSha256 = $util.newBuffer([]); + + /** + * MediaData fileEncSha256. + * @member {Uint8Array} fileEncSha256 + * @memberof proto.PaymentBackground.MediaData + * @instance + */ + MediaData.prototype.fileEncSha256 = $util.newBuffer([]); + + /** + * MediaData directPath. + * @member {string} directPath + * @memberof proto.PaymentBackground.MediaData + * @instance + */ + MediaData.prototype.directPath = ""; + + /** + * Creates a new MediaData instance using the specified properties. + * @function create + * @memberof proto.PaymentBackground.MediaData + * @static + * @param {proto.PaymentBackground.IMediaData=} [properties] Properties to set + * @returns {proto.PaymentBackground.MediaData} MediaData instance + */ + MediaData.create = function create(properties) { + return new MediaData(properties); + }; + + /** + * Encodes the specified MediaData message. Does not implicitly {@link proto.PaymentBackground.MediaData.verify|verify} messages. + * @function encode + * @memberof proto.PaymentBackground.MediaData + * @static + * @param {proto.PaymentBackground.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.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 MediaData message, length delimited. Does not implicitly {@link proto.PaymentBackground.MediaData.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.PaymentBackground.MediaData + * @static + * @param {proto.PaymentBackground.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.PaymentBackground.MediaData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.PaymentBackground.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.PaymentBackground.MediaData(); + 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 MediaData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.PaymentBackground.MediaData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.PaymentBackground.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.PaymentBackground.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.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 MediaData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.PaymentBackground.MediaData + * @static + * @param {Object.} object Plain object + * @returns {proto.PaymentBackground.MediaData} MediaData + */ + MediaData.fromObject = function fromObject(object) { + if (object instanceof $root.proto.PaymentBackground.MediaData) + return object; + var message = new $root.proto.PaymentBackground.MediaData(); + 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 MediaData message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.PaymentBackground.MediaData + * @static + * @param {proto.PaymentBackground.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) { + 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 MediaData to JSON. + * @function toJSON + * @memberof proto.PaymentBackground.MediaData + * @instance + * @returns {Object.} JSON object + */ + MediaData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MediaData; + })(); + /** - * PaymentBackgroundType enum. - * @name proto.PaymentBackground.PaymentBackgroundType + * Type enum. + * @name proto.PaymentBackground.Type * @enum {number} * @property {number} UNKNOWN=0 UNKNOWN value * @property {number} DEFAULT=1 DEFAULT value */ - PaymentBackground.PaymentBackgroundType = (function() { + PaymentBackground.Type = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "UNKNOWN"] = 0; values[valuesById[1] = "DEFAULT"] = 1; @@ -40903,16 +49311,16 @@ $root.proto = (function() { * Properties of a PaymentInfo. * @memberof proto * @interface IPaymentInfo - * @property {proto.PaymentInfo.PaymentInfoCurrency|null} [currencyDeprecated] PaymentInfo currencyDeprecated + * @property {proto.PaymentInfo.Currency|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 {proto.PaymentInfo.Status|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 {proto.PaymentInfo.TxnStatus|null} [txnStatus] PaymentInfo txnStatus * @property {boolean|null} [useNoviFiatFormat] PaymentInfo useNoviFiatFormat * @property {proto.IMoney|null} [primaryAmount] PaymentInfo primaryAmount * @property {proto.IMoney|null} [exchangeAmount] PaymentInfo exchangeAmount @@ -40935,7 +49343,7 @@ $root.proto = (function() { /** * PaymentInfo currencyDeprecated. - * @member {proto.PaymentInfo.PaymentInfoCurrency} currencyDeprecated + * @member {proto.PaymentInfo.Currency} currencyDeprecated * @memberof proto.PaymentInfo * @instance */ @@ -40959,7 +49367,7 @@ $root.proto = (function() { /** * PaymentInfo status. - * @member {proto.PaymentInfo.PaymentInfoStatus} status + * @member {proto.PaymentInfo.Status} status * @memberof proto.PaymentInfo * @instance */ @@ -41007,7 +49415,7 @@ $root.proto = (function() { /** * PaymentInfo txnStatus. - * @member {proto.PaymentInfo.PaymentInfoTxnStatus} txnStatus + * @member {proto.PaymentInfo.TxnStatus} txnStatus * @memberof proto.PaymentInfo * @instance */ @@ -41594,7 +50002,7 @@ $root.proto = (function() { object.exchangeAmount = null; } if (message.currencyDeprecated != null && message.hasOwnProperty("currencyDeprecated")) - object.currencyDeprecated = options.enums === String ? $root.proto.PaymentInfo.PaymentInfoCurrency[message.currencyDeprecated] : message.currencyDeprecated; + object.currencyDeprecated = options.enums === String ? $root.proto.PaymentInfo.Currency[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; @@ -41603,7 +50011,7 @@ $root.proto = (function() { 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; + object.status = options.enums === String ? $root.proto.PaymentInfo.Status[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; @@ -41621,7 +50029,7 @@ $root.proto = (function() { 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; + object.txnStatus = options.enums === String ? $root.proto.PaymentInfo.TxnStatus[message.txnStatus] : message.txnStatus; if (message.useNoviFiatFormat != null && message.hasOwnProperty("useNoviFiatFormat")) object.useNoviFiatFormat = message.useNoviFiatFormat; if (message.primaryAmount != null && message.hasOwnProperty("primaryAmount")) @@ -41643,13 +50051,13 @@ $root.proto = (function() { }; /** - * PaymentInfoCurrency enum. - * @name proto.PaymentInfo.PaymentInfoCurrency + * Currency enum. + * @name proto.PaymentInfo.Currency * @enum {number} * @property {number} UNKNOWN_CURRENCY=0 UNKNOWN_CURRENCY value * @property {number} INR=1 INR value */ - PaymentInfo.PaymentInfoCurrency = (function() { + PaymentInfo.Currency = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "UNKNOWN_CURRENCY"] = 0; values[valuesById[1] = "INR"] = 1; @@ -41657,8 +50065,8 @@ $root.proto = (function() { })(); /** - * PaymentInfoStatus enum. - * @name proto.PaymentInfo.PaymentInfoStatus + * Status enum. + * @name proto.PaymentInfo.Status * @enum {number} * @property {number} UNKNOWN_STATUS=0 UNKNOWN_STATUS value * @property {number} PROCESSING=1 PROCESSING value @@ -41673,7 +50081,7 @@ $root.proto = (function() { * @property {number} WAITING_FOR_PAYER=10 WAITING_FOR_PAYER value * @property {number} WAITING=11 WAITING value */ - PaymentInfo.PaymentInfoStatus = (function() { + PaymentInfo.Status = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "UNKNOWN_STATUS"] = 0; values[valuesById[1] = "PROCESSING"] = 1; @@ -41691,8 +50099,8 @@ $root.proto = (function() { })(); /** - * PaymentInfoTxnStatus enum. - * @name proto.PaymentInfo.PaymentInfoTxnStatus + * TxnStatus enum. + * @name proto.PaymentInfo.TxnStatus * @enum {number} * @property {number} UNKNOWN=0 UNKNOWN value * @property {number} PENDING_SETUP=1 PENDING_SETUP value @@ -41727,7 +50135,7 @@ $root.proto = (function() { * @property {number} REVERSAL_PENDING=30 REVERSAL_PENDING value * @property {number} REFUND_PENDING=31 REFUND_PENDING value */ - PaymentInfo.PaymentInfoTxnStatus = (function() { + PaymentInfo.TxnStatus = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "UNKNOWN"] = 0; values[valuesById[1] = "PENDING_SETUP"] = 1; @@ -41767,271 +50175,6 @@ $root.proto = (function() { return PaymentInfo; })(); - proto.PaymentInviteMessage = (function() { - - /** - * Properties of a PaymentInviteMessage. - * @memberof proto - * @interface IPaymentInviteMessage - * @property {proto.PaymentInviteMessage.PaymentInviteMessageServiceType|null} [serviceType] PaymentInviteMessage serviceType - * @property {number|Long|null} [expiryTimestamp] PaymentInviteMessage expiryTimestamp - */ - - /** - * Constructs a new PaymentInviteMessage. - * @memberof proto - * @classdesc Represents a PaymentInviteMessage. - * @implements IPaymentInviteMessage - * @constructor - * @param {proto.IPaymentInviteMessage=} [properties] Properties to set - */ - function PaymentInviteMessage(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]]; - } - - /** - * PaymentInviteMessage serviceType. - * @member {proto.PaymentInviteMessage.PaymentInviteMessageServiceType} serviceType - * @memberof proto.PaymentInviteMessage - * @instance - */ - PaymentInviteMessage.prototype.serviceType = 0; - - /** - * PaymentInviteMessage expiryTimestamp. - * @member {number|Long} expiryTimestamp - * @memberof proto.PaymentInviteMessage - * @instance - */ - PaymentInviteMessage.prototype.expiryTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new PaymentInviteMessage instance using the specified properties. - * @function create - * @memberof proto.PaymentInviteMessage - * @static - * @param {proto.IPaymentInviteMessage=} [properties] Properties to set - * @returns {proto.PaymentInviteMessage} PaymentInviteMessage instance - */ - PaymentInviteMessage.create = function create(properties) { - return new PaymentInviteMessage(properties); - }; - - /** - * Encodes the specified PaymentInviteMessage message. Does not implicitly {@link proto.PaymentInviteMessage.verify|verify} messages. - * @function encode - * @memberof proto.PaymentInviteMessage - * @static - * @param {proto.IPaymentInviteMessage} message PaymentInviteMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PaymentInviteMessage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.serviceType != null && Object.hasOwnProperty.call(message, "serviceType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.serviceType); - if (message.expiryTimestamp != null && Object.hasOwnProperty.call(message, "expiryTimestamp")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.expiryTimestamp); - return writer; - }; - - /** - * Encodes the specified PaymentInviteMessage message, length delimited. Does not implicitly {@link proto.PaymentInviteMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.PaymentInviteMessage - * @static - * @param {proto.IPaymentInviteMessage} message PaymentInviteMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PaymentInviteMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PaymentInviteMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.PaymentInviteMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.PaymentInviteMessage} PaymentInviteMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PaymentInviteMessage.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.PaymentInviteMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.serviceType = reader.int32(); - break; - case 2: - message.expiryTimestamp = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PaymentInviteMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.PaymentInviteMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.PaymentInviteMessage} PaymentInviteMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PaymentInviteMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PaymentInviteMessage message. - * @function verify - * @memberof proto.PaymentInviteMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PaymentInviteMessage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.serviceType != null && message.hasOwnProperty("serviceType")) - switch (message.serviceType) { - default: - return "serviceType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - 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"; - return null; - }; - - /** - * Creates a PaymentInviteMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.PaymentInviteMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.PaymentInviteMessage} PaymentInviteMessage - */ - PaymentInviteMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.PaymentInviteMessage) - return object; - var message = new $root.proto.PaymentInviteMessage(); - switch (object.serviceType) { - case "UNKNOWN": - case 0: - message.serviceType = 0; - break; - case "FBPAY": - case 1: - message.serviceType = 1; - break; - case "NOVI": - case 2: - message.serviceType = 2; - break; - case "UPI": - case 3: - message.serviceType = 3; - break; - } - if (object.expiryTimestamp != null) - if ($util.Long) - (message.expiryTimestamp = $util.Long.fromValue(object.expiryTimestamp)).unsigned = false; - 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(); - return message; - }; - - /** - * Creates a plain object from a PaymentInviteMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.PaymentInviteMessage - * @static - * @param {proto.PaymentInviteMessage} message PaymentInviteMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PaymentInviteMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.serviceType = options.enums === String ? "UNKNOWN" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.expiryTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.expiryTimestamp = options.longs === String ? "0" : 0; - } - if (message.serviceType != null && message.hasOwnProperty("serviceType")) - object.serviceType = options.enums === String ? $root.proto.PaymentInviteMessage.PaymentInviteMessageServiceType[message.serviceType] : message.serviceType; - 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() : message.expiryTimestamp; - return object; - }; - - /** - * Converts this PaymentInviteMessage to JSON. - * @function toJSON - * @memberof proto.PaymentInviteMessage - * @instance - * @returns {Object.} JSON object - */ - PaymentInviteMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * PaymentInviteMessageServiceType enum. - * @name proto.PaymentInviteMessage.PaymentInviteMessageServiceType - * @enum {number} - * @property {number} UNKNOWN=0 UNKNOWN value - * @property {number} FBPAY=1 FBPAY value - * @property {number} NOVI=2 NOVI value - * @property {number} UPI=3 UPI value - */ - PaymentInviteMessage.PaymentInviteMessageServiceType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN"] = 0; - values[valuesById[1] = "FBPAY"] = 1; - values[valuesById[2] = "NOVI"] = 2; - values[valuesById[3] = "UPI"] = 3; - return values; - })(); - - return PaymentInviteMessage; - })(); - proto.PendingKeyExchange = (function() { /** @@ -42897,193 +51040,6 @@ $root.proto = (function() { 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() { /** @@ -43525,318 +51481,6 @@ $root.proto = (function() { return PollAdditionalMetadata; })(); - proto.PollCreationMessage = (function() { - - /** - * Properties of a PollCreationMessage. - * @memberof proto - * @interface IPollCreationMessage - * @property {Uint8Array|null} [encKey] PollCreationMessage encKey - * @property {string|null} [name] PollCreationMessage name - * @property {Array.|null} [options] PollCreationMessage options - * @property {number|null} [selectableOptionsCount] PollCreationMessage selectableOptionsCount - * @property {proto.IContextInfo|null} [contextInfo] PollCreationMessage contextInfo - */ - - /** - * Constructs a new PollCreationMessage. - * @memberof proto - * @classdesc Represents a PollCreationMessage. - * @implements IPollCreationMessage - * @constructor - * @param {proto.IPollCreationMessage=} [properties] Properties to set - */ - function PollCreationMessage(properties) { - this.options = []; - 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]]; - } - - /** - * PollCreationMessage encKey. - * @member {Uint8Array} encKey - * @memberof proto.PollCreationMessage - * @instance - */ - PollCreationMessage.prototype.encKey = $util.newBuffer([]); - - /** - * PollCreationMessage name. - * @member {string} name - * @memberof proto.PollCreationMessage - * @instance - */ - PollCreationMessage.prototype.name = ""; - - /** - * PollCreationMessage options. - * @member {Array.} options - * @memberof proto.PollCreationMessage - * @instance - */ - PollCreationMessage.prototype.options = $util.emptyArray; - - /** - * PollCreationMessage selectableOptionsCount. - * @member {number} selectableOptionsCount - * @memberof proto.PollCreationMessage - * @instance - */ - PollCreationMessage.prototype.selectableOptionsCount = 0; - - /** - * PollCreationMessage contextInfo. - * @member {proto.IContextInfo|null|undefined} contextInfo - * @memberof proto.PollCreationMessage - * @instance - */ - PollCreationMessage.prototype.contextInfo = null; - - /** - * Creates a new PollCreationMessage instance using the specified properties. - * @function create - * @memberof proto.PollCreationMessage - * @static - * @param {proto.IPollCreationMessage=} [properties] Properties to set - * @returns {proto.PollCreationMessage} PollCreationMessage instance - */ - PollCreationMessage.create = function create(properties) { - return new PollCreationMessage(properties); - }; - - /** - * Encodes the specified PollCreationMessage message. Does not implicitly {@link proto.PollCreationMessage.verify|verify} messages. - * @function encode - * @memberof proto.PollCreationMessage - * @static - * @param {proto.IPollCreationMessage} message PollCreationMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PollCreationMessage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.encKey != null && Object.hasOwnProperty.call(message, "encKey")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.encKey); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.options != null && message.options.length) - for (var i = 0; i < message.options.length; ++i) - $root.proto.Option.encode(message.options[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.selectableOptionsCount != null && Object.hasOwnProperty.call(message, "selectableOptionsCount")) - writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.selectableOptionsCount); - if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) - $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PollCreationMessage message, length delimited. Does not implicitly {@link proto.PollCreationMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.PollCreationMessage - * @static - * @param {proto.IPollCreationMessage} message PollCreationMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PollCreationMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PollCreationMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.PollCreationMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.PollCreationMessage} PollCreationMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PollCreationMessage.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.PollCreationMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.encKey = reader.bytes(); - break; - case 2: - message.name = reader.string(); - break; - case 3: - if (!(message.options && message.options.length)) - message.options = []; - message.options.push($root.proto.Option.decode(reader, reader.uint32())); - break; - case 4: - message.selectableOptionsCount = reader.uint32(); - break; - case 5: - message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PollCreationMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.PollCreationMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.PollCreationMessage} PollCreationMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PollCreationMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PollCreationMessage message. - * @function verify - * @memberof proto.PollCreationMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PollCreationMessage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.encKey != null && message.hasOwnProperty("encKey")) - if (!(message.encKey && typeof message.encKey.length === "number" || $util.isString(message.encKey))) - return "encKey: buffer expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - if (!Array.isArray(message.options)) - return "options: array expected"; - for (var i = 0; i < message.options.length; ++i) { - var error = $root.proto.Option.verify(message.options[i]); - if (error) - return "options." + error; - } - } - if (message.selectableOptionsCount != null && message.hasOwnProperty("selectableOptionsCount")) - if (!$util.isInteger(message.selectableOptionsCount)) - return "selectableOptionsCount: integer expected"; - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { - var error = $root.proto.ContextInfo.verify(message.contextInfo); - if (error) - return "contextInfo." + error; - } - return null; - }; - - /** - * Creates a PollCreationMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.PollCreationMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.PollCreationMessage} PollCreationMessage - */ - PollCreationMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.PollCreationMessage) - return object; - var message = new $root.proto.PollCreationMessage(); - if (object.encKey != null) - if (typeof object.encKey === "string") - $util.base64.decode(object.encKey, message.encKey = $util.newBuffer($util.base64.length(object.encKey)), 0); - else if (object.encKey.length) - message.encKey = object.encKey; - if (object.name != null) - message.name = String(object.name); - if (object.options) { - if (!Array.isArray(object.options)) - throw TypeError(".proto.PollCreationMessage.options: array expected"); - message.options = []; - for (var i = 0; i < object.options.length; ++i) { - if (typeof object.options[i] !== "object") - throw TypeError(".proto.PollCreationMessage.options: object expected"); - message.options[i] = $root.proto.Option.fromObject(object.options[i]); - } - } - if (object.selectableOptionsCount != null) - message.selectableOptionsCount = object.selectableOptionsCount >>> 0; - if (object.contextInfo != null) { - if (typeof object.contextInfo !== "object") - throw TypeError(".proto.PollCreationMessage.contextInfo: object expected"); - message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); - } - return message; - }; - - /** - * Creates a plain object from a PollCreationMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.PollCreationMessage - * @static - * @param {proto.PollCreationMessage} message PollCreationMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PollCreationMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.options = []; - if (options.defaults) { - if (options.bytes === String) - object.encKey = ""; - else { - object.encKey = []; - if (options.bytes !== Array) - object.encKey = $util.newBuffer(object.encKey); - } - object.name = ""; - object.selectableOptionsCount = 0; - object.contextInfo = null; - } - if (message.encKey != null && message.hasOwnProperty("encKey")) - object.encKey = options.bytes === String ? $util.base64.encode(message.encKey, 0, message.encKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encKey) : message.encKey; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.options && message.options.length) { - object.options = []; - for (var j = 0; j < message.options.length; ++j) - object.options[j] = $root.proto.Option.toObject(message.options[j], options); - } - if (message.selectableOptionsCount != null && message.hasOwnProperty("selectableOptionsCount")) - object.selectableOptionsCount = message.selectableOptionsCount; - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) - object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); - return object; - }; - - /** - * Converts this PollCreationMessage to JSON. - * @function toJSON - * @memberof proto.PollCreationMessage - * @instance - * @returns {Object.} JSON object - */ - PollCreationMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PollCreationMessage; - })(); - proto.PollEncValue = (function() { /** @@ -44065,193 +51709,6 @@ $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() { /** @@ -44259,7 +51716,8 @@ $root.proto = (function() { * @memberof proto * @interface IPollUpdate * @property {proto.IMessageKey|null} [pollUpdateMessageKey] PollUpdate pollUpdateMessageKey - * @property {proto.IPollVoteMessage|null} [vote] PollUpdate vote + * @property {proto.Message.IPollVoteMessage|null} [vote] PollUpdate vote + * @property {number|Long|null} [senderTimestampMs] PollUpdate senderTimestampMs */ /** @@ -44287,12 +51745,20 @@ $root.proto = (function() { /** * PollUpdate vote. - * @member {proto.IPollVoteMessage|null|undefined} vote + * @member {proto.Message.IPollVoteMessage|null|undefined} vote * @memberof proto.PollUpdate * @instance */ PollUpdate.prototype.vote = null; + /** + * PollUpdate senderTimestampMs. + * @member {number|Long} senderTimestampMs + * @memberof proto.PollUpdate + * @instance + */ + PollUpdate.prototype.senderTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** * Creates a new PollUpdate instance using the specified properties. * @function create @@ -44320,7 +51786,9 @@ $root.proto = (function() { 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(); + $root.proto.Message.PollVoteMessage.encode(message.vote, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.senderTimestampMs != null && Object.hasOwnProperty.call(message, "senderTimestampMs")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.senderTimestampMs); return writer; }; @@ -44359,7 +51827,10 @@ $root.proto = (function() { message.pollUpdateMessageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); break; case 2: - message.vote = $root.proto.PollVoteMessage.decode(reader, reader.uint32()); + message.vote = $root.proto.Message.PollVoteMessage.decode(reader, reader.uint32()); + break; + case 3: + message.senderTimestampMs = reader.int64(); break; default: reader.skipType(tag & 7); @@ -44402,10 +51873,13 @@ $root.proto = (function() { return "pollUpdateMessageKey." + error; } if (message.vote != null && message.hasOwnProperty("vote")) { - var error = $root.proto.PollVoteMessage.verify(message.vote); + var error = $root.proto.Message.PollVoteMessage.verify(message.vote); if (error) return "vote." + error; } + 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"; return null; }; @@ -44429,8 +51903,17 @@ $root.proto = (function() { if (object.vote != null) { if (typeof object.vote !== "object") throw TypeError(".proto.PollUpdate.vote: object expected"); - message.vote = $root.proto.PollVoteMessage.fromObject(object.vote); + message.vote = $root.proto.Message.PollVoteMessage.fromObject(object.vote); } + 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(); return message; }; @@ -44450,11 +51933,21 @@ $root.proto = (function() { if (options.defaults) { object.pollUpdateMessageKey = null; object.vote = null; + 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; } 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); + object.vote = $root.proto.Message.PollVoteMessage.toObject(message.vote, options); + 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; return object; }; @@ -44472,656 +51965,6 @@ $root.proto = (function() { return PollUpdate; })(); - proto.PollUpdateMessage = (function() { - - /** - * Properties of a PollUpdateMessage. - * @memberof proto - * @interface IPollUpdateMessage - * @property {proto.IMessageKey|null} [pollCreationMessageKey] PollUpdateMessage pollCreationMessageKey - * @property {proto.IPollEncValue|null} [vote] PollUpdateMessage vote - * @property {proto.IPollUpdateMessageMetadata|null} [metadata] PollUpdateMessage metadata - */ - - /** - * Constructs a new PollUpdateMessage. - * @memberof proto - * @classdesc Represents a PollUpdateMessage. - * @implements IPollUpdateMessage - * @constructor - * @param {proto.IPollUpdateMessage=} [properties] Properties to set - */ - function PollUpdateMessage(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]]; - } - - /** - * PollUpdateMessage pollCreationMessageKey. - * @member {proto.IMessageKey|null|undefined} pollCreationMessageKey - * @memberof proto.PollUpdateMessage - * @instance - */ - PollUpdateMessage.prototype.pollCreationMessageKey = null; - - /** - * PollUpdateMessage vote. - * @member {proto.IPollEncValue|null|undefined} vote - * @memberof proto.PollUpdateMessage - * @instance - */ - 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 - * @memberof proto.PollUpdateMessage - * @static - * @param {proto.IPollUpdateMessage=} [properties] Properties to set - * @returns {proto.PollUpdateMessage} PollUpdateMessage instance - */ - PollUpdateMessage.create = function create(properties) { - return new PollUpdateMessage(properties); - }; - - /** - * Encodes the specified PollUpdateMessage message. Does not implicitly {@link proto.PollUpdateMessage.verify|verify} messages. - * @function encode - * @memberof proto.PollUpdateMessage - * @static - * @param {proto.IPollUpdateMessage} message PollUpdateMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PollUpdateMessage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pollCreationMessageKey != null && Object.hasOwnProperty.call(message, "pollCreationMessageKey")) - $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; - }; - - /** - * Encodes the specified PollUpdateMessage message, length delimited. Does not implicitly {@link proto.PollUpdateMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.PollUpdateMessage - * @static - * @param {proto.IPollUpdateMessage} message PollUpdateMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PollUpdateMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PollUpdateMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.PollUpdateMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.PollUpdateMessage} PollUpdateMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PollUpdateMessage.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.PollUpdateMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pollCreationMessageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); - break; - 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; - } - } - return message; - }; - - /** - * Decodes a PollUpdateMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.PollUpdateMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.PollUpdateMessage} PollUpdateMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PollUpdateMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PollUpdateMessage message. - * @function verify - * @memberof proto.PollUpdateMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PollUpdateMessage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pollCreationMessageKey != null && message.hasOwnProperty("pollCreationMessageKey")) { - var error = $root.proto.MessageKey.verify(message.pollCreationMessageKey); - if (error) - return "pollCreationMessageKey." + error; - } - if (message.vote != null && message.hasOwnProperty("vote")) { - var error = $root.proto.PollEncValue.verify(message.vote); - 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; - }; - - /** - * Creates a PollUpdateMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.PollUpdateMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.PollUpdateMessage} PollUpdateMessage - */ - PollUpdateMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.PollUpdateMessage) - return object; - var message = new $root.proto.PollUpdateMessage(); - if (object.pollCreationMessageKey != null) { - if (typeof object.pollCreationMessageKey !== "object") - throw TypeError(".proto.PollUpdateMessage.pollCreationMessageKey: object expected"); - message.pollCreationMessageKey = $root.proto.MessageKey.fromObject(object.pollCreationMessageKey); - } - if (object.vote != null) { - if (typeof object.vote !== "object") - 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; - }; - - /** - * Creates a plain object from a PollUpdateMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.PollUpdateMessage - * @static - * @param {proto.PollUpdateMessage} message PollUpdateMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PollUpdateMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - 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; - }; - - /** - * Converts this PollUpdateMessage to JSON. - * @function toJSON - * @memberof proto.PollUpdateMessage - * @instance - * @returns {Object.} JSON object - */ - PollUpdateMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - 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() { - - /** - * Properties of a PollVoteMessage. - * @memberof proto - * @interface IPollVoteMessage - * @property {Array.|null} [selectedOptions] PollVoteMessage selectedOptions - * @property {number|Long|null} [senderTimestampMs] PollVoteMessage senderTimestampMs - */ - - /** - * Constructs a new PollVoteMessage. - * @memberof proto - * @classdesc Represents a PollVoteMessage. - * @implements IPollVoteMessage - * @constructor - * @param {proto.IPollVoteMessage=} [properties] Properties to set - */ - function PollVoteMessage(properties) { - this.selectedOptions = []; - 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]]; - } - - /** - * PollVoteMessage selectedOptions. - * @member {Array.} selectedOptions - * @memberof proto.PollVoteMessage - * @instance - */ - PollVoteMessage.prototype.selectedOptions = $util.emptyArray; - - /** - * PollVoteMessage senderTimestampMs. - * @member {number|Long} senderTimestampMs - * @memberof proto.PollVoteMessage - * @instance - */ - PollVoteMessage.prototype.senderTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new PollVoteMessage instance using the specified properties. - * @function create - * @memberof proto.PollVoteMessage - * @static - * @param {proto.IPollVoteMessage=} [properties] Properties to set - * @returns {proto.PollVoteMessage} PollVoteMessage instance - */ - PollVoteMessage.create = function create(properties) { - return new PollVoteMessage(properties); - }; - - /** - * Encodes the specified PollVoteMessage message. Does not implicitly {@link proto.PollVoteMessage.verify|verify} messages. - * @function encode - * @memberof proto.PollVoteMessage - * @static - * @param {proto.IPollVoteMessage} message PollVoteMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PollVoteMessage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selectedOptions != null && message.selectedOptions.length) - for (var i = 0; i < message.selectedOptions.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.selectedOptions[i]); - if (message.senderTimestampMs != null && Object.hasOwnProperty.call(message, "senderTimestampMs")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.senderTimestampMs); - return writer; - }; - - /** - * Encodes the specified PollVoteMessage message, length delimited. Does not implicitly {@link proto.PollVoteMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.PollVoteMessage - * @static - * @param {proto.IPollVoteMessage} message PollVoteMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PollVoteMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PollVoteMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.PollVoteMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.PollVoteMessage} PollVoteMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PollVoteMessage.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.PollVoteMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.selectedOptions && message.selectedOptions.length)) - message.selectedOptions = []; - message.selectedOptions.push(reader.bytes()); - break; - case 2: - message.senderTimestampMs = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PollVoteMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.PollVoteMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.PollVoteMessage} PollVoteMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PollVoteMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PollVoteMessage message. - * @function verify - * @memberof proto.PollVoteMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PollVoteMessage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.selectedOptions != null && message.hasOwnProperty("selectedOptions")) { - if (!Array.isArray(message.selectedOptions)) - return "selectedOptions: array expected"; - for (var i = 0; i < message.selectedOptions.length; ++i) - if (!(message.selectedOptions[i] && typeof message.selectedOptions[i].length === "number" || $util.isString(message.selectedOptions[i]))) - return "selectedOptions: buffer[] 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"; - return null; - }; - - /** - * Creates a PollVoteMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.PollVoteMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.PollVoteMessage} PollVoteMessage - */ - PollVoteMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.PollVoteMessage) - return object; - var message = new $root.proto.PollVoteMessage(); - if (object.selectedOptions) { - if (!Array.isArray(object.selectedOptions)) - throw TypeError(".proto.PollVoteMessage.selectedOptions: array expected"); - message.selectedOptions = []; - for (var i = 0; i < object.selectedOptions.length; ++i) - if (typeof object.selectedOptions[i] === "string") - $util.base64.decode(object.selectedOptions[i], message.selectedOptions[i] = $util.newBuffer($util.base64.length(object.selectedOptions[i])), 0); - else if (object.selectedOptions[i].length) - message.selectedOptions[i] = object.selectedOptions[i]; - } - 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(); - return message; - }; - - /** - * Creates a plain object from a PollVoteMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.PollVoteMessage - * @static - * @param {proto.PollVoteMessage} message PollVoteMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PollVoteMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.selectedOptions = []; - if (options.defaults) - 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; - if (message.selectedOptions && message.selectedOptions.length) { - object.selectedOptions = []; - for (var j = 0; j < message.selectedOptions.length; ++j) - object.selectedOptions[j] = options.bytes === String ? $util.base64.encode(message.selectedOptions[j], 0, message.selectedOptions[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.selectedOptions[j]) : message.selectedOptions[j]; - } - 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; - return object; - }; - - /** - * Converts this PollVoteMessage to JSON. - * @function toJSON - * @memberof proto.PollVoteMessage - * @instance - * @returns {Object.} JSON object - */ - PollVoteMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PollVoteMessage; - })(); - proto.PreKeyRecordStructure = (function() { /** @@ -45372,2557 +52215,6 @@ $root.proto = (function() { 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() { - - /** - * Properties of a Product. - * @memberof proto - * @interface IProduct - * @property {string|null} [productId] Product productId - */ - - /** - * Constructs a new Product. - * @memberof proto - * @classdesc Represents a Product. - * @implements IProduct - * @constructor - * @param {proto.IProduct=} [properties] Properties to set - */ - function Product(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]]; - } - - /** - * Product productId. - * @member {string} productId - * @memberof proto.Product - * @instance - */ - Product.prototype.productId = ""; - - /** - * Creates a new Product instance using the specified properties. - * @function create - * @memberof proto.Product - * @static - * @param {proto.IProduct=} [properties] Properties to set - * @returns {proto.Product} Product instance - */ - Product.create = function create(properties) { - return new Product(properties); - }; - - /** - * Encodes the specified Product message. Does not implicitly {@link proto.Product.verify|verify} messages. - * @function encode - * @memberof proto.Product - * @static - * @param {proto.IProduct} message Product message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Product.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.productId != null && Object.hasOwnProperty.call(message, "productId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.productId); - return writer; - }; - - /** - * Encodes the specified Product message, length delimited. Does not implicitly {@link proto.Product.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.Product - * @static - * @param {proto.IProduct} message Product message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Product.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Product message from the specified reader or buffer. - * @function decode - * @memberof proto.Product - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.Product} Product - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Product.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.Product(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.productId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Product message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.Product - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Product} Product - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Product.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Product message. - * @function verify - * @memberof proto.Product - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Product.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.productId != null && message.hasOwnProperty("productId")) - if (!$util.isString(message.productId)) - return "productId: string expected"; - return null; - }; - - /** - * Creates a Product message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.Product - * @static - * @param {Object.} object Plain object - * @returns {proto.Product} Product - */ - Product.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Product) - return object; - var message = new $root.proto.Product(); - if (object.productId != null) - message.productId = String(object.productId); - return message; - }; - - /** - * Creates a plain object from a Product message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.Product - * @static - * @param {proto.Product} message Product - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Product.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.productId = ""; - if (message.productId != null && message.hasOwnProperty("productId")) - object.productId = message.productId; - return object; - }; - - /** - * Converts this Product to JSON. - * @function toJSON - * @memberof proto.Product - * @instance - * @returns {Object.} JSON object - */ - Product.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Product; - })(); - - proto.ProductListHeaderImage = (function() { - - /** - * Properties of a ProductListHeaderImage. - * @memberof proto - * @interface IProductListHeaderImage - * @property {string|null} [productId] ProductListHeaderImage productId - * @property {Uint8Array|null} [jpegThumbnail] ProductListHeaderImage jpegThumbnail - */ - - /** - * Constructs a new ProductListHeaderImage. - * @memberof proto - * @classdesc Represents a ProductListHeaderImage. - * @implements IProductListHeaderImage - * @constructor - * @param {proto.IProductListHeaderImage=} [properties] Properties to set - */ - function ProductListHeaderImage(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]]; - } - - /** - * ProductListHeaderImage productId. - * @member {string} productId - * @memberof proto.ProductListHeaderImage - * @instance - */ - ProductListHeaderImage.prototype.productId = ""; - - /** - * ProductListHeaderImage jpegThumbnail. - * @member {Uint8Array} jpegThumbnail - * @memberof proto.ProductListHeaderImage - * @instance - */ - ProductListHeaderImage.prototype.jpegThumbnail = $util.newBuffer([]); - - /** - * Creates a new ProductListHeaderImage instance using the specified properties. - * @function create - * @memberof proto.ProductListHeaderImage - * @static - * @param {proto.IProductListHeaderImage=} [properties] Properties to set - * @returns {proto.ProductListHeaderImage} ProductListHeaderImage instance - */ - ProductListHeaderImage.create = function create(properties) { - return new ProductListHeaderImage(properties); - }; - - /** - * Encodes the specified ProductListHeaderImage message. Does not implicitly {@link proto.ProductListHeaderImage.verify|verify} messages. - * @function encode - * @memberof proto.ProductListHeaderImage - * @static - * @param {proto.IProductListHeaderImage} message ProductListHeaderImage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProductListHeaderImage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.productId != null && Object.hasOwnProperty.call(message, "productId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.productId); - if (message.jpegThumbnail != null && Object.hasOwnProperty.call(message, "jpegThumbnail")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.jpegThumbnail); - return writer; - }; - - /** - * Encodes the specified ProductListHeaderImage message, length delimited. Does not implicitly {@link proto.ProductListHeaderImage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.ProductListHeaderImage - * @static - * @param {proto.IProductListHeaderImage} message ProductListHeaderImage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProductListHeaderImage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ProductListHeaderImage message from the specified reader or buffer. - * @function decode - * @memberof proto.ProductListHeaderImage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.ProductListHeaderImage} ProductListHeaderImage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProductListHeaderImage.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.ProductListHeaderImage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.productId = reader.string(); - break; - case 2: - message.jpegThumbnail = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ProductListHeaderImage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.ProductListHeaderImage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ProductListHeaderImage} ProductListHeaderImage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProductListHeaderImage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ProductListHeaderImage message. - * @function verify - * @memberof proto.ProductListHeaderImage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ProductListHeaderImage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.productId != null && message.hasOwnProperty("productId")) - if (!$util.isString(message.productId)) - return "productId: string expected"; - if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) - if (!(message.jpegThumbnail && typeof message.jpegThumbnail.length === "number" || $util.isString(message.jpegThumbnail))) - return "jpegThumbnail: buffer expected"; - return null; - }; - - /** - * Creates a ProductListHeaderImage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.ProductListHeaderImage - * @static - * @param {Object.} object Plain object - * @returns {proto.ProductListHeaderImage} ProductListHeaderImage - */ - ProductListHeaderImage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ProductListHeaderImage) - return object; - var message = new $root.proto.ProductListHeaderImage(); - if (object.productId != null) - message.productId = String(object.productId); - 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; - return message; - }; - - /** - * Creates a plain object from a ProductListHeaderImage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.ProductListHeaderImage - * @static - * @param {proto.ProductListHeaderImage} message ProductListHeaderImage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ProductListHeaderImage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.productId = ""; - if (options.bytes === String) - object.jpegThumbnail = ""; - else { - object.jpegThumbnail = []; - if (options.bytes !== Array) - object.jpegThumbnail = $util.newBuffer(object.jpegThumbnail); - } - } - if (message.productId != null && message.hasOwnProperty("productId")) - object.productId = message.productId; - 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; - return object; - }; - - /** - * Converts this ProductListHeaderImage to JSON. - * @function toJSON - * @memberof proto.ProductListHeaderImage - * @instance - * @returns {Object.} JSON object - */ - ProductListHeaderImage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ProductListHeaderImage; - })(); - - proto.ProductListInfo = (function() { - - /** - * Properties of a ProductListInfo. - * @memberof proto - * @interface IProductListInfo - * @property {Array.|null} [productSections] ProductListInfo productSections - * @property {proto.IProductListHeaderImage|null} [headerImage] ProductListInfo headerImage - * @property {string|null} [businessOwnerJid] ProductListInfo businessOwnerJid - */ - - /** - * Constructs a new ProductListInfo. - * @memberof proto - * @classdesc Represents a ProductListInfo. - * @implements IProductListInfo - * @constructor - * @param {proto.IProductListInfo=} [properties] Properties to set - */ - function ProductListInfo(properties) { - this.productSections = []; - 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]]; - } - - /** - * ProductListInfo productSections. - * @member {Array.} productSections - * @memberof proto.ProductListInfo - * @instance - */ - ProductListInfo.prototype.productSections = $util.emptyArray; - - /** - * ProductListInfo headerImage. - * @member {proto.IProductListHeaderImage|null|undefined} headerImage - * @memberof proto.ProductListInfo - * @instance - */ - ProductListInfo.prototype.headerImage = null; - - /** - * ProductListInfo businessOwnerJid. - * @member {string} businessOwnerJid - * @memberof proto.ProductListInfo - * @instance - */ - ProductListInfo.prototype.businessOwnerJid = ""; - - /** - * Creates a new ProductListInfo instance using the specified properties. - * @function create - * @memberof proto.ProductListInfo - * @static - * @param {proto.IProductListInfo=} [properties] Properties to set - * @returns {proto.ProductListInfo} ProductListInfo instance - */ - ProductListInfo.create = function create(properties) { - return new ProductListInfo(properties); - }; - - /** - * Encodes the specified ProductListInfo message. Does not implicitly {@link proto.ProductListInfo.verify|verify} messages. - * @function encode - * @memberof proto.ProductListInfo - * @static - * @param {proto.IProductListInfo} message ProductListInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProductListInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.productSections != null && message.productSections.length) - for (var i = 0; i < message.productSections.length; ++i) - $root.proto.ProductSection.encode(message.productSections[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.headerImage != null && Object.hasOwnProperty.call(message, "headerImage")) - $root.proto.ProductListHeaderImage.encode(message.headerImage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.businessOwnerJid != null && Object.hasOwnProperty.call(message, "businessOwnerJid")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.businessOwnerJid); - return writer; - }; - - /** - * Encodes the specified ProductListInfo message, length delimited. Does not implicitly {@link proto.ProductListInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.ProductListInfo - * @static - * @param {proto.IProductListInfo} message ProductListInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProductListInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ProductListInfo message from the specified reader or buffer. - * @function decode - * @memberof proto.ProductListInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.ProductListInfo} ProductListInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProductListInfo.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.ProductListInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.productSections && message.productSections.length)) - message.productSections = []; - message.productSections.push($root.proto.ProductSection.decode(reader, reader.uint32())); - break; - case 2: - message.headerImage = $root.proto.ProductListHeaderImage.decode(reader, reader.uint32()); - break; - case 3: - message.businessOwnerJid = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ProductListInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.ProductListInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ProductListInfo} ProductListInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProductListInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ProductListInfo message. - * @function verify - * @memberof proto.ProductListInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ProductListInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.productSections != null && message.hasOwnProperty("productSections")) { - if (!Array.isArray(message.productSections)) - return "productSections: array expected"; - for (var i = 0; i < message.productSections.length; ++i) { - var error = $root.proto.ProductSection.verify(message.productSections[i]); - if (error) - return "productSections." + error; - } - } - if (message.headerImage != null && message.hasOwnProperty("headerImage")) { - var error = $root.proto.ProductListHeaderImage.verify(message.headerImage); - if (error) - return "headerImage." + error; - } - if (message.businessOwnerJid != null && message.hasOwnProperty("businessOwnerJid")) - if (!$util.isString(message.businessOwnerJid)) - return "businessOwnerJid: string expected"; - return null; - }; - - /** - * Creates a ProductListInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.ProductListInfo - * @static - * @param {Object.} object Plain object - * @returns {proto.ProductListInfo} ProductListInfo - */ - ProductListInfo.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ProductListInfo) - return object; - var message = new $root.proto.ProductListInfo(); - if (object.productSections) { - if (!Array.isArray(object.productSections)) - throw TypeError(".proto.ProductListInfo.productSections: array expected"); - message.productSections = []; - for (var i = 0; i < object.productSections.length; ++i) { - if (typeof object.productSections[i] !== "object") - throw TypeError(".proto.ProductListInfo.productSections: object expected"); - message.productSections[i] = $root.proto.ProductSection.fromObject(object.productSections[i]); - } - } - if (object.headerImage != null) { - if (typeof object.headerImage !== "object") - throw TypeError(".proto.ProductListInfo.headerImage: object expected"); - message.headerImage = $root.proto.ProductListHeaderImage.fromObject(object.headerImage); - } - if (object.businessOwnerJid != null) - message.businessOwnerJid = String(object.businessOwnerJid); - return message; - }; - - /** - * Creates a plain object from a ProductListInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.ProductListInfo - * @static - * @param {proto.ProductListInfo} message ProductListInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ProductListInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.productSections = []; - if (options.defaults) { - object.headerImage = null; - object.businessOwnerJid = ""; - } - if (message.productSections && message.productSections.length) { - object.productSections = []; - for (var j = 0; j < message.productSections.length; ++j) - object.productSections[j] = $root.proto.ProductSection.toObject(message.productSections[j], options); - } - if (message.headerImage != null && message.hasOwnProperty("headerImage")) - object.headerImage = $root.proto.ProductListHeaderImage.toObject(message.headerImage, options); - if (message.businessOwnerJid != null && message.hasOwnProperty("businessOwnerJid")) - object.businessOwnerJid = message.businessOwnerJid; - return object; - }; - - /** - * Converts this ProductListInfo to JSON. - * @function toJSON - * @memberof proto.ProductListInfo - * @instance - * @returns {Object.} JSON object - */ - ProductListInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ProductListInfo; - })(); - - proto.ProductMessage = (function() { - - /** - * Properties of a ProductMessage. - * @memberof proto - * @interface IProductMessage - * @property {proto.IProductSnapshot|null} [product] ProductMessage product - * @property {string|null} [businessOwnerJid] ProductMessage businessOwnerJid - * @property {proto.ICatalogSnapshot|null} [catalog] ProductMessage catalog - * @property {string|null} [body] ProductMessage body - * @property {string|null} [footer] ProductMessage footer - * @property {proto.IContextInfo|null} [contextInfo] ProductMessage contextInfo - */ - - /** - * Constructs a new ProductMessage. - * @memberof proto - * @classdesc Represents a ProductMessage. - * @implements IProductMessage - * @constructor - * @param {proto.IProductMessage=} [properties] Properties to set - */ - function ProductMessage(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]]; - } - - /** - * ProductMessage product. - * @member {proto.IProductSnapshot|null|undefined} product - * @memberof proto.ProductMessage - * @instance - */ - ProductMessage.prototype.product = null; - - /** - * ProductMessage businessOwnerJid. - * @member {string} businessOwnerJid - * @memberof proto.ProductMessage - * @instance - */ - ProductMessage.prototype.businessOwnerJid = ""; - - /** - * ProductMessage catalog. - * @member {proto.ICatalogSnapshot|null|undefined} catalog - * @memberof proto.ProductMessage - * @instance - */ - ProductMessage.prototype.catalog = null; - - /** - * ProductMessage body. - * @member {string} body - * @memberof proto.ProductMessage - * @instance - */ - ProductMessage.prototype.body = ""; - - /** - * ProductMessage footer. - * @member {string} footer - * @memberof proto.ProductMessage - * @instance - */ - ProductMessage.prototype.footer = ""; - - /** - * ProductMessage contextInfo. - * @member {proto.IContextInfo|null|undefined} contextInfo - * @memberof proto.ProductMessage - * @instance - */ - ProductMessage.prototype.contextInfo = null; - - /** - * Creates a new ProductMessage instance using the specified properties. - * @function create - * @memberof proto.ProductMessage - * @static - * @param {proto.IProductMessage=} [properties] Properties to set - * @returns {proto.ProductMessage} ProductMessage instance - */ - ProductMessage.create = function create(properties) { - return new ProductMessage(properties); - }; - - /** - * Encodes the specified ProductMessage message. Does not implicitly {@link proto.ProductMessage.verify|verify} messages. - * @function encode - * @memberof proto.ProductMessage - * @static - * @param {proto.IProductMessage} message ProductMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProductMessage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.product != null && Object.hasOwnProperty.call(message, "product")) - $root.proto.ProductSnapshot.encode(message.product, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.businessOwnerJid != null && Object.hasOwnProperty.call(message, "businessOwnerJid")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.businessOwnerJid); - if (message.catalog != null && Object.hasOwnProperty.call(message, "catalog")) - $root.proto.CatalogSnapshot.encode(message.catalog, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.body); - if (message.footer != null && Object.hasOwnProperty.call(message, "footer")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.footer); - if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) - $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ProductMessage message, length delimited. Does not implicitly {@link proto.ProductMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.ProductMessage - * @static - * @param {proto.IProductMessage} message ProductMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProductMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ProductMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.ProductMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.ProductMessage} ProductMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProductMessage.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.ProductMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.product = $root.proto.ProductSnapshot.decode(reader, reader.uint32()); - break; - case 2: - message.businessOwnerJid = reader.string(); - break; - case 4: - message.catalog = $root.proto.CatalogSnapshot.decode(reader, reader.uint32()); - break; - case 5: - message.body = reader.string(); - break; - case 6: - message.footer = reader.string(); - break; - case 17: - message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ProductMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.ProductMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ProductMessage} ProductMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProductMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ProductMessage message. - * @function verify - * @memberof proto.ProductMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ProductMessage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.product != null && message.hasOwnProperty("product")) { - var error = $root.proto.ProductSnapshot.verify(message.product); - if (error) - return "product." + error; - } - if (message.businessOwnerJid != null && message.hasOwnProperty("businessOwnerJid")) - if (!$util.isString(message.businessOwnerJid)) - return "businessOwnerJid: string expected"; - if (message.catalog != null && message.hasOwnProperty("catalog")) { - var error = $root.proto.CatalogSnapshot.verify(message.catalog); - if (error) - return "catalog." + error; - } - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.footer != null && message.hasOwnProperty("footer")) - if (!$util.isString(message.footer)) - return "footer: string expected"; - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { - var error = $root.proto.ContextInfo.verify(message.contextInfo); - if (error) - return "contextInfo." + error; - } - return null; - }; - - /** - * Creates a ProductMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.ProductMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.ProductMessage} ProductMessage - */ - ProductMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ProductMessage) - return object; - var message = new $root.proto.ProductMessage(); - if (object.product != null) { - if (typeof object.product !== "object") - throw TypeError(".proto.ProductMessage.product: object expected"); - message.product = $root.proto.ProductSnapshot.fromObject(object.product); - } - if (object.businessOwnerJid != null) - message.businessOwnerJid = String(object.businessOwnerJid); - if (object.catalog != null) { - if (typeof object.catalog !== "object") - throw TypeError(".proto.ProductMessage.catalog: object expected"); - message.catalog = $root.proto.CatalogSnapshot.fromObject(object.catalog); - } - if (object.body != null) - message.body = String(object.body); - if (object.footer != null) - message.footer = String(object.footer); - if (object.contextInfo != null) { - if (typeof object.contextInfo !== "object") - throw TypeError(".proto.ProductMessage.contextInfo: object expected"); - message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); - } - return message; - }; - - /** - * Creates a plain object from a ProductMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.ProductMessage - * @static - * @param {proto.ProductMessage} message ProductMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ProductMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.product = null; - object.businessOwnerJid = ""; - object.catalog = null; - object.body = ""; - object.footer = ""; - object.contextInfo = null; - } - if (message.product != null && message.hasOwnProperty("product")) - object.product = $root.proto.ProductSnapshot.toObject(message.product, options); - if (message.businessOwnerJid != null && message.hasOwnProperty("businessOwnerJid")) - object.businessOwnerJid = message.businessOwnerJid; - if (message.catalog != null && message.hasOwnProperty("catalog")) - object.catalog = $root.proto.CatalogSnapshot.toObject(message.catalog, options); - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.footer != null && message.hasOwnProperty("footer")) - object.footer = message.footer; - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) - object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); - return object; - }; - - /** - * Converts this ProductMessage to JSON. - * @function toJSON - * @memberof proto.ProductMessage - * @instance - * @returns {Object.} JSON object - */ - ProductMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ProductMessage; - })(); - - proto.ProductSection = (function() { - - /** - * Properties of a ProductSection. - * @memberof proto - * @interface IProductSection - * @property {string|null} [title] ProductSection title - * @property {Array.|null} [products] ProductSection products - */ - - /** - * Constructs a new ProductSection. - * @memberof proto - * @classdesc Represents a ProductSection. - * @implements IProductSection - * @constructor - * @param {proto.IProductSection=} [properties] Properties to set - */ - function ProductSection(properties) { - this.products = []; - 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]]; - } - - /** - * ProductSection title. - * @member {string} title - * @memberof proto.ProductSection - * @instance - */ - ProductSection.prototype.title = ""; - - /** - * ProductSection products. - * @member {Array.} products - * @memberof proto.ProductSection - * @instance - */ - ProductSection.prototype.products = $util.emptyArray; - - /** - * Creates a new ProductSection instance using the specified properties. - * @function create - * @memberof proto.ProductSection - * @static - * @param {proto.IProductSection=} [properties] Properties to set - * @returns {proto.ProductSection} ProductSection instance - */ - ProductSection.create = function create(properties) { - return new ProductSection(properties); - }; - - /** - * Encodes the specified ProductSection message. Does not implicitly {@link proto.ProductSection.verify|verify} messages. - * @function encode - * @memberof proto.ProductSection - * @static - * @param {proto.IProductSection} message ProductSection message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProductSection.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.products != null && message.products.length) - for (var i = 0; i < message.products.length; ++i) - $root.proto.Product.encode(message.products[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ProductSection message, length delimited. Does not implicitly {@link proto.ProductSection.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.ProductSection - * @static - * @param {proto.IProductSection} message ProductSection message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProductSection.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ProductSection message from the specified reader or buffer. - * @function decode - * @memberof proto.ProductSection - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.ProductSection} ProductSection - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProductSection.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.ProductSection(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - if (!(message.products && message.products.length)) - message.products = []; - message.products.push($root.proto.Product.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ProductSection message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.ProductSection - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ProductSection} ProductSection - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProductSection.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ProductSection message. - * @function verify - * @memberof proto.ProductSection - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ProductSection.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.products != null && message.hasOwnProperty("products")) { - if (!Array.isArray(message.products)) - return "products: array expected"; - for (var i = 0; i < message.products.length; ++i) { - var error = $root.proto.Product.verify(message.products[i]); - if (error) - return "products." + error; - } - } - return null; - }; - - /** - * Creates a ProductSection message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.ProductSection - * @static - * @param {Object.} object Plain object - * @returns {proto.ProductSection} ProductSection - */ - ProductSection.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ProductSection) - return object; - var message = new $root.proto.ProductSection(); - if (object.title != null) - message.title = String(object.title); - if (object.products) { - if (!Array.isArray(object.products)) - throw TypeError(".proto.ProductSection.products: array expected"); - message.products = []; - for (var i = 0; i < object.products.length; ++i) { - if (typeof object.products[i] !== "object") - throw TypeError(".proto.ProductSection.products: object expected"); - message.products[i] = $root.proto.Product.fromObject(object.products[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ProductSection message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.ProductSection - * @static - * @param {proto.ProductSection} message ProductSection - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ProductSection.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.products = []; - if (options.defaults) - object.title = ""; - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.products && message.products.length) { - object.products = []; - for (var j = 0; j < message.products.length; ++j) - object.products[j] = $root.proto.Product.toObject(message.products[j], options); - } - return object; - }; - - /** - * Converts this ProductSection to JSON. - * @function toJSON - * @memberof proto.ProductSection - * @instance - * @returns {Object.} JSON object - */ - ProductSection.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ProductSection; - })(); - - proto.ProductSnapshot = (function() { - - /** - * Properties of a ProductSnapshot. - * @memberof proto - * @interface IProductSnapshot - * @property {proto.IImageMessage|null} [productImage] ProductSnapshot productImage - * @property {string|null} [productId] ProductSnapshot productId - * @property {string|null} [title] ProductSnapshot title - * @property {string|null} [description] ProductSnapshot description - * @property {string|null} [currencyCode] ProductSnapshot currencyCode - * @property {number|Long|null} [priceAmount1000] ProductSnapshot priceAmount1000 - * @property {string|null} [retailerId] ProductSnapshot retailerId - * @property {string|null} [url] ProductSnapshot url - * @property {number|null} [productImageCount] ProductSnapshot productImageCount - * @property {string|null} [firstImageId] ProductSnapshot firstImageId - * @property {number|Long|null} [salePriceAmount1000] ProductSnapshot salePriceAmount1000 - */ - - /** - * Constructs a new ProductSnapshot. - * @memberof proto - * @classdesc Represents a ProductSnapshot. - * @implements IProductSnapshot - * @constructor - * @param {proto.IProductSnapshot=} [properties] Properties to set - */ - function ProductSnapshot(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]]; - } - - /** - * ProductSnapshot productImage. - * @member {proto.IImageMessage|null|undefined} productImage - * @memberof proto.ProductSnapshot - * @instance - */ - ProductSnapshot.prototype.productImage = null; - - /** - * ProductSnapshot productId. - * @member {string} productId - * @memberof proto.ProductSnapshot - * @instance - */ - ProductSnapshot.prototype.productId = ""; - - /** - * ProductSnapshot title. - * @member {string} title - * @memberof proto.ProductSnapshot - * @instance - */ - ProductSnapshot.prototype.title = ""; - - /** - * ProductSnapshot description. - * @member {string} description - * @memberof proto.ProductSnapshot - * @instance - */ - ProductSnapshot.prototype.description = ""; - - /** - * ProductSnapshot currencyCode. - * @member {string} currencyCode - * @memberof proto.ProductSnapshot - * @instance - */ - ProductSnapshot.prototype.currencyCode = ""; - - /** - * ProductSnapshot priceAmount1000. - * @member {number|Long} priceAmount1000 - * @memberof proto.ProductSnapshot - * @instance - */ - ProductSnapshot.prototype.priceAmount1000 = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ProductSnapshot retailerId. - * @member {string} retailerId - * @memberof proto.ProductSnapshot - * @instance - */ - ProductSnapshot.prototype.retailerId = ""; - - /** - * ProductSnapshot url. - * @member {string} url - * @memberof proto.ProductSnapshot - * @instance - */ - ProductSnapshot.prototype.url = ""; - - /** - * ProductSnapshot productImageCount. - * @member {number} productImageCount - * @memberof proto.ProductSnapshot - * @instance - */ - ProductSnapshot.prototype.productImageCount = 0; - - /** - * ProductSnapshot firstImageId. - * @member {string} firstImageId - * @memberof proto.ProductSnapshot - * @instance - */ - ProductSnapshot.prototype.firstImageId = ""; - - /** - * ProductSnapshot salePriceAmount1000. - * @member {number|Long} salePriceAmount1000 - * @memberof proto.ProductSnapshot - * @instance - */ - ProductSnapshot.prototype.salePriceAmount1000 = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new ProductSnapshot instance using the specified properties. - * @function create - * @memberof proto.ProductSnapshot - * @static - * @param {proto.IProductSnapshot=} [properties] Properties to set - * @returns {proto.ProductSnapshot} ProductSnapshot instance - */ - ProductSnapshot.create = function create(properties) { - return new ProductSnapshot(properties); - }; - - /** - * Encodes the specified ProductSnapshot message. Does not implicitly {@link proto.ProductSnapshot.verify|verify} messages. - * @function encode - * @memberof proto.ProductSnapshot - * @static - * @param {proto.IProductSnapshot} message ProductSnapshot message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProductSnapshot.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.productImage != null && Object.hasOwnProperty.call(message, "productImage")) - $root.proto.ImageMessage.encode(message.productImage, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.productId != null && Object.hasOwnProperty.call(message, "productId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.productId); - if (message.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.title); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); - if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.currencyCode); - if (message.priceAmount1000 != null && Object.hasOwnProperty.call(message, "priceAmount1000")) - writer.uint32(/* id 6, wireType 0 =*/48).int64(message.priceAmount1000); - if (message.retailerId != null && Object.hasOwnProperty.call(message, "retailerId")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.retailerId); - if (message.url != null && Object.hasOwnProperty.call(message, "url")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.url); - if (message.productImageCount != null && Object.hasOwnProperty.call(message, "productImageCount")) - writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.productImageCount); - if (message.firstImageId != null && Object.hasOwnProperty.call(message, "firstImageId")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.firstImageId); - if (message.salePriceAmount1000 != null && Object.hasOwnProperty.call(message, "salePriceAmount1000")) - writer.uint32(/* id 12, wireType 0 =*/96).int64(message.salePriceAmount1000); - return writer; - }; - - /** - * Encodes the specified ProductSnapshot message, length delimited. Does not implicitly {@link proto.ProductSnapshot.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.ProductSnapshot - * @static - * @param {proto.IProductSnapshot} message ProductSnapshot message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProductSnapshot.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ProductSnapshot message from the specified reader or buffer. - * @function decode - * @memberof proto.ProductSnapshot - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.ProductSnapshot} ProductSnapshot - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProductSnapshot.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.ProductSnapshot(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.productImage = $root.proto.ImageMessage.decode(reader, reader.uint32()); - break; - case 2: - message.productId = reader.string(); - break; - case 3: - message.title = reader.string(); - break; - case 4: - message.description = reader.string(); - break; - case 5: - message.currencyCode = reader.string(); - break; - case 6: - message.priceAmount1000 = reader.int64(); - break; - case 7: - message.retailerId = reader.string(); - break; - case 8: - message.url = reader.string(); - break; - case 9: - message.productImageCount = reader.uint32(); - break; - case 11: - message.firstImageId = reader.string(); - break; - case 12: - message.salePriceAmount1000 = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ProductSnapshot message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.ProductSnapshot - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ProductSnapshot} ProductSnapshot - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProductSnapshot.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ProductSnapshot message. - * @function verify - * @memberof proto.ProductSnapshot - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ProductSnapshot.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.productImage != null && message.hasOwnProperty("productImage")) { - var error = $root.proto.ImageMessage.verify(message.productImage); - if (error) - return "productImage." + error; - } - if (message.productId != null && message.hasOwnProperty("productId")) - if (!$util.isString(message.productId)) - return "productId: 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.currencyCode != null && message.hasOwnProperty("currencyCode")) - if (!$util.isString(message.currencyCode)) - return "currencyCode: string expected"; - if (message.priceAmount1000 != null && message.hasOwnProperty("priceAmount1000")) - if (!$util.isInteger(message.priceAmount1000) && !(message.priceAmount1000 && $util.isInteger(message.priceAmount1000.low) && $util.isInteger(message.priceAmount1000.high))) - return "priceAmount1000: integer|Long expected"; - if (message.retailerId != null && message.hasOwnProperty("retailerId")) - if (!$util.isString(message.retailerId)) - return "retailerId: string expected"; - if (message.url != null && message.hasOwnProperty("url")) - if (!$util.isString(message.url)) - return "url: string expected"; - if (message.productImageCount != null && message.hasOwnProperty("productImageCount")) - if (!$util.isInteger(message.productImageCount)) - return "productImageCount: integer expected"; - if (message.firstImageId != null && message.hasOwnProperty("firstImageId")) - if (!$util.isString(message.firstImageId)) - return "firstImageId: string expected"; - if (message.salePriceAmount1000 != null && message.hasOwnProperty("salePriceAmount1000")) - if (!$util.isInteger(message.salePriceAmount1000) && !(message.salePriceAmount1000 && $util.isInteger(message.salePriceAmount1000.low) && $util.isInteger(message.salePriceAmount1000.high))) - return "salePriceAmount1000: integer|Long expected"; - return null; - }; - - /** - * Creates a ProductSnapshot message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.ProductSnapshot - * @static - * @param {Object.} object Plain object - * @returns {proto.ProductSnapshot} ProductSnapshot - */ - ProductSnapshot.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ProductSnapshot) - return object; - var message = new $root.proto.ProductSnapshot(); - if (object.productImage != null) { - if (typeof object.productImage !== "object") - throw TypeError(".proto.ProductSnapshot.productImage: object expected"); - message.productImage = $root.proto.ImageMessage.fromObject(object.productImage); - } - if (object.productId != null) - message.productId = String(object.productId); - if (object.title != null) - message.title = String(object.title); - if (object.description != null) - message.description = String(object.description); - if (object.currencyCode != null) - message.currencyCode = String(object.currencyCode); - if (object.priceAmount1000 != null) - if ($util.Long) - (message.priceAmount1000 = $util.Long.fromValue(object.priceAmount1000)).unsigned = false; - else if (typeof object.priceAmount1000 === "string") - message.priceAmount1000 = parseInt(object.priceAmount1000, 10); - else if (typeof object.priceAmount1000 === "number") - message.priceAmount1000 = object.priceAmount1000; - else if (typeof object.priceAmount1000 === "object") - message.priceAmount1000 = new $util.LongBits(object.priceAmount1000.low >>> 0, object.priceAmount1000.high >>> 0).toNumber(); - if (object.retailerId != null) - message.retailerId = String(object.retailerId); - if (object.url != null) - message.url = String(object.url); - if (object.productImageCount != null) - message.productImageCount = object.productImageCount >>> 0; - if (object.firstImageId != null) - message.firstImageId = String(object.firstImageId); - if (object.salePriceAmount1000 != null) - if ($util.Long) - (message.salePriceAmount1000 = $util.Long.fromValue(object.salePriceAmount1000)).unsigned = false; - else if (typeof object.salePriceAmount1000 === "string") - message.salePriceAmount1000 = parseInt(object.salePriceAmount1000, 10); - else if (typeof object.salePriceAmount1000 === "number") - message.salePriceAmount1000 = object.salePriceAmount1000; - else if (typeof object.salePriceAmount1000 === "object") - message.salePriceAmount1000 = new $util.LongBits(object.salePriceAmount1000.low >>> 0, object.salePriceAmount1000.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a ProductSnapshot message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.ProductSnapshot - * @static - * @param {proto.ProductSnapshot} message ProductSnapshot - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ProductSnapshot.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.productImage = null; - object.productId = ""; - object.title = ""; - object.description = ""; - object.currencyCode = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.priceAmount1000 = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.priceAmount1000 = options.longs === String ? "0" : 0; - object.retailerId = ""; - object.url = ""; - object.productImageCount = 0; - object.firstImageId = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.salePriceAmount1000 = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.salePriceAmount1000 = options.longs === String ? "0" : 0; - } - if (message.productImage != null && message.hasOwnProperty("productImage")) - object.productImage = $root.proto.ImageMessage.toObject(message.productImage, options); - if (message.productId != null && message.hasOwnProperty("productId")) - object.productId = message.productId; - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) - object.currencyCode = message.currencyCode; - if (message.priceAmount1000 != null && message.hasOwnProperty("priceAmount1000")) - if (typeof message.priceAmount1000 === "number") - object.priceAmount1000 = options.longs === String ? String(message.priceAmount1000) : message.priceAmount1000; - else - object.priceAmount1000 = options.longs === String ? $util.Long.prototype.toString.call(message.priceAmount1000) : options.longs === Number ? new $util.LongBits(message.priceAmount1000.low >>> 0, message.priceAmount1000.high >>> 0).toNumber() : message.priceAmount1000; - if (message.retailerId != null && message.hasOwnProperty("retailerId")) - object.retailerId = message.retailerId; - if (message.url != null && message.hasOwnProperty("url")) - object.url = message.url; - if (message.productImageCount != null && message.hasOwnProperty("productImageCount")) - object.productImageCount = message.productImageCount; - if (message.firstImageId != null && message.hasOwnProperty("firstImageId")) - object.firstImageId = message.firstImageId; - if (message.salePriceAmount1000 != null && message.hasOwnProperty("salePriceAmount1000")) - if (typeof message.salePriceAmount1000 === "number") - object.salePriceAmount1000 = options.longs === String ? String(message.salePriceAmount1000) : message.salePriceAmount1000; - else - object.salePriceAmount1000 = options.longs === String ? $util.Long.prototype.toString.call(message.salePriceAmount1000) : options.longs === Number ? new $util.LongBits(message.salePriceAmount1000.low >>> 0, message.salePriceAmount1000.high >>> 0).toNumber() : message.salePriceAmount1000; - return object; - }; - - /** - * Converts this ProductSnapshot to JSON. - * @function toJSON - * @memberof proto.ProductSnapshot - * @instance - * @returns {Object.} JSON object - */ - ProductSnapshot.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ProductSnapshot; - })(); - - proto.ProtocolMessage = (function() { - - /** - * Properties of a ProtocolMessage. - * @memberof proto - * @interface IProtocolMessage - * @property {proto.IMessageKey|null} [key] ProtocolMessage key - * @property {proto.ProtocolMessage.ProtocolMessageType|null} [type] ProtocolMessage type - * @property {number|null} [ephemeralExpiration] ProtocolMessage ephemeralExpiration - * @property {number|Long|null} [ephemeralSettingTimestamp] ProtocolMessage ephemeralSettingTimestamp - * @property {proto.IHistorySyncNotification|null} [historySyncNotification] ProtocolMessage historySyncNotification - * @property {proto.IAppStateSyncKeyShare|null} [appStateSyncKeyShare] ProtocolMessage appStateSyncKeyShare - * @property {proto.IAppStateSyncKeyRequest|null} [appStateSyncKeyRequest] ProtocolMessage appStateSyncKeyRequest - * @property {proto.IInitialSecurityNotificationSettingSync|null} [initialSecurityNotificationSettingSync] ProtocolMessage initialSecurityNotificationSettingSync - * @property {proto.IAppStateFatalExceptionNotification|null} [appStateFatalExceptionNotification] ProtocolMessage appStateFatalExceptionNotification - * @property {proto.IDisappearingMode|null} [disappearingMode] ProtocolMessage disappearingMode - */ - - /** - * Constructs a new ProtocolMessage. - * @memberof proto - * @classdesc Represents a ProtocolMessage. - * @implements IProtocolMessage - * @constructor - * @param {proto.IProtocolMessage=} [properties] Properties to set - */ - function ProtocolMessage(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]]; - } - - /** - * ProtocolMessage key. - * @member {proto.IMessageKey|null|undefined} key - * @memberof proto.ProtocolMessage - * @instance - */ - ProtocolMessage.prototype.key = null; - - /** - * ProtocolMessage type. - * @member {proto.ProtocolMessage.ProtocolMessageType} type - * @memberof proto.ProtocolMessage - * @instance - */ - ProtocolMessage.prototype.type = 0; - - /** - * ProtocolMessage ephemeralExpiration. - * @member {number} ephemeralExpiration - * @memberof proto.ProtocolMessage - * @instance - */ - ProtocolMessage.prototype.ephemeralExpiration = 0; - - /** - * ProtocolMessage ephemeralSettingTimestamp. - * @member {number|Long} ephemeralSettingTimestamp - * @memberof proto.ProtocolMessage - * @instance - */ - ProtocolMessage.prototype.ephemeralSettingTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ProtocolMessage historySyncNotification. - * @member {proto.IHistorySyncNotification|null|undefined} historySyncNotification - * @memberof proto.ProtocolMessage - * @instance - */ - ProtocolMessage.prototype.historySyncNotification = null; - - /** - * ProtocolMessage appStateSyncKeyShare. - * @member {proto.IAppStateSyncKeyShare|null|undefined} appStateSyncKeyShare - * @memberof proto.ProtocolMessage - * @instance - */ - ProtocolMessage.prototype.appStateSyncKeyShare = null; - - /** - * ProtocolMessage appStateSyncKeyRequest. - * @member {proto.IAppStateSyncKeyRequest|null|undefined} appStateSyncKeyRequest - * @memberof proto.ProtocolMessage - * @instance - */ - ProtocolMessage.prototype.appStateSyncKeyRequest = null; - - /** - * ProtocolMessage initialSecurityNotificationSettingSync. - * @member {proto.IInitialSecurityNotificationSettingSync|null|undefined} initialSecurityNotificationSettingSync - * @memberof proto.ProtocolMessage - * @instance - */ - ProtocolMessage.prototype.initialSecurityNotificationSettingSync = null; - - /** - * ProtocolMessage appStateFatalExceptionNotification. - * @member {proto.IAppStateFatalExceptionNotification|null|undefined} appStateFatalExceptionNotification - * @memberof proto.ProtocolMessage - * @instance - */ - ProtocolMessage.prototype.appStateFatalExceptionNotification = null; - - /** - * ProtocolMessage disappearingMode. - * @member {proto.IDisappearingMode|null|undefined} disappearingMode - * @memberof proto.ProtocolMessage - * @instance - */ - ProtocolMessage.prototype.disappearingMode = null; - - /** - * Creates a new ProtocolMessage instance using the specified properties. - * @function create - * @memberof proto.ProtocolMessage - * @static - * @param {proto.IProtocolMessage=} [properties] Properties to set - * @returns {proto.ProtocolMessage} ProtocolMessage instance - */ - ProtocolMessage.create = function create(properties) { - return new ProtocolMessage(properties); - }; - - /** - * Encodes the specified ProtocolMessage message. Does not implicitly {@link proto.ProtocolMessage.verify|verify} messages. - * @function encode - * @memberof proto.ProtocolMessage - * @static - * @param {proto.IProtocolMessage} message ProtocolMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProtocolMessage.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.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); - if (message.ephemeralExpiration != null && Object.hasOwnProperty.call(message, "ephemeralExpiration")) - writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.ephemeralExpiration); - if (message.ephemeralSettingTimestamp != null && Object.hasOwnProperty.call(message, "ephemeralSettingTimestamp")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.ephemeralSettingTimestamp); - if (message.historySyncNotification != null && Object.hasOwnProperty.call(message, "historySyncNotification")) - $root.proto.HistorySyncNotification.encode(message.historySyncNotification, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.appStateSyncKeyShare != null && Object.hasOwnProperty.call(message, "appStateSyncKeyShare")) - $root.proto.AppStateSyncKeyShare.encode(message.appStateSyncKeyShare, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.appStateSyncKeyRequest != null && Object.hasOwnProperty.call(message, "appStateSyncKeyRequest")) - $root.proto.AppStateSyncKeyRequest.encode(message.appStateSyncKeyRequest, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.initialSecurityNotificationSettingSync != null && Object.hasOwnProperty.call(message, "initialSecurityNotificationSettingSync")) - $root.proto.InitialSecurityNotificationSettingSync.encode(message.initialSecurityNotificationSettingSync, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.appStateFatalExceptionNotification != null && Object.hasOwnProperty.call(message, "appStateFatalExceptionNotification")) - $root.proto.AppStateFatalExceptionNotification.encode(message.appStateFatalExceptionNotification, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.disappearingMode != null && Object.hasOwnProperty.call(message, "disappearingMode")) - $root.proto.DisappearingMode.encode(message.disappearingMode, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ProtocolMessage message, length delimited. Does not implicitly {@link proto.ProtocolMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.ProtocolMessage - * @static - * @param {proto.IProtocolMessage} message ProtocolMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProtocolMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ProtocolMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.ProtocolMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.ProtocolMessage} ProtocolMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProtocolMessage.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.ProtocolMessage(); - 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.type = reader.int32(); - break; - case 4: - message.ephemeralExpiration = reader.uint32(); - break; - case 5: - message.ephemeralSettingTimestamp = reader.int64(); - break; - case 6: - message.historySyncNotification = $root.proto.HistorySyncNotification.decode(reader, reader.uint32()); - break; - case 7: - message.appStateSyncKeyShare = $root.proto.AppStateSyncKeyShare.decode(reader, reader.uint32()); - break; - case 8: - message.appStateSyncKeyRequest = $root.proto.AppStateSyncKeyRequest.decode(reader, reader.uint32()); - break; - case 9: - message.initialSecurityNotificationSettingSync = $root.proto.InitialSecurityNotificationSettingSync.decode(reader, reader.uint32()); - break; - case 10: - message.appStateFatalExceptionNotification = $root.proto.AppStateFatalExceptionNotification.decode(reader, reader.uint32()); - break; - case 11: - message.disappearingMode = $root.proto.DisappearingMode.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ProtocolMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.ProtocolMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ProtocolMessage} ProtocolMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProtocolMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ProtocolMessage message. - * @function verify - * @memberof proto.ProtocolMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ProtocolMessage.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.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - break; - } - 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.historySyncNotification != null && message.hasOwnProperty("historySyncNotification")) { - var error = $root.proto.HistorySyncNotification.verify(message.historySyncNotification); - if (error) - return "historySyncNotification." + error; - } - if (message.appStateSyncKeyShare != null && message.hasOwnProperty("appStateSyncKeyShare")) { - var error = $root.proto.AppStateSyncKeyShare.verify(message.appStateSyncKeyShare); - if (error) - return "appStateSyncKeyShare." + error; - } - if (message.appStateSyncKeyRequest != null && message.hasOwnProperty("appStateSyncKeyRequest")) { - var error = $root.proto.AppStateSyncKeyRequest.verify(message.appStateSyncKeyRequest); - if (error) - return "appStateSyncKeyRequest." + error; - } - if (message.initialSecurityNotificationSettingSync != null && message.hasOwnProperty("initialSecurityNotificationSettingSync")) { - var error = $root.proto.InitialSecurityNotificationSettingSync.verify(message.initialSecurityNotificationSettingSync); - if (error) - return "initialSecurityNotificationSettingSync." + error; - } - if (message.appStateFatalExceptionNotification != null && message.hasOwnProperty("appStateFatalExceptionNotification")) { - var error = $root.proto.AppStateFatalExceptionNotification.verify(message.appStateFatalExceptionNotification); - if (error) - return "appStateFatalExceptionNotification." + error; - } - if (message.disappearingMode != null && message.hasOwnProperty("disappearingMode")) { - var error = $root.proto.DisappearingMode.verify(message.disappearingMode); - if (error) - return "disappearingMode." + error; - } - return null; - }; - - /** - * Creates a ProtocolMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.ProtocolMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.ProtocolMessage} ProtocolMessage - */ - ProtocolMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ProtocolMessage) - return object; - var message = new $root.proto.ProtocolMessage(); - if (object.key != null) { - if (typeof object.key !== "object") - throw TypeError(".proto.ProtocolMessage.key: object expected"); - message.key = $root.proto.MessageKey.fromObject(object.key); - } - switch (object.type) { - case "REVOKE": - case 0: - message.type = 0; - break; - case "EPHEMERAL_SETTING": - case 3: - message.type = 3; - break; - case "EPHEMERAL_SYNC_RESPONSE": - case 4: - message.type = 4; - break; - case "HISTORY_SYNC_NOTIFICATION": - case 5: - message.type = 5; - break; - case "APP_STATE_SYNC_KEY_SHARE": - case 6: - message.type = 6; - break; - case "APP_STATE_SYNC_KEY_REQUEST": - case 7: - message.type = 7; - break; - case "MSG_FANOUT_BACKFILL_REQUEST": - case 8: - message.type = 8; - break; - case "INITIAL_SECURITY_NOTIFICATION_SETTING_SYNC": - case 9: - message.type = 9; - break; - case "APP_STATE_FATAL_EXCEPTION_NOTIFICATION": - case 10: - message.type = 10; - break; - } - 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(); - if (object.historySyncNotification != null) { - if (typeof object.historySyncNotification !== "object") - throw TypeError(".proto.ProtocolMessage.historySyncNotification: object expected"); - message.historySyncNotification = $root.proto.HistorySyncNotification.fromObject(object.historySyncNotification); - } - if (object.appStateSyncKeyShare != null) { - if (typeof object.appStateSyncKeyShare !== "object") - throw TypeError(".proto.ProtocolMessage.appStateSyncKeyShare: object expected"); - message.appStateSyncKeyShare = $root.proto.AppStateSyncKeyShare.fromObject(object.appStateSyncKeyShare); - } - if (object.appStateSyncKeyRequest != null) { - if (typeof object.appStateSyncKeyRequest !== "object") - throw TypeError(".proto.ProtocolMessage.appStateSyncKeyRequest: object expected"); - message.appStateSyncKeyRequest = $root.proto.AppStateSyncKeyRequest.fromObject(object.appStateSyncKeyRequest); - } - if (object.initialSecurityNotificationSettingSync != null) { - if (typeof object.initialSecurityNotificationSettingSync !== "object") - throw TypeError(".proto.ProtocolMessage.initialSecurityNotificationSettingSync: object expected"); - message.initialSecurityNotificationSettingSync = $root.proto.InitialSecurityNotificationSettingSync.fromObject(object.initialSecurityNotificationSettingSync); - } - if (object.appStateFatalExceptionNotification != null) { - if (typeof object.appStateFatalExceptionNotification !== "object") - throw TypeError(".proto.ProtocolMessage.appStateFatalExceptionNotification: object expected"); - message.appStateFatalExceptionNotification = $root.proto.AppStateFatalExceptionNotification.fromObject(object.appStateFatalExceptionNotification); - } - if (object.disappearingMode != null) { - if (typeof object.disappearingMode !== "object") - throw TypeError(".proto.ProtocolMessage.disappearingMode: object expected"); - message.disappearingMode = $root.proto.DisappearingMode.fromObject(object.disappearingMode); - } - return message; - }; - - /** - * Creates a plain object from a ProtocolMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.ProtocolMessage - * @static - * @param {proto.ProtocolMessage} message ProtocolMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ProtocolMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.key = null; - object.type = options.enums === String ? "REVOKE" : 0; - 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.historySyncNotification = null; - object.appStateSyncKeyShare = null; - object.appStateSyncKeyRequest = null; - object.initialSecurityNotificationSettingSync = null; - object.appStateFatalExceptionNotification = null; - object.disappearingMode = null; - } - if (message.key != null && message.hasOwnProperty("key")) - object.key = $root.proto.MessageKey.toObject(message.key, options); - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.proto.ProtocolMessage.ProtocolMessageType[message.type] : message.type; - 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.historySyncNotification != null && message.hasOwnProperty("historySyncNotification")) - object.historySyncNotification = $root.proto.HistorySyncNotification.toObject(message.historySyncNotification, options); - if (message.appStateSyncKeyShare != null && message.hasOwnProperty("appStateSyncKeyShare")) - object.appStateSyncKeyShare = $root.proto.AppStateSyncKeyShare.toObject(message.appStateSyncKeyShare, options); - if (message.appStateSyncKeyRequest != null && message.hasOwnProperty("appStateSyncKeyRequest")) - object.appStateSyncKeyRequest = $root.proto.AppStateSyncKeyRequest.toObject(message.appStateSyncKeyRequest, options); - if (message.initialSecurityNotificationSettingSync != null && message.hasOwnProperty("initialSecurityNotificationSettingSync")) - object.initialSecurityNotificationSettingSync = $root.proto.InitialSecurityNotificationSettingSync.toObject(message.initialSecurityNotificationSettingSync, options); - if (message.appStateFatalExceptionNotification != null && message.hasOwnProperty("appStateFatalExceptionNotification")) - object.appStateFatalExceptionNotification = $root.proto.AppStateFatalExceptionNotification.toObject(message.appStateFatalExceptionNotification, options); - if (message.disappearingMode != null && message.hasOwnProperty("disappearingMode")) - object.disappearingMode = $root.proto.DisappearingMode.toObject(message.disappearingMode, options); - return object; - }; - - /** - * Converts this ProtocolMessage to JSON. - * @function toJSON - * @memberof proto.ProtocolMessage - * @instance - * @returns {Object.} JSON object - */ - ProtocolMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * ProtocolMessageType enum. - * @name proto.ProtocolMessage.ProtocolMessageType - * @enum {number} - * @property {number} REVOKE=0 REVOKE value - * @property {number} EPHEMERAL_SETTING=3 EPHEMERAL_SETTING value - * @property {number} EPHEMERAL_SYNC_RESPONSE=4 EPHEMERAL_SYNC_RESPONSE value - * @property {number} HISTORY_SYNC_NOTIFICATION=5 HISTORY_SYNC_NOTIFICATION value - * @property {number} APP_STATE_SYNC_KEY_SHARE=6 APP_STATE_SYNC_KEY_SHARE value - * @property {number} APP_STATE_SYNC_KEY_REQUEST=7 APP_STATE_SYNC_KEY_REQUEST value - * @property {number} MSG_FANOUT_BACKFILL_REQUEST=8 MSG_FANOUT_BACKFILL_REQUEST value - * @property {number} INITIAL_SECURITY_NOTIFICATION_SETTING_SYNC=9 INITIAL_SECURITY_NOTIFICATION_SETTING_SYNC value - * @property {number} APP_STATE_FATAL_EXCEPTION_NOTIFICATION=10 APP_STATE_FATAL_EXCEPTION_NOTIFICATION value - */ - ProtocolMessage.ProtocolMessageType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REVOKE"] = 0; - values[valuesById[3] = "EPHEMERAL_SETTING"] = 3; - values[valuesById[4] = "EPHEMERAL_SYNC_RESPONSE"] = 4; - values[valuesById[5] = "HISTORY_SYNC_NOTIFICATION"] = 5; - values[valuesById[6] = "APP_STATE_SYNC_KEY_SHARE"] = 6; - values[valuesById[7] = "APP_STATE_SYNC_KEY_REQUEST"] = 7; - values[valuesById[8] = "MSG_FANOUT_BACKFILL_REQUEST"] = 8; - values[valuesById[9] = "INITIAL_SECURITY_NOTIFICATION_SETTING_SYNC"] = 9; - values[valuesById[10] = "APP_STATE_FATAL_EXCEPTION_NOTIFICATION"] = 10; - return values; - })(); - - 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() { /** @@ -48133,514 +52425,6 @@ $root.proto = (function() { 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() { - - /** - * Properties of a QuickReplyButton. - * @memberof proto - * @interface IQuickReplyButton - * @property {proto.IHighlyStructuredMessage|null} [displayText] QuickReplyButton displayText - * @property {string|null} [id] QuickReplyButton id - */ - - /** - * Constructs a new QuickReplyButton. - * @memberof proto - * @classdesc Represents a QuickReplyButton. - * @implements IQuickReplyButton - * @constructor - * @param {proto.IQuickReplyButton=} [properties] Properties to set - */ - function QuickReplyButton(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]]; - } - - /** - * QuickReplyButton displayText. - * @member {proto.IHighlyStructuredMessage|null|undefined} displayText - * @memberof proto.QuickReplyButton - * @instance - */ - QuickReplyButton.prototype.displayText = null; - - /** - * QuickReplyButton id. - * @member {string} id - * @memberof proto.QuickReplyButton - * @instance - */ - QuickReplyButton.prototype.id = ""; - - /** - * Creates a new QuickReplyButton instance using the specified properties. - * @function create - * @memberof proto.QuickReplyButton - * @static - * @param {proto.IQuickReplyButton=} [properties] Properties to set - * @returns {proto.QuickReplyButton} QuickReplyButton instance - */ - QuickReplyButton.create = function create(properties) { - return new QuickReplyButton(properties); - }; - - /** - * Encodes the specified QuickReplyButton message. Does not implicitly {@link proto.QuickReplyButton.verify|verify} messages. - * @function encode - * @memberof proto.QuickReplyButton - * @static - * @param {proto.IQuickReplyButton} message QuickReplyButton message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QuickReplyButton.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.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); - return writer; - }; - - /** - * Encodes the specified QuickReplyButton message, length delimited. Does not implicitly {@link proto.QuickReplyButton.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.QuickReplyButton - * @static - * @param {proto.IQuickReplyButton} message QuickReplyButton message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QuickReplyButton.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QuickReplyButton message from the specified reader or buffer. - * @function decode - * @memberof proto.QuickReplyButton - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.QuickReplyButton} QuickReplyButton - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QuickReplyButton.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.QuickReplyButton(); - 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.id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QuickReplyButton message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.QuickReplyButton - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.QuickReplyButton} QuickReplyButton - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QuickReplyButton.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QuickReplyButton message. - * @function verify - * @memberof proto.QuickReplyButton - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QuickReplyButton.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.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - return null; - }; - - /** - * Creates a QuickReplyButton message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.QuickReplyButton - * @static - * @param {Object.} object Plain object - * @returns {proto.QuickReplyButton} QuickReplyButton - */ - QuickReplyButton.fromObject = function fromObject(object) { - if (object instanceof $root.proto.QuickReplyButton) - return object; - var message = new $root.proto.QuickReplyButton(); - if (object.displayText != null) { - if (typeof object.displayText !== "object") - throw TypeError(".proto.QuickReplyButton.displayText: object expected"); - message.displayText = $root.proto.HighlyStructuredMessage.fromObject(object.displayText); - } - if (object.id != null) - message.id = String(object.id); - return message; - }; - - /** - * Creates a plain object from a QuickReplyButton message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.QuickReplyButton - * @static - * @param {proto.QuickReplyButton} message QuickReplyButton - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QuickReplyButton.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayText = null; - object.id = ""; - } - if (message.displayText != null && message.hasOwnProperty("displayText")) - object.displayText = $root.proto.HighlyStructuredMessage.toObject(message.displayText, options); - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - return object; - }; - - /** - * Converts this QuickReplyButton to JSON. - * @function toJSON - * @memberof proto.QuickReplyButton - * @instance - * @returns {Object.} JSON object - */ - QuickReplyButton.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QuickReplyButton; - })(); - proto.Reaction = (function() { /** @@ -48936,279 +52720,6 @@ $root.proto = (function() { return Reaction; })(); - proto.ReactionMessage = (function() { - - /** - * Properties of a ReactionMessage. - * @memberof proto - * @interface IReactionMessage - * @property {proto.IMessageKey|null} [key] ReactionMessage key - * @property {string|null} [text] ReactionMessage text - * @property {string|null} [groupingKey] ReactionMessage groupingKey - * @property {number|Long|null} [senderTimestampMs] ReactionMessage senderTimestampMs - */ - - /** - * Constructs a new ReactionMessage. - * @memberof proto - * @classdesc Represents a ReactionMessage. - * @implements IReactionMessage - * @constructor - * @param {proto.IReactionMessage=} [properties] Properties to set - */ - function ReactionMessage(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]]; - } - - /** - * ReactionMessage key. - * @member {proto.IMessageKey|null|undefined} key - * @memberof proto.ReactionMessage - * @instance - */ - ReactionMessage.prototype.key = null; - - /** - * ReactionMessage text. - * @member {string} text - * @memberof proto.ReactionMessage - * @instance - */ - ReactionMessage.prototype.text = ""; - - /** - * ReactionMessage groupingKey. - * @member {string} groupingKey - * @memberof proto.ReactionMessage - * @instance - */ - ReactionMessage.prototype.groupingKey = ""; - - /** - * ReactionMessage senderTimestampMs. - * @member {number|Long} senderTimestampMs - * @memberof proto.ReactionMessage - * @instance - */ - ReactionMessage.prototype.senderTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new ReactionMessage instance using the specified properties. - * @function create - * @memberof proto.ReactionMessage - * @static - * @param {proto.IReactionMessage=} [properties] Properties to set - * @returns {proto.ReactionMessage} ReactionMessage instance - */ - ReactionMessage.create = function create(properties) { - return new ReactionMessage(properties); - }; - - /** - * Encodes the specified ReactionMessage message. Does not implicitly {@link proto.ReactionMessage.verify|verify} messages. - * @function encode - * @memberof proto.ReactionMessage - * @static - * @param {proto.IReactionMessage} message ReactionMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReactionMessage.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); - return writer; - }; - - /** - * Encodes the specified ReactionMessage message, length delimited. Does not implicitly {@link proto.ReactionMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.ReactionMessage - * @static - * @param {proto.IReactionMessage} message ReactionMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReactionMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReactionMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.ReactionMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.ReactionMessage} ReactionMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReactionMessage.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.ReactionMessage(); - 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; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReactionMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.ReactionMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ReactionMessage} ReactionMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReactionMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReactionMessage message. - * @function verify - * @memberof proto.ReactionMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReactionMessage.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"; - return null; - }; - - /** - * Creates a ReactionMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.ReactionMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.ReactionMessage} ReactionMessage - */ - ReactionMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ReactionMessage) - return object; - var message = new $root.proto.ReactionMessage(); - if (object.key != null) { - if (typeof object.key !== "object") - throw TypeError(".proto.ReactionMessage.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(); - return message; - }; - - /** - * Creates a plain object from a ReactionMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.ReactionMessage - * @static - * @param {proto.ReactionMessage} message ReactionMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReactionMessage.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; - } - 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; - return object; - }; - - /** - * Converts this ReactionMessage to JSON. - * @function toJSON - * @memberof proto.ReactionMessage - * @instance - * @returns {Object.} JSON object - */ - ReactionMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ReactionMessage; - })(); - proto.RecentEmojiWeight = (function() { /** @@ -49419,952 +52930,6 @@ $root.proto = (function() { 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() { /** @@ -50601,1266 +53166,6 @@ $root.proto = (function() { return RecordStructure; })(); - proto.RequestPaymentMessage = (function() { - - /** - * Properties of a RequestPaymentMessage. - * @memberof proto - * @interface IRequestPaymentMessage - * @property {proto.IMessage|null} [noteMessage] RequestPaymentMessage noteMessage - * @property {string|null} [currencyCodeIso4217] RequestPaymentMessage currencyCodeIso4217 - * @property {number|Long|null} [amount1000] RequestPaymentMessage amount1000 - * @property {string|null} [requestFrom] RequestPaymentMessage requestFrom - * @property {number|Long|null} [expiryTimestamp] RequestPaymentMessage expiryTimestamp - * @property {proto.IMoney|null} [amount] RequestPaymentMessage amount - * @property {proto.IPaymentBackground|null} [background] RequestPaymentMessage background - */ - - /** - * Constructs a new RequestPaymentMessage. - * @memberof proto - * @classdesc Represents a RequestPaymentMessage. - * @implements IRequestPaymentMessage - * @constructor - * @param {proto.IRequestPaymentMessage=} [properties] Properties to set - */ - function RequestPaymentMessage(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]]; - } - - /** - * RequestPaymentMessage noteMessage. - * @member {proto.IMessage|null|undefined} noteMessage - * @memberof proto.RequestPaymentMessage - * @instance - */ - RequestPaymentMessage.prototype.noteMessage = null; - - /** - * RequestPaymentMessage currencyCodeIso4217. - * @member {string} currencyCodeIso4217 - * @memberof proto.RequestPaymentMessage - * @instance - */ - RequestPaymentMessage.prototype.currencyCodeIso4217 = ""; - - /** - * RequestPaymentMessage amount1000. - * @member {number|Long} amount1000 - * @memberof proto.RequestPaymentMessage - * @instance - */ - RequestPaymentMessage.prototype.amount1000 = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * RequestPaymentMessage requestFrom. - * @member {string} requestFrom - * @memberof proto.RequestPaymentMessage - * @instance - */ - RequestPaymentMessage.prototype.requestFrom = ""; - - /** - * RequestPaymentMessage expiryTimestamp. - * @member {number|Long} expiryTimestamp - * @memberof proto.RequestPaymentMessage - * @instance - */ - RequestPaymentMessage.prototype.expiryTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * RequestPaymentMessage amount. - * @member {proto.IMoney|null|undefined} amount - * @memberof proto.RequestPaymentMessage - * @instance - */ - RequestPaymentMessage.prototype.amount = null; - - /** - * RequestPaymentMessage background. - * @member {proto.IPaymentBackground|null|undefined} background - * @memberof proto.RequestPaymentMessage - * @instance - */ - RequestPaymentMessage.prototype.background = null; - - /** - * Creates a new RequestPaymentMessage instance using the specified properties. - * @function create - * @memberof proto.RequestPaymentMessage - * @static - * @param {proto.IRequestPaymentMessage=} [properties] Properties to set - * @returns {proto.RequestPaymentMessage} RequestPaymentMessage instance - */ - RequestPaymentMessage.create = function create(properties) { - return new RequestPaymentMessage(properties); - }; - - /** - * Encodes the specified RequestPaymentMessage message. Does not implicitly {@link proto.RequestPaymentMessage.verify|verify} messages. - * @function encode - * @memberof proto.RequestPaymentMessage - * @static - * @param {proto.IRequestPaymentMessage} message RequestPaymentMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RequestPaymentMessage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.currencyCodeIso4217 != null && Object.hasOwnProperty.call(message, "currencyCodeIso4217")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.currencyCodeIso4217); - if (message.amount1000 != null && Object.hasOwnProperty.call(message, "amount1000")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.amount1000); - if (message.requestFrom != null && Object.hasOwnProperty.call(message, "requestFrom")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestFrom); - if (message.noteMessage != null && Object.hasOwnProperty.call(message, "noteMessage")) - $root.proto.Message.encode(message.noteMessage, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.expiryTimestamp != null && Object.hasOwnProperty.call(message, "expiryTimestamp")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.expiryTimestamp); - if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) - $root.proto.Money.encode(message.amount, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.background != null && Object.hasOwnProperty.call(message, "background")) - $root.proto.PaymentBackground.encode(message.background, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RequestPaymentMessage message, length delimited. Does not implicitly {@link proto.RequestPaymentMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.RequestPaymentMessage - * @static - * @param {proto.IRequestPaymentMessage} message RequestPaymentMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RequestPaymentMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RequestPaymentMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.RequestPaymentMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.RequestPaymentMessage} RequestPaymentMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RequestPaymentMessage.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.RequestPaymentMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 4: - message.noteMessage = $root.proto.Message.decode(reader, reader.uint32()); - break; - case 1: - message.currencyCodeIso4217 = reader.string(); - break; - case 2: - message.amount1000 = reader.uint64(); - break; - case 3: - message.requestFrom = reader.string(); - break; - case 5: - message.expiryTimestamp = reader.int64(); - break; - case 6: - message.amount = $root.proto.Money.decode(reader, reader.uint32()); - break; - case 7: - message.background = $root.proto.PaymentBackground.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RequestPaymentMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.RequestPaymentMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.RequestPaymentMessage} RequestPaymentMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RequestPaymentMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RequestPaymentMessage message. - * @function verify - * @memberof proto.RequestPaymentMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RequestPaymentMessage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.noteMessage != null && message.hasOwnProperty("noteMessage")) { - var error = $root.proto.Message.verify(message.noteMessage); - if (error) - return "noteMessage." + error; - } - if (message.currencyCodeIso4217 != null && message.hasOwnProperty("currencyCodeIso4217")) - if (!$util.isString(message.currencyCodeIso4217)) - return "currencyCodeIso4217: string expected"; - 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.requestFrom != null && message.hasOwnProperty("requestFrom")) - if (!$util.isString(message.requestFrom)) - return "requestFrom: string expected"; - 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.amount != null && message.hasOwnProperty("amount")) { - var error = $root.proto.Money.verify(message.amount); - if (error) - return "amount." + error; - } - if (message.background != null && message.hasOwnProperty("background")) { - var error = $root.proto.PaymentBackground.verify(message.background); - if (error) - return "background." + error; - } - return null; - }; - - /** - * Creates a RequestPaymentMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.RequestPaymentMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.RequestPaymentMessage} RequestPaymentMessage - */ - RequestPaymentMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.RequestPaymentMessage) - return object; - var message = new $root.proto.RequestPaymentMessage(); - if (object.noteMessage != null) { - if (typeof object.noteMessage !== "object") - throw TypeError(".proto.RequestPaymentMessage.noteMessage: object expected"); - message.noteMessage = $root.proto.Message.fromObject(object.noteMessage); - } - if (object.currencyCodeIso4217 != null) - message.currencyCodeIso4217 = String(object.currencyCodeIso4217); - 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.requestFrom != null) - message.requestFrom = String(object.requestFrom); - if (object.expiryTimestamp != null) - if ($util.Long) - (message.expiryTimestamp = $util.Long.fromValue(object.expiryTimestamp)).unsigned = false; - 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(); - if (object.amount != null) { - if (typeof object.amount !== "object") - throw TypeError(".proto.RequestPaymentMessage.amount: object expected"); - message.amount = $root.proto.Money.fromObject(object.amount); - } - if (object.background != null) { - if (typeof object.background !== "object") - throw TypeError(".proto.RequestPaymentMessage.background: object expected"); - message.background = $root.proto.PaymentBackground.fromObject(object.background); - } - return message; - }; - - /** - * Creates a plain object from a RequestPaymentMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.RequestPaymentMessage - * @static - * @param {proto.RequestPaymentMessage} message RequestPaymentMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RequestPaymentMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.currencyCodeIso4217 = ""; - 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.requestFrom = ""; - object.noteMessage = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.expiryTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.expiryTimestamp = options.longs === String ? "0" : 0; - object.amount = null; - object.background = null; - } - if (message.currencyCodeIso4217 != null && message.hasOwnProperty("currencyCodeIso4217")) - object.currencyCodeIso4217 = message.currencyCodeIso4217; - 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.requestFrom != null && message.hasOwnProperty("requestFrom")) - object.requestFrom = message.requestFrom; - if (message.noteMessage != null && message.hasOwnProperty("noteMessage")) - object.noteMessage = $root.proto.Message.toObject(message.noteMessage, 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() : message.expiryTimestamp; - if (message.amount != null && message.hasOwnProperty("amount")) - object.amount = $root.proto.Money.toObject(message.amount, options); - if (message.background != null && message.hasOwnProperty("background")) - object.background = $root.proto.PaymentBackground.toObject(message.background, options); - return object; - }; - - /** - * Converts this RequestPaymentMessage to JSON. - * @function toJSON - * @memberof proto.RequestPaymentMessage - * @instance - * @returns {Object.} JSON object - */ - RequestPaymentMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RequestPaymentMessage; - })(); - - proto.Row = (function() { - - /** - * Properties of a Row. - * @memberof proto - * @interface IRow - * @property {string|null} [title] Row title - * @property {string|null} [description] Row description - * @property {string|null} [rowId] Row rowId - */ - - /** - * Constructs a new Row. - * @memberof proto - * @classdesc Represents a Row. - * @implements IRow - * @constructor - * @param {proto.IRow=} [properties] Properties to set - */ - function Row(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]]; - } - - /** - * Row title. - * @member {string} title - * @memberof proto.Row - * @instance - */ - Row.prototype.title = ""; - - /** - * Row description. - * @member {string} description - * @memberof proto.Row - * @instance - */ - Row.prototype.description = ""; - - /** - * Row rowId. - * @member {string} rowId - * @memberof proto.Row - * @instance - */ - Row.prototype.rowId = ""; - - /** - * Creates a new Row instance using the specified properties. - * @function create - * @memberof proto.Row - * @static - * @param {proto.IRow=} [properties] Properties to set - * @returns {proto.Row} Row instance - */ - Row.create = function create(properties) { - return new Row(properties); - }; - - /** - * Encodes the specified Row message. Does not implicitly {@link proto.Row.verify|verify} messages. - * @function encode - * @memberof proto.Row - * @static - * @param {proto.IRow} message Row message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Row.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.rowId != null && Object.hasOwnProperty.call(message, "rowId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.rowId); - return writer; - }; - - /** - * Encodes the specified Row message, length delimited. Does not implicitly {@link proto.Row.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.Row - * @static - * @param {proto.IRow} message Row message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Row.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Row message from the specified reader or buffer. - * @function decode - * @memberof proto.Row - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.Row} Row - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Row.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.Row(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.rowId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Row message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.Row - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Row} Row - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Row.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Row message. - * @function verify - * @memberof proto.Row - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Row.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object 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.rowId != null && message.hasOwnProperty("rowId")) - if (!$util.isString(message.rowId)) - return "rowId: string expected"; - return null; - }; - - /** - * Creates a Row message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.Row - * @static - * @param {Object.} object Plain object - * @returns {proto.Row} Row - */ - Row.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Row) - return object; - var message = new $root.proto.Row(); - if (object.title != null) - message.title = String(object.title); - if (object.description != null) - message.description = String(object.description); - if (object.rowId != null) - message.rowId = String(object.rowId); - return message; - }; - - /** - * Creates a plain object from a Row message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.Row - * @static - * @param {proto.Row} message Row - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Row.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.title = ""; - object.description = ""; - object.rowId = ""; - } - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.rowId != null && message.hasOwnProperty("rowId")) - object.rowId = message.rowId; - return object; - }; - - /** - * Converts this Row to JSON. - * @function toJSON - * @memberof proto.Row - * @instance - * @returns {Object.} JSON object - */ - Row.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Row; - })(); - - proto.Section = (function() { - - /** - * Properties of a Section. - * @memberof proto - * @interface ISection - * @property {string|null} [title] Section title - * @property {Array.|null} [rows] Section rows - */ - - /** - * Constructs a new Section. - * @memberof proto - * @classdesc Represents a Section. - * @implements ISection - * @constructor - * @param {proto.ISection=} [properties] Properties to set - */ - function Section(properties) { - this.rows = []; - 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]]; - } - - /** - * Section title. - * @member {string} title - * @memberof proto.Section - * @instance - */ - Section.prototype.title = ""; - - /** - * Section rows. - * @member {Array.} rows - * @memberof proto.Section - * @instance - */ - Section.prototype.rows = $util.emptyArray; - - /** - * Creates a new Section instance using the specified properties. - * @function create - * @memberof proto.Section - * @static - * @param {proto.ISection=} [properties] Properties to set - * @returns {proto.Section} Section instance - */ - Section.create = function create(properties) { - return new Section(properties); - }; - - /** - * Encodes the specified Section message. Does not implicitly {@link proto.Section.verify|verify} messages. - * @function encode - * @memberof proto.Section - * @static - * @param {proto.ISection} message Section message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Section.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.rows != null && message.rows.length) - for (var i = 0; i < message.rows.length; ++i) - $root.proto.Row.encode(message.rows[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Section message, length delimited. Does not implicitly {@link proto.Section.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.Section - * @static - * @param {proto.ISection} message Section message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Section.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Section message from the specified reader or buffer. - * @function decode - * @memberof proto.Section - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.Section} Section - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Section.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.Section(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - if (!(message.rows && message.rows.length)) - message.rows = []; - message.rows.push($root.proto.Row.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Section message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.Section - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Section} Section - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Section.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Section message. - * @function verify - * @memberof proto.Section - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Section.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.rows != null && message.hasOwnProperty("rows")) { - if (!Array.isArray(message.rows)) - return "rows: array expected"; - for (var i = 0; i < message.rows.length; ++i) { - var error = $root.proto.Row.verify(message.rows[i]); - if (error) - return "rows." + error; - } - } - return null; - }; - - /** - * Creates a Section message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.Section - * @static - * @param {Object.} object Plain object - * @returns {proto.Section} Section - */ - Section.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Section) - return object; - var message = new $root.proto.Section(); - if (object.title != null) - message.title = String(object.title); - if (object.rows) { - if (!Array.isArray(object.rows)) - throw TypeError(".proto.Section.rows: array expected"); - message.rows = []; - for (var i = 0; i < object.rows.length; ++i) { - if (typeof object.rows[i] !== "object") - throw TypeError(".proto.Section.rows: object expected"); - message.rows[i] = $root.proto.Row.fromObject(object.rows[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Section message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.Section - * @static - * @param {proto.Section} message Section - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Section.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rows = []; - if (options.defaults) - object.title = ""; - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.rows && message.rows.length) { - object.rows = []; - for (var j = 0; j < message.rows.length; ++j) - object.rows[j] = $root.proto.Row.toObject(message.rows[j], options); - } - return object; - }; - - /** - * Converts this Section to JSON. - * @function toJSON - * @memberof proto.Section - * @instance - * @returns {Object.} JSON object - */ - Section.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Section; - })(); - - 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.SendPaymentMessage = (function() { - - /** - * Properties of a SendPaymentMessage. - * @memberof proto - * @interface ISendPaymentMessage - * @property {proto.IMessage|null} [noteMessage] SendPaymentMessage noteMessage - * @property {proto.IMessageKey|null} [requestMessageKey] SendPaymentMessage requestMessageKey - * @property {proto.IPaymentBackground|null} [background] SendPaymentMessage background - */ - - /** - * Constructs a new SendPaymentMessage. - * @memberof proto - * @classdesc Represents a SendPaymentMessage. - * @implements ISendPaymentMessage - * @constructor - * @param {proto.ISendPaymentMessage=} [properties] Properties to set - */ - function SendPaymentMessage(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]]; - } - - /** - * SendPaymentMessage noteMessage. - * @member {proto.IMessage|null|undefined} noteMessage - * @memberof proto.SendPaymentMessage - * @instance - */ - SendPaymentMessage.prototype.noteMessage = null; - - /** - * SendPaymentMessage requestMessageKey. - * @member {proto.IMessageKey|null|undefined} requestMessageKey - * @memberof proto.SendPaymentMessage - * @instance - */ - SendPaymentMessage.prototype.requestMessageKey = null; - - /** - * SendPaymentMessage background. - * @member {proto.IPaymentBackground|null|undefined} background - * @memberof proto.SendPaymentMessage - * @instance - */ - SendPaymentMessage.prototype.background = null; - - /** - * Creates a new SendPaymentMessage instance using the specified properties. - * @function create - * @memberof proto.SendPaymentMessage - * @static - * @param {proto.ISendPaymentMessage=} [properties] Properties to set - * @returns {proto.SendPaymentMessage} SendPaymentMessage instance - */ - SendPaymentMessage.create = function create(properties) { - return new SendPaymentMessage(properties); - }; - - /** - * Encodes the specified SendPaymentMessage message. Does not implicitly {@link proto.SendPaymentMessage.verify|verify} messages. - * @function encode - * @memberof proto.SendPaymentMessage - * @static - * @param {proto.ISendPaymentMessage} message SendPaymentMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SendPaymentMessage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.noteMessage != null && Object.hasOwnProperty.call(message, "noteMessage")) - $root.proto.Message.encode(message.noteMessage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.requestMessageKey != null && Object.hasOwnProperty.call(message, "requestMessageKey")) - $root.proto.MessageKey.encode(message.requestMessageKey, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.background != null && Object.hasOwnProperty.call(message, "background")) - $root.proto.PaymentBackground.encode(message.background, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SendPaymentMessage message, length delimited. Does not implicitly {@link proto.SendPaymentMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.SendPaymentMessage - * @static - * @param {proto.ISendPaymentMessage} message SendPaymentMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SendPaymentMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SendPaymentMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.SendPaymentMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.SendPaymentMessage} SendPaymentMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SendPaymentMessage.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.SendPaymentMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.noteMessage = $root.proto.Message.decode(reader, reader.uint32()); - break; - case 3: - message.requestMessageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); - break; - case 4: - message.background = $root.proto.PaymentBackground.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SendPaymentMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.SendPaymentMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.SendPaymentMessage} SendPaymentMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SendPaymentMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SendPaymentMessage message. - * @function verify - * @memberof proto.SendPaymentMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SendPaymentMessage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.noteMessage != null && message.hasOwnProperty("noteMessage")) { - var error = $root.proto.Message.verify(message.noteMessage); - if (error) - return "noteMessage." + error; - } - if (message.requestMessageKey != null && message.hasOwnProperty("requestMessageKey")) { - var error = $root.proto.MessageKey.verify(message.requestMessageKey); - if (error) - return "requestMessageKey." + error; - } - if (message.background != null && message.hasOwnProperty("background")) { - var error = $root.proto.PaymentBackground.verify(message.background); - if (error) - return "background." + error; - } - return null; - }; - - /** - * Creates a SendPaymentMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.SendPaymentMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.SendPaymentMessage} SendPaymentMessage - */ - SendPaymentMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.SendPaymentMessage) - return object; - var message = new $root.proto.SendPaymentMessage(); - if (object.noteMessage != null) { - if (typeof object.noteMessage !== "object") - throw TypeError(".proto.SendPaymentMessage.noteMessage: object expected"); - message.noteMessage = $root.proto.Message.fromObject(object.noteMessage); - } - if (object.requestMessageKey != null) { - if (typeof object.requestMessageKey !== "object") - throw TypeError(".proto.SendPaymentMessage.requestMessageKey: object expected"); - message.requestMessageKey = $root.proto.MessageKey.fromObject(object.requestMessageKey); - } - if (object.background != null) { - if (typeof object.background !== "object") - throw TypeError(".proto.SendPaymentMessage.background: object expected"); - message.background = $root.proto.PaymentBackground.fromObject(object.background); - } - return message; - }; - - /** - * Creates a plain object from a SendPaymentMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.SendPaymentMessage - * @static - * @param {proto.SendPaymentMessage} message SendPaymentMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SendPaymentMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.noteMessage = null; - object.requestMessageKey = null; - object.background = null; - } - if (message.noteMessage != null && message.hasOwnProperty("noteMessage")) - object.noteMessage = $root.proto.Message.toObject(message.noteMessage, options); - if (message.requestMessageKey != null && message.hasOwnProperty("requestMessageKey")) - object.requestMessageKey = $root.proto.MessageKey.toObject(message.requestMessageKey, options); - if (message.background != null && message.hasOwnProperty("background")) - object.background = $root.proto.PaymentBackground.toObject(message.background, options); - return object; - }; - - /** - * Converts this SendPaymentMessage to JSON. - * @function toJSON - * @memberof proto.SendPaymentMessage - * @instance - * @returns {Object.} JSON object - */ - SendPaymentMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SendPaymentMessage; - })(); - proto.SenderChainKey = (function() { /** @@ -52080,225 +53385,6 @@ $root.proto = (function() { 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() { /** @@ -53427,265 +54513,6 @@ $root.proto = (function() { 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() { /** @@ -54211,279 +55038,6 @@ $root.proto = (function() { return SessionStructure; })(); - proto.ShopMessage = (function() { - - /** - * Properties of a ShopMessage. - * @memberof proto - * @interface IShopMessage - * @property {string|null} [id] ShopMessage id - * @property {proto.ShopMessage.ShopMessageSurface|null} [surface] ShopMessage surface - * @property {number|null} [messageVersion] ShopMessage messageVersion - */ - - /** - * Constructs a new ShopMessage. - * @memberof proto - * @classdesc Represents a ShopMessage. - * @implements IShopMessage - * @constructor - * @param {proto.IShopMessage=} [properties] Properties to set - */ - function ShopMessage(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]]; - } - - /** - * ShopMessage id. - * @member {string} id - * @memberof proto.ShopMessage - * @instance - */ - ShopMessage.prototype.id = ""; - - /** - * ShopMessage surface. - * @member {proto.ShopMessage.ShopMessageSurface} surface - * @memberof proto.ShopMessage - * @instance - */ - ShopMessage.prototype.surface = 0; - - /** - * ShopMessage messageVersion. - * @member {number} messageVersion - * @memberof proto.ShopMessage - * @instance - */ - ShopMessage.prototype.messageVersion = 0; - - /** - * Creates a new ShopMessage instance using the specified properties. - * @function create - * @memberof proto.ShopMessage - * @static - * @param {proto.IShopMessage=} [properties] Properties to set - * @returns {proto.ShopMessage} ShopMessage instance - */ - ShopMessage.create = function create(properties) { - return new ShopMessage(properties); - }; - - /** - * Encodes the specified ShopMessage message. Does not implicitly {@link proto.ShopMessage.verify|verify} messages. - * @function encode - * @memberof proto.ShopMessage - * @static - * @param {proto.IShopMessage} message ShopMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ShopMessage.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.surface != null && Object.hasOwnProperty.call(message, "surface")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.surface); - if (message.messageVersion != null && Object.hasOwnProperty.call(message, "messageVersion")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.messageVersion); - return writer; - }; - - /** - * Encodes the specified ShopMessage message, length delimited. Does not implicitly {@link proto.ShopMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.ShopMessage - * @static - * @param {proto.IShopMessage} message ShopMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ShopMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ShopMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.ShopMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.ShopMessage} ShopMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ShopMessage.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.ShopMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.surface = reader.int32(); - break; - case 3: - message.messageVersion = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ShopMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.ShopMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.ShopMessage} ShopMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ShopMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ShopMessage message. - * @function verify - * @memberof proto.ShopMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ShopMessage.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.surface != null && message.hasOwnProperty("surface")) - switch (message.surface) { - default: - return "surface: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) - if (!$util.isInteger(message.messageVersion)) - return "messageVersion: integer expected"; - return null; - }; - - /** - * Creates a ShopMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.ShopMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.ShopMessage} ShopMessage - */ - ShopMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.ShopMessage) - return object; - var message = new $root.proto.ShopMessage(); - if (object.id != null) - message.id = String(object.id); - switch (object.surface) { - case "UNKNOWN_SURFACE": - case 0: - message.surface = 0; - break; - case "FB": - case 1: - message.surface = 1; - break; - case "IG": - case 2: - message.surface = 2; - break; - case "WA": - case 3: - message.surface = 3; - break; - } - if (object.messageVersion != null) - message.messageVersion = object.messageVersion | 0; - return message; - }; - - /** - * Creates a plain object from a ShopMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.ShopMessage - * @static - * @param {proto.ShopMessage} message ShopMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ShopMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.id = ""; - object.surface = options.enums === String ? "UNKNOWN_SURFACE" : 0; - object.messageVersion = 0; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.surface != null && message.hasOwnProperty("surface")) - object.surface = options.enums === String ? $root.proto.ShopMessage.ShopMessageSurface[message.surface] : message.surface; - if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) - object.messageVersion = message.messageVersion; - return object; - }; - - /** - * Converts this ShopMessage to JSON. - * @function toJSON - * @memberof proto.ShopMessage - * @instance - * @returns {Object.} JSON object - */ - ShopMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * ShopMessageSurface enum. - * @name proto.ShopMessage.ShopMessageSurface - * @enum {number} - * @property {number} UNKNOWN_SURFACE=0 UNKNOWN_SURFACE value - * @property {number} FB=1 FB value - * @property {number} IG=2 IG value - * @property {number} WA=3 WA value - */ - ShopMessage.ShopMessageSurface = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN_SURFACE"] = 0; - values[valuesById[1] = "FB"] = 1; - values[valuesById[2] = "IG"] = 2; - values[valuesById[3] = "WA"] = 3; - return values; - })(); - - return ShopMessage; - })(); - proto.SignedPreKeyRecordStructure = (function() { /** @@ -54801,380 +55355,6 @@ $root.proto = (function() { return SignedPreKeyRecordStructure; })(); - proto.SingleSelectReply = (function() { - - /** - * Properties of a SingleSelectReply. - * @memberof proto - * @interface ISingleSelectReply - * @property {string|null} [selectedRowId] SingleSelectReply selectedRowId - */ - - /** - * Constructs a new SingleSelectReply. - * @memberof proto - * @classdesc Represents a SingleSelectReply. - * @implements ISingleSelectReply - * @constructor - * @param {proto.ISingleSelectReply=} [properties] Properties to set - */ - function SingleSelectReply(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]]; - } - - /** - * SingleSelectReply selectedRowId. - * @member {string} selectedRowId - * @memberof proto.SingleSelectReply - * @instance - */ - SingleSelectReply.prototype.selectedRowId = ""; - - /** - * Creates a new SingleSelectReply instance using the specified properties. - * @function create - * @memberof proto.SingleSelectReply - * @static - * @param {proto.ISingleSelectReply=} [properties] Properties to set - * @returns {proto.SingleSelectReply} SingleSelectReply instance - */ - SingleSelectReply.create = function create(properties) { - return new SingleSelectReply(properties); - }; - - /** - * Encodes the specified SingleSelectReply message. Does not implicitly {@link proto.SingleSelectReply.verify|verify} messages. - * @function encode - * @memberof proto.SingleSelectReply - * @static - * @param {proto.ISingleSelectReply} message SingleSelectReply message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SingleSelectReply.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selectedRowId != null && Object.hasOwnProperty.call(message, "selectedRowId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selectedRowId); - return writer; - }; - - /** - * Encodes the specified SingleSelectReply message, length delimited. Does not implicitly {@link proto.SingleSelectReply.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.SingleSelectReply - * @static - * @param {proto.ISingleSelectReply} message SingleSelectReply message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SingleSelectReply.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SingleSelectReply message from the specified reader or buffer. - * @function decode - * @memberof proto.SingleSelectReply - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.SingleSelectReply} SingleSelectReply - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SingleSelectReply.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.SingleSelectReply(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selectedRowId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SingleSelectReply message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.SingleSelectReply - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.SingleSelectReply} SingleSelectReply - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SingleSelectReply.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SingleSelectReply message. - * @function verify - * @memberof proto.SingleSelectReply - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SingleSelectReply.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.selectedRowId != null && message.hasOwnProperty("selectedRowId")) - if (!$util.isString(message.selectedRowId)) - return "selectedRowId: string expected"; - return null; - }; - - /** - * Creates a SingleSelectReply message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.SingleSelectReply - * @static - * @param {Object.} object Plain object - * @returns {proto.SingleSelectReply} SingleSelectReply - */ - SingleSelectReply.fromObject = function fromObject(object) { - if (object instanceof $root.proto.SingleSelectReply) - return object; - var message = new $root.proto.SingleSelectReply(); - if (object.selectedRowId != null) - message.selectedRowId = String(object.selectedRowId); - return message; - }; - - /** - * Creates a plain object from a SingleSelectReply message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.SingleSelectReply - * @static - * @param {proto.SingleSelectReply} message SingleSelectReply - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SingleSelectReply.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.selectedRowId = ""; - if (message.selectedRowId != null && message.hasOwnProperty("selectedRowId")) - object.selectedRowId = message.selectedRowId; - return object; - }; - - /** - * Converts this SingleSelectReply to JSON. - * @function toJSON - * @memberof proto.SingleSelectReply - * @instance - * @returns {Object.} JSON object - */ - SingleSelectReply.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - 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() { /** @@ -55413,38 +55593,33 @@ $root.proto = (function() { return StatusPSA; })(); - proto.StickerMessage = (function() { + proto.StickerMetadata = (function() { /** - * Properties of a StickerMessage. + * Properties of a StickerMetadata. * @memberof proto - * @interface IStickerMessage - * @property {string|null} [url] StickerMessage url - * @property {Uint8Array|null} [fileSha256] StickerMessage fileSha256 - * @property {Uint8Array|null} [fileEncSha256] StickerMessage fileEncSha256 - * @property {Uint8Array|null} [mediaKey] StickerMessage mediaKey - * @property {string|null} [mimetype] StickerMessage mimetype - * @property {number|null} [height] StickerMessage height - * @property {number|null} [width] StickerMessage width - * @property {string|null} [directPath] StickerMessage directPath - * @property {number|Long|null} [fileLength] StickerMessage fileLength - * @property {number|Long|null} [mediaKeyTimestamp] StickerMessage mediaKeyTimestamp - * @property {number|null} [firstFrameLength] StickerMessage firstFrameLength - * @property {Uint8Array|null} [firstFrameSidecar] StickerMessage firstFrameSidecar - * @property {boolean|null} [isAnimated] StickerMessage isAnimated - * @property {Uint8Array|null} [pngThumbnail] StickerMessage pngThumbnail - * @property {proto.IContextInfo|null} [contextInfo] StickerMessage contextInfo + * @interface IStickerMetadata + * @property {string|null} [url] StickerMetadata url + * @property {Uint8Array|null} [fileSha256] StickerMetadata fileSha256 + * @property {Uint8Array|null} [fileEncSha256] StickerMetadata fileEncSha256 + * @property {Uint8Array|null} [mediaKey] StickerMetadata mediaKey + * @property {string|null} [mimetype] StickerMetadata mimetype + * @property {number|null} [height] StickerMetadata height + * @property {number|null} [width] StickerMetadata width + * @property {string|null} [directPath] StickerMetadata directPath + * @property {number|Long|null} [fileLength] StickerMetadata fileLength + * @property {number|null} [weight] StickerMetadata weight */ /** - * Constructs a new StickerMessage. + * Constructs a new StickerMetadata. * @memberof proto - * @classdesc Represents a StickerMessage. - * @implements IStickerMessage + * @classdesc Represents a StickerMetadata. + * @implements IStickerMetadata * @constructor - * @param {proto.IStickerMessage=} [properties] Properties to set + * @param {proto.IStickerMetadata=} [properties] Properties to set */ - function StickerMessage(properties) { + function StickerMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -55452,147 +55627,107 @@ $root.proto = (function() { } /** - * StickerMessage url. + * StickerMetadata url. * @member {string} url - * @memberof proto.StickerMessage + * @memberof proto.StickerMetadata * @instance */ - StickerMessage.prototype.url = ""; + StickerMetadata.prototype.url = ""; /** - * StickerMessage fileSha256. + * StickerMetadata fileSha256. * @member {Uint8Array} fileSha256 - * @memberof proto.StickerMessage + * @memberof proto.StickerMetadata * @instance */ - StickerMessage.prototype.fileSha256 = $util.newBuffer([]); + StickerMetadata.prototype.fileSha256 = $util.newBuffer([]); /** - * StickerMessage fileEncSha256. + * StickerMetadata fileEncSha256. * @member {Uint8Array} fileEncSha256 - * @memberof proto.StickerMessage + * @memberof proto.StickerMetadata * @instance */ - StickerMessage.prototype.fileEncSha256 = $util.newBuffer([]); + StickerMetadata.prototype.fileEncSha256 = $util.newBuffer([]); /** - * StickerMessage mediaKey. + * StickerMetadata mediaKey. * @member {Uint8Array} mediaKey - * @memberof proto.StickerMessage + * @memberof proto.StickerMetadata * @instance */ - StickerMessage.prototype.mediaKey = $util.newBuffer([]); + StickerMetadata.prototype.mediaKey = $util.newBuffer([]); /** - * StickerMessage mimetype. + * StickerMetadata mimetype. * @member {string} mimetype - * @memberof proto.StickerMessage + * @memberof proto.StickerMetadata * @instance */ - StickerMessage.prototype.mimetype = ""; + StickerMetadata.prototype.mimetype = ""; /** - * StickerMessage height. + * StickerMetadata height. * @member {number} height - * @memberof proto.StickerMessage + * @memberof proto.StickerMetadata * @instance */ - StickerMessage.prototype.height = 0; + StickerMetadata.prototype.height = 0; /** - * StickerMessage width. + * StickerMetadata width. * @member {number} width - * @memberof proto.StickerMessage + * @memberof proto.StickerMetadata * @instance */ - StickerMessage.prototype.width = 0; + StickerMetadata.prototype.width = 0; /** - * StickerMessage directPath. + * StickerMetadata directPath. * @member {string} directPath - * @memberof proto.StickerMessage + * @memberof proto.StickerMetadata * @instance */ - StickerMessage.prototype.directPath = ""; + StickerMetadata.prototype.directPath = ""; /** - * StickerMessage fileLength. + * StickerMetadata fileLength. * @member {number|Long} fileLength - * @memberof proto.StickerMessage + * @memberof proto.StickerMetadata * @instance */ - StickerMessage.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + StickerMetadata.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** - * StickerMessage mediaKeyTimestamp. - * @member {number|Long} mediaKeyTimestamp - * @memberof proto.StickerMessage + * StickerMetadata weight. + * @member {number} weight + * @memberof proto.StickerMetadata * @instance */ - StickerMessage.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + StickerMetadata.prototype.weight = 0; /** - * StickerMessage firstFrameLength. - * @member {number} firstFrameLength - * @memberof proto.StickerMessage - * @instance - */ - StickerMessage.prototype.firstFrameLength = 0; - - /** - * StickerMessage firstFrameSidecar. - * @member {Uint8Array} firstFrameSidecar - * @memberof proto.StickerMessage - * @instance - */ - StickerMessage.prototype.firstFrameSidecar = $util.newBuffer([]); - - /** - * StickerMessage isAnimated. - * @member {boolean} isAnimated - * @memberof proto.StickerMessage - * @instance - */ - StickerMessage.prototype.isAnimated = false; - - /** - * StickerMessage pngThumbnail. - * @member {Uint8Array} pngThumbnail - * @memberof proto.StickerMessage - * @instance - */ - StickerMessage.prototype.pngThumbnail = $util.newBuffer([]); - - /** - * StickerMessage contextInfo. - * @member {proto.IContextInfo|null|undefined} contextInfo - * @memberof proto.StickerMessage - * @instance - */ - StickerMessage.prototype.contextInfo = null; - - /** - * Creates a new StickerMessage instance using the specified properties. + * Creates a new StickerMetadata instance using the specified properties. * @function create - * @memberof proto.StickerMessage + * @memberof proto.StickerMetadata * @static - * @param {proto.IStickerMessage=} [properties] Properties to set - * @returns {proto.StickerMessage} StickerMessage instance + * @param {proto.IStickerMetadata=} [properties] Properties to set + * @returns {proto.StickerMetadata} StickerMetadata instance */ - StickerMessage.create = function create(properties) { - return new StickerMessage(properties); + StickerMetadata.create = function create(properties) { + return new StickerMetadata(properties); }; /** - * Encodes the specified StickerMessage message. Does not implicitly {@link proto.StickerMessage.verify|verify} messages. + * Encodes the specified StickerMetadata message. Does not implicitly {@link proto.StickerMetadata.verify|verify} messages. * @function encode - * @memberof proto.StickerMessage + * @memberof proto.StickerMetadata * @static - * @param {proto.IStickerMessage} message StickerMessage message or plain object to encode + * @param {proto.IStickerMetadata} message StickerMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StickerMessage.encode = function encode(message, writer) { + StickerMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.url != null && Object.hasOwnProperty.call(message, "url")) @@ -55613,49 +55748,39 @@ $root.proto = (function() { writer.uint32(/* id 8, wireType 2 =*/66).string(message.directPath); if (message.fileLength != null && Object.hasOwnProperty.call(message, "fileLength")) writer.uint32(/* id 9, wireType 0 =*/72).uint64(message.fileLength); - if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp")) - writer.uint32(/* id 10, wireType 0 =*/80).int64(message.mediaKeyTimestamp); - if (message.firstFrameLength != null && Object.hasOwnProperty.call(message, "firstFrameLength")) - writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.firstFrameLength); - if (message.firstFrameSidecar != null && Object.hasOwnProperty.call(message, "firstFrameSidecar")) - writer.uint32(/* id 12, wireType 2 =*/98).bytes(message.firstFrameSidecar); - if (message.isAnimated != null && Object.hasOwnProperty.call(message, "isAnimated")) - writer.uint32(/* id 13, wireType 0 =*/104).bool(message.isAnimated); - if (message.pngThumbnail != null && Object.hasOwnProperty.call(message, "pngThumbnail")) - writer.uint32(/* id 16, wireType 2 =*/130).bytes(message.pngThumbnail); - 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.weight != null && Object.hasOwnProperty.call(message, "weight")) + writer.uint32(/* id 10, wireType 5 =*/85).float(message.weight); return writer; }; /** - * Encodes the specified StickerMessage message, length delimited. Does not implicitly {@link proto.StickerMessage.verify|verify} messages. + * Encodes the specified StickerMetadata message, length delimited. Does not implicitly {@link proto.StickerMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof proto.StickerMessage + * @memberof proto.StickerMetadata * @static - * @param {proto.IStickerMessage} message StickerMessage message or plain object to encode + * @param {proto.IStickerMetadata} message StickerMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StickerMessage.encodeDelimited = function encodeDelimited(message, writer) { + StickerMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StickerMessage message from the specified reader or buffer. + * Decodes a StickerMetadata message from the specified reader or buffer. * @function decode - * @memberof proto.StickerMessage + * @memberof proto.StickerMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.StickerMessage} StickerMessage + * @returns {proto.StickerMetadata} StickerMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StickerMessage.decode = function decode(reader, length) { + StickerMetadata.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.StickerMessage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.StickerMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -55687,22 +55812,7 @@ $root.proto = (function() { message.fileLength = reader.uint64(); break; case 10: - message.mediaKeyTimestamp = reader.int64(); - break; - case 11: - message.firstFrameLength = reader.uint32(); - break; - case 12: - message.firstFrameSidecar = reader.bytes(); - break; - case 13: - message.isAnimated = reader.bool(); - break; - case 16: - message.pngThumbnail = reader.bytes(); - break; - case 17: - message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); + message.weight = reader.float(); break; default: reader.skipType(tag & 7); @@ -55713,30 +55823,30 @@ $root.proto = (function() { }; /** - * Decodes a StickerMessage message from the specified reader or buffer, length delimited. + * Decodes a StickerMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.StickerMessage + * @memberof proto.StickerMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.StickerMessage} StickerMessage + * @returns {proto.StickerMetadata} StickerMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StickerMessage.decodeDelimited = function decodeDelimited(reader) { + StickerMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StickerMessage message. + * Verifies a StickerMetadata message. * @function verify - * @memberof proto.StickerMessage + * @memberof proto.StickerMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StickerMessage.verify = function verify(message) { + StickerMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.url != null && message.hasOwnProperty("url")) @@ -55766,41 +55876,24 @@ $root.proto = (function() { 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.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.firstFrameLength != null && message.hasOwnProperty("firstFrameLength")) - if (!$util.isInteger(message.firstFrameLength)) - return "firstFrameLength: integer expected"; - if (message.firstFrameSidecar != null && message.hasOwnProperty("firstFrameSidecar")) - if (!(message.firstFrameSidecar && typeof message.firstFrameSidecar.length === "number" || $util.isString(message.firstFrameSidecar))) - return "firstFrameSidecar: buffer expected"; - if (message.isAnimated != null && message.hasOwnProperty("isAnimated")) - if (typeof message.isAnimated !== "boolean") - return "isAnimated: boolean expected"; - if (message.pngThumbnail != null && message.hasOwnProperty("pngThumbnail")) - if (!(message.pngThumbnail && typeof message.pngThumbnail.length === "number" || $util.isString(message.pngThumbnail))) - return "pngThumbnail: buffer expected"; - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { - var error = $root.proto.ContextInfo.verify(message.contextInfo); - if (error) - return "contextInfo." + error; - } + if (message.weight != null && message.hasOwnProperty("weight")) + if (typeof message.weight !== "number") + return "weight: number expected"; return null; }; /** - * Creates a StickerMessage message from a plain object. Also converts values to their respective internal types. + * Creates a StickerMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.StickerMessage + * @memberof proto.StickerMetadata * @static * @param {Object.} object Plain object - * @returns {proto.StickerMessage} StickerMessage + * @returns {proto.StickerMetadata} StickerMetadata */ - StickerMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.StickerMessage) + StickerMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.proto.StickerMetadata) return object; - var message = new $root.proto.StickerMessage(); + var message = new $root.proto.StickerMetadata(); if (object.url != null) message.url = String(object.url); if (object.fileSha256 != null) @@ -55835,47 +55928,21 @@ $root.proto = (function() { 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.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.firstFrameLength != null) - message.firstFrameLength = object.firstFrameLength >>> 0; - if (object.firstFrameSidecar != null) - if (typeof object.firstFrameSidecar === "string") - $util.base64.decode(object.firstFrameSidecar, message.firstFrameSidecar = $util.newBuffer($util.base64.length(object.firstFrameSidecar)), 0); - else if (object.firstFrameSidecar.length) - message.firstFrameSidecar = object.firstFrameSidecar; - if (object.isAnimated != null) - message.isAnimated = Boolean(object.isAnimated); - if (object.pngThumbnail != null) - if (typeof object.pngThumbnail === "string") - $util.base64.decode(object.pngThumbnail, message.pngThumbnail = $util.newBuffer($util.base64.length(object.pngThumbnail)), 0); - else if (object.pngThumbnail.length) - message.pngThumbnail = object.pngThumbnail; - if (object.contextInfo != null) { - if (typeof object.contextInfo !== "object") - throw TypeError(".proto.StickerMessage.contextInfo: object expected"); - message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); - } + if (object.weight != null) + message.weight = Number(object.weight); return message; }; /** - * Creates a plain object from a StickerMessage message. Also converts values to other types if specified. + * Creates a plain object from a StickerMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof proto.StickerMessage + * @memberof proto.StickerMetadata * @static - * @param {proto.StickerMessage} message StickerMessage + * @param {proto.StickerMetadata} message StickerMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StickerMessage.toObject = function toObject(message, options) { + StickerMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -55911,28 +55978,7 @@ $root.proto = (function() { object.fileLength = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.fileLength = options.longs === String ? "0" : 0; - 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.firstFrameLength = 0; - if (options.bytes === String) - object.firstFrameSidecar = ""; - else { - object.firstFrameSidecar = []; - if (options.bytes !== Array) - object.firstFrameSidecar = $util.newBuffer(object.firstFrameSidecar); - } - object.isAnimated = false; - if (options.bytes === String) - object.pngThumbnail = ""; - else { - object.pngThumbnail = []; - if (options.bytes !== Array) - object.pngThumbnail = $util.newBuffer(object.pngThumbnail); - } - object.contextInfo = null; + object.weight = 0; } if (message.url != null && message.hasOwnProperty("url")) object.url = message.url; @@ -55955,545 +56001,23 @@ $root.proto = (function() { 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.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.firstFrameLength != null && message.hasOwnProperty("firstFrameLength")) - object.firstFrameLength = message.firstFrameLength; - if (message.firstFrameSidecar != null && message.hasOwnProperty("firstFrameSidecar")) - object.firstFrameSidecar = options.bytes === String ? $util.base64.encode(message.firstFrameSidecar, 0, message.firstFrameSidecar.length) : options.bytes === Array ? Array.prototype.slice.call(message.firstFrameSidecar) : message.firstFrameSidecar; - if (message.isAnimated != null && message.hasOwnProperty("isAnimated")) - object.isAnimated = message.isAnimated; - if (message.pngThumbnail != null && message.hasOwnProperty("pngThumbnail")) - object.pngThumbnail = options.bytes === String ? $util.base64.encode(message.pngThumbnail, 0, message.pngThumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.pngThumbnail) : message.pngThumbnail; - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) - object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + if (message.weight != null && message.hasOwnProperty("weight")) + object.weight = options.json && !isFinite(message.weight) ? String(message.weight) : message.weight; return object; }; /** - * Converts this StickerMessage to JSON. + * Converts this StickerMetadata to JSON. * @function toJSON - * @memberof proto.StickerMessage + * @memberof proto.StickerMetadata * @instance * @returns {Object.} JSON object */ - StickerMessage.prototype.toJSON = function toJSON() { + StickerMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return StickerMessage; - })(); - - proto.StickerSyncRMRMessage = (function() { - - /** - * Properties of a StickerSyncRMRMessage. - * @memberof proto - * @interface IStickerSyncRMRMessage - * @property {Array.|null} [filehash] StickerSyncRMRMessage filehash - * @property {string|null} [rmrSource] StickerSyncRMRMessage rmrSource - * @property {number|Long|null} [requestTimestamp] StickerSyncRMRMessage requestTimestamp - */ - - /** - * Constructs a new StickerSyncRMRMessage. - * @memberof proto - * @classdesc Represents a StickerSyncRMRMessage. - * @implements IStickerSyncRMRMessage - * @constructor - * @param {proto.IStickerSyncRMRMessage=} [properties] Properties to set - */ - function StickerSyncRMRMessage(properties) { - this.filehash = []; - 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]]; - } - - /** - * StickerSyncRMRMessage filehash. - * @member {Array.} filehash - * @memberof proto.StickerSyncRMRMessage - * @instance - */ - StickerSyncRMRMessage.prototype.filehash = $util.emptyArray; - - /** - * StickerSyncRMRMessage rmrSource. - * @member {string} rmrSource - * @memberof proto.StickerSyncRMRMessage - * @instance - */ - StickerSyncRMRMessage.prototype.rmrSource = ""; - - /** - * StickerSyncRMRMessage requestTimestamp. - * @member {number|Long} requestTimestamp - * @memberof proto.StickerSyncRMRMessage - * @instance - */ - StickerSyncRMRMessage.prototype.requestTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new StickerSyncRMRMessage instance using the specified properties. - * @function create - * @memberof proto.StickerSyncRMRMessage - * @static - * @param {proto.IStickerSyncRMRMessage=} [properties] Properties to set - * @returns {proto.StickerSyncRMRMessage} StickerSyncRMRMessage instance - */ - StickerSyncRMRMessage.create = function create(properties) { - return new StickerSyncRMRMessage(properties); - }; - - /** - * Encodes the specified StickerSyncRMRMessage message. Does not implicitly {@link proto.StickerSyncRMRMessage.verify|verify} messages. - * @function encode - * @memberof proto.StickerSyncRMRMessage - * @static - * @param {proto.IStickerSyncRMRMessage} message StickerSyncRMRMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StickerSyncRMRMessage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.filehash != null && message.filehash.length) - for (var i = 0; i < message.filehash.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.filehash[i]); - if (message.rmrSource != null && Object.hasOwnProperty.call(message, "rmrSource")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.rmrSource); - if (message.requestTimestamp != null && Object.hasOwnProperty.call(message, "requestTimestamp")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.requestTimestamp); - return writer; - }; - - /** - * Encodes the specified StickerSyncRMRMessage message, length delimited. Does not implicitly {@link proto.StickerSyncRMRMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.StickerSyncRMRMessage - * @static - * @param {proto.IStickerSyncRMRMessage} message StickerSyncRMRMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StickerSyncRMRMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StickerSyncRMRMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.StickerSyncRMRMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.StickerSyncRMRMessage} StickerSyncRMRMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StickerSyncRMRMessage.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.StickerSyncRMRMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.filehash && message.filehash.length)) - message.filehash = []; - message.filehash.push(reader.string()); - break; - case 2: - message.rmrSource = reader.string(); - break; - case 3: - message.requestTimestamp = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StickerSyncRMRMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.StickerSyncRMRMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.StickerSyncRMRMessage} StickerSyncRMRMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StickerSyncRMRMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StickerSyncRMRMessage message. - * @function verify - * @memberof proto.StickerSyncRMRMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StickerSyncRMRMessage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.filehash != null && message.hasOwnProperty("filehash")) { - if (!Array.isArray(message.filehash)) - return "filehash: array expected"; - for (var i = 0; i < message.filehash.length; ++i) - if (!$util.isString(message.filehash[i])) - return "filehash: string[] expected"; - } - if (message.rmrSource != null && message.hasOwnProperty("rmrSource")) - if (!$util.isString(message.rmrSource)) - return "rmrSource: string expected"; - if (message.requestTimestamp != null && message.hasOwnProperty("requestTimestamp")) - if (!$util.isInteger(message.requestTimestamp) && !(message.requestTimestamp && $util.isInteger(message.requestTimestamp.low) && $util.isInteger(message.requestTimestamp.high))) - return "requestTimestamp: integer|Long expected"; - return null; - }; - - /** - * Creates a StickerSyncRMRMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.StickerSyncRMRMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.StickerSyncRMRMessage} StickerSyncRMRMessage - */ - StickerSyncRMRMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.StickerSyncRMRMessage) - return object; - var message = new $root.proto.StickerSyncRMRMessage(); - if (object.filehash) { - if (!Array.isArray(object.filehash)) - throw TypeError(".proto.StickerSyncRMRMessage.filehash: array expected"); - message.filehash = []; - for (var i = 0; i < object.filehash.length; ++i) - message.filehash[i] = String(object.filehash[i]); - } - if (object.rmrSource != null) - message.rmrSource = String(object.rmrSource); - if (object.requestTimestamp != null) - if ($util.Long) - (message.requestTimestamp = $util.Long.fromValue(object.requestTimestamp)).unsigned = false; - else if (typeof object.requestTimestamp === "string") - message.requestTimestamp = parseInt(object.requestTimestamp, 10); - else if (typeof object.requestTimestamp === "number") - message.requestTimestamp = object.requestTimestamp; - else if (typeof object.requestTimestamp === "object") - message.requestTimestamp = new $util.LongBits(object.requestTimestamp.low >>> 0, object.requestTimestamp.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a StickerSyncRMRMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.StickerSyncRMRMessage - * @static - * @param {proto.StickerSyncRMRMessage} message StickerSyncRMRMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StickerSyncRMRMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.filehash = []; - if (options.defaults) { - object.rmrSource = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.requestTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.requestTimestamp = options.longs === String ? "0" : 0; - } - if (message.filehash && message.filehash.length) { - object.filehash = []; - for (var j = 0; j < message.filehash.length; ++j) - object.filehash[j] = message.filehash[j]; - } - if (message.rmrSource != null && message.hasOwnProperty("rmrSource")) - object.rmrSource = message.rmrSource; - if (message.requestTimestamp != null && message.hasOwnProperty("requestTimestamp")) - if (typeof message.requestTimestamp === "number") - object.requestTimestamp = options.longs === String ? String(message.requestTimestamp) : message.requestTimestamp; - else - object.requestTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.requestTimestamp) : options.longs === Number ? new $util.LongBits(message.requestTimestamp.low >>> 0, message.requestTimestamp.high >>> 0).toNumber() : message.requestTimestamp; - return object; - }; - - /** - * Converts this StickerSyncRMRMessage to JSON. - * @function toJSON - * @memberof proto.StickerSyncRMRMessage - * @instance - * @returns {Object.} JSON object - */ - StickerSyncRMRMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return StickerSyncRMRMessage; - })(); - - 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; + return StickerMetadata; })(); proto.SyncActionData = (function() { @@ -56773,517 +56297,6 @@ $root.proto = (function() { 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"; - 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(); - break; - case 3: - 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; - } - } - return message; - }; - - /** - * Decodes a SyncActionMessageRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.SyncActionMessageRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SyncActionMessageRange message. - * @function verify - * @memberof proto.SyncActionMessageRange - * @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) { - 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]); - if (error) - return "messages." + error; - } - } - return null; - }; - - /** - * Creates a SyncActionMessageRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.SyncActionMessageRange - * @static - * @param {Object.} object Plain object - * @returns {proto.SyncActionMessageRange} SyncActionMessageRange - */ - SyncActionMessageRange.fromObject = function fromObject(object) { - if (object instanceof $root.proto.SyncActionMessageRange) - 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]); - } - } - return message; - }; - - /** - * Creates a plain object from a SyncActionMessageRange message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.SyncActionMessageRange - * @static - * @param {proto.SyncActionMessageRange} message SyncActionMessageRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SyncActionMessageRange.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 (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); - } - return object; - }; - - /** - * Converts this SyncActionMessageRange to JSON. - * @function toJSON - * @memberof proto.SyncActionMessageRange - * @instance - * @returns {Object.} JSON object - */ - SyncActionMessageRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SyncActionMessageRange; - })(); - proto.SyncActionValue = (function() { /** @@ -57291,34 +56304,33 @@ $root.proto = (function() { * @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 - * @property {proto.INuxAction|null} [nuxAction] SyncActionValue nuxAction + * @property {proto.SyncActionValue.IStarAction|null} [starAction] SyncActionValue starAction + * @property {proto.SyncActionValue.IContactAction|null} [contactAction] SyncActionValue contactAction + * @property {proto.SyncActionValue.IMuteAction|null} [muteAction] SyncActionValue muteAction + * @property {proto.SyncActionValue.IPinAction|null} [pinAction] SyncActionValue pinAction + * @property {proto.SyncActionValue.ISecurityNotificationSetting|null} [securityNotificationSetting] SyncActionValue securityNotificationSetting + * @property {proto.SyncActionValue.IPushNameSetting|null} [pushNameSetting] SyncActionValue pushNameSetting + * @property {proto.SyncActionValue.IQuickReplyAction|null} [quickReplyAction] SyncActionValue quickReplyAction + * @property {proto.SyncActionValue.IRecentEmojiWeightsAction|null} [recentEmojiWeightsAction] SyncActionValue recentEmojiWeightsAction + * @property {proto.SyncActionValue.ILabelEditAction|null} [labelEditAction] SyncActionValue labelEditAction + * @property {proto.SyncActionValue.ILabelAssociationAction|null} [labelAssociationAction] SyncActionValue labelAssociationAction + * @property {proto.SyncActionValue.ILocaleSetting|null} [localeSetting] SyncActionValue localeSetting + * @property {proto.SyncActionValue.IArchiveChatAction|null} [archiveChatAction] SyncActionValue archiveChatAction + * @property {proto.SyncActionValue.IDeleteMessageForMeAction|null} [deleteMessageForMeAction] SyncActionValue deleteMessageForMeAction + * @property {proto.SyncActionValue.IKeyExpiration|null} [keyExpiration] SyncActionValue keyExpiration + * @property {proto.SyncActionValue.IMarkChatAsReadAction|null} [markChatAsReadAction] SyncActionValue markChatAsReadAction + * @property {proto.SyncActionValue.IClearChatAction|null} [clearChatAction] SyncActionValue clearChatAction + * @property {proto.SyncActionValue.IDeleteChatAction|null} [deleteChatAction] SyncActionValue deleteChatAction + * @property {proto.SyncActionValue.IUnarchiveChatsSetting|null} [unarchiveChatsSetting] SyncActionValue unarchiveChatsSetting + * @property {proto.SyncActionValue.IPrimaryFeature|null} [primaryFeature] SyncActionValue primaryFeature + * @property {proto.SyncActionValue.IAndroidUnsupportedActions|null} [androidUnsupportedActions] SyncActionValue androidUnsupportedActions + * @property {proto.SyncActionValue.IAgentAction|null} [agentAction] SyncActionValue agentAction + * @property {proto.SyncActionValue.ISubscriptionAction|null} [subscriptionAction] SyncActionValue subscriptionAction + * @property {proto.SyncActionValue.IUserStatusMuteAction|null} [userStatusMuteAction] SyncActionValue userStatusMuteAction + * @property {proto.SyncActionValue.ITimeFormatAction|null} [timeFormatAction] SyncActionValue timeFormatAction + * @property {proto.SyncActionValue.INuxAction|null} [nuxAction] SyncActionValue nuxAction + * @property {proto.SyncActionValue.IPrimaryVersionAction|null} [primaryVersionAction] SyncActionValue primaryVersionAction + * @property {proto.SyncActionValue.IStickerAction|null} [stickerAction] SyncActionValue stickerAction */ /** @@ -57346,7 +56358,7 @@ $root.proto = (function() { /** * SyncActionValue starAction. - * @member {proto.IStarAction|null|undefined} starAction + * @member {proto.SyncActionValue.IStarAction|null|undefined} starAction * @memberof proto.SyncActionValue * @instance */ @@ -57354,7 +56366,7 @@ $root.proto = (function() { /** * SyncActionValue contactAction. - * @member {proto.IContactAction|null|undefined} contactAction + * @member {proto.SyncActionValue.IContactAction|null|undefined} contactAction * @memberof proto.SyncActionValue * @instance */ @@ -57362,7 +56374,7 @@ $root.proto = (function() { /** * SyncActionValue muteAction. - * @member {proto.IMuteAction|null|undefined} muteAction + * @member {proto.SyncActionValue.IMuteAction|null|undefined} muteAction * @memberof proto.SyncActionValue * @instance */ @@ -57370,7 +56382,7 @@ $root.proto = (function() { /** * SyncActionValue pinAction. - * @member {proto.IPinAction|null|undefined} pinAction + * @member {proto.SyncActionValue.IPinAction|null|undefined} pinAction * @memberof proto.SyncActionValue * @instance */ @@ -57378,7 +56390,7 @@ $root.proto = (function() { /** * SyncActionValue securityNotificationSetting. - * @member {proto.ISecurityNotificationSetting|null|undefined} securityNotificationSetting + * @member {proto.SyncActionValue.ISecurityNotificationSetting|null|undefined} securityNotificationSetting * @memberof proto.SyncActionValue * @instance */ @@ -57386,7 +56398,7 @@ $root.proto = (function() { /** * SyncActionValue pushNameSetting. - * @member {proto.IPushNameSetting|null|undefined} pushNameSetting + * @member {proto.SyncActionValue.IPushNameSetting|null|undefined} pushNameSetting * @memberof proto.SyncActionValue * @instance */ @@ -57394,31 +56406,15 @@ $root.proto = (function() { /** * SyncActionValue quickReplyAction. - * @member {proto.IQuickReplyAction|null|undefined} quickReplyAction + * @member {proto.SyncActionValue.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 + * @member {proto.SyncActionValue.IRecentEmojiWeightsAction|null|undefined} recentEmojiWeightsAction * @memberof proto.SyncActionValue * @instance */ @@ -57426,7 +56422,7 @@ $root.proto = (function() { /** * SyncActionValue labelEditAction. - * @member {proto.ILabelEditAction|null|undefined} labelEditAction + * @member {proto.SyncActionValue.ILabelEditAction|null|undefined} labelEditAction * @memberof proto.SyncActionValue * @instance */ @@ -57434,7 +56430,7 @@ $root.proto = (function() { /** * SyncActionValue labelAssociationAction. - * @member {proto.ILabelAssociationAction|null|undefined} labelAssociationAction + * @member {proto.SyncActionValue.ILabelAssociationAction|null|undefined} labelAssociationAction * @memberof proto.SyncActionValue * @instance */ @@ -57442,7 +56438,7 @@ $root.proto = (function() { /** * SyncActionValue localeSetting. - * @member {proto.ILocaleSetting|null|undefined} localeSetting + * @member {proto.SyncActionValue.ILocaleSetting|null|undefined} localeSetting * @memberof proto.SyncActionValue * @instance */ @@ -57450,7 +56446,7 @@ $root.proto = (function() { /** * SyncActionValue archiveChatAction. - * @member {proto.IArchiveChatAction|null|undefined} archiveChatAction + * @member {proto.SyncActionValue.IArchiveChatAction|null|undefined} archiveChatAction * @memberof proto.SyncActionValue * @instance */ @@ -57458,7 +56454,7 @@ $root.proto = (function() { /** * SyncActionValue deleteMessageForMeAction. - * @member {proto.IDeleteMessageForMeAction|null|undefined} deleteMessageForMeAction + * @member {proto.SyncActionValue.IDeleteMessageForMeAction|null|undefined} deleteMessageForMeAction * @memberof proto.SyncActionValue * @instance */ @@ -57466,7 +56462,7 @@ $root.proto = (function() { /** * SyncActionValue keyExpiration. - * @member {proto.IKeyExpiration|null|undefined} keyExpiration + * @member {proto.SyncActionValue.IKeyExpiration|null|undefined} keyExpiration * @memberof proto.SyncActionValue * @instance */ @@ -57474,7 +56470,7 @@ $root.proto = (function() { /** * SyncActionValue markChatAsReadAction. - * @member {proto.IMarkChatAsReadAction|null|undefined} markChatAsReadAction + * @member {proto.SyncActionValue.IMarkChatAsReadAction|null|undefined} markChatAsReadAction * @memberof proto.SyncActionValue * @instance */ @@ -57482,7 +56478,7 @@ $root.proto = (function() { /** * SyncActionValue clearChatAction. - * @member {proto.IClearChatAction|null|undefined} clearChatAction + * @member {proto.SyncActionValue.IClearChatAction|null|undefined} clearChatAction * @memberof proto.SyncActionValue * @instance */ @@ -57490,7 +56486,7 @@ $root.proto = (function() { /** * SyncActionValue deleteChatAction. - * @member {proto.IDeleteChatAction|null|undefined} deleteChatAction + * @member {proto.SyncActionValue.IDeleteChatAction|null|undefined} deleteChatAction * @memberof proto.SyncActionValue * @instance */ @@ -57498,7 +56494,7 @@ $root.proto = (function() { /** * SyncActionValue unarchiveChatsSetting. - * @member {proto.IUnarchiveChatsSetting|null|undefined} unarchiveChatsSetting + * @member {proto.SyncActionValue.IUnarchiveChatsSetting|null|undefined} unarchiveChatsSetting * @memberof proto.SyncActionValue * @instance */ @@ -57506,23 +56502,15 @@ $root.proto = (function() { /** * SyncActionValue primaryFeature. - * @member {proto.IPrimaryFeature|null|undefined} primaryFeature + * @member {proto.SyncActionValue.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 + * @member {proto.SyncActionValue.IAndroidUnsupportedActions|null|undefined} androidUnsupportedActions * @memberof proto.SyncActionValue * @instance */ @@ -57530,7 +56518,7 @@ $root.proto = (function() { /** * SyncActionValue agentAction. - * @member {proto.IAgentAction|null|undefined} agentAction + * @member {proto.SyncActionValue.IAgentAction|null|undefined} agentAction * @memberof proto.SyncActionValue * @instance */ @@ -57538,7 +56526,7 @@ $root.proto = (function() { /** * SyncActionValue subscriptionAction. - * @member {proto.ISubscriptionAction|null|undefined} subscriptionAction + * @member {proto.SyncActionValue.ISubscriptionAction|null|undefined} subscriptionAction * @memberof proto.SyncActionValue * @instance */ @@ -57546,7 +56534,7 @@ $root.proto = (function() { /** * SyncActionValue userStatusMuteAction. - * @member {proto.IUserStatusMuteAction|null|undefined} userStatusMuteAction + * @member {proto.SyncActionValue.IUserStatusMuteAction|null|undefined} userStatusMuteAction * @memberof proto.SyncActionValue * @instance */ @@ -57554,7 +56542,7 @@ $root.proto = (function() { /** * SyncActionValue timeFormatAction. - * @member {proto.ITimeFormatAction|null|undefined} timeFormatAction + * @member {proto.SyncActionValue.ITimeFormatAction|null|undefined} timeFormatAction * @memberof proto.SyncActionValue * @instance */ @@ -57562,12 +56550,28 @@ $root.proto = (function() { /** * SyncActionValue nuxAction. - * @member {proto.INuxAction|null|undefined} nuxAction + * @member {proto.SyncActionValue.INuxAction|null|undefined} nuxAction * @memberof proto.SyncActionValue * @instance */ SyncActionValue.prototype.nuxAction = null; + /** + * SyncActionValue primaryVersionAction. + * @member {proto.SyncActionValue.IPrimaryVersionAction|null|undefined} primaryVersionAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.primaryVersionAction = null; + + /** + * SyncActionValue stickerAction. + * @member {proto.SyncActionValue.IStickerAction|null|undefined} stickerAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.stickerAction = null; + /** * Creates a new SyncActionValue instance using the specified properties. * @function create @@ -57595,61 +56599,59 @@ $root.proto = (function() { 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(); + $root.proto.SyncActionValue.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(); + $root.proto.SyncActionValue.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(); + $root.proto.SyncActionValue.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(); + $root.proto.SyncActionValue.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(); + $root.proto.SyncActionValue.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(); + $root.proto.SyncActionValue.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(); + $root.proto.SyncActionValue.QuickReplyAction.encode(message.quickReplyAction, writer.uint32(/* id 8, wireType 2 =*/66).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(); + $root.proto.SyncActionValue.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(); + $root.proto.SyncActionValue.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(); + $root.proto.SyncActionValue.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(); + $root.proto.SyncActionValue.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(); + $root.proto.SyncActionValue.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(); + $root.proto.SyncActionValue.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(); + $root.proto.SyncActionValue.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(); + $root.proto.SyncActionValue.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(); + $root.proto.SyncActionValue.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(); + $root.proto.SyncActionValue.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(); + $root.proto.SyncActionValue.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(); + $root.proto.SyncActionValue.PrimaryFeature.encode(message.primaryFeature, writer.uint32(/* id 24, wireType 2 =*/194).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(); + $root.proto.SyncActionValue.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(); + $root.proto.SyncActionValue.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(); + $root.proto.SyncActionValue.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(); + $root.proto.SyncActionValue.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(); + $root.proto.SyncActionValue.TimeFormatAction.encode(message.timeFormatAction, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); if (message.nuxAction != null && Object.hasOwnProperty.call(message, "nuxAction")) - $root.proto.NuxAction.encode(message.nuxAction, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); + $root.proto.SyncActionValue.NuxAction.encode(message.nuxAction, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); + if (message.primaryVersionAction != null && Object.hasOwnProperty.call(message, "primaryVersionAction")) + $root.proto.SyncActionValue.PrimaryVersionAction.encode(message.primaryVersionAction, writer.uint32(/* id 32, wireType 2 =*/258).fork()).ldelim(); + if (message.stickerAction != null && Object.hasOwnProperty.call(message, "stickerAction")) + $root.proto.SyncActionValue.StickerAction.encode(message.stickerAction, writer.uint32(/* id 33, wireType 2 =*/266).fork()).ldelim(); return writer; }; @@ -57688,88 +56690,85 @@ $root.proto = (function() { message.timestamp = reader.int64(); break; case 2: - message.starAction = $root.proto.StarAction.decode(reader, reader.uint32()); + message.starAction = $root.proto.SyncActionValue.StarAction.decode(reader, reader.uint32()); break; case 3: - message.contactAction = $root.proto.ContactAction.decode(reader, reader.uint32()); + message.contactAction = $root.proto.SyncActionValue.ContactAction.decode(reader, reader.uint32()); break; case 4: - message.muteAction = $root.proto.MuteAction.decode(reader, reader.uint32()); + message.muteAction = $root.proto.SyncActionValue.MuteAction.decode(reader, reader.uint32()); break; case 5: - message.pinAction = $root.proto.PinAction.decode(reader, reader.uint32()); + message.pinAction = $root.proto.SyncActionValue.PinAction.decode(reader, reader.uint32()); break; case 6: - message.securityNotificationSetting = $root.proto.SecurityNotificationSetting.decode(reader, reader.uint32()); + message.securityNotificationSetting = $root.proto.SyncActionValue.SecurityNotificationSetting.decode(reader, reader.uint32()); break; case 7: - message.pushNameSetting = $root.proto.PushNameSetting.decode(reader, reader.uint32()); + message.pushNameSetting = $root.proto.SyncActionValue.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()); + message.quickReplyAction = $root.proto.SyncActionValue.QuickReplyAction.decode(reader, reader.uint32()); break; case 11: - message.recentEmojiWeightsAction = $root.proto.RecentEmojiWeightsAction.decode(reader, reader.uint32()); + message.recentEmojiWeightsAction = $root.proto.SyncActionValue.RecentEmojiWeightsAction.decode(reader, reader.uint32()); break; case 14: - message.labelEditAction = $root.proto.LabelEditAction.decode(reader, reader.uint32()); + message.labelEditAction = $root.proto.SyncActionValue.LabelEditAction.decode(reader, reader.uint32()); break; case 15: - message.labelAssociationAction = $root.proto.LabelAssociationAction.decode(reader, reader.uint32()); + message.labelAssociationAction = $root.proto.SyncActionValue.LabelAssociationAction.decode(reader, reader.uint32()); break; case 16: - message.localeSetting = $root.proto.LocaleSetting.decode(reader, reader.uint32()); + message.localeSetting = $root.proto.SyncActionValue.LocaleSetting.decode(reader, reader.uint32()); break; case 17: - message.archiveChatAction = $root.proto.ArchiveChatAction.decode(reader, reader.uint32()); + message.archiveChatAction = $root.proto.SyncActionValue.ArchiveChatAction.decode(reader, reader.uint32()); break; case 18: - message.deleteMessageForMeAction = $root.proto.DeleteMessageForMeAction.decode(reader, reader.uint32()); + message.deleteMessageForMeAction = $root.proto.SyncActionValue.DeleteMessageForMeAction.decode(reader, reader.uint32()); break; case 19: - message.keyExpiration = $root.proto.KeyExpiration.decode(reader, reader.uint32()); + message.keyExpiration = $root.proto.SyncActionValue.KeyExpiration.decode(reader, reader.uint32()); break; case 20: - message.markChatAsReadAction = $root.proto.MarkChatAsReadAction.decode(reader, reader.uint32()); + message.markChatAsReadAction = $root.proto.SyncActionValue.MarkChatAsReadAction.decode(reader, reader.uint32()); break; case 21: - message.clearChatAction = $root.proto.ClearChatAction.decode(reader, reader.uint32()); + message.clearChatAction = $root.proto.SyncActionValue.ClearChatAction.decode(reader, reader.uint32()); break; case 22: - message.deleteChatAction = $root.proto.DeleteChatAction.decode(reader, reader.uint32()); + message.deleteChatAction = $root.proto.SyncActionValue.DeleteChatAction.decode(reader, reader.uint32()); break; case 23: - message.unarchiveChatsSetting = $root.proto.UnarchiveChatsSetting.decode(reader, reader.uint32()); + message.unarchiveChatsSetting = $root.proto.SyncActionValue.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()); + message.primaryFeature = $root.proto.SyncActionValue.PrimaryFeature.decode(reader, reader.uint32()); break; case 26: - message.androidUnsupportedActions = $root.proto.AndroidUnsupportedActions.decode(reader, reader.uint32()); + message.androidUnsupportedActions = $root.proto.SyncActionValue.AndroidUnsupportedActions.decode(reader, reader.uint32()); break; case 27: - message.agentAction = $root.proto.AgentAction.decode(reader, reader.uint32()); + message.agentAction = $root.proto.SyncActionValue.AgentAction.decode(reader, reader.uint32()); break; case 28: - message.subscriptionAction = $root.proto.SubscriptionAction.decode(reader, reader.uint32()); + message.subscriptionAction = $root.proto.SyncActionValue.SubscriptionAction.decode(reader, reader.uint32()); break; case 29: - message.userStatusMuteAction = $root.proto.UserStatusMuteAction.decode(reader, reader.uint32()); + message.userStatusMuteAction = $root.proto.SyncActionValue.UserStatusMuteAction.decode(reader, reader.uint32()); break; case 30: - message.timeFormatAction = $root.proto.TimeFormatAction.decode(reader, reader.uint32()); + message.timeFormatAction = $root.proto.SyncActionValue.TimeFormatAction.decode(reader, reader.uint32()); break; case 31: - message.nuxAction = $root.proto.NuxAction.decode(reader, reader.uint32()); + message.nuxAction = $root.proto.SyncActionValue.NuxAction.decode(reader, reader.uint32()); + break; + case 32: + message.primaryVersionAction = $root.proto.SyncActionValue.PrimaryVersionAction.decode(reader, reader.uint32()); + break; + case 33: + message.stickerAction = $root.proto.SyncActionValue.StickerAction.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -57810,145 +56809,140 @@ $root.proto = (function() { 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); + var error = $root.proto.SyncActionValue.StarAction.verify(message.starAction); if (error) return "starAction." + error; } if (message.contactAction != null && message.hasOwnProperty("contactAction")) { - var error = $root.proto.ContactAction.verify(message.contactAction); + var error = $root.proto.SyncActionValue.ContactAction.verify(message.contactAction); if (error) return "contactAction." + error; } if (message.muteAction != null && message.hasOwnProperty("muteAction")) { - var error = $root.proto.MuteAction.verify(message.muteAction); + var error = $root.proto.SyncActionValue.MuteAction.verify(message.muteAction); if (error) return "muteAction." + error; } if (message.pinAction != null && message.hasOwnProperty("pinAction")) { - var error = $root.proto.PinAction.verify(message.pinAction); + var error = $root.proto.SyncActionValue.PinAction.verify(message.pinAction); if (error) return "pinAction." + error; } if (message.securityNotificationSetting != null && message.hasOwnProperty("securityNotificationSetting")) { - var error = $root.proto.SecurityNotificationSetting.verify(message.securityNotificationSetting); + var error = $root.proto.SyncActionValue.SecurityNotificationSetting.verify(message.securityNotificationSetting); if (error) return "securityNotificationSetting." + error; } if (message.pushNameSetting != null && message.hasOwnProperty("pushNameSetting")) { - var error = $root.proto.PushNameSetting.verify(message.pushNameSetting); + var error = $root.proto.SyncActionValue.PushNameSetting.verify(message.pushNameSetting); if (error) return "pushNameSetting." + error; } if (message.quickReplyAction != null && message.hasOwnProperty("quickReplyAction")) { - var error = $root.proto.QuickReplyAction.verify(message.quickReplyAction); + var error = $root.proto.SyncActionValue.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); + var error = $root.proto.SyncActionValue.RecentEmojiWeightsAction.verify(message.recentEmojiWeightsAction); if (error) return "recentEmojiWeightsAction." + error; } if (message.labelEditAction != null && message.hasOwnProperty("labelEditAction")) { - var error = $root.proto.LabelEditAction.verify(message.labelEditAction); + var error = $root.proto.SyncActionValue.LabelEditAction.verify(message.labelEditAction); if (error) return "labelEditAction." + error; } if (message.labelAssociationAction != null && message.hasOwnProperty("labelAssociationAction")) { - var error = $root.proto.LabelAssociationAction.verify(message.labelAssociationAction); + var error = $root.proto.SyncActionValue.LabelAssociationAction.verify(message.labelAssociationAction); if (error) return "labelAssociationAction." + error; } if (message.localeSetting != null && message.hasOwnProperty("localeSetting")) { - var error = $root.proto.LocaleSetting.verify(message.localeSetting); + var error = $root.proto.SyncActionValue.LocaleSetting.verify(message.localeSetting); if (error) return "localeSetting." + error; } if (message.archiveChatAction != null && message.hasOwnProperty("archiveChatAction")) { - var error = $root.proto.ArchiveChatAction.verify(message.archiveChatAction); + var error = $root.proto.SyncActionValue.ArchiveChatAction.verify(message.archiveChatAction); if (error) return "archiveChatAction." + error; } if (message.deleteMessageForMeAction != null && message.hasOwnProperty("deleteMessageForMeAction")) { - var error = $root.proto.DeleteMessageForMeAction.verify(message.deleteMessageForMeAction); + var error = $root.proto.SyncActionValue.DeleteMessageForMeAction.verify(message.deleteMessageForMeAction); if (error) return "deleteMessageForMeAction." + error; } if (message.keyExpiration != null && message.hasOwnProperty("keyExpiration")) { - var error = $root.proto.KeyExpiration.verify(message.keyExpiration); + var error = $root.proto.SyncActionValue.KeyExpiration.verify(message.keyExpiration); if (error) return "keyExpiration." + error; } if (message.markChatAsReadAction != null && message.hasOwnProperty("markChatAsReadAction")) { - var error = $root.proto.MarkChatAsReadAction.verify(message.markChatAsReadAction); + var error = $root.proto.SyncActionValue.MarkChatAsReadAction.verify(message.markChatAsReadAction); if (error) return "markChatAsReadAction." + error; } if (message.clearChatAction != null && message.hasOwnProperty("clearChatAction")) { - var error = $root.proto.ClearChatAction.verify(message.clearChatAction); + var error = $root.proto.SyncActionValue.ClearChatAction.verify(message.clearChatAction); if (error) return "clearChatAction." + error; } if (message.deleteChatAction != null && message.hasOwnProperty("deleteChatAction")) { - var error = $root.proto.DeleteChatAction.verify(message.deleteChatAction); + var error = $root.proto.SyncActionValue.DeleteChatAction.verify(message.deleteChatAction); if (error) return "deleteChatAction." + error; } if (message.unarchiveChatsSetting != null && message.hasOwnProperty("unarchiveChatsSetting")) { - var error = $root.proto.UnarchiveChatsSetting.verify(message.unarchiveChatsSetting); + var error = $root.proto.SyncActionValue.UnarchiveChatsSetting.verify(message.unarchiveChatsSetting); if (error) return "unarchiveChatsSetting." + error; } if (message.primaryFeature != null && message.hasOwnProperty("primaryFeature")) { - var error = $root.proto.PrimaryFeature.verify(message.primaryFeature); + var error = $root.proto.SyncActionValue.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); + var error = $root.proto.SyncActionValue.AndroidUnsupportedActions.verify(message.androidUnsupportedActions); if (error) return "androidUnsupportedActions." + error; } if (message.agentAction != null && message.hasOwnProperty("agentAction")) { - var error = $root.proto.AgentAction.verify(message.agentAction); + var error = $root.proto.SyncActionValue.AgentAction.verify(message.agentAction); if (error) return "agentAction." + error; } if (message.subscriptionAction != null && message.hasOwnProperty("subscriptionAction")) { - var error = $root.proto.SubscriptionAction.verify(message.subscriptionAction); + var error = $root.proto.SyncActionValue.SubscriptionAction.verify(message.subscriptionAction); if (error) return "subscriptionAction." + error; } if (message.userStatusMuteAction != null && message.hasOwnProperty("userStatusMuteAction")) { - var error = $root.proto.UserStatusMuteAction.verify(message.userStatusMuteAction); + var error = $root.proto.SyncActionValue.UserStatusMuteAction.verify(message.userStatusMuteAction); if (error) return "userStatusMuteAction." + error; } if (message.timeFormatAction != null && message.hasOwnProperty("timeFormatAction")) { - var error = $root.proto.TimeFormatAction.verify(message.timeFormatAction); + var error = $root.proto.SyncActionValue.TimeFormatAction.verify(message.timeFormatAction); if (error) return "timeFormatAction." + error; } if (message.nuxAction != null && message.hasOwnProperty("nuxAction")) { - var error = $root.proto.NuxAction.verify(message.nuxAction); + var error = $root.proto.SyncActionValue.NuxAction.verify(message.nuxAction); if (error) return "nuxAction." + error; } + if (message.primaryVersionAction != null && message.hasOwnProperty("primaryVersionAction")) { + var error = $root.proto.SyncActionValue.PrimaryVersionAction.verify(message.primaryVersionAction); + if (error) + return "primaryVersionAction." + error; + } + if (message.stickerAction != null && message.hasOwnProperty("stickerAction")) { + var error = $root.proto.SyncActionValue.StickerAction.verify(message.stickerAction); + if (error) + return "stickerAction." + error; + } return null; }; @@ -57976,142 +56970,137 @@ $root.proto = (function() { if (object.starAction != null) { if (typeof object.starAction !== "object") throw TypeError(".proto.SyncActionValue.starAction: object expected"); - message.starAction = $root.proto.StarAction.fromObject(object.starAction); + message.starAction = $root.proto.SyncActionValue.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); + message.contactAction = $root.proto.SyncActionValue.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); + message.muteAction = $root.proto.SyncActionValue.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); + message.pinAction = $root.proto.SyncActionValue.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); + message.securityNotificationSetting = $root.proto.SyncActionValue.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); + message.pushNameSetting = $root.proto.SyncActionValue.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); + message.quickReplyAction = $root.proto.SyncActionValue.QuickReplyAction.fromObject(object.quickReplyAction); } if (object.recentEmojiWeightsAction != null) { if (typeof object.recentEmojiWeightsAction !== "object") throw TypeError(".proto.SyncActionValue.recentEmojiWeightsAction: object expected"); - message.recentEmojiWeightsAction = $root.proto.RecentEmojiWeightsAction.fromObject(object.recentEmojiWeightsAction); + message.recentEmojiWeightsAction = $root.proto.SyncActionValue.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); + message.labelEditAction = $root.proto.SyncActionValue.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); + message.labelAssociationAction = $root.proto.SyncActionValue.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); + message.localeSetting = $root.proto.SyncActionValue.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); + message.archiveChatAction = $root.proto.SyncActionValue.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); + message.deleteMessageForMeAction = $root.proto.SyncActionValue.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); + message.keyExpiration = $root.proto.SyncActionValue.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); + message.markChatAsReadAction = $root.proto.SyncActionValue.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); + message.clearChatAction = $root.proto.SyncActionValue.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); + message.deleteChatAction = $root.proto.SyncActionValue.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); + message.unarchiveChatsSetting = $root.proto.SyncActionValue.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); + message.primaryFeature = $root.proto.SyncActionValue.PrimaryFeature.fromObject(object.primaryFeature); } if (object.androidUnsupportedActions != null) { if (typeof object.androidUnsupportedActions !== "object") throw TypeError(".proto.SyncActionValue.androidUnsupportedActions: object expected"); - message.androidUnsupportedActions = $root.proto.AndroidUnsupportedActions.fromObject(object.androidUnsupportedActions); + message.androidUnsupportedActions = $root.proto.SyncActionValue.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); + message.agentAction = $root.proto.SyncActionValue.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); + message.subscriptionAction = $root.proto.SyncActionValue.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); + message.userStatusMuteAction = $root.proto.SyncActionValue.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); + message.timeFormatAction = $root.proto.SyncActionValue.TimeFormatAction.fromObject(object.timeFormatAction); } if (object.nuxAction != null) { if (typeof object.nuxAction !== "object") throw TypeError(".proto.SyncActionValue.nuxAction: object expected"); - message.nuxAction = $root.proto.NuxAction.fromObject(object.nuxAction); + message.nuxAction = $root.proto.SyncActionValue.NuxAction.fromObject(object.nuxAction); + } + if (object.primaryVersionAction != null) { + if (typeof object.primaryVersionAction !== "object") + throw TypeError(".proto.SyncActionValue.primaryVersionAction: object expected"); + message.primaryVersionAction = $root.proto.SyncActionValue.PrimaryVersionAction.fromObject(object.primaryVersionAction); + } + if (object.stickerAction != null) { + if (typeof object.stickerAction !== "object") + throw TypeError(".proto.SyncActionValue.stickerAction: object expected"); + message.stickerAction = $root.proto.SyncActionValue.StickerAction.fromObject(object.stickerAction); } return message; }; @@ -58142,8 +57131,6 @@ $root.proto = (function() { object.securityNotificationSetting = null; object.pushNameSetting = null; object.quickReplyAction = null; - object.recentStickerWeightsAction = null; - object.recentStickerMetadata = null; object.recentEmojiWeightsAction = null; object.labelEditAction = null; object.labelAssociationAction = null; @@ -58156,13 +57143,14 @@ $root.proto = (function() { 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.nuxAction = null; + object.primaryVersionAction = null; + object.stickerAction = null; } if (message.timestamp != null && message.hasOwnProperty("timestamp")) if (typeof message.timestamp === "number") @@ -58170,61 +57158,59 @@ $root.proto = (function() { 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); + object.starAction = $root.proto.SyncActionValue.StarAction.toObject(message.starAction, options); if (message.contactAction != null && message.hasOwnProperty("contactAction")) - object.contactAction = $root.proto.ContactAction.toObject(message.contactAction, options); + object.contactAction = $root.proto.SyncActionValue.ContactAction.toObject(message.contactAction, options); if (message.muteAction != null && message.hasOwnProperty("muteAction")) - object.muteAction = $root.proto.MuteAction.toObject(message.muteAction, options); + object.muteAction = $root.proto.SyncActionValue.MuteAction.toObject(message.muteAction, options); if (message.pinAction != null && message.hasOwnProperty("pinAction")) - object.pinAction = $root.proto.PinAction.toObject(message.pinAction, options); + object.pinAction = $root.proto.SyncActionValue.PinAction.toObject(message.pinAction, options); if (message.securityNotificationSetting != null && message.hasOwnProperty("securityNotificationSetting")) - object.securityNotificationSetting = $root.proto.SecurityNotificationSetting.toObject(message.securityNotificationSetting, options); + object.securityNotificationSetting = $root.proto.SyncActionValue.SecurityNotificationSetting.toObject(message.securityNotificationSetting, options); if (message.pushNameSetting != null && message.hasOwnProperty("pushNameSetting")) - object.pushNameSetting = $root.proto.PushNameSetting.toObject(message.pushNameSetting, options); + object.pushNameSetting = $root.proto.SyncActionValue.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); + object.quickReplyAction = $root.proto.SyncActionValue.QuickReplyAction.toObject(message.quickReplyAction, options); if (message.recentEmojiWeightsAction != null && message.hasOwnProperty("recentEmojiWeightsAction")) - object.recentEmojiWeightsAction = $root.proto.RecentEmojiWeightsAction.toObject(message.recentEmojiWeightsAction, options); + object.recentEmojiWeightsAction = $root.proto.SyncActionValue.RecentEmojiWeightsAction.toObject(message.recentEmojiWeightsAction, options); if (message.labelEditAction != null && message.hasOwnProperty("labelEditAction")) - object.labelEditAction = $root.proto.LabelEditAction.toObject(message.labelEditAction, options); + object.labelEditAction = $root.proto.SyncActionValue.LabelEditAction.toObject(message.labelEditAction, options); if (message.labelAssociationAction != null && message.hasOwnProperty("labelAssociationAction")) - object.labelAssociationAction = $root.proto.LabelAssociationAction.toObject(message.labelAssociationAction, options); + object.labelAssociationAction = $root.proto.SyncActionValue.LabelAssociationAction.toObject(message.labelAssociationAction, options); if (message.localeSetting != null && message.hasOwnProperty("localeSetting")) - object.localeSetting = $root.proto.LocaleSetting.toObject(message.localeSetting, options); + object.localeSetting = $root.proto.SyncActionValue.LocaleSetting.toObject(message.localeSetting, options); if (message.archiveChatAction != null && message.hasOwnProperty("archiveChatAction")) - object.archiveChatAction = $root.proto.ArchiveChatAction.toObject(message.archiveChatAction, options); + object.archiveChatAction = $root.proto.SyncActionValue.ArchiveChatAction.toObject(message.archiveChatAction, options); if (message.deleteMessageForMeAction != null && message.hasOwnProperty("deleteMessageForMeAction")) - object.deleteMessageForMeAction = $root.proto.DeleteMessageForMeAction.toObject(message.deleteMessageForMeAction, options); + object.deleteMessageForMeAction = $root.proto.SyncActionValue.DeleteMessageForMeAction.toObject(message.deleteMessageForMeAction, options); if (message.keyExpiration != null && message.hasOwnProperty("keyExpiration")) - object.keyExpiration = $root.proto.KeyExpiration.toObject(message.keyExpiration, options); + object.keyExpiration = $root.proto.SyncActionValue.KeyExpiration.toObject(message.keyExpiration, options); if (message.markChatAsReadAction != null && message.hasOwnProperty("markChatAsReadAction")) - object.markChatAsReadAction = $root.proto.MarkChatAsReadAction.toObject(message.markChatAsReadAction, options); + object.markChatAsReadAction = $root.proto.SyncActionValue.MarkChatAsReadAction.toObject(message.markChatAsReadAction, options); if (message.clearChatAction != null && message.hasOwnProperty("clearChatAction")) - object.clearChatAction = $root.proto.ClearChatAction.toObject(message.clearChatAction, options); + object.clearChatAction = $root.proto.SyncActionValue.ClearChatAction.toObject(message.clearChatAction, options); if (message.deleteChatAction != null && message.hasOwnProperty("deleteChatAction")) - object.deleteChatAction = $root.proto.DeleteChatAction.toObject(message.deleteChatAction, options); + object.deleteChatAction = $root.proto.SyncActionValue.DeleteChatAction.toObject(message.deleteChatAction, options); if (message.unarchiveChatsSetting != null && message.hasOwnProperty("unarchiveChatsSetting")) - object.unarchiveChatsSetting = $root.proto.UnarchiveChatsSetting.toObject(message.unarchiveChatsSetting, options); + object.unarchiveChatsSetting = $root.proto.SyncActionValue.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); + object.primaryFeature = $root.proto.SyncActionValue.PrimaryFeature.toObject(message.primaryFeature, options); if (message.androidUnsupportedActions != null && message.hasOwnProperty("androidUnsupportedActions")) - object.androidUnsupportedActions = $root.proto.AndroidUnsupportedActions.toObject(message.androidUnsupportedActions, options); + object.androidUnsupportedActions = $root.proto.SyncActionValue.AndroidUnsupportedActions.toObject(message.androidUnsupportedActions, options); if (message.agentAction != null && message.hasOwnProperty("agentAction")) - object.agentAction = $root.proto.AgentAction.toObject(message.agentAction, options); + object.agentAction = $root.proto.SyncActionValue.AgentAction.toObject(message.agentAction, options); if (message.subscriptionAction != null && message.hasOwnProperty("subscriptionAction")) - object.subscriptionAction = $root.proto.SubscriptionAction.toObject(message.subscriptionAction, options); + object.subscriptionAction = $root.proto.SyncActionValue.SubscriptionAction.toObject(message.subscriptionAction, options); if (message.userStatusMuteAction != null && message.hasOwnProperty("userStatusMuteAction")) - object.userStatusMuteAction = $root.proto.UserStatusMuteAction.toObject(message.userStatusMuteAction, options); + object.userStatusMuteAction = $root.proto.SyncActionValue.UserStatusMuteAction.toObject(message.userStatusMuteAction, options); if (message.timeFormatAction != null && message.hasOwnProperty("timeFormatAction")) - object.timeFormatAction = $root.proto.TimeFormatAction.toObject(message.timeFormatAction, options); + object.timeFormatAction = $root.proto.SyncActionValue.TimeFormatAction.toObject(message.timeFormatAction, options); if (message.nuxAction != null && message.hasOwnProperty("nuxAction")) - object.nuxAction = $root.proto.NuxAction.toObject(message.nuxAction, options); + object.nuxAction = $root.proto.SyncActionValue.NuxAction.toObject(message.nuxAction, options); + if (message.primaryVersionAction != null && message.hasOwnProperty("primaryVersionAction")) + object.primaryVersionAction = $root.proto.SyncActionValue.PrimaryVersionAction.toObject(message.primaryVersionAction, options); + if (message.stickerAction != null && message.hasOwnProperty("stickerAction")) + object.stickerAction = $root.proto.SyncActionValue.StickerAction.toObject(message.stickerAction, options); return object; }; @@ -58239,6 +57225,6274 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + SyncActionValue.AgentAction = (function() { + + /** + * Properties of an AgentAction. + * @memberof proto.SyncActionValue + * @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.SyncActionValue + * @classdesc Represents an AgentAction. + * @implements IAgentAction + * @constructor + * @param {proto.SyncActionValue.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.SyncActionValue.AgentAction + * @instance + */ + AgentAction.prototype.name = ""; + + /** + * AgentAction deviceID. + * @member {number} deviceID + * @memberof proto.SyncActionValue.AgentAction + * @instance + */ + AgentAction.prototype.deviceID = 0; + + /** + * AgentAction isDeleted. + * @member {boolean} isDeleted + * @memberof proto.SyncActionValue.AgentAction + * @instance + */ + AgentAction.prototype.isDeleted = false; + + /** + * Creates a new AgentAction instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.AgentAction + * @static + * @param {proto.SyncActionValue.IAgentAction=} [properties] Properties to set + * @returns {proto.SyncActionValue.AgentAction} AgentAction instance + */ + AgentAction.create = function create(properties) { + return new AgentAction(properties); + }; + + /** + * Encodes the specified AgentAction message. Does not implicitly {@link proto.SyncActionValue.AgentAction.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.AgentAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.AgentAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.AgentAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.AgentAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.AgentAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.AgentAction + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.AgentAction} AgentAction + */ + AgentAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.AgentAction) + return object; + var message = new $root.proto.SyncActionValue.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.SyncActionValue.AgentAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.AgentAction + * @instance + * @returns {Object.} JSON object + */ + AgentAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AgentAction; + })(); + + SyncActionValue.AndroidUnsupportedActions = (function() { + + /** + * Properties of an AndroidUnsupportedActions. + * @memberof proto.SyncActionValue + * @interface IAndroidUnsupportedActions + * @property {boolean|null} [allowed] AndroidUnsupportedActions allowed + */ + + /** + * Constructs a new AndroidUnsupportedActions. + * @memberof proto.SyncActionValue + * @classdesc Represents an AndroidUnsupportedActions. + * @implements IAndroidUnsupportedActions + * @constructor + * @param {proto.SyncActionValue.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.SyncActionValue.AndroidUnsupportedActions + * @instance + */ + AndroidUnsupportedActions.prototype.allowed = false; + + /** + * Creates a new AndroidUnsupportedActions instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.AndroidUnsupportedActions + * @static + * @param {proto.SyncActionValue.IAndroidUnsupportedActions=} [properties] Properties to set + * @returns {proto.SyncActionValue.AndroidUnsupportedActions} AndroidUnsupportedActions instance + */ + AndroidUnsupportedActions.create = function create(properties) { + return new AndroidUnsupportedActions(properties); + }; + + /** + * Encodes the specified AndroidUnsupportedActions message. Does not implicitly {@link proto.SyncActionValue.AndroidUnsupportedActions.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.AndroidUnsupportedActions + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.AndroidUnsupportedActions.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.AndroidUnsupportedActions + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.AndroidUnsupportedActions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.AndroidUnsupportedActions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.AndroidUnsupportedActions + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.AndroidUnsupportedActions} AndroidUnsupportedActions + */ + AndroidUnsupportedActions.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.AndroidUnsupportedActions) + return object; + var message = new $root.proto.SyncActionValue.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.SyncActionValue.AndroidUnsupportedActions + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.AndroidUnsupportedActions + * @instance + * @returns {Object.} JSON object + */ + AndroidUnsupportedActions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AndroidUnsupportedActions; + })(); + + SyncActionValue.ArchiveChatAction = (function() { + + /** + * Properties of an ArchiveChatAction. + * @memberof proto.SyncActionValue + * @interface IArchiveChatAction + * @property {boolean|null} [archived] ArchiveChatAction archived + * @property {proto.SyncActionValue.ISyncActionMessageRange|null} [messageRange] ArchiveChatAction messageRange + */ + + /** + * Constructs a new ArchiveChatAction. + * @memberof proto.SyncActionValue + * @classdesc Represents an ArchiveChatAction. + * @implements IArchiveChatAction + * @constructor + * @param {proto.SyncActionValue.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.SyncActionValue.ArchiveChatAction + * @instance + */ + ArchiveChatAction.prototype.archived = false; + + /** + * ArchiveChatAction messageRange. + * @member {proto.SyncActionValue.ISyncActionMessageRange|null|undefined} messageRange + * @memberof proto.SyncActionValue.ArchiveChatAction + * @instance + */ + ArchiveChatAction.prototype.messageRange = null; + + /** + * Creates a new ArchiveChatAction instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.ArchiveChatAction + * @static + * @param {proto.SyncActionValue.IArchiveChatAction=} [properties] Properties to set + * @returns {proto.SyncActionValue.ArchiveChatAction} ArchiveChatAction instance + */ + ArchiveChatAction.create = function create(properties) { + return new ArchiveChatAction(properties); + }; + + /** + * Encodes the specified ArchiveChatAction message. Does not implicitly {@link proto.SyncActionValue.ArchiveChatAction.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.ArchiveChatAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.ArchiveChatAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.ArchiveChatAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.ArchiveChatAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.ArchiveChatAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.ArchiveChatAction + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.ArchiveChatAction} ArchiveChatAction + */ + ArchiveChatAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.ArchiveChatAction) + return object; + var message = new $root.proto.SyncActionValue.ArchiveChatAction(); + if (object.archived != null) + message.archived = Boolean(object.archived); + if (object.messageRange != null) { + if (typeof object.messageRange !== "object") + throw TypeError(".proto.SyncActionValue.ArchiveChatAction.messageRange: object expected"); + message.messageRange = $root.proto.SyncActionValue.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.SyncActionValue.ArchiveChatAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.SyncActionMessageRange.toObject(message.messageRange, options); + return object; + }; + + /** + * Converts this ArchiveChatAction to JSON. + * @function toJSON + * @memberof proto.SyncActionValue.ArchiveChatAction + * @instance + * @returns {Object.} JSON object + */ + ArchiveChatAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ArchiveChatAction; + })(); + + SyncActionValue.ClearChatAction = (function() { + + /** + * Properties of a ClearChatAction. + * @memberof proto.SyncActionValue + * @interface IClearChatAction + * @property {proto.SyncActionValue.ISyncActionMessageRange|null} [messageRange] ClearChatAction messageRange + */ + + /** + * Constructs a new ClearChatAction. + * @memberof proto.SyncActionValue + * @classdesc Represents a ClearChatAction. + * @implements IClearChatAction + * @constructor + * @param {proto.SyncActionValue.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.SyncActionValue.ISyncActionMessageRange|null|undefined} messageRange + * @memberof proto.SyncActionValue.ClearChatAction + * @instance + */ + ClearChatAction.prototype.messageRange = null; + + /** + * Creates a new ClearChatAction instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.ClearChatAction + * @static + * @param {proto.SyncActionValue.IClearChatAction=} [properties] Properties to set + * @returns {proto.SyncActionValue.ClearChatAction} ClearChatAction instance + */ + ClearChatAction.create = function create(properties) { + return new ClearChatAction(properties); + }; + + /** + * Encodes the specified ClearChatAction message. Does not implicitly {@link proto.SyncActionValue.ClearChatAction.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.ClearChatAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.ClearChatAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.ClearChatAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.ClearChatAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.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.SyncActionValue.ClearChatAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.messageRange = $root.proto.SyncActionValue.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.SyncActionValue.ClearChatAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.ClearChatAction + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.ClearChatAction} ClearChatAction + */ + ClearChatAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.ClearChatAction) + return object; + var message = new $root.proto.SyncActionValue.ClearChatAction(); + if (object.messageRange != null) { + if (typeof object.messageRange !== "object") + throw TypeError(".proto.SyncActionValue.ClearChatAction.messageRange: object expected"); + message.messageRange = $root.proto.SyncActionValue.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.SyncActionValue.ClearChatAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.SyncActionMessageRange.toObject(message.messageRange, options); + return object; + }; + + /** + * Converts this ClearChatAction to JSON. + * @function toJSON + * @memberof proto.SyncActionValue.ClearChatAction + * @instance + * @returns {Object.} JSON object + */ + ClearChatAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ClearChatAction; + })(); + + SyncActionValue.ContactAction = (function() { + + /** + * Properties of a ContactAction. + * @memberof proto.SyncActionValue + * @interface IContactAction + * @property {string|null} [fullName] ContactAction fullName + * @property {string|null} [firstName] ContactAction firstName + */ + + /** + * Constructs a new ContactAction. + * @memberof proto.SyncActionValue + * @classdesc Represents a ContactAction. + * @implements IContactAction + * @constructor + * @param {proto.SyncActionValue.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.SyncActionValue.ContactAction + * @instance + */ + ContactAction.prototype.fullName = ""; + + /** + * ContactAction firstName. + * @member {string} firstName + * @memberof proto.SyncActionValue.ContactAction + * @instance + */ + ContactAction.prototype.firstName = ""; + + /** + * Creates a new ContactAction instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.ContactAction + * @static + * @param {proto.SyncActionValue.IContactAction=} [properties] Properties to set + * @returns {proto.SyncActionValue.ContactAction} ContactAction instance + */ + ContactAction.create = function create(properties) { + return new ContactAction(properties); + }; + + /** + * Encodes the specified ContactAction message. Does not implicitly {@link proto.SyncActionValue.ContactAction.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.ContactAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.ContactAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.ContactAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.ContactAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.ContactAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.ContactAction + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.ContactAction} ContactAction + */ + ContactAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.ContactAction) + return object; + var message = new $root.proto.SyncActionValue.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.SyncActionValue.ContactAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.ContactAction + * @instance + * @returns {Object.} JSON object + */ + ContactAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ContactAction; + })(); + + SyncActionValue.DeleteChatAction = (function() { + + /** + * Properties of a DeleteChatAction. + * @memberof proto.SyncActionValue + * @interface IDeleteChatAction + * @property {proto.SyncActionValue.ISyncActionMessageRange|null} [messageRange] DeleteChatAction messageRange + */ + + /** + * Constructs a new DeleteChatAction. + * @memberof proto.SyncActionValue + * @classdesc Represents a DeleteChatAction. + * @implements IDeleteChatAction + * @constructor + * @param {proto.SyncActionValue.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.SyncActionValue.ISyncActionMessageRange|null|undefined} messageRange + * @memberof proto.SyncActionValue.DeleteChatAction + * @instance + */ + DeleteChatAction.prototype.messageRange = null; + + /** + * Creates a new DeleteChatAction instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.DeleteChatAction + * @static + * @param {proto.SyncActionValue.IDeleteChatAction=} [properties] Properties to set + * @returns {proto.SyncActionValue.DeleteChatAction} DeleteChatAction instance + */ + DeleteChatAction.create = function create(properties) { + return new DeleteChatAction(properties); + }; + + /** + * Encodes the specified DeleteChatAction message. Does not implicitly {@link proto.SyncActionValue.DeleteChatAction.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.DeleteChatAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.DeleteChatAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.DeleteChatAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.DeleteChatAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.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.SyncActionValue.DeleteChatAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.messageRange = $root.proto.SyncActionValue.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.SyncActionValue.DeleteChatAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.DeleteChatAction + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.DeleteChatAction} DeleteChatAction + */ + DeleteChatAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.DeleteChatAction) + return object; + var message = new $root.proto.SyncActionValue.DeleteChatAction(); + if (object.messageRange != null) { + if (typeof object.messageRange !== "object") + throw TypeError(".proto.SyncActionValue.DeleteChatAction.messageRange: object expected"); + message.messageRange = $root.proto.SyncActionValue.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.SyncActionValue.DeleteChatAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.SyncActionMessageRange.toObject(message.messageRange, options); + return object; + }; + + /** + * Converts this DeleteChatAction to JSON. + * @function toJSON + * @memberof proto.SyncActionValue.DeleteChatAction + * @instance + * @returns {Object.} JSON object + */ + DeleteChatAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteChatAction; + })(); + + SyncActionValue.DeleteMessageForMeAction = (function() { + + /** + * Properties of a DeleteMessageForMeAction. + * @memberof proto.SyncActionValue + * @interface IDeleteMessageForMeAction + * @property {boolean|null} [deleteMedia] DeleteMessageForMeAction deleteMedia + * @property {number|Long|null} [messageTimestamp] DeleteMessageForMeAction messageTimestamp + */ + + /** + * Constructs a new DeleteMessageForMeAction. + * @memberof proto.SyncActionValue + * @classdesc Represents a DeleteMessageForMeAction. + * @implements IDeleteMessageForMeAction + * @constructor + * @param {proto.SyncActionValue.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.SyncActionValue.DeleteMessageForMeAction + * @instance + */ + DeleteMessageForMeAction.prototype.deleteMedia = false; + + /** + * DeleteMessageForMeAction messageTimestamp. + * @member {number|Long} messageTimestamp + * @memberof proto.SyncActionValue.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.SyncActionValue.DeleteMessageForMeAction + * @static + * @param {proto.SyncActionValue.IDeleteMessageForMeAction=} [properties] Properties to set + * @returns {proto.SyncActionValue.DeleteMessageForMeAction} DeleteMessageForMeAction instance + */ + DeleteMessageForMeAction.create = function create(properties) { + return new DeleteMessageForMeAction(properties); + }; + + /** + * Encodes the specified DeleteMessageForMeAction message. Does not implicitly {@link proto.SyncActionValue.DeleteMessageForMeAction.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.DeleteMessageForMeAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.DeleteMessageForMeAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.DeleteMessageForMeAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.DeleteMessageForMeAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.DeleteMessageForMeAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.DeleteMessageForMeAction + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.DeleteMessageForMeAction} DeleteMessageForMeAction + */ + DeleteMessageForMeAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.DeleteMessageForMeAction) + return object; + var message = new $root.proto.SyncActionValue.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.SyncActionValue.DeleteMessageForMeAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.DeleteMessageForMeAction + * @instance + * @returns {Object.} JSON object + */ + DeleteMessageForMeAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteMessageForMeAction; + })(); + + SyncActionValue.KeyExpiration = (function() { + + /** + * Properties of a KeyExpiration. + * @memberof proto.SyncActionValue + * @interface IKeyExpiration + * @property {number|null} [expiredKeyEpoch] KeyExpiration expiredKeyEpoch + */ + + /** + * Constructs a new KeyExpiration. + * @memberof proto.SyncActionValue + * @classdesc Represents a KeyExpiration. + * @implements IKeyExpiration + * @constructor + * @param {proto.SyncActionValue.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.SyncActionValue.KeyExpiration + * @instance + */ + KeyExpiration.prototype.expiredKeyEpoch = 0; + + /** + * Creates a new KeyExpiration instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.KeyExpiration + * @static + * @param {proto.SyncActionValue.IKeyExpiration=} [properties] Properties to set + * @returns {proto.SyncActionValue.KeyExpiration} KeyExpiration instance + */ + KeyExpiration.create = function create(properties) { + return new KeyExpiration(properties); + }; + + /** + * Encodes the specified KeyExpiration message. Does not implicitly {@link proto.SyncActionValue.KeyExpiration.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.KeyExpiration + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.KeyExpiration.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.KeyExpiration + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.KeyExpiration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.KeyExpiration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.KeyExpiration + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.KeyExpiration} KeyExpiration + */ + KeyExpiration.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.KeyExpiration) + return object; + var message = new $root.proto.SyncActionValue.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.SyncActionValue.KeyExpiration + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.KeyExpiration + * @instance + * @returns {Object.} JSON object + */ + KeyExpiration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return KeyExpiration; + })(); + + SyncActionValue.LabelAssociationAction = (function() { + + /** + * Properties of a LabelAssociationAction. + * @memberof proto.SyncActionValue + * @interface ILabelAssociationAction + * @property {boolean|null} [labeled] LabelAssociationAction labeled + */ + + /** + * Constructs a new LabelAssociationAction. + * @memberof proto.SyncActionValue + * @classdesc Represents a LabelAssociationAction. + * @implements ILabelAssociationAction + * @constructor + * @param {proto.SyncActionValue.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.SyncActionValue.LabelAssociationAction + * @instance + */ + LabelAssociationAction.prototype.labeled = false; + + /** + * Creates a new LabelAssociationAction instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.LabelAssociationAction + * @static + * @param {proto.SyncActionValue.ILabelAssociationAction=} [properties] Properties to set + * @returns {proto.SyncActionValue.LabelAssociationAction} LabelAssociationAction instance + */ + LabelAssociationAction.create = function create(properties) { + return new LabelAssociationAction(properties); + }; + + /** + * Encodes the specified LabelAssociationAction message. Does not implicitly {@link proto.SyncActionValue.LabelAssociationAction.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.LabelAssociationAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.LabelAssociationAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.LabelAssociationAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.LabelAssociationAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.LabelAssociationAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.LabelAssociationAction + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.LabelAssociationAction} LabelAssociationAction + */ + LabelAssociationAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.LabelAssociationAction) + return object; + var message = new $root.proto.SyncActionValue.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.SyncActionValue.LabelAssociationAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.LabelAssociationAction + * @instance + * @returns {Object.} JSON object + */ + LabelAssociationAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LabelAssociationAction; + })(); + + SyncActionValue.LabelEditAction = (function() { + + /** + * Properties of a LabelEditAction. + * @memberof proto.SyncActionValue + * @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.SyncActionValue + * @classdesc Represents a LabelEditAction. + * @implements ILabelEditAction + * @constructor + * @param {proto.SyncActionValue.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.SyncActionValue.LabelEditAction + * @instance + */ + LabelEditAction.prototype.name = ""; + + /** + * LabelEditAction color. + * @member {number} color + * @memberof proto.SyncActionValue.LabelEditAction + * @instance + */ + LabelEditAction.prototype.color = 0; + + /** + * LabelEditAction predefinedId. + * @member {number} predefinedId + * @memberof proto.SyncActionValue.LabelEditAction + * @instance + */ + LabelEditAction.prototype.predefinedId = 0; + + /** + * LabelEditAction deleted. + * @member {boolean} deleted + * @memberof proto.SyncActionValue.LabelEditAction + * @instance + */ + LabelEditAction.prototype.deleted = false; + + /** + * Creates a new LabelEditAction instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.LabelEditAction + * @static + * @param {proto.SyncActionValue.ILabelEditAction=} [properties] Properties to set + * @returns {proto.SyncActionValue.LabelEditAction} LabelEditAction instance + */ + LabelEditAction.create = function create(properties) { + return new LabelEditAction(properties); + }; + + /** + * Encodes the specified LabelEditAction message. Does not implicitly {@link proto.SyncActionValue.LabelEditAction.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.LabelEditAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.LabelEditAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.LabelEditAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.LabelEditAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.LabelEditAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.LabelEditAction + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.LabelEditAction} LabelEditAction + */ + LabelEditAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.LabelEditAction) + return object; + var message = new $root.proto.SyncActionValue.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.SyncActionValue.LabelEditAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.LabelEditAction + * @instance + * @returns {Object.} JSON object + */ + LabelEditAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LabelEditAction; + })(); + + SyncActionValue.LocaleSetting = (function() { + + /** + * Properties of a LocaleSetting. + * @memberof proto.SyncActionValue + * @interface ILocaleSetting + * @property {string|null} [locale] LocaleSetting locale + */ + + /** + * Constructs a new LocaleSetting. + * @memberof proto.SyncActionValue + * @classdesc Represents a LocaleSetting. + * @implements ILocaleSetting + * @constructor + * @param {proto.SyncActionValue.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.SyncActionValue.LocaleSetting + * @instance + */ + LocaleSetting.prototype.locale = ""; + + /** + * Creates a new LocaleSetting instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.LocaleSetting + * @static + * @param {proto.SyncActionValue.ILocaleSetting=} [properties] Properties to set + * @returns {proto.SyncActionValue.LocaleSetting} LocaleSetting instance + */ + LocaleSetting.create = function create(properties) { + return new LocaleSetting(properties); + }; + + /** + * Encodes the specified LocaleSetting message. Does not implicitly {@link proto.SyncActionValue.LocaleSetting.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.LocaleSetting + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.LocaleSetting.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.LocaleSetting + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.LocaleSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.LocaleSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.LocaleSetting + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.LocaleSetting} LocaleSetting + */ + LocaleSetting.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.LocaleSetting) + return object; + var message = new $root.proto.SyncActionValue.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.SyncActionValue.LocaleSetting + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.LocaleSetting + * @instance + * @returns {Object.} JSON object + */ + LocaleSetting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LocaleSetting; + })(); + + SyncActionValue.MarkChatAsReadAction = (function() { + + /** + * Properties of a MarkChatAsReadAction. + * @memberof proto.SyncActionValue + * @interface IMarkChatAsReadAction + * @property {boolean|null} [read] MarkChatAsReadAction read + * @property {proto.SyncActionValue.ISyncActionMessageRange|null} [messageRange] MarkChatAsReadAction messageRange + */ + + /** + * Constructs a new MarkChatAsReadAction. + * @memberof proto.SyncActionValue + * @classdesc Represents a MarkChatAsReadAction. + * @implements IMarkChatAsReadAction + * @constructor + * @param {proto.SyncActionValue.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.SyncActionValue.MarkChatAsReadAction + * @instance + */ + MarkChatAsReadAction.prototype.read = false; + + /** + * MarkChatAsReadAction messageRange. + * @member {proto.SyncActionValue.ISyncActionMessageRange|null|undefined} messageRange + * @memberof proto.SyncActionValue.MarkChatAsReadAction + * @instance + */ + MarkChatAsReadAction.prototype.messageRange = null; + + /** + * Creates a new MarkChatAsReadAction instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.MarkChatAsReadAction + * @static + * @param {proto.SyncActionValue.IMarkChatAsReadAction=} [properties] Properties to set + * @returns {proto.SyncActionValue.MarkChatAsReadAction} MarkChatAsReadAction instance + */ + MarkChatAsReadAction.create = function create(properties) { + return new MarkChatAsReadAction(properties); + }; + + /** + * Encodes the specified MarkChatAsReadAction message. Does not implicitly {@link proto.SyncActionValue.MarkChatAsReadAction.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.MarkChatAsReadAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.MarkChatAsReadAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.MarkChatAsReadAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.MarkChatAsReadAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.MarkChatAsReadAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.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.SyncActionValue.MarkChatAsReadAction + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.MarkChatAsReadAction} MarkChatAsReadAction + */ + MarkChatAsReadAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.MarkChatAsReadAction) + return object; + var message = new $root.proto.SyncActionValue.MarkChatAsReadAction(); + if (object.read != null) + message.read = Boolean(object.read); + if (object.messageRange != null) { + if (typeof object.messageRange !== "object") + throw TypeError(".proto.SyncActionValue.MarkChatAsReadAction.messageRange: object expected"); + message.messageRange = $root.proto.SyncActionValue.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.SyncActionValue.MarkChatAsReadAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.SyncActionMessageRange.toObject(message.messageRange, options); + return object; + }; + + /** + * Converts this MarkChatAsReadAction to JSON. + * @function toJSON + * @memberof proto.SyncActionValue.MarkChatAsReadAction + * @instance + * @returns {Object.} JSON object + */ + MarkChatAsReadAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MarkChatAsReadAction; + })(); + + SyncActionValue.MuteAction = (function() { + + /** + * Properties of a MuteAction. + * @memberof proto.SyncActionValue + * @interface IMuteAction + * @property {boolean|null} [muted] MuteAction muted + * @property {number|Long|null} [muteEndTimestamp] MuteAction muteEndTimestamp + */ + + /** + * Constructs a new MuteAction. + * @memberof proto.SyncActionValue + * @classdesc Represents a MuteAction. + * @implements IMuteAction + * @constructor + * @param {proto.SyncActionValue.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.SyncActionValue.MuteAction + * @instance + */ + MuteAction.prototype.muted = false; + + /** + * MuteAction muteEndTimestamp. + * @member {number|Long} muteEndTimestamp + * @memberof proto.SyncActionValue.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.SyncActionValue.MuteAction + * @static + * @param {proto.SyncActionValue.IMuteAction=} [properties] Properties to set + * @returns {proto.SyncActionValue.MuteAction} MuteAction instance + */ + MuteAction.create = function create(properties) { + return new MuteAction(properties); + }; + + /** + * Encodes the specified MuteAction message. Does not implicitly {@link proto.SyncActionValue.MuteAction.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.MuteAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.MuteAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.MuteAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.MuteAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.MuteAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.MuteAction + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.MuteAction} MuteAction + */ + MuteAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.MuteAction) + return object; + var message = new $root.proto.SyncActionValue.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.SyncActionValue.MuteAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.MuteAction + * @instance + * @returns {Object.} JSON object + */ + MuteAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MuteAction; + })(); + + SyncActionValue.NuxAction = (function() { + + /** + * Properties of a NuxAction. + * @memberof proto.SyncActionValue + * @interface INuxAction + * @property {boolean|null} [acknowledged] NuxAction acknowledged + */ + + /** + * Constructs a new NuxAction. + * @memberof proto.SyncActionValue + * @classdesc Represents a NuxAction. + * @implements INuxAction + * @constructor + * @param {proto.SyncActionValue.INuxAction=} [properties] Properties to set + */ + function NuxAction(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]]; + } + + /** + * NuxAction acknowledged. + * @member {boolean} acknowledged + * @memberof proto.SyncActionValue.NuxAction + * @instance + */ + NuxAction.prototype.acknowledged = false; + + /** + * Creates a new NuxAction instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.NuxAction + * @static + * @param {proto.SyncActionValue.INuxAction=} [properties] Properties to set + * @returns {proto.SyncActionValue.NuxAction} NuxAction instance + */ + NuxAction.create = function create(properties) { + return new NuxAction(properties); + }; + + /** + * Encodes the specified NuxAction message. Does not implicitly {@link proto.SyncActionValue.NuxAction.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.NuxAction + * @static + * @param {proto.SyncActionValue.INuxAction} message NuxAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NuxAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.acknowledged != null && Object.hasOwnProperty.call(message, "acknowledged")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.acknowledged); + return writer; + }; + + /** + * Encodes the specified NuxAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.NuxAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.NuxAction + * @static + * @param {proto.SyncActionValue.INuxAction} message NuxAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NuxAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NuxAction message from the specified reader or buffer. + * @function decode + * @memberof proto.SyncActionValue.NuxAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.NuxAction} NuxAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NuxAction.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.NuxAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.acknowledged = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NuxAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SyncActionValue.NuxAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.NuxAction} NuxAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NuxAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NuxAction message. + * @function verify + * @memberof proto.SyncActionValue.NuxAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NuxAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.acknowledged != null && message.hasOwnProperty("acknowledged")) + if (typeof message.acknowledged !== "boolean") + return "acknowledged: boolean expected"; + return null; + }; + + /** + * Creates a NuxAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SyncActionValue.NuxAction + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.NuxAction} NuxAction + */ + NuxAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.NuxAction) + return object; + var message = new $root.proto.SyncActionValue.NuxAction(); + if (object.acknowledged != null) + message.acknowledged = Boolean(object.acknowledged); + return message; + }; + + /** + * Creates a plain object from a NuxAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SyncActionValue.NuxAction + * @static + * @param {proto.SyncActionValue.NuxAction} message NuxAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NuxAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.acknowledged = false; + if (message.acknowledged != null && message.hasOwnProperty("acknowledged")) + object.acknowledged = message.acknowledged; + return object; + }; + + /** + * Converts this NuxAction to JSON. + * @function toJSON + * @memberof proto.SyncActionValue.NuxAction + * @instance + * @returns {Object.} JSON object + */ + NuxAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return NuxAction; + })(); + + SyncActionValue.PinAction = (function() { + + /** + * Properties of a PinAction. + * @memberof proto.SyncActionValue + * @interface IPinAction + * @property {boolean|null} [pinned] PinAction pinned + */ + + /** + * Constructs a new PinAction. + * @memberof proto.SyncActionValue + * @classdesc Represents a PinAction. + * @implements IPinAction + * @constructor + * @param {proto.SyncActionValue.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.SyncActionValue.PinAction + * @instance + */ + PinAction.prototype.pinned = false; + + /** + * Creates a new PinAction instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.PinAction + * @static + * @param {proto.SyncActionValue.IPinAction=} [properties] Properties to set + * @returns {proto.SyncActionValue.PinAction} PinAction instance + */ + PinAction.create = function create(properties) { + return new PinAction(properties); + }; + + /** + * Encodes the specified PinAction message. Does not implicitly {@link proto.SyncActionValue.PinAction.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.PinAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.PinAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.PinAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.PinAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.PinAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.PinAction + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.PinAction} PinAction + */ + PinAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.PinAction) + return object; + var message = new $root.proto.SyncActionValue.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.SyncActionValue.PinAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.PinAction + * @instance + * @returns {Object.} JSON object + */ + PinAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PinAction; + })(); + + SyncActionValue.PrimaryFeature = (function() { + + /** + * Properties of a PrimaryFeature. + * @memberof proto.SyncActionValue + * @interface IPrimaryFeature + * @property {Array.|null} [flags] PrimaryFeature flags + */ + + /** + * Constructs a new PrimaryFeature. + * @memberof proto.SyncActionValue + * @classdesc Represents a PrimaryFeature. + * @implements IPrimaryFeature + * @constructor + * @param {proto.SyncActionValue.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.SyncActionValue.PrimaryFeature + * @instance + */ + PrimaryFeature.prototype.flags = $util.emptyArray; + + /** + * Creates a new PrimaryFeature instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.PrimaryFeature + * @static + * @param {proto.SyncActionValue.IPrimaryFeature=} [properties] Properties to set + * @returns {proto.SyncActionValue.PrimaryFeature} PrimaryFeature instance + */ + PrimaryFeature.create = function create(properties) { + return new PrimaryFeature(properties); + }; + + /** + * Encodes the specified PrimaryFeature message. Does not implicitly {@link proto.SyncActionValue.PrimaryFeature.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.PrimaryFeature + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.PrimaryFeature.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.PrimaryFeature + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.PrimaryFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.PrimaryFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.PrimaryFeature + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.PrimaryFeature} PrimaryFeature + */ + PrimaryFeature.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.PrimaryFeature) + return object; + var message = new $root.proto.SyncActionValue.PrimaryFeature(); + if (object.flags) { + if (!Array.isArray(object.flags)) + throw TypeError(".proto.SyncActionValue.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.SyncActionValue.PrimaryFeature + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.PrimaryFeature + * @instance + * @returns {Object.} JSON object + */ + PrimaryFeature.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PrimaryFeature; + })(); + + SyncActionValue.PrimaryVersionAction = (function() { + + /** + * Properties of a PrimaryVersionAction. + * @memberof proto.SyncActionValue + * @interface IPrimaryVersionAction + * @property {string|null} [version] PrimaryVersionAction version + */ + + /** + * Constructs a new PrimaryVersionAction. + * @memberof proto.SyncActionValue + * @classdesc Represents a PrimaryVersionAction. + * @implements IPrimaryVersionAction + * @constructor + * @param {proto.SyncActionValue.IPrimaryVersionAction=} [properties] Properties to set + */ + function PrimaryVersionAction(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]]; + } + + /** + * PrimaryVersionAction version. + * @member {string} version + * @memberof proto.SyncActionValue.PrimaryVersionAction + * @instance + */ + PrimaryVersionAction.prototype.version = ""; + + /** + * Creates a new PrimaryVersionAction instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.PrimaryVersionAction + * @static + * @param {proto.SyncActionValue.IPrimaryVersionAction=} [properties] Properties to set + * @returns {proto.SyncActionValue.PrimaryVersionAction} PrimaryVersionAction instance + */ + PrimaryVersionAction.create = function create(properties) { + return new PrimaryVersionAction(properties); + }; + + /** + * Encodes the specified PrimaryVersionAction message. Does not implicitly {@link proto.SyncActionValue.PrimaryVersionAction.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.PrimaryVersionAction + * @static + * @param {proto.SyncActionValue.IPrimaryVersionAction} message PrimaryVersionAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrimaryVersionAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + return writer; + }; + + /** + * Encodes the specified PrimaryVersionAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.PrimaryVersionAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.PrimaryVersionAction + * @static + * @param {proto.SyncActionValue.IPrimaryVersionAction} message PrimaryVersionAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrimaryVersionAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PrimaryVersionAction message from the specified reader or buffer. + * @function decode + * @memberof proto.SyncActionValue.PrimaryVersionAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.PrimaryVersionAction} PrimaryVersionAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrimaryVersionAction.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.PrimaryVersionAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.version = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PrimaryVersionAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SyncActionValue.PrimaryVersionAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.PrimaryVersionAction} PrimaryVersionAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrimaryVersionAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PrimaryVersionAction message. + * @function verify + * @memberof proto.SyncActionValue.PrimaryVersionAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PrimaryVersionAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + return null; + }; + + /** + * Creates a PrimaryVersionAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SyncActionValue.PrimaryVersionAction + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.PrimaryVersionAction} PrimaryVersionAction + */ + PrimaryVersionAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.PrimaryVersionAction) + return object; + var message = new $root.proto.SyncActionValue.PrimaryVersionAction(); + if (object.version != null) + message.version = String(object.version); + return message; + }; + + /** + * Creates a plain object from a PrimaryVersionAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SyncActionValue.PrimaryVersionAction + * @static + * @param {proto.SyncActionValue.PrimaryVersionAction} message PrimaryVersionAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PrimaryVersionAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.version = ""; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; + + /** + * Converts this PrimaryVersionAction to JSON. + * @function toJSON + * @memberof proto.SyncActionValue.PrimaryVersionAction + * @instance + * @returns {Object.} JSON object + */ + PrimaryVersionAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PrimaryVersionAction; + })(); + + SyncActionValue.PushNameSetting = (function() { + + /** + * Properties of a PushNameSetting. + * @memberof proto.SyncActionValue + * @interface IPushNameSetting + * @property {string|null} [name] PushNameSetting name + */ + + /** + * Constructs a new PushNameSetting. + * @memberof proto.SyncActionValue + * @classdesc Represents a PushNameSetting. + * @implements IPushNameSetting + * @constructor + * @param {proto.SyncActionValue.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.SyncActionValue.PushNameSetting + * @instance + */ + PushNameSetting.prototype.name = ""; + + /** + * Creates a new PushNameSetting instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.PushNameSetting + * @static + * @param {proto.SyncActionValue.IPushNameSetting=} [properties] Properties to set + * @returns {proto.SyncActionValue.PushNameSetting} PushNameSetting instance + */ + PushNameSetting.create = function create(properties) { + return new PushNameSetting(properties); + }; + + /** + * Encodes the specified PushNameSetting message. Does not implicitly {@link proto.SyncActionValue.PushNameSetting.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.PushNameSetting + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.PushNameSetting.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.PushNameSetting + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.PushNameSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.PushNameSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.PushNameSetting + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.PushNameSetting} PushNameSetting + */ + PushNameSetting.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.PushNameSetting) + return object; + var message = new $root.proto.SyncActionValue.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.SyncActionValue.PushNameSetting + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.PushNameSetting + * @instance + * @returns {Object.} JSON object + */ + PushNameSetting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PushNameSetting; + })(); + + SyncActionValue.QuickReplyAction = (function() { + + /** + * Properties of a QuickReplyAction. + * @memberof proto.SyncActionValue + * @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.SyncActionValue + * @classdesc Represents a QuickReplyAction. + * @implements IQuickReplyAction + * @constructor + * @param {proto.SyncActionValue.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.SyncActionValue.QuickReplyAction + * @instance + */ + QuickReplyAction.prototype.shortcut = ""; + + /** + * QuickReplyAction message. + * @member {string} message + * @memberof proto.SyncActionValue.QuickReplyAction + * @instance + */ + QuickReplyAction.prototype.message = ""; + + /** + * QuickReplyAction keywords. + * @member {Array.} keywords + * @memberof proto.SyncActionValue.QuickReplyAction + * @instance + */ + QuickReplyAction.prototype.keywords = $util.emptyArray; + + /** + * QuickReplyAction count. + * @member {number} count + * @memberof proto.SyncActionValue.QuickReplyAction + * @instance + */ + QuickReplyAction.prototype.count = 0; + + /** + * QuickReplyAction deleted. + * @member {boolean} deleted + * @memberof proto.SyncActionValue.QuickReplyAction + * @instance + */ + QuickReplyAction.prototype.deleted = false; + + /** + * Creates a new QuickReplyAction instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.QuickReplyAction + * @static + * @param {proto.SyncActionValue.IQuickReplyAction=} [properties] Properties to set + * @returns {proto.SyncActionValue.QuickReplyAction} QuickReplyAction instance + */ + QuickReplyAction.create = function create(properties) { + return new QuickReplyAction(properties); + }; + + /** + * Encodes the specified QuickReplyAction message. Does not implicitly {@link proto.SyncActionValue.QuickReplyAction.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.QuickReplyAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.QuickReplyAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.QuickReplyAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.QuickReplyAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.QuickReplyAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.QuickReplyAction + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.QuickReplyAction} QuickReplyAction + */ + QuickReplyAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.QuickReplyAction) + return object; + var message = new $root.proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.QuickReplyAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.QuickReplyAction + * @instance + * @returns {Object.} JSON object + */ + QuickReplyAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QuickReplyAction; + })(); + + SyncActionValue.RecentEmojiWeightsAction = (function() { + + /** + * Properties of a RecentEmojiWeightsAction. + * @memberof proto.SyncActionValue + * @interface IRecentEmojiWeightsAction + * @property {Array.|null} [weights] RecentEmojiWeightsAction weights + */ + + /** + * Constructs a new RecentEmojiWeightsAction. + * @memberof proto.SyncActionValue + * @classdesc Represents a RecentEmojiWeightsAction. + * @implements IRecentEmojiWeightsAction + * @constructor + * @param {proto.SyncActionValue.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.SyncActionValue.RecentEmojiWeightsAction + * @instance + */ + RecentEmojiWeightsAction.prototype.weights = $util.emptyArray; + + /** + * Creates a new RecentEmojiWeightsAction instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.RecentEmojiWeightsAction + * @static + * @param {proto.SyncActionValue.IRecentEmojiWeightsAction=} [properties] Properties to set + * @returns {proto.SyncActionValue.RecentEmojiWeightsAction} RecentEmojiWeightsAction instance + */ + RecentEmojiWeightsAction.create = function create(properties) { + return new RecentEmojiWeightsAction(properties); + }; + + /** + * Encodes the specified RecentEmojiWeightsAction message. Does not implicitly {@link proto.SyncActionValue.RecentEmojiWeightsAction.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.RecentEmojiWeightsAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.RecentEmojiWeightsAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.RecentEmojiWeightsAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.RecentEmojiWeightsAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.RecentEmojiWeightsAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.RecentEmojiWeightsAction + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.RecentEmojiWeightsAction} RecentEmojiWeightsAction + */ + RecentEmojiWeightsAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.RecentEmojiWeightsAction) + return object; + var message = new $root.proto.SyncActionValue.RecentEmojiWeightsAction(); + if (object.weights) { + if (!Array.isArray(object.weights)) + throw TypeError(".proto.SyncActionValue.RecentEmojiWeightsAction.weights: array expected"); + message.weights = []; + for (var i = 0; i < object.weights.length; ++i) { + if (typeof object.weights[i] !== "object") + throw TypeError(".proto.SyncActionValue.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.SyncActionValue.RecentEmojiWeightsAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.RecentEmojiWeightsAction + * @instance + * @returns {Object.} JSON object + */ + RecentEmojiWeightsAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RecentEmojiWeightsAction; + })(); + + SyncActionValue.SecurityNotificationSetting = (function() { + + /** + * Properties of a SecurityNotificationSetting. + * @memberof proto.SyncActionValue + * @interface ISecurityNotificationSetting + * @property {boolean|null} [showNotification] SecurityNotificationSetting showNotification + */ + + /** + * Constructs a new SecurityNotificationSetting. + * @memberof proto.SyncActionValue + * @classdesc Represents a SecurityNotificationSetting. + * @implements ISecurityNotificationSetting + * @constructor + * @param {proto.SyncActionValue.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.SyncActionValue.SecurityNotificationSetting + * @instance + */ + SecurityNotificationSetting.prototype.showNotification = false; + + /** + * Creates a new SecurityNotificationSetting instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.SecurityNotificationSetting + * @static + * @param {proto.SyncActionValue.ISecurityNotificationSetting=} [properties] Properties to set + * @returns {proto.SyncActionValue.SecurityNotificationSetting} SecurityNotificationSetting instance + */ + SecurityNotificationSetting.create = function create(properties) { + return new SecurityNotificationSetting(properties); + }; + + /** + * Encodes the specified SecurityNotificationSetting message. Does not implicitly {@link proto.SyncActionValue.SecurityNotificationSetting.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.SecurityNotificationSetting + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.SecurityNotificationSetting.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.SecurityNotificationSetting + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.SecurityNotificationSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.SecurityNotificationSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.SecurityNotificationSetting + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.SecurityNotificationSetting} SecurityNotificationSetting + */ + SecurityNotificationSetting.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.SecurityNotificationSetting) + return object; + var message = new $root.proto.SyncActionValue.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.SyncActionValue.SecurityNotificationSetting + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.SecurityNotificationSetting + * @instance + * @returns {Object.} JSON object + */ + SecurityNotificationSetting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SecurityNotificationSetting; + })(); + + SyncActionValue.StarAction = (function() { + + /** + * Properties of a StarAction. + * @memberof proto.SyncActionValue + * @interface IStarAction + * @property {boolean|null} [starred] StarAction starred + */ + + /** + * Constructs a new StarAction. + * @memberof proto.SyncActionValue + * @classdesc Represents a StarAction. + * @implements IStarAction + * @constructor + * @param {proto.SyncActionValue.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.SyncActionValue.StarAction + * @instance + */ + StarAction.prototype.starred = false; + + /** + * Creates a new StarAction instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.StarAction + * @static + * @param {proto.SyncActionValue.IStarAction=} [properties] Properties to set + * @returns {proto.SyncActionValue.StarAction} StarAction instance + */ + StarAction.create = function create(properties) { + return new StarAction(properties); + }; + + /** + * Encodes the specified StarAction message. Does not implicitly {@link proto.SyncActionValue.StarAction.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.StarAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.StarAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.StarAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.StarAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.StarAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.StarAction + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.StarAction} StarAction + */ + StarAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.StarAction) + return object; + var message = new $root.proto.SyncActionValue.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.SyncActionValue.StarAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.StarAction + * @instance + * @returns {Object.} JSON object + */ + StarAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return StarAction; + })(); + + SyncActionValue.StickerAction = (function() { + + /** + * Properties of a StickerAction. + * @memberof proto.SyncActionValue + * @interface IStickerAction + * @property {string|null} [url] StickerAction url + * @property {Uint8Array|null} [fileEncSha256] StickerAction fileEncSha256 + * @property {Uint8Array|null} [mediaKey] StickerAction mediaKey + * @property {string|null} [mimetype] StickerAction mimetype + * @property {number|null} [height] StickerAction height + * @property {number|null} [width] StickerAction width + * @property {string|null} [directPath] StickerAction directPath + * @property {number|Long|null} [fileLength] StickerAction fileLength + * @property {boolean|null} [isFavorite] StickerAction isFavorite + * @property {number|null} [deviceIdHint] StickerAction deviceIdHint + */ + + /** + * Constructs a new StickerAction. + * @memberof proto.SyncActionValue + * @classdesc Represents a StickerAction. + * @implements IStickerAction + * @constructor + * @param {proto.SyncActionValue.IStickerAction=} [properties] Properties to set + */ + function StickerAction(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]]; + } + + /** + * StickerAction url. + * @member {string} url + * @memberof proto.SyncActionValue.StickerAction + * @instance + */ + StickerAction.prototype.url = ""; + + /** + * StickerAction fileEncSha256. + * @member {Uint8Array} fileEncSha256 + * @memberof proto.SyncActionValue.StickerAction + * @instance + */ + StickerAction.prototype.fileEncSha256 = $util.newBuffer([]); + + /** + * StickerAction mediaKey. + * @member {Uint8Array} mediaKey + * @memberof proto.SyncActionValue.StickerAction + * @instance + */ + StickerAction.prototype.mediaKey = $util.newBuffer([]); + + /** + * StickerAction mimetype. + * @member {string} mimetype + * @memberof proto.SyncActionValue.StickerAction + * @instance + */ + StickerAction.prototype.mimetype = ""; + + /** + * StickerAction height. + * @member {number} height + * @memberof proto.SyncActionValue.StickerAction + * @instance + */ + StickerAction.prototype.height = 0; + + /** + * StickerAction width. + * @member {number} width + * @memberof proto.SyncActionValue.StickerAction + * @instance + */ + StickerAction.prototype.width = 0; + + /** + * StickerAction directPath. + * @member {string} directPath + * @memberof proto.SyncActionValue.StickerAction + * @instance + */ + StickerAction.prototype.directPath = ""; + + /** + * StickerAction fileLength. + * @member {number|Long} fileLength + * @memberof proto.SyncActionValue.StickerAction + * @instance + */ + StickerAction.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * StickerAction isFavorite. + * @member {boolean} isFavorite + * @memberof proto.SyncActionValue.StickerAction + * @instance + */ + StickerAction.prototype.isFavorite = false; + + /** + * StickerAction deviceIdHint. + * @member {number} deviceIdHint + * @memberof proto.SyncActionValue.StickerAction + * @instance + */ + StickerAction.prototype.deviceIdHint = 0; + + /** + * Creates a new StickerAction instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.StickerAction + * @static + * @param {proto.SyncActionValue.IStickerAction=} [properties] Properties to set + * @returns {proto.SyncActionValue.StickerAction} StickerAction instance + */ + StickerAction.create = function create(properties) { + return new StickerAction(properties); + }; + + /** + * Encodes the specified StickerAction message. Does not implicitly {@link proto.SyncActionValue.StickerAction.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.StickerAction + * @static + * @param {proto.SyncActionValue.IStickerAction} message StickerAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StickerAction.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.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.fileEncSha256); + if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.mediaKey); + if (message.mimetype != null && Object.hasOwnProperty.call(message, "mimetype")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.mimetype); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.height); + if (message.width != null && Object.hasOwnProperty.call(message, "width")) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.width); + if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.directPath); + if (message.fileLength != null && Object.hasOwnProperty.call(message, "fileLength")) + writer.uint32(/* id 8, wireType 0 =*/64).uint64(message.fileLength); + if (message.isFavorite != null && Object.hasOwnProperty.call(message, "isFavorite")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.isFavorite); + if (message.deviceIdHint != null && Object.hasOwnProperty.call(message, "deviceIdHint")) + writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.deviceIdHint); + return writer; + }; + + /** + * Encodes the specified StickerAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.StickerAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.StickerAction + * @static + * @param {proto.SyncActionValue.IStickerAction} message StickerAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StickerAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StickerAction message from the specified reader or buffer. + * @function decode + * @memberof proto.SyncActionValue.StickerAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.StickerAction} StickerAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StickerAction.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.StickerAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.url = reader.string(); + break; + case 2: + message.fileEncSha256 = reader.bytes(); + break; + case 3: + message.mediaKey = reader.bytes(); + break; + case 4: + message.mimetype = reader.string(); + break; + case 5: + message.height = reader.uint32(); + break; + case 6: + message.width = reader.uint32(); + break; + case 7: + message.directPath = reader.string(); + break; + case 8: + message.fileLength = reader.uint64(); + break; + case 9: + message.isFavorite = reader.bool(); + break; + case 10: + message.deviceIdHint = reader.uint32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StickerAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SyncActionValue.StickerAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.StickerAction} StickerAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StickerAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StickerAction message. + * @function verify + * @memberof proto.SyncActionValue.StickerAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StickerAction.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.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) + if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256))) + return "fileEncSha256: buffer 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.mimetype != null && message.hasOwnProperty("mimetype")) + if (!$util.isString(message.mimetype)) + return "mimetype: string 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.directPath != null && message.hasOwnProperty("directPath")) + if (!$util.isString(message.directPath)) + return "directPath: string 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.isFavorite != null && message.hasOwnProperty("isFavorite")) + if (typeof message.isFavorite !== "boolean") + return "isFavorite: boolean expected"; + if (message.deviceIdHint != null && message.hasOwnProperty("deviceIdHint")) + if (!$util.isInteger(message.deviceIdHint)) + return "deviceIdHint: integer expected"; + return null; + }; + + /** + * Creates a StickerAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SyncActionValue.StickerAction + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.StickerAction} StickerAction + */ + StickerAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.StickerAction) + return object; + var message = new $root.proto.SyncActionValue.StickerAction(); + if (object.url != null) + message.url = String(object.url); + 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.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.mimetype != null) + message.mimetype = String(object.mimetype); + if (object.height != null) + message.height = object.height >>> 0; + if (object.width != null) + message.width = object.width >>> 0; + if (object.directPath != null) + message.directPath = String(object.directPath); + 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.isFavorite != null) + message.isFavorite = Boolean(object.isFavorite); + if (object.deviceIdHint != null) + message.deviceIdHint = object.deviceIdHint >>> 0; + return message; + }; + + /** + * Creates a plain object from a StickerAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SyncActionValue.StickerAction + * @static + * @param {proto.SyncActionValue.StickerAction} message StickerAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StickerAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.url = ""; + if (options.bytes === String) + object.fileEncSha256 = ""; + else { + object.fileEncSha256 = []; + if (options.bytes !== Array) + object.fileEncSha256 = $util.newBuffer(object.fileEncSha256); + } + if (options.bytes === String) + object.mediaKey = ""; + else { + object.mediaKey = []; + if (options.bytes !== Array) + object.mediaKey = $util.newBuffer(object.mediaKey); + } + object.mimetype = ""; + object.height = 0; + object.width = 0; + object.directPath = ""; + 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.isFavorite = false; + object.deviceIdHint = 0; + } + if (message.url != null && message.hasOwnProperty("url")) + object.url = message.url; + 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.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.mimetype != null && message.hasOwnProperty("mimetype")) + object.mimetype = message.mimetype; + if (message.height != null && message.hasOwnProperty("height")) + object.height = message.height; + if (message.width != null && message.hasOwnProperty("width")) + object.width = message.width; + if (message.directPath != null && message.hasOwnProperty("directPath")) + object.directPath = message.directPath; + 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.isFavorite != null && message.hasOwnProperty("isFavorite")) + object.isFavorite = message.isFavorite; + if (message.deviceIdHint != null && message.hasOwnProperty("deviceIdHint")) + object.deviceIdHint = message.deviceIdHint; + return object; + }; + + /** + * Converts this StickerAction to JSON. + * @function toJSON + * @memberof proto.SyncActionValue.StickerAction + * @instance + * @returns {Object.} JSON object + */ + StickerAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return StickerAction; + })(); + + SyncActionValue.SubscriptionAction = (function() { + + /** + * Properties of a SubscriptionAction. + * @memberof proto.SyncActionValue + * @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.SyncActionValue + * @classdesc Represents a SubscriptionAction. + * @implements ISubscriptionAction + * @constructor + * @param {proto.SyncActionValue.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.SyncActionValue.SubscriptionAction + * @instance + */ + SubscriptionAction.prototype.isDeactivated = false; + + /** + * SubscriptionAction isAutoRenewing. + * @member {boolean} isAutoRenewing + * @memberof proto.SyncActionValue.SubscriptionAction + * @instance + */ + SubscriptionAction.prototype.isAutoRenewing = false; + + /** + * SubscriptionAction expirationDate. + * @member {number|Long} expirationDate + * @memberof proto.SyncActionValue.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.SyncActionValue.SubscriptionAction + * @static + * @param {proto.SyncActionValue.ISubscriptionAction=} [properties] Properties to set + * @returns {proto.SyncActionValue.SubscriptionAction} SubscriptionAction instance + */ + SubscriptionAction.create = function create(properties) { + return new SubscriptionAction(properties); + }; + + /** + * Encodes the specified SubscriptionAction message. Does not implicitly {@link proto.SyncActionValue.SubscriptionAction.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.SubscriptionAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.SubscriptionAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.SubscriptionAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.SubscriptionAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.SubscriptionAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.SubscriptionAction + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.SubscriptionAction} SubscriptionAction + */ + SubscriptionAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.SubscriptionAction) + return object; + var message = new $root.proto.SyncActionValue.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.SyncActionValue.SubscriptionAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.SubscriptionAction + * @instance + * @returns {Object.} JSON object + */ + SubscriptionAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SubscriptionAction; + })(); + + SyncActionValue.SyncActionMessageRange = (function() { + + /** + * Properties of a SyncActionMessageRange. + * @memberof proto.SyncActionValue + * @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.SyncActionValue + * @classdesc Represents a SyncActionMessageRange. + * @implements ISyncActionMessageRange + * @constructor + * @param {proto.SyncActionValue.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.SyncActionValue.SyncActionMessageRange + * @instance + */ + SyncActionMessageRange.prototype.lastMessageTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * SyncActionMessageRange lastSystemMessageTimestamp. + * @member {number|Long} lastSystemMessageTimestamp + * @memberof proto.SyncActionValue.SyncActionMessageRange + * @instance + */ + SyncActionMessageRange.prototype.lastSystemMessageTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * SyncActionMessageRange messages. + * @member {Array.} messages + * @memberof proto.SyncActionValue.SyncActionMessageRange + * @instance + */ + SyncActionMessageRange.prototype.messages = $util.emptyArray; + + /** + * Creates a new SyncActionMessageRange instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.SyncActionMessageRange + * @static + * @param {proto.SyncActionValue.ISyncActionMessageRange=} [properties] Properties to set + * @returns {proto.SyncActionValue.SyncActionMessageRange} SyncActionMessageRange instance + */ + SyncActionMessageRange.create = function create(properties) { + return new SyncActionMessageRange(properties); + }; + + /** + * Encodes the specified SyncActionMessageRange message. Does not implicitly {@link proto.SyncActionValue.SyncActionMessageRange.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.SyncActionMessageRange + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.SyncActionMessageRange.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.SyncActionMessageRange + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.SyncActionMessageRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.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.SyncActionValue.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(); + break; + case 3: + if (!(message.messages && message.messages.length)) + message.messages = []; + message.messages.push($root.proto.SyncActionValue.SyncActionMessage.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SyncActionMessageRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SyncActionValue.SyncActionMessageRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.SyncActionMessageRange} SyncActionMessageRange + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SyncActionMessageRange message. + * @function verify + * @memberof proto.SyncActionValue.SyncActionMessageRange + * @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) { + 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.SyncActionValue.SyncActionMessage.verify(message.messages[i]); + if (error) + return "messages." + error; + } + } + return null; + }; + + /** + * Creates a SyncActionMessageRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SyncActionValue.SyncActionMessageRange + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.SyncActionMessageRange} SyncActionMessageRange + */ + SyncActionMessageRange.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.SyncActionMessageRange) + return object; + var message = new $root.proto.SyncActionValue.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.SyncActionValue.SyncActionMessageRange.messages: array expected"); + message.messages = []; + for (var i = 0; i < object.messages.length; ++i) { + if (typeof object.messages[i] !== "object") + throw TypeError(".proto.SyncActionValue.SyncActionMessageRange.messages: object expected"); + message.messages[i] = $root.proto.SyncActionValue.SyncActionMessage.fromObject(object.messages[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SyncActionMessageRange message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SyncActionValue.SyncActionMessageRange + * @static + * @param {proto.SyncActionValue.SyncActionMessageRange} message SyncActionMessageRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SyncActionMessageRange.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 (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.SyncActionValue.SyncActionMessage.toObject(message.messages[j], options); + } + return object; + }; + + /** + * Converts this SyncActionMessageRange to JSON. + * @function toJSON + * @memberof proto.SyncActionValue.SyncActionMessageRange + * @instance + * @returns {Object.} JSON object + */ + SyncActionMessageRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SyncActionMessageRange; + })(); + + SyncActionValue.SyncActionMessage = (function() { + + /** + * Properties of a SyncActionMessage. + * @memberof proto.SyncActionValue + * @interface ISyncActionMessage + * @property {proto.IMessageKey|null} [key] SyncActionMessage key + * @property {number|Long|null} [timestamp] SyncActionMessage timestamp + */ + + /** + * Constructs a new SyncActionMessage. + * @memberof proto.SyncActionValue + * @classdesc Represents a SyncActionMessage. + * @implements ISyncActionMessage + * @constructor + * @param {proto.SyncActionValue.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.SyncActionValue.SyncActionMessage + * @instance + */ + SyncActionMessage.prototype.key = null; + + /** + * SyncActionMessage timestamp. + * @member {number|Long} timestamp + * @memberof proto.SyncActionValue.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.SyncActionValue.SyncActionMessage + * @static + * @param {proto.SyncActionValue.ISyncActionMessage=} [properties] Properties to set + * @returns {proto.SyncActionValue.SyncActionMessage} SyncActionMessage instance + */ + SyncActionMessage.create = function create(properties) { + return new SyncActionMessage(properties); + }; + + /** + * Encodes the specified SyncActionMessage message. Does not implicitly {@link proto.SyncActionValue.SyncActionMessage.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.SyncActionMessage + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.SyncActionMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.SyncActionMessage + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.SyncActionMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.SyncActionMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.SyncActionMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.SyncActionMessage} SyncActionMessage + */ + SyncActionMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.SyncActionMessage) + return object; + var message = new $root.proto.SyncActionValue.SyncActionMessage(); + if (object.key != null) { + if (typeof object.key !== "object") + throw TypeError(".proto.SyncActionValue.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.SyncActionValue.SyncActionMessage + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.SyncActionMessage + * @instance + * @returns {Object.} JSON object + */ + SyncActionMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SyncActionMessage; + })(); + + SyncActionValue.TimeFormatAction = (function() { + + /** + * Properties of a TimeFormatAction. + * @memberof proto.SyncActionValue + * @interface ITimeFormatAction + * @property {boolean|null} [isTwentyFourHourFormatEnabled] TimeFormatAction isTwentyFourHourFormatEnabled + */ + + /** + * Constructs a new TimeFormatAction. + * @memberof proto.SyncActionValue + * @classdesc Represents a TimeFormatAction. + * @implements ITimeFormatAction + * @constructor + * @param {proto.SyncActionValue.ITimeFormatAction=} [properties] Properties to set + */ + function TimeFormatAction(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]]; + } + + /** + * TimeFormatAction isTwentyFourHourFormatEnabled. + * @member {boolean} isTwentyFourHourFormatEnabled + * @memberof proto.SyncActionValue.TimeFormatAction + * @instance + */ + TimeFormatAction.prototype.isTwentyFourHourFormatEnabled = false; + + /** + * Creates a new TimeFormatAction instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.TimeFormatAction + * @static + * @param {proto.SyncActionValue.ITimeFormatAction=} [properties] Properties to set + * @returns {proto.SyncActionValue.TimeFormatAction} TimeFormatAction instance + */ + TimeFormatAction.create = function create(properties) { + return new TimeFormatAction(properties); + }; + + /** + * Encodes the specified TimeFormatAction message. Does not implicitly {@link proto.SyncActionValue.TimeFormatAction.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.TimeFormatAction + * @static + * @param {proto.SyncActionValue.ITimeFormatAction} message TimeFormatAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeFormatAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.isTwentyFourHourFormatEnabled != null && Object.hasOwnProperty.call(message, "isTwentyFourHourFormatEnabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isTwentyFourHourFormatEnabled); + return writer; + }; + + /** + * Encodes the specified TimeFormatAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.TimeFormatAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.TimeFormatAction + * @static + * @param {proto.SyncActionValue.ITimeFormatAction} message TimeFormatAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeFormatAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimeFormatAction message from the specified reader or buffer. + * @function decode + * @memberof proto.SyncActionValue.TimeFormatAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.TimeFormatAction} TimeFormatAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeFormatAction.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.TimeFormatAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.isTwentyFourHourFormatEnabled = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TimeFormatAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SyncActionValue.TimeFormatAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.TimeFormatAction} TimeFormatAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeFormatAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeFormatAction message. + * @function verify + * @memberof proto.SyncActionValue.TimeFormatAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeFormatAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.isTwentyFourHourFormatEnabled != null && message.hasOwnProperty("isTwentyFourHourFormatEnabled")) + if (typeof message.isTwentyFourHourFormatEnabled !== "boolean") + return "isTwentyFourHourFormatEnabled: boolean expected"; + return null; + }; + + /** + * Creates a TimeFormatAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SyncActionValue.TimeFormatAction + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.TimeFormatAction} TimeFormatAction + */ + TimeFormatAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.TimeFormatAction) + return object; + var message = new $root.proto.SyncActionValue.TimeFormatAction(); + if (object.isTwentyFourHourFormatEnabled != null) + message.isTwentyFourHourFormatEnabled = Boolean(object.isTwentyFourHourFormatEnabled); + return message; + }; + + /** + * Creates a plain object from a TimeFormatAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SyncActionValue.TimeFormatAction + * @static + * @param {proto.SyncActionValue.TimeFormatAction} message TimeFormatAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeFormatAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.isTwentyFourHourFormatEnabled = false; + if (message.isTwentyFourHourFormatEnabled != null && message.hasOwnProperty("isTwentyFourHourFormatEnabled")) + object.isTwentyFourHourFormatEnabled = message.isTwentyFourHourFormatEnabled; + return object; + }; + + /** + * Converts this TimeFormatAction to JSON. + * @function toJSON + * @memberof proto.SyncActionValue.TimeFormatAction + * @instance + * @returns {Object.} JSON object + */ + TimeFormatAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TimeFormatAction; + })(); + + SyncActionValue.UnarchiveChatsSetting = (function() { + + /** + * Properties of an UnarchiveChatsSetting. + * @memberof proto.SyncActionValue + * @interface IUnarchiveChatsSetting + * @property {boolean|null} [unarchiveChats] UnarchiveChatsSetting unarchiveChats + */ + + /** + * Constructs a new UnarchiveChatsSetting. + * @memberof proto.SyncActionValue + * @classdesc Represents an UnarchiveChatsSetting. + * @implements IUnarchiveChatsSetting + * @constructor + * @param {proto.SyncActionValue.IUnarchiveChatsSetting=} [properties] Properties to set + */ + function UnarchiveChatsSetting(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]]; + } + + /** + * UnarchiveChatsSetting unarchiveChats. + * @member {boolean} unarchiveChats + * @memberof proto.SyncActionValue.UnarchiveChatsSetting + * @instance + */ + UnarchiveChatsSetting.prototype.unarchiveChats = false; + + /** + * Creates a new UnarchiveChatsSetting instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.UnarchiveChatsSetting + * @static + * @param {proto.SyncActionValue.IUnarchiveChatsSetting=} [properties] Properties to set + * @returns {proto.SyncActionValue.UnarchiveChatsSetting} UnarchiveChatsSetting instance + */ + UnarchiveChatsSetting.create = function create(properties) { + return new UnarchiveChatsSetting(properties); + }; + + /** + * Encodes the specified UnarchiveChatsSetting message. Does not implicitly {@link proto.SyncActionValue.UnarchiveChatsSetting.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.UnarchiveChatsSetting + * @static + * @param {proto.SyncActionValue.IUnarchiveChatsSetting} message UnarchiveChatsSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnarchiveChatsSetting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.unarchiveChats != null && Object.hasOwnProperty.call(message, "unarchiveChats")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.unarchiveChats); + return writer; + }; + + /** + * Encodes the specified UnarchiveChatsSetting message, length delimited. Does not implicitly {@link proto.SyncActionValue.UnarchiveChatsSetting.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.UnarchiveChatsSetting + * @static + * @param {proto.SyncActionValue.IUnarchiveChatsSetting} message UnarchiveChatsSetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnarchiveChatsSetting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UnarchiveChatsSetting message from the specified reader or buffer. + * @function decode + * @memberof proto.SyncActionValue.UnarchiveChatsSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.UnarchiveChatsSetting} UnarchiveChatsSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnarchiveChatsSetting.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.UnarchiveChatsSetting(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.unarchiveChats = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UnarchiveChatsSetting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SyncActionValue.UnarchiveChatsSetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.UnarchiveChatsSetting} UnarchiveChatsSetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnarchiveChatsSetting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UnarchiveChatsSetting message. + * @function verify + * @memberof proto.SyncActionValue.UnarchiveChatsSetting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UnarchiveChatsSetting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.unarchiveChats != null && message.hasOwnProperty("unarchiveChats")) + if (typeof message.unarchiveChats !== "boolean") + return "unarchiveChats: boolean expected"; + return null; + }; + + /** + * Creates an UnarchiveChatsSetting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SyncActionValue.UnarchiveChatsSetting + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.UnarchiveChatsSetting} UnarchiveChatsSetting + */ + UnarchiveChatsSetting.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.UnarchiveChatsSetting) + return object; + var message = new $root.proto.SyncActionValue.UnarchiveChatsSetting(); + if (object.unarchiveChats != null) + message.unarchiveChats = Boolean(object.unarchiveChats); + return message; + }; + + /** + * Creates a plain object from an UnarchiveChatsSetting message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SyncActionValue.UnarchiveChatsSetting + * @static + * @param {proto.SyncActionValue.UnarchiveChatsSetting} message UnarchiveChatsSetting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UnarchiveChatsSetting.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.unarchiveChats = false; + if (message.unarchiveChats != null && message.hasOwnProperty("unarchiveChats")) + object.unarchiveChats = message.unarchiveChats; + return object; + }; + + /** + * Converts this UnarchiveChatsSetting to JSON. + * @function toJSON + * @memberof proto.SyncActionValue.UnarchiveChatsSetting + * @instance + * @returns {Object.} JSON object + */ + UnarchiveChatsSetting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UnarchiveChatsSetting; + })(); + + SyncActionValue.UserStatusMuteAction = (function() { + + /** + * Properties of a UserStatusMuteAction. + * @memberof proto.SyncActionValue + * @interface IUserStatusMuteAction + * @property {boolean|null} [muted] UserStatusMuteAction muted + */ + + /** + * Constructs a new UserStatusMuteAction. + * @memberof proto.SyncActionValue + * @classdesc Represents a UserStatusMuteAction. + * @implements IUserStatusMuteAction + * @constructor + * @param {proto.SyncActionValue.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.SyncActionValue.UserStatusMuteAction + * @instance + */ + UserStatusMuteAction.prototype.muted = false; + + /** + * Creates a new UserStatusMuteAction instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.UserStatusMuteAction + * @static + * @param {proto.SyncActionValue.IUserStatusMuteAction=} [properties] Properties to set + * @returns {proto.SyncActionValue.UserStatusMuteAction} UserStatusMuteAction instance + */ + UserStatusMuteAction.create = function create(properties) { + return new UserStatusMuteAction(properties); + }; + + /** + * Encodes the specified UserStatusMuteAction message. Does not implicitly {@link proto.SyncActionValue.UserStatusMuteAction.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.UserStatusMuteAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.UserStatusMuteAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.UserStatusMuteAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.UserStatusMuteAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.UserStatusMuteAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.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.SyncActionValue.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.SyncActionValue.UserStatusMuteAction + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.UserStatusMuteAction} UserStatusMuteAction + */ + UserStatusMuteAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.UserStatusMuteAction) + return object; + var message = new $root.proto.SyncActionValue.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.SyncActionValue.UserStatusMuteAction + * @static + * @param {proto.SyncActionValue.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.SyncActionValue.UserStatusMuteAction + * @instance + * @returns {Object.} JSON object + */ + UserStatusMuteAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UserStatusMuteAction; + })(); + return SyncActionValue; })(); @@ -58444,7 +63698,7 @@ $root.proto = (function() { * Properties of a SyncdMutation. * @memberof proto * @interface ISyncdMutation - * @property {proto.SyncdMutation.SyncdMutationSyncdOperation|null} [operation] SyncdMutation operation + * @property {proto.SyncdMutation.SyncdOperation|null} [operation] SyncdMutation operation * @property {proto.ISyncdRecord|null} [record] SyncdMutation record */ @@ -58465,7 +63719,7 @@ $root.proto = (function() { /** * SyncdMutation operation. - * @member {proto.SyncdMutation.SyncdMutationSyncdOperation} operation + * @member {proto.SyncdMutation.SyncdOperation} operation * @memberof proto.SyncdMutation * @instance */ @@ -58646,7 +63900,7 @@ $root.proto = (function() { object.record = null; } if (message.operation != null && message.hasOwnProperty("operation")) - object.operation = options.enums === String ? $root.proto.SyncdMutation.SyncdMutationSyncdOperation[message.operation] : message.operation; + object.operation = options.enums === String ? $root.proto.SyncdMutation.SyncdOperation[message.operation] : message.operation; if (message.record != null && message.hasOwnProperty("record")) object.record = $root.proto.SyncdRecord.toObject(message.record, options); return object; @@ -58664,13 +63918,13 @@ $root.proto = (function() { }; /** - * SyncdMutationSyncdOperation enum. - * @name proto.SyncdMutation.SyncdMutationSyncdOperation + * SyncdOperation enum. + * @name proto.SyncdMutation.SyncdOperation * @enum {number} * @property {number} SET=0 SET value * @property {number} REMOVE=1 REMOVE value */ - SyncdMutation.SyncdMutationSyncdOperation = (function() { + SyncdMutation.SyncdOperation = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "SET"] = 0; values[valuesById[1] = "REMOVE"] = 1; @@ -60236,9 +65490,9 @@ $root.proto = (function() { * @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 + * @property {proto.TemplateButton.IQuickReplyButton|null} [quickReplyButton] TemplateButton quickReplyButton + * @property {proto.TemplateButton.IURLButton|null} [urlButton] TemplateButton urlButton + * @property {proto.TemplateButton.ICallButton|null} [callButton] TemplateButton callButton */ /** @@ -60266,7 +65520,7 @@ $root.proto = (function() { /** * TemplateButton quickReplyButton. - * @member {proto.IQuickReplyButton|null|undefined} quickReplyButton + * @member {proto.TemplateButton.IQuickReplyButton|null|undefined} quickReplyButton * @memberof proto.TemplateButton * @instance */ @@ -60274,7 +65528,7 @@ $root.proto = (function() { /** * TemplateButton urlButton. - * @member {proto.IURLButton|null|undefined} urlButton + * @member {proto.TemplateButton.IURLButton|null|undefined} urlButton * @memberof proto.TemplateButton * @instance */ @@ -60282,7 +65536,7 @@ $root.proto = (function() { /** * TemplateButton callButton. - * @member {proto.ICallButton|null|undefined} callButton + * @member {proto.TemplateButton.ICallButton|null|undefined} callButton * @memberof proto.TemplateButton * @instance */ @@ -60327,11 +65581,11 @@ $root.proto = (function() { 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(); + $root.proto.TemplateButton.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(); + $root.proto.TemplateButton.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(); + $root.proto.TemplateButton.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); return writer; @@ -60372,13 +65626,13 @@ $root.proto = (function() { message.index = reader.uint32(); break; case 1: - message.quickReplyButton = $root.proto.QuickReplyButton.decode(reader, reader.uint32()); + message.quickReplyButton = $root.proto.TemplateButton.QuickReplyButton.decode(reader, reader.uint32()); break; case 2: - message.urlButton = $root.proto.URLButton.decode(reader, reader.uint32()); + message.urlButton = $root.proto.TemplateButton.URLButton.decode(reader, reader.uint32()); break; case 3: - message.callButton = $root.proto.CallButton.decode(reader, reader.uint32()); + message.callButton = $root.proto.TemplateButton.CallButton.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -60422,7 +65676,7 @@ $root.proto = (function() { if (message.quickReplyButton != null && message.hasOwnProperty("quickReplyButton")) { properties.button = 1; { - var error = $root.proto.QuickReplyButton.verify(message.quickReplyButton); + var error = $root.proto.TemplateButton.QuickReplyButton.verify(message.quickReplyButton); if (error) return "quickReplyButton." + error; } @@ -60432,7 +65686,7 @@ $root.proto = (function() { return "button: multiple values"; properties.button = 1; { - var error = $root.proto.URLButton.verify(message.urlButton); + var error = $root.proto.TemplateButton.URLButton.verify(message.urlButton); if (error) return "urlButton." + error; } @@ -60442,7 +65696,7 @@ $root.proto = (function() { return "button: multiple values"; properties.button = 1; { - var error = $root.proto.CallButton.verify(message.callButton); + var error = $root.proto.TemplateButton.CallButton.verify(message.callButton); if (error) return "callButton." + error; } @@ -60467,17 +65721,17 @@ $root.proto = (function() { if (object.quickReplyButton != null) { if (typeof object.quickReplyButton !== "object") throw TypeError(".proto.TemplateButton.quickReplyButton: object expected"); - message.quickReplyButton = $root.proto.QuickReplyButton.fromObject(object.quickReplyButton); + message.quickReplyButton = $root.proto.TemplateButton.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); + message.urlButton = $root.proto.TemplateButton.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); + message.callButton = $root.proto.TemplateButton.CallButton.fromObject(object.callButton); } return message; }; @@ -60498,17 +65752,17 @@ $root.proto = (function() { if (options.defaults) object.index = 0; if (message.quickReplyButton != null && message.hasOwnProperty("quickReplyButton")) { - object.quickReplyButton = $root.proto.QuickReplyButton.toObject(message.quickReplyButton, options); + object.quickReplyButton = $root.proto.TemplateButton.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); + object.urlButton = $root.proto.TemplateButton.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); + object.callButton = $root.proto.TemplateButton.CallButton.toObject(message.callButton, options); if (options.oneofs) object.button = "callButton"; } @@ -60528,1877 +65782,664 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + TemplateButton.CallButton = (function() { + + /** + * Properties of a CallButton. + * @memberof proto.TemplateButton + * @interface ICallButton + * @property {proto.Message.IHighlyStructuredMessage|null} [displayText] CallButton displayText + * @property {proto.Message.IHighlyStructuredMessage|null} [phoneNumber] CallButton phoneNumber + */ + + /** + * Constructs a new CallButton. + * @memberof proto.TemplateButton + * @classdesc Represents a CallButton. + * @implements ICallButton + * @constructor + * @param {proto.TemplateButton.ICallButton=} [properties] Properties to set + */ + function CallButton(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]]; + } + + /** + * CallButton displayText. + * @member {proto.Message.IHighlyStructuredMessage|null|undefined} displayText + * @memberof proto.TemplateButton.CallButton + * @instance + */ + CallButton.prototype.displayText = null; + + /** + * CallButton phoneNumber. + * @member {proto.Message.IHighlyStructuredMessage|null|undefined} phoneNumber + * @memberof proto.TemplateButton.CallButton + * @instance + */ + CallButton.prototype.phoneNumber = null; + + /** + * Creates a new CallButton instance using the specified properties. + * @function create + * @memberof proto.TemplateButton.CallButton + * @static + * @param {proto.TemplateButton.ICallButton=} [properties] Properties to set + * @returns {proto.TemplateButton.CallButton} CallButton instance + */ + CallButton.create = function create(properties) { + return new CallButton(properties); + }; + + /** + * Encodes the specified CallButton message. Does not implicitly {@link proto.TemplateButton.CallButton.verify|verify} messages. + * @function encode + * @memberof proto.TemplateButton.CallButton + * @static + * @param {proto.TemplateButton.ICallButton} message CallButton message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CallButton.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayText != null && Object.hasOwnProperty.call(message, "displayText")) + $root.proto.Message.HighlyStructuredMessage.encode(message.displayText, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.phoneNumber != null && Object.hasOwnProperty.call(message, "phoneNumber")) + $root.proto.Message.HighlyStructuredMessage.encode(message.phoneNumber, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CallButton message, length delimited. Does not implicitly {@link proto.TemplateButton.CallButton.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.TemplateButton.CallButton + * @static + * @param {proto.TemplateButton.ICallButton} message CallButton message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CallButton.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CallButton message from the specified reader or buffer. + * @function decode + * @memberof proto.TemplateButton.CallButton + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.TemplateButton.CallButton} CallButton + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CallButton.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.CallButton(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.displayText = $root.proto.Message.HighlyStructuredMessage.decode(reader, reader.uint32()); + break; + case 2: + message.phoneNumber = $root.proto.Message.HighlyStructuredMessage.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CallButton message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.TemplateButton.CallButton + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.TemplateButton.CallButton} CallButton + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CallButton.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CallButton message. + * @function verify + * @memberof proto.TemplateButton.CallButton + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CallButton.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayText != null && message.hasOwnProperty("displayText")) { + var error = $root.proto.Message.HighlyStructuredMessage.verify(message.displayText); + if (error) + return "displayText." + error; + } + if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) { + var error = $root.proto.Message.HighlyStructuredMessage.verify(message.phoneNumber); + if (error) + return "phoneNumber." + error; + } + return null; + }; + + /** + * Creates a CallButton message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.TemplateButton.CallButton + * @static + * @param {Object.} object Plain object + * @returns {proto.TemplateButton.CallButton} CallButton + */ + CallButton.fromObject = function fromObject(object) { + if (object instanceof $root.proto.TemplateButton.CallButton) + return object; + var message = new $root.proto.TemplateButton.CallButton(); + if (object.displayText != null) { + if (typeof object.displayText !== "object") + throw TypeError(".proto.TemplateButton.CallButton.displayText: object expected"); + message.displayText = $root.proto.Message.HighlyStructuredMessage.fromObject(object.displayText); + } + if (object.phoneNumber != null) { + if (typeof object.phoneNumber !== "object") + throw TypeError(".proto.TemplateButton.CallButton.phoneNumber: object expected"); + message.phoneNumber = $root.proto.Message.HighlyStructuredMessage.fromObject(object.phoneNumber); + } + return message; + }; + + /** + * Creates a plain object from a CallButton message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.TemplateButton.CallButton + * @static + * @param {proto.TemplateButton.CallButton} message CallButton + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CallButton.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayText = null; + object.phoneNumber = null; + } + if (message.displayText != null && message.hasOwnProperty("displayText")) + object.displayText = $root.proto.Message.HighlyStructuredMessage.toObject(message.displayText, options); + if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) + object.phoneNumber = $root.proto.Message.HighlyStructuredMessage.toObject(message.phoneNumber, options); + return object; + }; + + /** + * Converts this CallButton to JSON. + * @function toJSON + * @memberof proto.TemplateButton.CallButton + * @instance + * @returns {Object.} JSON object + */ + CallButton.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CallButton; + })(); + + TemplateButton.QuickReplyButton = (function() { + + /** + * Properties of a QuickReplyButton. + * @memberof proto.TemplateButton + * @interface IQuickReplyButton + * @property {proto.Message.IHighlyStructuredMessage|null} [displayText] QuickReplyButton displayText + * @property {string|null} [id] QuickReplyButton id + */ + + /** + * Constructs a new QuickReplyButton. + * @memberof proto.TemplateButton + * @classdesc Represents a QuickReplyButton. + * @implements IQuickReplyButton + * @constructor + * @param {proto.TemplateButton.IQuickReplyButton=} [properties] Properties to set + */ + function QuickReplyButton(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]]; + } + + /** + * QuickReplyButton displayText. + * @member {proto.Message.IHighlyStructuredMessage|null|undefined} displayText + * @memberof proto.TemplateButton.QuickReplyButton + * @instance + */ + QuickReplyButton.prototype.displayText = null; + + /** + * QuickReplyButton id. + * @member {string} id + * @memberof proto.TemplateButton.QuickReplyButton + * @instance + */ + QuickReplyButton.prototype.id = ""; + + /** + * Creates a new QuickReplyButton instance using the specified properties. + * @function create + * @memberof proto.TemplateButton.QuickReplyButton + * @static + * @param {proto.TemplateButton.IQuickReplyButton=} [properties] Properties to set + * @returns {proto.TemplateButton.QuickReplyButton} QuickReplyButton instance + */ + QuickReplyButton.create = function create(properties) { + return new QuickReplyButton(properties); + }; + + /** + * Encodes the specified QuickReplyButton message. Does not implicitly {@link proto.TemplateButton.QuickReplyButton.verify|verify} messages. + * @function encode + * @memberof proto.TemplateButton.QuickReplyButton + * @static + * @param {proto.TemplateButton.IQuickReplyButton} message QuickReplyButton message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuickReplyButton.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayText != null && Object.hasOwnProperty.call(message, "displayText")) + $root.proto.Message.HighlyStructuredMessage.encode(message.displayText, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); + return writer; + }; + + /** + * Encodes the specified QuickReplyButton message, length delimited. Does not implicitly {@link proto.TemplateButton.QuickReplyButton.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.TemplateButton.QuickReplyButton + * @static + * @param {proto.TemplateButton.IQuickReplyButton} message QuickReplyButton message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuickReplyButton.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuickReplyButton message from the specified reader or buffer. + * @function decode + * @memberof proto.TemplateButton.QuickReplyButton + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.TemplateButton.QuickReplyButton} QuickReplyButton + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuickReplyButton.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.QuickReplyButton(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.displayText = $root.proto.Message.HighlyStructuredMessage.decode(reader, reader.uint32()); + break; + case 2: + message.id = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QuickReplyButton message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.TemplateButton.QuickReplyButton + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.TemplateButton.QuickReplyButton} QuickReplyButton + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuickReplyButton.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuickReplyButton message. + * @function verify + * @memberof proto.TemplateButton.QuickReplyButton + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuickReplyButton.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayText != null && message.hasOwnProperty("displayText")) { + var error = $root.proto.Message.HighlyStructuredMessage.verify(message.displayText); + if (error) + return "displayText." + error; + } + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + return null; + }; + + /** + * Creates a QuickReplyButton message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.TemplateButton.QuickReplyButton + * @static + * @param {Object.} object Plain object + * @returns {proto.TemplateButton.QuickReplyButton} QuickReplyButton + */ + QuickReplyButton.fromObject = function fromObject(object) { + if (object instanceof $root.proto.TemplateButton.QuickReplyButton) + return object; + var message = new $root.proto.TemplateButton.QuickReplyButton(); + if (object.displayText != null) { + if (typeof object.displayText !== "object") + throw TypeError(".proto.TemplateButton.QuickReplyButton.displayText: object expected"); + message.displayText = $root.proto.Message.HighlyStructuredMessage.fromObject(object.displayText); + } + if (object.id != null) + message.id = String(object.id); + return message; + }; + + /** + * Creates a plain object from a QuickReplyButton message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.TemplateButton.QuickReplyButton + * @static + * @param {proto.TemplateButton.QuickReplyButton} message QuickReplyButton + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuickReplyButton.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayText = null; + object.id = ""; + } + if (message.displayText != null && message.hasOwnProperty("displayText")) + object.displayText = $root.proto.Message.HighlyStructuredMessage.toObject(message.displayText, options); + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + return object; + }; + + /** + * Converts this QuickReplyButton to JSON. + * @function toJSON + * @memberof proto.TemplateButton.QuickReplyButton + * @instance + * @returns {Object.} JSON object + */ + QuickReplyButton.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QuickReplyButton; + })(); + + TemplateButton.URLButton = (function() { + + /** + * Properties of a URLButton. + * @memberof proto.TemplateButton + * @interface IURLButton + * @property {proto.Message.IHighlyStructuredMessage|null} [displayText] URLButton displayText + * @property {proto.Message.IHighlyStructuredMessage|null} [url] URLButton url + */ + + /** + * Constructs a new URLButton. + * @memberof proto.TemplateButton + * @classdesc Represents a URLButton. + * @implements IURLButton + * @constructor + * @param {proto.TemplateButton.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.Message.IHighlyStructuredMessage|null|undefined} displayText + * @memberof proto.TemplateButton.URLButton + * @instance + */ + URLButton.prototype.displayText = null; + + /** + * URLButton url. + * @member {proto.Message.IHighlyStructuredMessage|null|undefined} url + * @memberof proto.TemplateButton.URLButton + * @instance + */ + URLButton.prototype.url = null; + + /** + * Creates a new URLButton instance using the specified properties. + * @function create + * @memberof proto.TemplateButton.URLButton + * @static + * @param {proto.TemplateButton.IURLButton=} [properties] Properties to set + * @returns {proto.TemplateButton.URLButton} URLButton instance + */ + URLButton.create = function create(properties) { + return new URLButton(properties); + }; + + /** + * Encodes the specified URLButton message. Does not implicitly {@link proto.TemplateButton.URLButton.verify|verify} messages. + * @function encode + * @memberof proto.TemplateButton.URLButton + * @static + * @param {proto.TemplateButton.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.Message.HighlyStructuredMessage.encode(message.displayText, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.url != null && Object.hasOwnProperty.call(message, "url")) + $root.proto.Message.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.TemplateButton.URLButton.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.TemplateButton.URLButton + * @static + * @param {proto.TemplateButton.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.TemplateButton.URLButton + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.TemplateButton.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.TemplateButton.URLButton(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.displayText = $root.proto.Message.HighlyStructuredMessage.decode(reader, reader.uint32()); + break; + case 2: + message.url = $root.proto.Message.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.TemplateButton.URLButton + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.TemplateButton.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.TemplateButton.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.Message.HighlyStructuredMessage.verify(message.displayText); + if (error) + return "displayText." + error; + } + if (message.url != null && message.hasOwnProperty("url")) { + var error = $root.proto.Message.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.TemplateButton.URLButton + * @static + * @param {Object.} object Plain object + * @returns {proto.TemplateButton.URLButton} URLButton + */ + URLButton.fromObject = function fromObject(object) { + if (object instanceof $root.proto.TemplateButton.URLButton) + return object; + var message = new $root.proto.TemplateButton.URLButton(); + if (object.displayText != null) { + if (typeof object.displayText !== "object") + throw TypeError(".proto.TemplateButton.URLButton.displayText: object expected"); + message.displayText = $root.proto.Message.HighlyStructuredMessage.fromObject(object.displayText); + } + if (object.url != null) { + if (typeof object.url !== "object") + throw TypeError(".proto.TemplateButton.URLButton.url: object expected"); + message.url = $root.proto.Message.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.TemplateButton.URLButton + * @static + * @param {proto.TemplateButton.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.Message.HighlyStructuredMessage.toObject(message.displayText, options); + if (message.url != null && message.hasOwnProperty("url")) + object.url = $root.proto.Message.HighlyStructuredMessage.toObject(message.url, options); + return object; + }; + + /** + * Converts this URLButton to JSON. + * @function toJSON + * @memberof proto.TemplateButton.URLButton + * @instance + * @returns {Object.} JSON object + */ + URLButton.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return URLButton; + })(); + 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.TimeFormatAction = (function() { - - /** - * Properties of a TimeFormatAction. - * @memberof proto - * @interface ITimeFormatAction - * @property {boolean|null} [isTwentyFourHourFormatEnabled] TimeFormatAction isTwentyFourHourFormatEnabled - */ - - /** - * Constructs a new TimeFormatAction. - * @memberof proto - * @classdesc Represents a TimeFormatAction. - * @implements ITimeFormatAction - * @constructor - * @param {proto.ITimeFormatAction=} [properties] Properties to set - */ - function TimeFormatAction(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]]; - } - - /** - * TimeFormatAction isTwentyFourHourFormatEnabled. - * @member {boolean} isTwentyFourHourFormatEnabled - * @memberof proto.TimeFormatAction - * @instance - */ - TimeFormatAction.prototype.isTwentyFourHourFormatEnabled = false; - - /** - * Creates a new TimeFormatAction instance using the specified properties. - * @function create - * @memberof proto.TimeFormatAction - * @static - * @param {proto.ITimeFormatAction=} [properties] Properties to set - * @returns {proto.TimeFormatAction} TimeFormatAction instance - */ - TimeFormatAction.create = function create(properties) { - return new TimeFormatAction(properties); - }; - - /** - * Encodes the specified TimeFormatAction message. Does not implicitly {@link proto.TimeFormatAction.verify|verify} messages. - * @function encode - * @memberof proto.TimeFormatAction - * @static - * @param {proto.ITimeFormatAction} message TimeFormatAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TimeFormatAction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.isTwentyFourHourFormatEnabled != null && Object.hasOwnProperty.call(message, "isTwentyFourHourFormatEnabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isTwentyFourHourFormatEnabled); - return writer; - }; - - /** - * Encodes the specified TimeFormatAction message, length delimited. Does not implicitly {@link proto.TimeFormatAction.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.TimeFormatAction - * @static - * @param {proto.ITimeFormatAction} message TimeFormatAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TimeFormatAction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TimeFormatAction message from the specified reader or buffer. - * @function decode - * @memberof proto.TimeFormatAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.TimeFormatAction} TimeFormatAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TimeFormatAction.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.TimeFormatAction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.isTwentyFourHourFormatEnabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TimeFormatAction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.TimeFormatAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.TimeFormatAction} TimeFormatAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TimeFormatAction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TimeFormatAction message. - * @function verify - * @memberof proto.TimeFormatAction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TimeFormatAction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.isTwentyFourHourFormatEnabled != null && message.hasOwnProperty("isTwentyFourHourFormatEnabled")) - if (typeof message.isTwentyFourHourFormatEnabled !== "boolean") - return "isTwentyFourHourFormatEnabled: boolean expected"; - return null; - }; - - /** - * Creates a TimeFormatAction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.TimeFormatAction - * @static - * @param {Object.} object Plain object - * @returns {proto.TimeFormatAction} TimeFormatAction - */ - TimeFormatAction.fromObject = function fromObject(object) { - if (object instanceof $root.proto.TimeFormatAction) - return object; - var message = new $root.proto.TimeFormatAction(); - if (object.isTwentyFourHourFormatEnabled != null) - message.isTwentyFourHourFormatEnabled = Boolean(object.isTwentyFourHourFormatEnabled); - return message; - }; - - /** - * Creates a plain object from a TimeFormatAction message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.TimeFormatAction - * @static - * @param {proto.TimeFormatAction} message TimeFormatAction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TimeFormatAction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.isTwentyFourHourFormatEnabled = false; - if (message.isTwentyFourHourFormatEnabled != null && message.hasOwnProperty("isTwentyFourHourFormatEnabled")) - object.isTwentyFourHourFormatEnabled = message.isTwentyFourHourFormatEnabled; - return object; - }; - - /** - * Converts this TimeFormatAction to JSON. - * @function toJSON - * @memberof proto.TimeFormatAction - * @instance - * @returns {Object.} JSON object - */ - TimeFormatAction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - 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() { - - /** - * Properties of an UnarchiveChatsSetting. - * @memberof proto - * @interface IUnarchiveChatsSetting - * @property {boolean|null} [unarchiveChats] UnarchiveChatsSetting unarchiveChats - */ - - /** - * Constructs a new UnarchiveChatsSetting. - * @memberof proto - * @classdesc Represents an UnarchiveChatsSetting. - * @implements IUnarchiveChatsSetting - * @constructor - * @param {proto.IUnarchiveChatsSetting=} [properties] Properties to set - */ - function UnarchiveChatsSetting(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]]; - } - - /** - * UnarchiveChatsSetting unarchiveChats. - * @member {boolean} unarchiveChats - * @memberof proto.UnarchiveChatsSetting - * @instance - */ - UnarchiveChatsSetting.prototype.unarchiveChats = false; - - /** - * Creates a new UnarchiveChatsSetting instance using the specified properties. - * @function create - * @memberof proto.UnarchiveChatsSetting - * @static - * @param {proto.IUnarchiveChatsSetting=} [properties] Properties to set - * @returns {proto.UnarchiveChatsSetting} UnarchiveChatsSetting instance - */ - UnarchiveChatsSetting.create = function create(properties) { - return new UnarchiveChatsSetting(properties); - }; - - /** - * Encodes the specified UnarchiveChatsSetting message. Does not implicitly {@link proto.UnarchiveChatsSetting.verify|verify} messages. - * @function encode - * @memberof proto.UnarchiveChatsSetting - * @static - * @param {proto.IUnarchiveChatsSetting} message UnarchiveChatsSetting message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UnarchiveChatsSetting.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.unarchiveChats != null && Object.hasOwnProperty.call(message, "unarchiveChats")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.unarchiveChats); - return writer; - }; - - /** - * Encodes the specified UnarchiveChatsSetting message, length delimited. Does not implicitly {@link proto.UnarchiveChatsSetting.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.UnarchiveChatsSetting - * @static - * @param {proto.IUnarchiveChatsSetting} message UnarchiveChatsSetting message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UnarchiveChatsSetting.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UnarchiveChatsSetting message from the specified reader or buffer. - * @function decode - * @memberof proto.UnarchiveChatsSetting - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.UnarchiveChatsSetting} UnarchiveChatsSetting - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UnarchiveChatsSetting.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.UnarchiveChatsSetting(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.unarchiveChats = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UnarchiveChatsSetting message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.UnarchiveChatsSetting - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.UnarchiveChatsSetting} UnarchiveChatsSetting - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UnarchiveChatsSetting.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UnarchiveChatsSetting message. - * @function verify - * @memberof proto.UnarchiveChatsSetting - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UnarchiveChatsSetting.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.unarchiveChats != null && message.hasOwnProperty("unarchiveChats")) - if (typeof message.unarchiveChats !== "boolean") - return "unarchiveChats: boolean expected"; - return null; - }; - - /** - * Creates an UnarchiveChatsSetting message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.UnarchiveChatsSetting - * @static - * @param {Object.} object Plain object - * @returns {proto.UnarchiveChatsSetting} UnarchiveChatsSetting - */ - UnarchiveChatsSetting.fromObject = function fromObject(object) { - if (object instanceof $root.proto.UnarchiveChatsSetting) - return object; - var message = new $root.proto.UnarchiveChatsSetting(); - if (object.unarchiveChats != null) - message.unarchiveChats = Boolean(object.unarchiveChats); - return message; - }; - - /** - * Creates a plain object from an UnarchiveChatsSetting message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.UnarchiveChatsSetting - * @static - * @param {proto.UnarchiveChatsSetting} message UnarchiveChatsSetting - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UnarchiveChatsSetting.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.unarchiveChats = false; - if (message.unarchiveChats != null && message.hasOwnProperty("unarchiveChats")) - object.unarchiveChats = message.unarchiveChats; - return object; - }; - - /** - * Converts this UnarchiveChatsSetting to JSON. - * @function toJSON - * @memberof proto.UnarchiveChatsSetting - * @instance - * @returns {Object.} JSON object - */ - UnarchiveChatsSetting.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return UnarchiveChatsSetting; - })(); - - proto.UserAgent = (function() { - - /** - * Properties of a UserAgent. - * @memberof proto - * @interface IUserAgent - * @property {proto.UserAgent.UserAgentPlatform|null} [platform] UserAgent platform - * @property {proto.IAppVersion|null} [appVersion] UserAgent appVersion - * @property {string|null} [mcc] UserAgent mcc - * @property {string|null} [mnc] UserAgent mnc - * @property {string|null} [osVersion] UserAgent osVersion - * @property {string|null} [manufacturer] UserAgent manufacturer - * @property {string|null} [device] UserAgent device - * @property {string|null} [osBuildNumber] UserAgent osBuildNumber - * @property {string|null} [phoneId] UserAgent phoneId - * @property {proto.UserAgent.UserAgentReleaseChannel|null} [releaseChannel] UserAgent releaseChannel - * @property {string|null} [localeLanguageIso6391] UserAgent localeLanguageIso6391 - * @property {string|null} [localeCountryIso31661Alpha2] UserAgent localeCountryIso31661Alpha2 - * @property {string|null} [deviceBoard] UserAgent deviceBoard - */ - - /** - * Constructs a new UserAgent. - * @memberof proto - * @classdesc Represents a UserAgent. - * @implements IUserAgent - * @constructor - * @param {proto.IUserAgent=} [properties] Properties to set - */ - function UserAgent(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]]; - } - - /** - * UserAgent platform. - * @member {proto.UserAgent.UserAgentPlatform} platform - * @memberof proto.UserAgent - * @instance - */ - UserAgent.prototype.platform = 0; - - /** - * UserAgent appVersion. - * @member {proto.IAppVersion|null|undefined} appVersion - * @memberof proto.UserAgent - * @instance - */ - UserAgent.prototype.appVersion = null; - - /** - * UserAgent mcc. - * @member {string} mcc - * @memberof proto.UserAgent - * @instance - */ - UserAgent.prototype.mcc = ""; - - /** - * UserAgent mnc. - * @member {string} mnc - * @memberof proto.UserAgent - * @instance - */ - UserAgent.prototype.mnc = ""; - - /** - * UserAgent osVersion. - * @member {string} osVersion - * @memberof proto.UserAgent - * @instance - */ - UserAgent.prototype.osVersion = ""; - - /** - * UserAgent manufacturer. - * @member {string} manufacturer - * @memberof proto.UserAgent - * @instance - */ - UserAgent.prototype.manufacturer = ""; - - /** - * UserAgent device. - * @member {string} device - * @memberof proto.UserAgent - * @instance - */ - UserAgent.prototype.device = ""; - - /** - * UserAgent osBuildNumber. - * @member {string} osBuildNumber - * @memberof proto.UserAgent - * @instance - */ - UserAgent.prototype.osBuildNumber = ""; - - /** - * UserAgent phoneId. - * @member {string} phoneId - * @memberof proto.UserAgent - * @instance - */ - UserAgent.prototype.phoneId = ""; - - /** - * UserAgent releaseChannel. - * @member {proto.UserAgent.UserAgentReleaseChannel} releaseChannel - * @memberof proto.UserAgent - * @instance - */ - UserAgent.prototype.releaseChannel = 0; - - /** - * UserAgent localeLanguageIso6391. - * @member {string} localeLanguageIso6391 - * @memberof proto.UserAgent - * @instance - */ - UserAgent.prototype.localeLanguageIso6391 = ""; - - /** - * UserAgent localeCountryIso31661Alpha2. - * @member {string} localeCountryIso31661Alpha2 - * @memberof proto.UserAgent - * @instance - */ - UserAgent.prototype.localeCountryIso31661Alpha2 = ""; - - /** - * UserAgent deviceBoard. - * @member {string} deviceBoard - * @memberof proto.UserAgent - * @instance - */ - UserAgent.prototype.deviceBoard = ""; - - /** - * Creates a new UserAgent instance using the specified properties. - * @function create - * @memberof proto.UserAgent - * @static - * @param {proto.IUserAgent=} [properties] Properties to set - * @returns {proto.UserAgent} UserAgent instance - */ - UserAgent.create = function create(properties) { - return new UserAgent(properties); - }; - - /** - * Encodes the specified UserAgent message. Does not implicitly {@link proto.UserAgent.verify|verify} messages. - * @function encode - * @memberof proto.UserAgent - * @static - * @param {proto.IUserAgent} message UserAgent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserAgent.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.platform != null && Object.hasOwnProperty.call(message, "platform")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.platform); - if (message.appVersion != null && Object.hasOwnProperty.call(message, "appVersion")) - $root.proto.AppVersion.encode(message.appVersion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.mcc != null && Object.hasOwnProperty.call(message, "mcc")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.mcc); - if (message.mnc != null && Object.hasOwnProperty.call(message, "mnc")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.mnc); - if (message.osVersion != null && Object.hasOwnProperty.call(message, "osVersion")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.osVersion); - if (message.manufacturer != null && Object.hasOwnProperty.call(message, "manufacturer")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.manufacturer); - if (message.device != null && Object.hasOwnProperty.call(message, "device")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.device); - if (message.osBuildNumber != null && Object.hasOwnProperty.call(message, "osBuildNumber")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.osBuildNumber); - if (message.phoneId != null && Object.hasOwnProperty.call(message, "phoneId")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.phoneId); - if (message.releaseChannel != null && Object.hasOwnProperty.call(message, "releaseChannel")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.releaseChannel); - if (message.localeLanguageIso6391 != null && Object.hasOwnProperty.call(message, "localeLanguageIso6391")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.localeLanguageIso6391); - if (message.localeCountryIso31661Alpha2 != null && Object.hasOwnProperty.call(message, "localeCountryIso31661Alpha2")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.localeCountryIso31661Alpha2); - if (message.deviceBoard != null && Object.hasOwnProperty.call(message, "deviceBoard")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.deviceBoard); - return writer; - }; - - /** - * Encodes the specified UserAgent message, length delimited. Does not implicitly {@link proto.UserAgent.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.UserAgent - * @static - * @param {proto.IUserAgent} message UserAgent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserAgent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UserAgent message from the specified reader or buffer. - * @function decode - * @memberof proto.UserAgent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.UserAgent} UserAgent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserAgent.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.UserAgent(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.platform = reader.int32(); - break; - case 2: - message.appVersion = $root.proto.AppVersion.decode(reader, reader.uint32()); - break; - case 3: - message.mcc = reader.string(); - break; - case 4: - message.mnc = reader.string(); - break; - case 5: - message.osVersion = reader.string(); - break; - case 6: - message.manufacturer = reader.string(); - break; - case 7: - message.device = reader.string(); - break; - case 8: - message.osBuildNumber = reader.string(); - break; - case 9: - message.phoneId = reader.string(); - break; - case 10: - message.releaseChannel = reader.int32(); - break; - case 11: - message.localeLanguageIso6391 = reader.string(); - break; - case 12: - message.localeCountryIso31661Alpha2 = reader.string(); - break; - case 13: - message.deviceBoard = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UserAgent message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.UserAgent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.UserAgent} UserAgent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserAgent.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UserAgent message. - * @function verify - * @memberof proto.UserAgent - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UserAgent.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.platform != null && message.hasOwnProperty("platform")) - switch (message.platform) { - default: - return "platform: 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: - break; - } - if (message.appVersion != null && message.hasOwnProperty("appVersion")) { - var error = $root.proto.AppVersion.verify(message.appVersion); - if (error) - return "appVersion." + error; - } - if (message.mcc != null && message.hasOwnProperty("mcc")) - if (!$util.isString(message.mcc)) - return "mcc: string expected"; - if (message.mnc != null && message.hasOwnProperty("mnc")) - if (!$util.isString(message.mnc)) - return "mnc: string expected"; - if (message.osVersion != null && message.hasOwnProperty("osVersion")) - if (!$util.isString(message.osVersion)) - return "osVersion: string expected"; - if (message.manufacturer != null && message.hasOwnProperty("manufacturer")) - if (!$util.isString(message.manufacturer)) - return "manufacturer: string expected"; - if (message.device != null && message.hasOwnProperty("device")) - if (!$util.isString(message.device)) - return "device: string expected"; - if (message.osBuildNumber != null && message.hasOwnProperty("osBuildNumber")) - if (!$util.isString(message.osBuildNumber)) - return "osBuildNumber: string expected"; - if (message.phoneId != null && message.hasOwnProperty("phoneId")) - if (!$util.isString(message.phoneId)) - return "phoneId: string expected"; - if (message.releaseChannel != null && message.hasOwnProperty("releaseChannel")) - switch (message.releaseChannel) { - default: - return "releaseChannel: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.localeLanguageIso6391 != null && message.hasOwnProperty("localeLanguageIso6391")) - if (!$util.isString(message.localeLanguageIso6391)) - return "localeLanguageIso6391: string expected"; - if (message.localeCountryIso31661Alpha2 != null && message.hasOwnProperty("localeCountryIso31661Alpha2")) - if (!$util.isString(message.localeCountryIso31661Alpha2)) - return "localeCountryIso31661Alpha2: string expected"; - if (message.deviceBoard != null && message.hasOwnProperty("deviceBoard")) - if (!$util.isString(message.deviceBoard)) - return "deviceBoard: string expected"; - return null; - }; - - /** - * Creates a UserAgent message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.UserAgent - * @static - * @param {Object.} object Plain object - * @returns {proto.UserAgent} UserAgent - */ - UserAgent.fromObject = function fromObject(object) { - if (object instanceof $root.proto.UserAgent) - return object; - var message = new $root.proto.UserAgent(); - switch (object.platform) { - case "ANDROID": - case 0: - message.platform = 0; - break; - case "IOS": - case 1: - message.platform = 1; - break; - case "WINDOWS_PHONE": - case 2: - message.platform = 2; - break; - case "BLACKBERRY": - case 3: - message.platform = 3; - break; - case "BLACKBERRYX": - case 4: - message.platform = 4; - break; - case "S40": - case 5: - message.platform = 5; - break; - case "S60": - case 6: - message.platform = 6; - break; - case "PYTHON_CLIENT": - case 7: - message.platform = 7; - break; - case "TIZEN": - case 8: - message.platform = 8; - break; - case "ENTERPRISE": - case 9: - message.platform = 9; - break; - case "SMB_ANDROID": - case 10: - message.platform = 10; - break; - case "KAIOS": - case 11: - message.platform = 11; - break; - case "SMB_IOS": - case 12: - message.platform = 12; - break; - case "WINDOWS": - case 13: - message.platform = 13; - break; - case "WEB": - case 14: - message.platform = 14; - break; - case "PORTAL": - case 15: - message.platform = 15; - break; - case "GREEN_ANDROID": - case 16: - message.platform = 16; - break; - case "GREEN_IPHONE": - case 17: - message.platform = 17; - break; - case "BLUE_ANDROID": - case 18: - message.platform = 18; - break; - case "BLUE_IPHONE": - case 19: - message.platform = 19; - break; - case "FBLITE_ANDROID": - case 20: - message.platform = 20; - break; - case "MLITE_ANDROID": - case 21: - message.platform = 21; - break; - case "IGLITE_ANDROID": - case 22: - message.platform = 22; - break; - case "PAGE": - case 23: - message.platform = 23; - break; - case "MACOS": - case 24: - message.platform = 24; - break; - case "OCULUS_MSG": - case 25: - message.platform = 25; - break; - case "OCULUS_CALL": - case 26: - message.platform = 26; - break; - case "MILAN": - case 27: - message.platform = 27; - break; - case "CAPI": - case 28: - message.platform = 28; - break; - } - if (object.appVersion != null) { - if (typeof object.appVersion !== "object") - throw TypeError(".proto.UserAgent.appVersion: object expected"); - message.appVersion = $root.proto.AppVersion.fromObject(object.appVersion); - } - if (object.mcc != null) - message.mcc = String(object.mcc); - if (object.mnc != null) - message.mnc = String(object.mnc); - if (object.osVersion != null) - message.osVersion = String(object.osVersion); - if (object.manufacturer != null) - message.manufacturer = String(object.manufacturer); - if (object.device != null) - message.device = String(object.device); - if (object.osBuildNumber != null) - message.osBuildNumber = String(object.osBuildNumber); - if (object.phoneId != null) - message.phoneId = String(object.phoneId); - switch (object.releaseChannel) { - case "RELEASE": - case 0: - message.releaseChannel = 0; - break; - case "BETA": - case 1: - message.releaseChannel = 1; - break; - case "ALPHA": - case 2: - message.releaseChannel = 2; - break; - case "DEBUG": - case 3: - message.releaseChannel = 3; - break; - } - if (object.localeLanguageIso6391 != null) - message.localeLanguageIso6391 = String(object.localeLanguageIso6391); - if (object.localeCountryIso31661Alpha2 != null) - message.localeCountryIso31661Alpha2 = String(object.localeCountryIso31661Alpha2); - if (object.deviceBoard != null) - message.deviceBoard = String(object.deviceBoard); - return message; - }; - - /** - * Creates a plain object from a UserAgent message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.UserAgent - * @static - * @param {proto.UserAgent} message UserAgent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UserAgent.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.platform = options.enums === String ? "ANDROID" : 0; - object.appVersion = null; - object.mcc = ""; - object.mnc = ""; - object.osVersion = ""; - object.manufacturer = ""; - object.device = ""; - object.osBuildNumber = ""; - object.phoneId = ""; - object.releaseChannel = options.enums === String ? "RELEASE" : 0; - object.localeLanguageIso6391 = ""; - object.localeCountryIso31661Alpha2 = ""; - object.deviceBoard = ""; - } - if (message.platform != null && message.hasOwnProperty("platform")) - object.platform = options.enums === String ? $root.proto.UserAgent.UserAgentPlatform[message.platform] : message.platform; - if (message.appVersion != null && message.hasOwnProperty("appVersion")) - object.appVersion = $root.proto.AppVersion.toObject(message.appVersion, options); - if (message.mcc != null && message.hasOwnProperty("mcc")) - object.mcc = message.mcc; - if (message.mnc != null && message.hasOwnProperty("mnc")) - object.mnc = message.mnc; - if (message.osVersion != null && message.hasOwnProperty("osVersion")) - object.osVersion = message.osVersion; - if (message.manufacturer != null && message.hasOwnProperty("manufacturer")) - object.manufacturer = message.manufacturer; - if (message.device != null && message.hasOwnProperty("device")) - object.device = message.device; - if (message.osBuildNumber != null && message.hasOwnProperty("osBuildNumber")) - object.osBuildNumber = message.osBuildNumber; - if (message.phoneId != null && message.hasOwnProperty("phoneId")) - object.phoneId = message.phoneId; - if (message.releaseChannel != null && message.hasOwnProperty("releaseChannel")) - object.releaseChannel = options.enums === String ? $root.proto.UserAgent.UserAgentReleaseChannel[message.releaseChannel] : message.releaseChannel; - if (message.localeLanguageIso6391 != null && message.hasOwnProperty("localeLanguageIso6391")) - object.localeLanguageIso6391 = message.localeLanguageIso6391; - if (message.localeCountryIso31661Alpha2 != null && message.hasOwnProperty("localeCountryIso31661Alpha2")) - object.localeCountryIso31661Alpha2 = message.localeCountryIso31661Alpha2; - if (message.deviceBoard != null && message.hasOwnProperty("deviceBoard")) - object.deviceBoard = message.deviceBoard; - return object; - }; - - /** - * Converts this UserAgent to JSON. - * @function toJSON - * @memberof proto.UserAgent - * @instance - * @returns {Object.} JSON object - */ - UserAgent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * UserAgentPlatform enum. - * @name proto.UserAgent.UserAgentPlatform - * @enum {number} - * @property {number} ANDROID=0 ANDROID value - * @property {number} IOS=1 IOS value - * @property {number} WINDOWS_PHONE=2 WINDOWS_PHONE value - * @property {number} BLACKBERRY=3 BLACKBERRY value - * @property {number} BLACKBERRYX=4 BLACKBERRYX value - * @property {number} S40=5 S40 value - * @property {number} S60=6 S60 value - * @property {number} PYTHON_CLIENT=7 PYTHON_CLIENT value - * @property {number} TIZEN=8 TIZEN value - * @property {number} ENTERPRISE=9 ENTERPRISE value - * @property {number} SMB_ANDROID=10 SMB_ANDROID value - * @property {number} KAIOS=11 KAIOS value - * @property {number} SMB_IOS=12 SMB_IOS value - * @property {number} WINDOWS=13 WINDOWS value - * @property {number} WEB=14 WEB value - * @property {number} PORTAL=15 PORTAL value - * @property {number} GREEN_ANDROID=16 GREEN_ANDROID value - * @property {number} GREEN_IPHONE=17 GREEN_IPHONE value - * @property {number} BLUE_ANDROID=18 BLUE_ANDROID value - * @property {number} BLUE_IPHONE=19 BLUE_IPHONE value - * @property {number} FBLITE_ANDROID=20 FBLITE_ANDROID value - * @property {number} MLITE_ANDROID=21 MLITE_ANDROID value - * @property {number} IGLITE_ANDROID=22 IGLITE_ANDROID value - * @property {number} PAGE=23 PAGE value - * @property {number} MACOS=24 MACOS value - * @property {number} OCULUS_MSG=25 OCULUS_MSG value - * @property {number} OCULUS_CALL=26 OCULUS_CALL value - * @property {number} MILAN=27 MILAN value - * @property {number} CAPI=28 CAPI value - */ - UserAgent.UserAgentPlatform = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ANDROID"] = 0; - values[valuesById[1] = "IOS"] = 1; - values[valuesById[2] = "WINDOWS_PHONE"] = 2; - values[valuesById[3] = "BLACKBERRY"] = 3; - values[valuesById[4] = "BLACKBERRYX"] = 4; - values[valuesById[5] = "S40"] = 5; - values[valuesById[6] = "S60"] = 6; - values[valuesById[7] = "PYTHON_CLIENT"] = 7; - values[valuesById[8] = "TIZEN"] = 8; - values[valuesById[9] = "ENTERPRISE"] = 9; - values[valuesById[10] = "SMB_ANDROID"] = 10; - values[valuesById[11] = "KAIOS"] = 11; - values[valuesById[12] = "SMB_IOS"] = 12; - values[valuesById[13] = "WINDOWS"] = 13; - values[valuesById[14] = "WEB"] = 14; - values[valuesById[15] = "PORTAL"] = 15; - values[valuesById[16] = "GREEN_ANDROID"] = 16; - values[valuesById[17] = "GREEN_IPHONE"] = 17; - values[valuesById[18] = "BLUE_ANDROID"] = 18; - values[valuesById[19] = "BLUE_IPHONE"] = 19; - values[valuesById[20] = "FBLITE_ANDROID"] = 20; - values[valuesById[21] = "MLITE_ANDROID"] = 21; - values[valuesById[22] = "IGLITE_ANDROID"] = 22; - values[valuesById[23] = "PAGE"] = 23; - values[valuesById[24] = "MACOS"] = 24; - values[valuesById[25] = "OCULUS_MSG"] = 25; - values[valuesById[26] = "OCULUS_CALL"] = 26; - values[valuesById[27] = "MILAN"] = 27; - values[valuesById[28] = "CAPI"] = 28; - return values; - })(); - - /** - * UserAgentReleaseChannel enum. - * @name proto.UserAgent.UserAgentReleaseChannel - * @enum {number} - * @property {number} RELEASE=0 RELEASE value - * @property {number} BETA=1 BETA value - * @property {number} ALPHA=2 ALPHA value - * @property {number} DEBUG=3 DEBUG value - */ - UserAgent.UserAgentReleaseChannel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RELEASE"] = 0; - values[valuesById[1] = "BETA"] = 1; - values[valuesById[2] = "ALPHA"] = 2; - values[valuesById[3] = "DEBUG"] = 3; - return values; - })(); - - return UserAgent; - })(); - proto.UserReceipt = (function() { /** @@ -62773,193 +66814,6 @@ $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() { /** @@ -63216,1157 +67070,333 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return VerifiedNameCertificate; - })(); + VerifiedNameCertificate.Details = (function() { - proto.VerifiedNameDetails = (function() { + /** + * Properties of a Details. + * @memberof proto.VerifiedNameCertificate + * @interface IDetails + * @property {number|Long|null} [serial] Details serial + * @property {string|null} [issuer] Details issuer + * @property {string|null} [verifiedName] Details verifiedName + * @property {Array.|null} [localizedNames] Details localizedNames + * @property {number|Long|null} [issueTime] Details issueTime + */ - /** - * 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; - } + /** + * Constructs a new Details. + * @memberof proto.VerifiedNameCertificate + * @classdesc Represents a Details. + * @implements IDetails + * @constructor + * @param {proto.VerifiedNameCertificate.IDetails=} [properties] Properties to set + */ + function Details(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]]; } - 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()); - }; + /** + * Details serial. + * @member {number|Long} serial + * @memberof proto.VerifiedNameCertificate.Details + * @instance + */ + Details.prototype.serial = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - /** - * 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; + /** + * Details issuer. + * @member {string} issuer + * @memberof proto.VerifiedNameCertificate.Details + * @instance + */ + Details.prototype.issuer = ""; + + /** + * Details verifiedName. + * @member {string} verifiedName + * @memberof proto.VerifiedNameCertificate.Details + * @instance + */ + Details.prototype.verifiedName = ""; + + /** + * Details localizedNames. + * @member {Array.} localizedNames + * @memberof proto.VerifiedNameCertificate.Details + * @instance + */ + Details.prototype.localizedNames = $util.emptyArray; + + /** + * Details issueTime. + * @member {number|Long} issueTime + * @memberof proto.VerifiedNameCertificate.Details + * @instance + */ + Details.prototype.issueTime = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new Details instance using the specified properties. + * @function create + * @memberof proto.VerifiedNameCertificate.Details + * @static + * @param {proto.VerifiedNameCertificate.IDetails=} [properties] Properties to set + * @returns {proto.VerifiedNameCertificate.Details} Details instance + */ + Details.create = function create(properties) { + return new Details(properties); + }; + + /** + * Encodes the specified Details message. Does not implicitly {@link proto.VerifiedNameCertificate.Details.verify|verify} messages. + * @function encode + * @memberof proto.VerifiedNameCertificate.Details + * @static + * @param {proto.VerifiedNameCertificate.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).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 Details message, length delimited. Does not implicitly {@link proto.VerifiedNameCertificate.Details.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.VerifiedNameCertificate.Details + * @static + * @param {proto.VerifiedNameCertificate.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.VerifiedNameCertificate.Details + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.VerifiedNameCertificate.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.VerifiedNameCertificate.Details(); + 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; + } } - } - 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; - }; + return message; + }; - /** - * 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) + /** + * Decodes a Details message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.VerifiedNameCertificate.Details + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.VerifiedNameCertificate.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.VerifiedNameCertificate.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) && !(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 Details message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.VerifiedNameCertificate.Details + * @static + * @param {Object.} object Plain object + * @returns {proto.VerifiedNameCertificate.Details} Details + */ + Details.fromObject = function fromObject(object) { + if (object instanceof $root.proto.VerifiedNameCertificate.Details) + return object; + var message = new $root.proto.VerifiedNameCertificate.Details(); + 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.VerifiedNameCertificate.Details.localizedNames: array expected"); + message.localizedNames = []; + for (var i = 0; i < object.localizedNames.length; ++i) { + if (typeof object.localizedNames[i] !== "object") + throw TypeError(".proto.VerifiedNameCertificate.Details.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 Details message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.VerifiedNameCertificate.Details + * @static + * @param {proto.VerifiedNameCertificate.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.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; - 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 Details to JSON. + * @function toJSON + * @memberof proto.VerifiedNameCertificate.Details + * @instance + * @returns {Object.} JSON object + */ + Details.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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 Details; })(); - return VideoMessage; + return VerifiedNameCertificate; })(); proto.WallpaperSettings = (function() { @@ -64585,51 +67615,51 @@ $root.proto = (function() { * Properties of a WebFeatures. * @memberof proto * @interface IWebFeatures - * @property {proto.WebFeatures.WebFeaturesFlag|null} [labelsDisplay] WebFeatures labelsDisplay - * @property {proto.WebFeatures.WebFeaturesFlag|null} [voipIndividualOutgoing] WebFeatures voipIndividualOutgoing - * @property {proto.WebFeatures.WebFeaturesFlag|null} [groupsV3] WebFeatures groupsV3 - * @property {proto.WebFeatures.WebFeaturesFlag|null} [groupsV3Create] WebFeatures groupsV3Create - * @property {proto.WebFeatures.WebFeaturesFlag|null} [changeNumberV2] WebFeatures changeNumberV2 - * @property {proto.WebFeatures.WebFeaturesFlag|null} [queryStatusV3Thumbnail] WebFeatures queryStatusV3Thumbnail - * @property {proto.WebFeatures.WebFeaturesFlag|null} [liveLocations] WebFeatures liveLocations - * @property {proto.WebFeatures.WebFeaturesFlag|null} [queryVname] WebFeatures queryVname - * @property {proto.WebFeatures.WebFeaturesFlag|null} [voipIndividualIncoming] WebFeatures voipIndividualIncoming - * @property {proto.WebFeatures.WebFeaturesFlag|null} [quickRepliesQuery] WebFeatures quickRepliesQuery - * @property {proto.WebFeatures.WebFeaturesFlag|null} [payments] WebFeatures payments - * @property {proto.WebFeatures.WebFeaturesFlag|null} [stickerPackQuery] WebFeatures stickerPackQuery - * @property {proto.WebFeatures.WebFeaturesFlag|null} [liveLocationsFinal] WebFeatures liveLocationsFinal - * @property {proto.WebFeatures.WebFeaturesFlag|null} [labelsEdit] WebFeatures labelsEdit - * @property {proto.WebFeatures.WebFeaturesFlag|null} [mediaUpload] WebFeatures mediaUpload - * @property {proto.WebFeatures.WebFeaturesFlag|null} [mediaUploadRichQuickReplies] WebFeatures mediaUploadRichQuickReplies - * @property {proto.WebFeatures.WebFeaturesFlag|null} [vnameV2] WebFeatures vnameV2 - * @property {proto.WebFeatures.WebFeaturesFlag|null} [videoPlaybackUrl] WebFeatures videoPlaybackUrl - * @property {proto.WebFeatures.WebFeaturesFlag|null} [statusRanking] WebFeatures statusRanking - * @property {proto.WebFeatures.WebFeaturesFlag|null} [voipIndividualVideo] WebFeatures voipIndividualVideo - * @property {proto.WebFeatures.WebFeaturesFlag|null} [thirdPartyStickers] WebFeatures thirdPartyStickers - * @property {proto.WebFeatures.WebFeaturesFlag|null} [frequentlyForwardedSetting] WebFeatures frequentlyForwardedSetting - * @property {proto.WebFeatures.WebFeaturesFlag|null} [groupsV4JoinPermission] WebFeatures groupsV4JoinPermission - * @property {proto.WebFeatures.WebFeaturesFlag|null} [recentStickers] WebFeatures recentStickers - * @property {proto.WebFeatures.WebFeaturesFlag|null} [catalog] WebFeatures catalog - * @property {proto.WebFeatures.WebFeaturesFlag|null} [starredStickers] WebFeatures starredStickers - * @property {proto.WebFeatures.WebFeaturesFlag|null} [voipGroupCall] WebFeatures voipGroupCall - * @property {proto.WebFeatures.WebFeaturesFlag|null} [templateMessage] WebFeatures templateMessage - * @property {proto.WebFeatures.WebFeaturesFlag|null} [templateMessageInteractivity] WebFeatures templateMessageInteractivity - * @property {proto.WebFeatures.WebFeaturesFlag|null} [ephemeralMessages] WebFeatures ephemeralMessages - * @property {proto.WebFeatures.WebFeaturesFlag|null} [e2ENotificationSync] WebFeatures e2ENotificationSync - * @property {proto.WebFeatures.WebFeaturesFlag|null} [recentStickersV2] WebFeatures recentStickersV2 - * @property {proto.WebFeatures.WebFeaturesFlag|null} [recentStickersV3] WebFeatures recentStickersV3 - * @property {proto.WebFeatures.WebFeaturesFlag|null} [userNotice] WebFeatures userNotice - * @property {proto.WebFeatures.WebFeaturesFlag|null} [support] WebFeatures support - * @property {proto.WebFeatures.WebFeaturesFlag|null} [groupUiiCleanup] WebFeatures groupUiiCleanup - * @property {proto.WebFeatures.WebFeaturesFlag|null} [groupDogfoodingInternalOnly] WebFeatures groupDogfoodingInternalOnly - * @property {proto.WebFeatures.WebFeaturesFlag|null} [settingsSync] WebFeatures settingsSync - * @property {proto.WebFeatures.WebFeaturesFlag|null} [archiveV2] WebFeatures archiveV2 - * @property {proto.WebFeatures.WebFeaturesFlag|null} [ephemeralAllowGroupMembers] WebFeatures ephemeralAllowGroupMembers - * @property {proto.WebFeatures.WebFeaturesFlag|null} [ephemeral24HDuration] WebFeatures ephemeral24HDuration - * @property {proto.WebFeatures.WebFeaturesFlag|null} [mdForceUpgrade] WebFeatures mdForceUpgrade - * @property {proto.WebFeatures.WebFeaturesFlag|null} [disappearingMode] WebFeatures disappearingMode - * @property {proto.WebFeatures.WebFeaturesFlag|null} [externalMdOptInAvailable] WebFeatures externalMdOptInAvailable - * @property {proto.WebFeatures.WebFeaturesFlag|null} [noDeleteMessageTimeLimit] WebFeatures noDeleteMessageTimeLimit + * @property {proto.WebFeatures.Flag|null} [labelsDisplay] WebFeatures labelsDisplay + * @property {proto.WebFeatures.Flag|null} [voipIndividualOutgoing] WebFeatures voipIndividualOutgoing + * @property {proto.WebFeatures.Flag|null} [groupsV3] WebFeatures groupsV3 + * @property {proto.WebFeatures.Flag|null} [groupsV3Create] WebFeatures groupsV3Create + * @property {proto.WebFeatures.Flag|null} [changeNumberV2] WebFeatures changeNumberV2 + * @property {proto.WebFeatures.Flag|null} [queryStatusV3Thumbnail] WebFeatures queryStatusV3Thumbnail + * @property {proto.WebFeatures.Flag|null} [liveLocations] WebFeatures liveLocations + * @property {proto.WebFeatures.Flag|null} [queryVname] WebFeatures queryVname + * @property {proto.WebFeatures.Flag|null} [voipIndividualIncoming] WebFeatures voipIndividualIncoming + * @property {proto.WebFeatures.Flag|null} [quickRepliesQuery] WebFeatures quickRepliesQuery + * @property {proto.WebFeatures.Flag|null} [payments] WebFeatures payments + * @property {proto.WebFeatures.Flag|null} [stickerPackQuery] WebFeatures stickerPackQuery + * @property {proto.WebFeatures.Flag|null} [liveLocationsFinal] WebFeatures liveLocationsFinal + * @property {proto.WebFeatures.Flag|null} [labelsEdit] WebFeatures labelsEdit + * @property {proto.WebFeatures.Flag|null} [mediaUpload] WebFeatures mediaUpload + * @property {proto.WebFeatures.Flag|null} [mediaUploadRichQuickReplies] WebFeatures mediaUploadRichQuickReplies + * @property {proto.WebFeatures.Flag|null} [vnameV2] WebFeatures vnameV2 + * @property {proto.WebFeatures.Flag|null} [videoPlaybackUrl] WebFeatures videoPlaybackUrl + * @property {proto.WebFeatures.Flag|null} [statusRanking] WebFeatures statusRanking + * @property {proto.WebFeatures.Flag|null} [voipIndividualVideo] WebFeatures voipIndividualVideo + * @property {proto.WebFeatures.Flag|null} [thirdPartyStickers] WebFeatures thirdPartyStickers + * @property {proto.WebFeatures.Flag|null} [frequentlyForwardedSetting] WebFeatures frequentlyForwardedSetting + * @property {proto.WebFeatures.Flag|null} [groupsV4JoinPermission] WebFeatures groupsV4JoinPermission + * @property {proto.WebFeatures.Flag|null} [recentStickers] WebFeatures recentStickers + * @property {proto.WebFeatures.Flag|null} [catalog] WebFeatures catalog + * @property {proto.WebFeatures.Flag|null} [starredStickers] WebFeatures starredStickers + * @property {proto.WebFeatures.Flag|null} [voipGroupCall] WebFeatures voipGroupCall + * @property {proto.WebFeatures.Flag|null} [templateMessage] WebFeatures templateMessage + * @property {proto.WebFeatures.Flag|null} [templateMessageInteractivity] WebFeatures templateMessageInteractivity + * @property {proto.WebFeatures.Flag|null} [ephemeralMessages] WebFeatures ephemeralMessages + * @property {proto.WebFeatures.Flag|null} [e2ENotificationSync] WebFeatures e2ENotificationSync + * @property {proto.WebFeatures.Flag|null} [recentStickersV2] WebFeatures recentStickersV2 + * @property {proto.WebFeatures.Flag|null} [recentStickersV3] WebFeatures recentStickersV3 + * @property {proto.WebFeatures.Flag|null} [userNotice] WebFeatures userNotice + * @property {proto.WebFeatures.Flag|null} [support] WebFeatures support + * @property {proto.WebFeatures.Flag|null} [groupUiiCleanup] WebFeatures groupUiiCleanup + * @property {proto.WebFeatures.Flag|null} [groupDogfoodingInternalOnly] WebFeatures groupDogfoodingInternalOnly + * @property {proto.WebFeatures.Flag|null} [settingsSync] WebFeatures settingsSync + * @property {proto.WebFeatures.Flag|null} [archiveV2] WebFeatures archiveV2 + * @property {proto.WebFeatures.Flag|null} [ephemeralAllowGroupMembers] WebFeatures ephemeralAllowGroupMembers + * @property {proto.WebFeatures.Flag|null} [ephemeral24HDuration] WebFeatures ephemeral24HDuration + * @property {proto.WebFeatures.Flag|null} [mdForceUpgrade] WebFeatures mdForceUpgrade + * @property {proto.WebFeatures.Flag|null} [disappearingMode] WebFeatures disappearingMode + * @property {proto.WebFeatures.Flag|null} [externalMdOptInAvailable] WebFeatures externalMdOptInAvailable + * @property {proto.WebFeatures.Flag|null} [noDeleteMessageTimeLimit] WebFeatures noDeleteMessageTimeLimit */ /** @@ -64649,7 +67679,7 @@ $root.proto = (function() { /** * WebFeatures labelsDisplay. - * @member {proto.WebFeatures.WebFeaturesFlag} labelsDisplay + * @member {proto.WebFeatures.Flag} labelsDisplay * @memberof proto.WebFeatures * @instance */ @@ -64657,7 +67687,7 @@ $root.proto = (function() { /** * WebFeatures voipIndividualOutgoing. - * @member {proto.WebFeatures.WebFeaturesFlag} voipIndividualOutgoing + * @member {proto.WebFeatures.Flag} voipIndividualOutgoing * @memberof proto.WebFeatures * @instance */ @@ -64665,7 +67695,7 @@ $root.proto = (function() { /** * WebFeatures groupsV3. - * @member {proto.WebFeatures.WebFeaturesFlag} groupsV3 + * @member {proto.WebFeatures.Flag} groupsV3 * @memberof proto.WebFeatures * @instance */ @@ -64673,7 +67703,7 @@ $root.proto = (function() { /** * WebFeatures groupsV3Create. - * @member {proto.WebFeatures.WebFeaturesFlag} groupsV3Create + * @member {proto.WebFeatures.Flag} groupsV3Create * @memberof proto.WebFeatures * @instance */ @@ -64681,7 +67711,7 @@ $root.proto = (function() { /** * WebFeatures changeNumberV2. - * @member {proto.WebFeatures.WebFeaturesFlag} changeNumberV2 + * @member {proto.WebFeatures.Flag} changeNumberV2 * @memberof proto.WebFeatures * @instance */ @@ -64689,7 +67719,7 @@ $root.proto = (function() { /** * WebFeatures queryStatusV3Thumbnail. - * @member {proto.WebFeatures.WebFeaturesFlag} queryStatusV3Thumbnail + * @member {proto.WebFeatures.Flag} queryStatusV3Thumbnail * @memberof proto.WebFeatures * @instance */ @@ -64697,7 +67727,7 @@ $root.proto = (function() { /** * WebFeatures liveLocations. - * @member {proto.WebFeatures.WebFeaturesFlag} liveLocations + * @member {proto.WebFeatures.Flag} liveLocations * @memberof proto.WebFeatures * @instance */ @@ -64705,7 +67735,7 @@ $root.proto = (function() { /** * WebFeatures queryVname. - * @member {proto.WebFeatures.WebFeaturesFlag} queryVname + * @member {proto.WebFeatures.Flag} queryVname * @memberof proto.WebFeatures * @instance */ @@ -64713,7 +67743,7 @@ $root.proto = (function() { /** * WebFeatures voipIndividualIncoming. - * @member {proto.WebFeatures.WebFeaturesFlag} voipIndividualIncoming + * @member {proto.WebFeatures.Flag} voipIndividualIncoming * @memberof proto.WebFeatures * @instance */ @@ -64721,7 +67751,7 @@ $root.proto = (function() { /** * WebFeatures quickRepliesQuery. - * @member {proto.WebFeatures.WebFeaturesFlag} quickRepliesQuery + * @member {proto.WebFeatures.Flag} quickRepliesQuery * @memberof proto.WebFeatures * @instance */ @@ -64729,7 +67759,7 @@ $root.proto = (function() { /** * WebFeatures payments. - * @member {proto.WebFeatures.WebFeaturesFlag} payments + * @member {proto.WebFeatures.Flag} payments * @memberof proto.WebFeatures * @instance */ @@ -64737,7 +67767,7 @@ $root.proto = (function() { /** * WebFeatures stickerPackQuery. - * @member {proto.WebFeatures.WebFeaturesFlag} stickerPackQuery + * @member {proto.WebFeatures.Flag} stickerPackQuery * @memberof proto.WebFeatures * @instance */ @@ -64745,7 +67775,7 @@ $root.proto = (function() { /** * WebFeatures liveLocationsFinal. - * @member {proto.WebFeatures.WebFeaturesFlag} liveLocationsFinal + * @member {proto.WebFeatures.Flag} liveLocationsFinal * @memberof proto.WebFeatures * @instance */ @@ -64753,7 +67783,7 @@ $root.proto = (function() { /** * WebFeatures labelsEdit. - * @member {proto.WebFeatures.WebFeaturesFlag} labelsEdit + * @member {proto.WebFeatures.Flag} labelsEdit * @memberof proto.WebFeatures * @instance */ @@ -64761,7 +67791,7 @@ $root.proto = (function() { /** * WebFeatures mediaUpload. - * @member {proto.WebFeatures.WebFeaturesFlag} mediaUpload + * @member {proto.WebFeatures.Flag} mediaUpload * @memberof proto.WebFeatures * @instance */ @@ -64769,7 +67799,7 @@ $root.proto = (function() { /** * WebFeatures mediaUploadRichQuickReplies. - * @member {proto.WebFeatures.WebFeaturesFlag} mediaUploadRichQuickReplies + * @member {proto.WebFeatures.Flag} mediaUploadRichQuickReplies * @memberof proto.WebFeatures * @instance */ @@ -64777,7 +67807,7 @@ $root.proto = (function() { /** * WebFeatures vnameV2. - * @member {proto.WebFeatures.WebFeaturesFlag} vnameV2 + * @member {proto.WebFeatures.Flag} vnameV2 * @memberof proto.WebFeatures * @instance */ @@ -64785,7 +67815,7 @@ $root.proto = (function() { /** * WebFeatures videoPlaybackUrl. - * @member {proto.WebFeatures.WebFeaturesFlag} videoPlaybackUrl + * @member {proto.WebFeatures.Flag} videoPlaybackUrl * @memberof proto.WebFeatures * @instance */ @@ -64793,7 +67823,7 @@ $root.proto = (function() { /** * WebFeatures statusRanking. - * @member {proto.WebFeatures.WebFeaturesFlag} statusRanking + * @member {proto.WebFeatures.Flag} statusRanking * @memberof proto.WebFeatures * @instance */ @@ -64801,7 +67831,7 @@ $root.proto = (function() { /** * WebFeatures voipIndividualVideo. - * @member {proto.WebFeatures.WebFeaturesFlag} voipIndividualVideo + * @member {proto.WebFeatures.Flag} voipIndividualVideo * @memberof proto.WebFeatures * @instance */ @@ -64809,7 +67839,7 @@ $root.proto = (function() { /** * WebFeatures thirdPartyStickers. - * @member {proto.WebFeatures.WebFeaturesFlag} thirdPartyStickers + * @member {proto.WebFeatures.Flag} thirdPartyStickers * @memberof proto.WebFeatures * @instance */ @@ -64817,7 +67847,7 @@ $root.proto = (function() { /** * WebFeatures frequentlyForwardedSetting. - * @member {proto.WebFeatures.WebFeaturesFlag} frequentlyForwardedSetting + * @member {proto.WebFeatures.Flag} frequentlyForwardedSetting * @memberof proto.WebFeatures * @instance */ @@ -64825,7 +67855,7 @@ $root.proto = (function() { /** * WebFeatures groupsV4JoinPermission. - * @member {proto.WebFeatures.WebFeaturesFlag} groupsV4JoinPermission + * @member {proto.WebFeatures.Flag} groupsV4JoinPermission * @memberof proto.WebFeatures * @instance */ @@ -64833,7 +67863,7 @@ $root.proto = (function() { /** * WebFeatures recentStickers. - * @member {proto.WebFeatures.WebFeaturesFlag} recentStickers + * @member {proto.WebFeatures.Flag} recentStickers * @memberof proto.WebFeatures * @instance */ @@ -64841,7 +67871,7 @@ $root.proto = (function() { /** * WebFeatures catalog. - * @member {proto.WebFeatures.WebFeaturesFlag} catalog + * @member {proto.WebFeatures.Flag} catalog * @memberof proto.WebFeatures * @instance */ @@ -64849,7 +67879,7 @@ $root.proto = (function() { /** * WebFeatures starredStickers. - * @member {proto.WebFeatures.WebFeaturesFlag} starredStickers + * @member {proto.WebFeatures.Flag} starredStickers * @memberof proto.WebFeatures * @instance */ @@ -64857,7 +67887,7 @@ $root.proto = (function() { /** * WebFeatures voipGroupCall. - * @member {proto.WebFeatures.WebFeaturesFlag} voipGroupCall + * @member {proto.WebFeatures.Flag} voipGroupCall * @memberof proto.WebFeatures * @instance */ @@ -64865,7 +67895,7 @@ $root.proto = (function() { /** * WebFeatures templateMessage. - * @member {proto.WebFeatures.WebFeaturesFlag} templateMessage + * @member {proto.WebFeatures.Flag} templateMessage * @memberof proto.WebFeatures * @instance */ @@ -64873,7 +67903,7 @@ $root.proto = (function() { /** * WebFeatures templateMessageInteractivity. - * @member {proto.WebFeatures.WebFeaturesFlag} templateMessageInteractivity + * @member {proto.WebFeatures.Flag} templateMessageInteractivity * @memberof proto.WebFeatures * @instance */ @@ -64881,7 +67911,7 @@ $root.proto = (function() { /** * WebFeatures ephemeralMessages. - * @member {proto.WebFeatures.WebFeaturesFlag} ephemeralMessages + * @member {proto.WebFeatures.Flag} ephemeralMessages * @memberof proto.WebFeatures * @instance */ @@ -64889,7 +67919,7 @@ $root.proto = (function() { /** * WebFeatures e2ENotificationSync. - * @member {proto.WebFeatures.WebFeaturesFlag} e2ENotificationSync + * @member {proto.WebFeatures.Flag} e2ENotificationSync * @memberof proto.WebFeatures * @instance */ @@ -64897,7 +67927,7 @@ $root.proto = (function() { /** * WebFeatures recentStickersV2. - * @member {proto.WebFeatures.WebFeaturesFlag} recentStickersV2 + * @member {proto.WebFeatures.Flag} recentStickersV2 * @memberof proto.WebFeatures * @instance */ @@ -64905,7 +67935,7 @@ $root.proto = (function() { /** * WebFeatures recentStickersV3. - * @member {proto.WebFeatures.WebFeaturesFlag} recentStickersV3 + * @member {proto.WebFeatures.Flag} recentStickersV3 * @memberof proto.WebFeatures * @instance */ @@ -64913,7 +67943,7 @@ $root.proto = (function() { /** * WebFeatures userNotice. - * @member {proto.WebFeatures.WebFeaturesFlag} userNotice + * @member {proto.WebFeatures.Flag} userNotice * @memberof proto.WebFeatures * @instance */ @@ -64921,7 +67951,7 @@ $root.proto = (function() { /** * WebFeatures support. - * @member {proto.WebFeatures.WebFeaturesFlag} support + * @member {proto.WebFeatures.Flag} support * @memberof proto.WebFeatures * @instance */ @@ -64929,7 +67959,7 @@ $root.proto = (function() { /** * WebFeatures groupUiiCleanup. - * @member {proto.WebFeatures.WebFeaturesFlag} groupUiiCleanup + * @member {proto.WebFeatures.Flag} groupUiiCleanup * @memberof proto.WebFeatures * @instance */ @@ -64937,7 +67967,7 @@ $root.proto = (function() { /** * WebFeatures groupDogfoodingInternalOnly. - * @member {proto.WebFeatures.WebFeaturesFlag} groupDogfoodingInternalOnly + * @member {proto.WebFeatures.Flag} groupDogfoodingInternalOnly * @memberof proto.WebFeatures * @instance */ @@ -64945,7 +67975,7 @@ $root.proto = (function() { /** * WebFeatures settingsSync. - * @member {proto.WebFeatures.WebFeaturesFlag} settingsSync + * @member {proto.WebFeatures.Flag} settingsSync * @memberof proto.WebFeatures * @instance */ @@ -64953,7 +67983,7 @@ $root.proto = (function() { /** * WebFeatures archiveV2. - * @member {proto.WebFeatures.WebFeaturesFlag} archiveV2 + * @member {proto.WebFeatures.Flag} archiveV2 * @memberof proto.WebFeatures * @instance */ @@ -64961,7 +67991,7 @@ $root.proto = (function() { /** * WebFeatures ephemeralAllowGroupMembers. - * @member {proto.WebFeatures.WebFeaturesFlag} ephemeralAllowGroupMembers + * @member {proto.WebFeatures.Flag} ephemeralAllowGroupMembers * @memberof proto.WebFeatures * @instance */ @@ -64969,7 +67999,7 @@ $root.proto = (function() { /** * WebFeatures ephemeral24HDuration. - * @member {proto.WebFeatures.WebFeaturesFlag} ephemeral24HDuration + * @member {proto.WebFeatures.Flag} ephemeral24HDuration * @memberof proto.WebFeatures * @instance */ @@ -64977,7 +68007,7 @@ $root.proto = (function() { /** * WebFeatures mdForceUpgrade. - * @member {proto.WebFeatures.WebFeaturesFlag} mdForceUpgrade + * @member {proto.WebFeatures.Flag} mdForceUpgrade * @memberof proto.WebFeatures * @instance */ @@ -64985,7 +68015,7 @@ $root.proto = (function() { /** * WebFeatures disappearingMode. - * @member {proto.WebFeatures.WebFeaturesFlag} disappearingMode + * @member {proto.WebFeatures.Flag} disappearingMode * @memberof proto.WebFeatures * @instance */ @@ -64993,7 +68023,7 @@ $root.proto = (function() { /** * WebFeatures externalMdOptInAvailable. - * @member {proto.WebFeatures.WebFeaturesFlag} externalMdOptInAvailable + * @member {proto.WebFeatures.Flag} externalMdOptInAvailable * @memberof proto.WebFeatures * @instance */ @@ -65001,7 +68031,7 @@ $root.proto = (function() { /** * WebFeatures noDeleteMessageTimeLimit. - * @member {proto.WebFeatures.WebFeaturesFlag} noDeleteMessageTimeLimit + * @member {proto.WebFeatures.Flag} noDeleteMessageTimeLimit * @memberof proto.WebFeatures * @instance */ @@ -66664,95 +69694,95 @@ $root.proto = (function() { object.noDeleteMessageTimeLimit = options.enums === String ? "NOT_STARTED" : 0; } if (message.labelsDisplay != null && message.hasOwnProperty("labelsDisplay")) - object.labelsDisplay = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.labelsDisplay] : message.labelsDisplay; + object.labelsDisplay = options.enums === String ? $root.proto.WebFeatures.Flag[message.labelsDisplay] : message.labelsDisplay; if (message.voipIndividualOutgoing != null && message.hasOwnProperty("voipIndividualOutgoing")) - object.voipIndividualOutgoing = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.voipIndividualOutgoing] : message.voipIndividualOutgoing; + object.voipIndividualOutgoing = options.enums === String ? $root.proto.WebFeatures.Flag[message.voipIndividualOutgoing] : message.voipIndividualOutgoing; if (message.groupsV3 != null && message.hasOwnProperty("groupsV3")) - object.groupsV3 = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.groupsV3] : message.groupsV3; + object.groupsV3 = options.enums === String ? $root.proto.WebFeatures.Flag[message.groupsV3] : message.groupsV3; if (message.groupsV3Create != null && message.hasOwnProperty("groupsV3Create")) - object.groupsV3Create = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.groupsV3Create] : message.groupsV3Create; + object.groupsV3Create = options.enums === String ? $root.proto.WebFeatures.Flag[message.groupsV3Create] : message.groupsV3Create; if (message.changeNumberV2 != null && message.hasOwnProperty("changeNumberV2")) - object.changeNumberV2 = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.changeNumberV2] : message.changeNumberV2; + object.changeNumberV2 = options.enums === String ? $root.proto.WebFeatures.Flag[message.changeNumberV2] : message.changeNumberV2; if (message.queryStatusV3Thumbnail != null && message.hasOwnProperty("queryStatusV3Thumbnail")) - object.queryStatusV3Thumbnail = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.queryStatusV3Thumbnail] : message.queryStatusV3Thumbnail; + object.queryStatusV3Thumbnail = options.enums === String ? $root.proto.WebFeatures.Flag[message.queryStatusV3Thumbnail] : message.queryStatusV3Thumbnail; if (message.liveLocations != null && message.hasOwnProperty("liveLocations")) - object.liveLocations = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.liveLocations] : message.liveLocations; + object.liveLocations = options.enums === String ? $root.proto.WebFeatures.Flag[message.liveLocations] : message.liveLocations; if (message.queryVname != null && message.hasOwnProperty("queryVname")) - object.queryVname = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.queryVname] : message.queryVname; + object.queryVname = options.enums === String ? $root.proto.WebFeatures.Flag[message.queryVname] : message.queryVname; if (message.voipIndividualIncoming != null && message.hasOwnProperty("voipIndividualIncoming")) - object.voipIndividualIncoming = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.voipIndividualIncoming] : message.voipIndividualIncoming; + object.voipIndividualIncoming = options.enums === String ? $root.proto.WebFeatures.Flag[message.voipIndividualIncoming] : message.voipIndividualIncoming; if (message.quickRepliesQuery != null && message.hasOwnProperty("quickRepliesQuery")) - object.quickRepliesQuery = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.quickRepliesQuery] : message.quickRepliesQuery; + object.quickRepliesQuery = options.enums === String ? $root.proto.WebFeatures.Flag[message.quickRepliesQuery] : message.quickRepliesQuery; if (message.payments != null && message.hasOwnProperty("payments")) - object.payments = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.payments] : message.payments; + object.payments = options.enums === String ? $root.proto.WebFeatures.Flag[message.payments] : message.payments; if (message.stickerPackQuery != null && message.hasOwnProperty("stickerPackQuery")) - object.stickerPackQuery = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.stickerPackQuery] : message.stickerPackQuery; + object.stickerPackQuery = options.enums === String ? $root.proto.WebFeatures.Flag[message.stickerPackQuery] : message.stickerPackQuery; if (message.liveLocationsFinal != null && message.hasOwnProperty("liveLocationsFinal")) - object.liveLocationsFinal = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.liveLocationsFinal] : message.liveLocationsFinal; + object.liveLocationsFinal = options.enums === String ? $root.proto.WebFeatures.Flag[message.liveLocationsFinal] : message.liveLocationsFinal; if (message.labelsEdit != null && message.hasOwnProperty("labelsEdit")) - object.labelsEdit = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.labelsEdit] : message.labelsEdit; + object.labelsEdit = options.enums === String ? $root.proto.WebFeatures.Flag[message.labelsEdit] : message.labelsEdit; if (message.mediaUpload != null && message.hasOwnProperty("mediaUpload")) - object.mediaUpload = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.mediaUpload] : message.mediaUpload; + object.mediaUpload = options.enums === String ? $root.proto.WebFeatures.Flag[message.mediaUpload] : message.mediaUpload; if (message.mediaUploadRichQuickReplies != null && message.hasOwnProperty("mediaUploadRichQuickReplies")) - object.mediaUploadRichQuickReplies = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.mediaUploadRichQuickReplies] : message.mediaUploadRichQuickReplies; + object.mediaUploadRichQuickReplies = options.enums === String ? $root.proto.WebFeatures.Flag[message.mediaUploadRichQuickReplies] : message.mediaUploadRichQuickReplies; if (message.vnameV2 != null && message.hasOwnProperty("vnameV2")) - object.vnameV2 = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.vnameV2] : message.vnameV2; + object.vnameV2 = options.enums === String ? $root.proto.WebFeatures.Flag[message.vnameV2] : message.vnameV2; if (message.videoPlaybackUrl != null && message.hasOwnProperty("videoPlaybackUrl")) - object.videoPlaybackUrl = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.videoPlaybackUrl] : message.videoPlaybackUrl; + object.videoPlaybackUrl = options.enums === String ? $root.proto.WebFeatures.Flag[message.videoPlaybackUrl] : message.videoPlaybackUrl; if (message.statusRanking != null && message.hasOwnProperty("statusRanking")) - object.statusRanking = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.statusRanking] : message.statusRanking; + object.statusRanking = options.enums === String ? $root.proto.WebFeatures.Flag[message.statusRanking] : message.statusRanking; if (message.voipIndividualVideo != null && message.hasOwnProperty("voipIndividualVideo")) - object.voipIndividualVideo = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.voipIndividualVideo] : message.voipIndividualVideo; + object.voipIndividualVideo = options.enums === String ? $root.proto.WebFeatures.Flag[message.voipIndividualVideo] : message.voipIndividualVideo; if (message.thirdPartyStickers != null && message.hasOwnProperty("thirdPartyStickers")) - object.thirdPartyStickers = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.thirdPartyStickers] : message.thirdPartyStickers; + object.thirdPartyStickers = options.enums === String ? $root.proto.WebFeatures.Flag[message.thirdPartyStickers] : message.thirdPartyStickers; if (message.frequentlyForwardedSetting != null && message.hasOwnProperty("frequentlyForwardedSetting")) - object.frequentlyForwardedSetting = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.frequentlyForwardedSetting] : message.frequentlyForwardedSetting; + object.frequentlyForwardedSetting = options.enums === String ? $root.proto.WebFeatures.Flag[message.frequentlyForwardedSetting] : message.frequentlyForwardedSetting; if (message.groupsV4JoinPermission != null && message.hasOwnProperty("groupsV4JoinPermission")) - object.groupsV4JoinPermission = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.groupsV4JoinPermission] : message.groupsV4JoinPermission; + object.groupsV4JoinPermission = options.enums === String ? $root.proto.WebFeatures.Flag[message.groupsV4JoinPermission] : message.groupsV4JoinPermission; if (message.recentStickers != null && message.hasOwnProperty("recentStickers")) - object.recentStickers = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.recentStickers] : message.recentStickers; + object.recentStickers = options.enums === String ? $root.proto.WebFeatures.Flag[message.recentStickers] : message.recentStickers; if (message.catalog != null && message.hasOwnProperty("catalog")) - object.catalog = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.catalog] : message.catalog; + object.catalog = options.enums === String ? $root.proto.WebFeatures.Flag[message.catalog] : message.catalog; if (message.starredStickers != null && message.hasOwnProperty("starredStickers")) - object.starredStickers = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.starredStickers] : message.starredStickers; + object.starredStickers = options.enums === String ? $root.proto.WebFeatures.Flag[message.starredStickers] : message.starredStickers; if (message.voipGroupCall != null && message.hasOwnProperty("voipGroupCall")) - object.voipGroupCall = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.voipGroupCall] : message.voipGroupCall; + object.voipGroupCall = options.enums === String ? $root.proto.WebFeatures.Flag[message.voipGroupCall] : message.voipGroupCall; if (message.templateMessage != null && message.hasOwnProperty("templateMessage")) - object.templateMessage = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.templateMessage] : message.templateMessage; + object.templateMessage = options.enums === String ? $root.proto.WebFeatures.Flag[message.templateMessage] : message.templateMessage; if (message.templateMessageInteractivity != null && message.hasOwnProperty("templateMessageInteractivity")) - object.templateMessageInteractivity = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.templateMessageInteractivity] : message.templateMessageInteractivity; + object.templateMessageInteractivity = options.enums === String ? $root.proto.WebFeatures.Flag[message.templateMessageInteractivity] : message.templateMessageInteractivity; if (message.ephemeralMessages != null && message.hasOwnProperty("ephemeralMessages")) - object.ephemeralMessages = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.ephemeralMessages] : message.ephemeralMessages; + object.ephemeralMessages = options.enums === String ? $root.proto.WebFeatures.Flag[message.ephemeralMessages] : message.ephemeralMessages; if (message.e2ENotificationSync != null && message.hasOwnProperty("e2ENotificationSync")) - object.e2ENotificationSync = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.e2ENotificationSync] : message.e2ENotificationSync; + object.e2ENotificationSync = options.enums === String ? $root.proto.WebFeatures.Flag[message.e2ENotificationSync] : message.e2ENotificationSync; if (message.recentStickersV2 != null && message.hasOwnProperty("recentStickersV2")) - object.recentStickersV2 = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.recentStickersV2] : message.recentStickersV2; + object.recentStickersV2 = options.enums === String ? $root.proto.WebFeatures.Flag[message.recentStickersV2] : message.recentStickersV2; if (message.recentStickersV3 != null && message.hasOwnProperty("recentStickersV3")) - object.recentStickersV3 = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.recentStickersV3] : message.recentStickersV3; + object.recentStickersV3 = options.enums === String ? $root.proto.WebFeatures.Flag[message.recentStickersV3] : message.recentStickersV3; if (message.userNotice != null && message.hasOwnProperty("userNotice")) - object.userNotice = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.userNotice] : message.userNotice; + object.userNotice = options.enums === String ? $root.proto.WebFeatures.Flag[message.userNotice] : message.userNotice; if (message.support != null && message.hasOwnProperty("support")) - object.support = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.support] : message.support; + object.support = options.enums === String ? $root.proto.WebFeatures.Flag[message.support] : message.support; if (message.groupUiiCleanup != null && message.hasOwnProperty("groupUiiCleanup")) - object.groupUiiCleanup = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.groupUiiCleanup] : message.groupUiiCleanup; + object.groupUiiCleanup = options.enums === String ? $root.proto.WebFeatures.Flag[message.groupUiiCleanup] : message.groupUiiCleanup; if (message.groupDogfoodingInternalOnly != null && message.hasOwnProperty("groupDogfoodingInternalOnly")) - object.groupDogfoodingInternalOnly = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.groupDogfoodingInternalOnly] : message.groupDogfoodingInternalOnly; + object.groupDogfoodingInternalOnly = options.enums === String ? $root.proto.WebFeatures.Flag[message.groupDogfoodingInternalOnly] : message.groupDogfoodingInternalOnly; if (message.settingsSync != null && message.hasOwnProperty("settingsSync")) - object.settingsSync = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.settingsSync] : message.settingsSync; + object.settingsSync = options.enums === String ? $root.proto.WebFeatures.Flag[message.settingsSync] : message.settingsSync; if (message.archiveV2 != null && message.hasOwnProperty("archiveV2")) - object.archiveV2 = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.archiveV2] : message.archiveV2; + object.archiveV2 = options.enums === String ? $root.proto.WebFeatures.Flag[message.archiveV2] : message.archiveV2; if (message.ephemeralAllowGroupMembers != null && message.hasOwnProperty("ephemeralAllowGroupMembers")) - object.ephemeralAllowGroupMembers = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.ephemeralAllowGroupMembers] : message.ephemeralAllowGroupMembers; + object.ephemeralAllowGroupMembers = options.enums === String ? $root.proto.WebFeatures.Flag[message.ephemeralAllowGroupMembers] : message.ephemeralAllowGroupMembers; if (message.ephemeral24HDuration != null && message.hasOwnProperty("ephemeral24HDuration")) - object.ephemeral24HDuration = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.ephemeral24HDuration] : message.ephemeral24HDuration; + object.ephemeral24HDuration = options.enums === String ? $root.proto.WebFeatures.Flag[message.ephemeral24HDuration] : message.ephemeral24HDuration; if (message.mdForceUpgrade != null && message.hasOwnProperty("mdForceUpgrade")) - object.mdForceUpgrade = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.mdForceUpgrade] : message.mdForceUpgrade; + object.mdForceUpgrade = options.enums === String ? $root.proto.WebFeatures.Flag[message.mdForceUpgrade] : message.mdForceUpgrade; if (message.disappearingMode != null && message.hasOwnProperty("disappearingMode")) - object.disappearingMode = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.disappearingMode] : message.disappearingMode; + object.disappearingMode = options.enums === String ? $root.proto.WebFeatures.Flag[message.disappearingMode] : message.disappearingMode; if (message.externalMdOptInAvailable != null && message.hasOwnProperty("externalMdOptInAvailable")) - object.externalMdOptInAvailable = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.externalMdOptInAvailable] : message.externalMdOptInAvailable; + object.externalMdOptInAvailable = options.enums === String ? $root.proto.WebFeatures.Flag[message.externalMdOptInAvailable] : message.externalMdOptInAvailable; if (message.noDeleteMessageTimeLimit != null && message.hasOwnProperty("noDeleteMessageTimeLimit")) - object.noDeleteMessageTimeLimit = options.enums === String ? $root.proto.WebFeatures.WebFeaturesFlag[message.noDeleteMessageTimeLimit] : message.noDeleteMessageTimeLimit; + object.noDeleteMessageTimeLimit = options.enums === String ? $root.proto.WebFeatures.Flag[message.noDeleteMessageTimeLimit] : message.noDeleteMessageTimeLimit; return object; }; @@ -66768,15 +69798,15 @@ $root.proto = (function() { }; /** - * WebFeaturesFlag enum. - * @name proto.WebFeatures.WebFeaturesFlag + * Flag enum. + * @name proto.WebFeatures.Flag * @enum {number} * @property {number} NOT_STARTED=0 NOT_STARTED value * @property {number} FORCE_UPGRADE=1 FORCE_UPGRADE value * @property {number} DEVELOPMENT=2 DEVELOPMENT value * @property {number} PRODUCTION=3 PRODUCTION value */ - WebFeatures.WebFeaturesFlag = (function() { + WebFeatures.Flag = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "NOT_STARTED"] = 0; values[valuesById[1] = "FORCE_UPGRADE"] = 1; @@ -66788,313 +69818,6 @@ $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() { /** @@ -67104,7 +69827,7 @@ $root.proto = (function() { * @property {proto.IMessageKey} key WebMessageInfo key * @property {proto.IMessage|null} [message] WebMessageInfo message * @property {number|Long|null} [messageTimestamp] WebMessageInfo messageTimestamp - * @property {proto.WebMessageInfo.WebMessageInfoStatus|null} [status] WebMessageInfo status + * @property {proto.WebMessageInfo.Status|null} [status] WebMessageInfo status * @property {string|null} [participant] WebMessageInfo participant * @property {number|Long|null} [messageC2STimestamp] WebMessageInfo messageC2STimestamp * @property {boolean|null} [ignore] WebMessageInfo ignore @@ -67115,19 +69838,19 @@ $root.proto = (function() { * @property {boolean|null} [multicast] WebMessageInfo multicast * @property {boolean|null} [urlText] WebMessageInfo urlText * @property {boolean|null} [urlNumber] WebMessageInfo urlNumber - * @property {proto.WebMessageInfo.WebMessageInfoStubType|null} [messageStubType] WebMessageInfo messageStubType + * @property {proto.WebMessageInfo.StubType|null} [messageStubType] WebMessageInfo messageStubType * @property {boolean|null} [clearMedia] WebMessageInfo clearMedia * @property {Array.|null} [messageStubParameters] WebMessageInfo messageStubParameters * @property {number|null} [duration] WebMessageInfo duration * @property {Array.|null} [labels] WebMessageInfo labels * @property {proto.IPaymentInfo|null} [paymentInfo] WebMessageInfo paymentInfo - * @property {proto.ILiveLocationMessage|null} [finalLiveLocation] WebMessageInfo finalLiveLocation + * @property {proto.Message.ILiveLocationMessage|null} [finalLiveLocation] WebMessageInfo finalLiveLocation * @property {proto.IPaymentInfo|null} [quotedPaymentInfo] WebMessageInfo quotedPaymentInfo * @property {number|Long|null} [ephemeralStartTimestamp] WebMessageInfo ephemeralStartTimestamp * @property {number|null} [ephemeralDuration] WebMessageInfo ephemeralDuration * @property {boolean|null} [ephemeralOffToOn] WebMessageInfo ephemeralOffToOn * @property {boolean|null} [ephemeralOutOfSync] WebMessageInfo ephemeralOutOfSync - * @property {proto.WebMessageInfo.WebMessageInfoBizPrivacyStatus|null} [bizPrivacyStatus] WebMessageInfo bizPrivacyStatus + * @property {proto.WebMessageInfo.BizPrivacyStatus|null} [bizPrivacyStatus] WebMessageInfo bizPrivacyStatus * @property {string|null} [verifiedBizName] WebMessageInfo verifiedBizName * @property {proto.IMediaData|null} [mediaData] WebMessageInfo mediaData * @property {proto.IPhotoChange|null} [photoChange] WebMessageInfo photoChange @@ -67142,6 +69865,8 @@ $root.proto = (function() { * @property {boolean|null} [statusAlreadyViewed] WebMessageInfo statusAlreadyViewed * @property {Uint8Array|null} [messageSecret] WebMessageInfo messageSecret * @property {proto.IKeepInChat|null} [keepInChat] WebMessageInfo keepInChat + * @property {string|null} [originalSelfAuthorUserJidString] WebMessageInfo originalSelfAuthorUserJidString + * @property {number|Long|null} [revokeMessageTimestamp] WebMessageInfo revokeMessageTimestamp */ /** @@ -67190,7 +69915,7 @@ $root.proto = (function() { /** * WebMessageInfo status. - * @member {proto.WebMessageInfo.WebMessageInfoStatus} status + * @member {proto.WebMessageInfo.Status} status * @memberof proto.WebMessageInfo * @instance */ @@ -67278,7 +70003,7 @@ $root.proto = (function() { /** * WebMessageInfo messageStubType. - * @member {proto.WebMessageInfo.WebMessageInfoStubType} messageStubType + * @member {proto.WebMessageInfo.StubType} messageStubType * @memberof proto.WebMessageInfo * @instance */ @@ -67326,7 +70051,7 @@ $root.proto = (function() { /** * WebMessageInfo finalLiveLocation. - * @member {proto.ILiveLocationMessage|null|undefined} finalLiveLocation + * @member {proto.Message.ILiveLocationMessage|null|undefined} finalLiveLocation * @memberof proto.WebMessageInfo * @instance */ @@ -67374,7 +70099,7 @@ $root.proto = (function() { /** * WebMessageInfo bizPrivacyStatus. - * @member {proto.WebMessageInfo.WebMessageInfoBizPrivacyStatus} bizPrivacyStatus + * @member {proto.WebMessageInfo.BizPrivacyStatus} bizPrivacyStatus * @memberof proto.WebMessageInfo * @instance */ @@ -67492,6 +70217,22 @@ $root.proto = (function() { */ WebMessageInfo.prototype.keepInChat = null; + /** + * WebMessageInfo originalSelfAuthorUserJidString. + * @member {string} originalSelfAuthorUserJidString + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.originalSelfAuthorUserJidString = ""; + + /** + * WebMessageInfo revokeMessageTimestamp. + * @member {number|Long} revokeMessageTimestamp + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.revokeMessageTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + /** * Creates a new WebMessageInfo instance using the specified properties. * @function create @@ -67558,7 +70299,7 @@ $root.proto = (function() { if (message.paymentInfo != null && Object.hasOwnProperty.call(message, "paymentInfo")) $root.proto.PaymentInfo.encode(message.paymentInfo, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); if (message.finalLiveLocation != null && Object.hasOwnProperty.call(message, "finalLiveLocation")) - $root.proto.LiveLocationMessage.encode(message.finalLiveLocation, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); + $root.proto.Message.LiveLocationMessage.encode(message.finalLiveLocation, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); if (message.quotedPaymentInfo != null && Object.hasOwnProperty.call(message, "quotedPaymentInfo")) $root.proto.PaymentInfo.encode(message.quotedPaymentInfo, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); if (message.ephemeralStartTimestamp != null && Object.hasOwnProperty.call(message, "ephemeralStartTimestamp")) @@ -67602,6 +70343,10 @@ $root.proto = (function() { 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(); + if (message.originalSelfAuthorUserJidString != null && Object.hasOwnProperty.call(message, "originalSelfAuthorUserJidString")) + writer.uint32(/* id 51, wireType 2 =*/410).string(message.originalSelfAuthorUserJidString); + if (message.revokeMessageTimestamp != null && Object.hasOwnProperty.call(message, "revokeMessageTimestamp")) + writer.uint32(/* id 52, wireType 0 =*/416).uint64(message.revokeMessageTimestamp); return writer; }; @@ -67701,7 +70446,7 @@ $root.proto = (function() { message.paymentInfo = $root.proto.PaymentInfo.decode(reader, reader.uint32()); break; case 30: - message.finalLiveLocation = $root.proto.LiveLocationMessage.decode(reader, reader.uint32()); + message.finalLiveLocation = $root.proto.Message.LiveLocationMessage.decode(reader, reader.uint32()); break; case 31: message.quotedPaymentInfo = $root.proto.PaymentInfo.decode(reader, reader.uint32()); @@ -67769,6 +70514,12 @@ $root.proto = (function() { case 50: message.keepInChat = $root.proto.KeepInChat.decode(reader, reader.uint32()); break; + case 51: + message.originalSelfAuthorUserJidString = reader.string(); + break; + case 52: + message.revokeMessageTimestamp = reader.uint64(); + break; default: reader.skipType(tag & 7); break; @@ -68009,6 +70760,12 @@ $root.proto = (function() { case 141: case 142: case 143: + case 144: + case 145: + case 146: + case 147: + case 148: + case 149: break; } if (message.clearMedia != null && message.hasOwnProperty("clearMedia")) @@ -68037,7 +70794,7 @@ $root.proto = (function() { return "paymentInfo." + error; } if (message.finalLiveLocation != null && message.hasOwnProperty("finalLiveLocation")) { - var error = $root.proto.LiveLocationMessage.verify(message.finalLiveLocation); + var error = $root.proto.Message.LiveLocationMessage.verify(message.finalLiveLocation); if (error) return "finalLiveLocation." + error; } @@ -68140,6 +70897,12 @@ $root.proto = (function() { if (error) return "keepInChat." + error; } + if (message.originalSelfAuthorUserJidString != null && message.hasOwnProperty("originalSelfAuthorUserJidString")) + if (!$util.isString(message.originalSelfAuthorUserJidString)) + return "originalSelfAuthorUserJidString: string expected"; + if (message.revokeMessageTimestamp != null && message.hasOwnProperty("revokeMessageTimestamp")) + if (!$util.isInteger(message.revokeMessageTimestamp) && !(message.revokeMessageTimestamp && $util.isInteger(message.revokeMessageTimestamp.low) && $util.isInteger(message.revokeMessageTimestamp.high))) + return "revokeMessageTimestamp: integer|Long expected"; return null; }; @@ -68807,6 +71570,30 @@ $root.proto = (function() { case 143: message.messageStubType = 143; break; + case "GROUP_MEMBERSHIP_JOIN_APPROVAL_REQUEST": + case 144: + message.messageStubType = 144; + break; + case "GROUP_MEMBERSHIP_JOIN_APPROVAL_MODE": + case 145: + message.messageStubType = 145; + break; + case "INTEGRITY_UNLINK_PARENT_GROUP": + case 146: + message.messageStubType = 146; + break; + case "COMMUNITY_PARTICIPANT_PROMOTE": + case 147: + message.messageStubType = 147; + break; + case "COMMUNITY_PARTICIPANT_DEMOTE": + case 148: + message.messageStubType = 148; + break; + case "COMMUNITY_PARENT_GROUP_DELETED": + case 149: + message.messageStubType = 149; + break; } if (object.clearMedia != null) message.clearMedia = Boolean(object.clearMedia); @@ -68834,7 +71621,7 @@ $root.proto = (function() { if (object.finalLiveLocation != null) { if (typeof object.finalLiveLocation !== "object") throw TypeError(".proto.WebMessageInfo.finalLiveLocation: object expected"); - message.finalLiveLocation = $root.proto.LiveLocationMessage.fromObject(object.finalLiveLocation); + message.finalLiveLocation = $root.proto.Message.LiveLocationMessage.fromObject(object.finalLiveLocation); } if (object.quotedPaymentInfo != null) { if (typeof object.quotedPaymentInfo !== "object") @@ -68950,6 +71737,17 @@ $root.proto = (function() { throw TypeError(".proto.WebMessageInfo.keepInChat: object expected"); message.keepInChat = $root.proto.KeepInChat.fromObject(object.keepInChat); } + if (object.originalSelfAuthorUserJidString != null) + message.originalSelfAuthorUserJidString = String(object.originalSelfAuthorUserJidString); + if (object.revokeMessageTimestamp != null) + if ($util.Long) + (message.revokeMessageTimestamp = $util.Long.fromValue(object.revokeMessageTimestamp)).unsigned = true; + else if (typeof object.revokeMessageTimestamp === "string") + message.revokeMessageTimestamp = parseInt(object.revokeMessageTimestamp, 10); + else if (typeof object.revokeMessageTimestamp === "number") + message.revokeMessageTimestamp = object.revokeMessageTimestamp; + else if (typeof object.revokeMessageTimestamp === "object") + message.revokeMessageTimestamp = new $util.LongBits(object.revokeMessageTimestamp.low >>> 0, object.revokeMessageTimestamp.high >>> 0).toNumber(true); return message; }; @@ -69040,6 +71838,12 @@ $root.proto = (function() { object.messageSecret = $util.newBuffer(object.messageSecret); } object.keepInChat = null; + object.originalSelfAuthorUserJidString = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.revokeMessageTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.revokeMessageTimestamp = options.longs === String ? "0" : 0; } if (message.key != null && message.hasOwnProperty("key")) object.key = $root.proto.MessageKey.toObject(message.key, options); @@ -69051,7 +71855,7 @@ $root.proto = (function() { 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.status != null && message.hasOwnProperty("status")) - object.status = options.enums === String ? $root.proto.WebMessageInfo.WebMessageInfoStatus[message.status] : message.status; + object.status = options.enums === String ? $root.proto.WebMessageInfo.Status[message.status] : message.status; if (message.participant != null && message.hasOwnProperty("participant")) object.participant = message.participant; if (message.messageC2STimestamp != null && message.hasOwnProperty("messageC2STimestamp")) @@ -69076,7 +71880,7 @@ $root.proto = (function() { if (message.urlNumber != null && message.hasOwnProperty("urlNumber")) object.urlNumber = message.urlNumber; if (message.messageStubType != null && message.hasOwnProperty("messageStubType")) - object.messageStubType = options.enums === String ? $root.proto.WebMessageInfo.WebMessageInfoStubType[message.messageStubType] : message.messageStubType; + object.messageStubType = options.enums === String ? $root.proto.WebMessageInfo.StubType[message.messageStubType] : message.messageStubType; if (message.clearMedia != null && message.hasOwnProperty("clearMedia")) object.clearMedia = message.clearMedia; if (message.messageStubParameters && message.messageStubParameters.length) { @@ -69094,7 +71898,7 @@ $root.proto = (function() { if (message.paymentInfo != null && message.hasOwnProperty("paymentInfo")) object.paymentInfo = $root.proto.PaymentInfo.toObject(message.paymentInfo, options); if (message.finalLiveLocation != null && message.hasOwnProperty("finalLiveLocation")) - object.finalLiveLocation = $root.proto.LiveLocationMessage.toObject(message.finalLiveLocation, options); + object.finalLiveLocation = $root.proto.Message.LiveLocationMessage.toObject(message.finalLiveLocation, options); if (message.quotedPaymentInfo != null && message.hasOwnProperty("quotedPaymentInfo")) object.quotedPaymentInfo = $root.proto.PaymentInfo.toObject(message.quotedPaymentInfo, options); if (message.ephemeralStartTimestamp != null && message.hasOwnProperty("ephemeralStartTimestamp")) @@ -69109,7 +71913,7 @@ $root.proto = (function() { if (message.ephemeralOutOfSync != null && message.hasOwnProperty("ephemeralOutOfSync")) object.ephemeralOutOfSync = message.ephemeralOutOfSync; if (message.bizPrivacyStatus != null && message.hasOwnProperty("bizPrivacyStatus")) - object.bizPrivacyStatus = options.enums === String ? $root.proto.WebMessageInfo.WebMessageInfoBizPrivacyStatus[message.bizPrivacyStatus] : message.bizPrivacyStatus; + object.bizPrivacyStatus = options.enums === String ? $root.proto.WebMessageInfo.BizPrivacyStatus[message.bizPrivacyStatus] : message.bizPrivacyStatus; if (message.verifiedBizName != null && message.hasOwnProperty("verifiedBizName")) object.verifiedBizName = message.verifiedBizName; if (message.mediaData != null && message.hasOwnProperty("mediaData")) @@ -69147,6 +71951,13 @@ $root.proto = (function() { 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); + if (message.originalSelfAuthorUserJidString != null && message.hasOwnProperty("originalSelfAuthorUserJidString")) + object.originalSelfAuthorUserJidString = message.originalSelfAuthorUserJidString; + if (message.revokeMessageTimestamp != null && message.hasOwnProperty("revokeMessageTimestamp")) + if (typeof message.revokeMessageTimestamp === "number") + object.revokeMessageTimestamp = options.longs === String ? String(message.revokeMessageTimestamp) : message.revokeMessageTimestamp; + else + object.revokeMessageTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.revokeMessageTimestamp) : options.longs === Number ? new $util.LongBits(message.revokeMessageTimestamp.low >>> 0, message.revokeMessageTimestamp.high >>> 0).toNumber(true) : message.revokeMessageTimestamp; return object; }; @@ -69162,8 +71973,26 @@ $root.proto = (function() { }; /** - * WebMessageInfoStatus enum. - * @name proto.WebMessageInfo.WebMessageInfoStatus + * BizPrivacyStatus enum. + * @name proto.WebMessageInfo.BizPrivacyStatus + * @enum {number} + * @property {number} E2EE=0 E2EE value + * @property {number} FB=2 FB value + * @property {number} BSP=1 BSP value + * @property {number} BSP_AND_FB=3 BSP_AND_FB value + */ + WebMessageInfo.BizPrivacyStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "E2EE"] = 0; + values[valuesById[2] = "FB"] = 2; + values[valuesById[1] = "BSP"] = 1; + values[valuesById[3] = "BSP_AND_FB"] = 3; + return values; + })(); + + /** + * Status enum. + * @name proto.WebMessageInfo.Status * @enum {number} * @property {number} ERROR=0 ERROR value * @property {number} PENDING=1 PENDING value @@ -69172,7 +72001,7 @@ $root.proto = (function() { * @property {number} READ=4 READ value * @property {number} PLAYED=5 PLAYED value */ - WebMessageInfo.WebMessageInfoStatus = (function() { + WebMessageInfo.Status = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "ERROR"] = 0; values[valuesById[1] = "PENDING"] = 1; @@ -69184,8 +72013,8 @@ $root.proto = (function() { })(); /** - * WebMessageInfoStubType enum. - * @name proto.WebMessageInfo.WebMessageInfoStubType + * StubType enum. + * @name proto.WebMessageInfo.StubType * @enum {number} * @property {number} UNKNOWN=0 UNKNOWN value * @property {number} REVOKE=1 REVOKE value @@ -69331,8 +72160,14 @@ $root.proto = (function() { * @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 + * @property {number} GROUP_MEMBERSHIP_JOIN_APPROVAL_REQUEST=144 GROUP_MEMBERSHIP_JOIN_APPROVAL_REQUEST value + * @property {number} GROUP_MEMBERSHIP_JOIN_APPROVAL_MODE=145 GROUP_MEMBERSHIP_JOIN_APPROVAL_MODE value + * @property {number} INTEGRITY_UNLINK_PARENT_GROUP=146 INTEGRITY_UNLINK_PARENT_GROUP value + * @property {number} COMMUNITY_PARTICIPANT_PROMOTE=147 COMMUNITY_PARTICIPANT_PROMOTE value + * @property {number} COMMUNITY_PARTICIPANT_DEMOTE=148 COMMUNITY_PARTICIPANT_DEMOTE value + * @property {number} COMMUNITY_PARENT_GROUP_DELETED=149 COMMUNITY_PARENT_GROUP_DELETED value */ - WebMessageInfo.WebMessageInfoStubType = (function() { + WebMessageInfo.StubType = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "UNKNOWN"] = 0; values[valuesById[1] = "REVOKE"] = 1; @@ -69478,24 +72313,12 @@ $root.proto = (function() { 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; - })(); - - /** - * WebMessageInfoBizPrivacyStatus enum. - * @name proto.WebMessageInfo.WebMessageInfoBizPrivacyStatus - * @enum {number} - * @property {number} E2EE=0 E2EE value - * @property {number} FB=2 FB value - * @property {number} BSP=1 BSP value - * @property {number} BSP_AND_FB=3 BSP_AND_FB value - */ - WebMessageInfo.WebMessageInfoBizPrivacyStatus = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "E2EE"] = 0; - values[valuesById[2] = "FB"] = 2; - values[valuesById[1] = "BSP"] = 1; - values[valuesById[3] = "BSP_AND_FB"] = 3; + values[valuesById[144] = "GROUP_MEMBERSHIP_JOIN_APPROVAL_REQUEST"] = 144; + values[valuesById[145] = "GROUP_MEMBERSHIP_JOIN_APPROVAL_MODE"] = 145; + values[valuesById[146] = "INTEGRITY_UNLINK_PARENT_GROUP"] = 146; + values[valuesById[147] = "COMMUNITY_PARTICIPANT_PROMOTE"] = 147; + values[valuesById[148] = "COMMUNITY_PARTICIPANT_DEMOTE"] = 148; + values[valuesById[149] = "COMMUNITY_PARENT_GROUP_DELETED"] = 149; return values; })(); @@ -69792,423 +72615,6 @@ $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/LegacySocket/messages.ts b/src/LegacySocket/messages.ts index 6cf5c84..1ad7061 100644 --- a/src/LegacySocket/messages.ts +++ b/src/LegacySocket/messages.ts @@ -151,7 +151,7 @@ const makeMessagesSocket = (config: LegacySocketConfig) => { // if it's a message to delete another message if(protocolMessage) { switch (protocolMessage.type) { - case proto.ProtocolMessage.ProtocolMessageType.REVOKE: + case proto.Message.ProtocolMessage.Type.REVOKE: const key = protocolMessage.key const messageStubType = WAMessageStubType.REVOKE ev.emit('messages.update', [ @@ -162,7 +162,7 @@ const makeMessagesSocket = (config: LegacySocketConfig) => { } ]) return - case proto.ProtocolMessage.ProtocolMessageType.EPHEMERAL_SETTING: + case proto.Message.ProtocolMessage.Type.EPHEMERAL_SETTING: chatUpdate.ephemeralSettingTimestamp = message.messageTimestamp chatUpdate.ephemeralExpiration = protocolMessage.ephemeralExpiration diff --git a/src/Socket/groups.ts b/src/Socket/groups.ts index c82aced..c675e81 100644 --- a/src/Socket/groups.ts +++ b/src/Socket/groups.ts @@ -147,7 +147,7 @@ export const makeGroupsSocket = (config: SocketConfig) => { * @param key the key of the invite message, or optionally only provide the jid of the person who sent the invite * @param inviteMessage the message to accept */ - groupAcceptInviteV4: async(key: string | WAMessageKey, inviteMessage: proto.IGroupInviteMessage) => { + groupAcceptInviteV4: async(key: string | WAMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => { key = typeof key === 'string' ? { remoteJid: key } : key const results = await groupQuery(inviteMessage.groupJid!, 'set', [{ tag: 'accept', @@ -163,7 +163,7 @@ export const makeGroupsSocket = (config: SocketConfig) => { // update the invite message to be expired if(key.id) { // create new invite message that is expired - inviteMessage = proto.GroupInviteMessage.fromObject(inviteMessage) + inviteMessage = proto.Message.GroupInviteMessage.fromObject(inviteMessage) inviteMessage.inviteExpiration = 0 inviteMessage.inviteCode = '' ev.emit('messages.update', [ diff --git a/src/Socket/messages-recv.ts b/src/Socket/messages-recv.ts index 5d2407a..0d64827 100644 --- a/src/Socket/messages-recv.ts +++ b/src/Socket/messages-recv.ts @@ -193,7 +193,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => { case 'not_ephemeral': result.message = { protocolMessage: { - type: proto.ProtocolMessage.ProtocolMessageType.EPHEMERAL_SETTING, + type: proto.Message.ProtocolMessage.Type.EPHEMERAL_SETTING, ephemeralExpiration: +(child.attrs.expiration || 0) } } @@ -340,13 +340,13 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => { ( // basically, we only want to know when a message from us has been delivered to/read by the other person // or another device of ours has read some messages - status > proto.WebMessageInfo.WebMessageInfoStatus.DELIVERY_ACK || + status > proto.WebMessageInfo.Status.DELIVERY_ACK || !isNodeFromMe ) ) { if(isJidGroup(remoteJid)) { if(attrs.participant) { - const updateKey: keyof MessageUserReceipt = status === proto.WebMessageInfo.WebMessageInfoStatus.DELIVERY_ACK ? 'receiptTimestamp' : 'readTimestamp' + const updateKey: keyof MessageUserReceipt = status === proto.WebMessageInfo.Status.DELIVERY_ACK ? 'receiptTimestamp' : 'readTimestamp' ev.emit( 'message-receipt.update', ids.map(id => ({ @@ -428,7 +428,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => { async() => { await decryptionTask // message failed to decrypt - if(msg.messageStubType === proto.WebMessageInfo.WebMessageInfoStubType.CIPHERTEXT) { + if(msg.messageStubType === proto.WebMessageInfo.StubType.CIPHERTEXT) { logger.error( { key: msg.key, params: msg.messageStubParameters }, 'failure in decrypting message' diff --git a/src/Socket/messages-send.ts b/src/Socket/messages-send.ts index 9f2f506..ac77d44 100644 --- a/src/Socket/messages-send.ts +++ b/src/Socket/messages-send.ts @@ -550,8 +550,8 @@ export const makeMessagesSocket = (config: SocketConfig) => { } else { try { const media = decryptMediaRetryData(result.media!, mediaKey, result.key.id!) - if(media.result !== proto.MediaRetryNotification.MediaRetryNotificationResultType.SUCCESS) { - const resultStr = proto.MediaRetryNotification.MediaRetryNotificationResultType[media.result] + if(media.result !== proto.MediaRetryNotification.ResultType.SUCCESS) { + const resultStr = proto.MediaRetryNotification.ResultType[media.result] throw new Boom( `Media re-upload failed by device (${resultStr})`, { data: media, statusCode: getStatusCodeForMediaRetry(media.result) || 404 } diff --git a/src/Types/Auth.ts b/src/Types/Auth.ts index 68db080..67373ca 100644 --- a/src/Types/Auth.ts +++ b/src/Types/Auth.ts @@ -56,7 +56,7 @@ export type SignalDataTypeMap = { 'session': any 'sender-key': any 'sender-key-memory': { [jid: string]: boolean } - 'app-state-sync-key': proto.IAppStateSyncKeyData + 'app-state-sync-key': proto.Message.IAppStateSyncKeyData 'app-state-sync-version': LTHashState } diff --git a/src/Types/Chat.ts b/src/Types/Chat.ts index e963b26..71e1a8e 100644 --- a/src/Types/Chat.ts +++ b/src/Types/Chat.ts @@ -30,7 +30,7 @@ export type WAPatchCreate = { index: string[] type: WAPatchName apiVersion: number - operation: proto.SyncdMutation.SyncdMutationSyncdOperation + operation: proto.SyncdMutation.SyncdOperation } export type Chat = proto.IConversation & { @@ -45,7 +45,7 @@ export type Chat = proto.IConversation & { * the last messages in a chat, sorted reverse-chronologically. That is, the latest message should be first in the chat * for MD modifications, the last message in the array (i.e. the earlist message) must be the last message recv in the chat * */ -export type LastMessageList = MinimalMessage[] | proto.ISyncActionMessageRange +export type LastMessageList = MinimalMessage[] | proto.SyncActionValue.ISyncActionMessageRange export type ChatModification = { diff --git a/src/Types/Message.ts b/src/Types/Message.ts index 2cdda10..8798385 100644 --- a/src/Types/Message.ts +++ b/src/Types/Message.ts @@ -9,15 +9,15 @@ import type { GroupMetadata } from './GroupMetadata' export { proto as WAProto } export type WAMessage = proto.IWebMessageInfo export type WAMessageContent = proto.IMessage -export type WAContactMessage = proto.IContactMessage -export type WAContactsArrayMessage = proto.IContactsArrayMessage +export type WAContactMessage = proto.Message.IContactMessage +export type WAContactsArrayMessage = proto.Message.IContactsArrayMessage export type WAMessageKey = proto.IMessageKey -export type WATextMessage = proto.IExtendedTextMessage +export type WATextMessage = proto.Message.IExtendedTextMessage export type WAContextInfo = proto.IContextInfo -export type WALocationMessage = proto.ILocationMessage -export type WAGenericMediaMessage = proto.IVideoMessage | proto.IImageMessage | proto.IAudioMessage | proto.IDocumentMessage | proto.IStickerMessage -export import WAMessageStubType = proto.WebMessageInfo.WebMessageInfoStubType -export import WAMessageStatus = proto.WebMessageInfo.WebMessageInfoStatus +export type WALocationMessage = proto.Message.ILocationMessage +export type WAGenericMediaMessage = proto.Message.IVideoMessage | proto.Message.IImageMessage | proto.Message.IAudioMessage | proto.Message.IDocumentMessage | proto.Message.IStickerMessage +export import WAMessageStubType = proto.WebMessageInfo.StubType +export import WAMessageStatus = proto.WebMessageInfo.Status export type WAMediaUpload = Buffer | { url: URL | string } | { stream: Readable } /** Set of message types that are supported by the library */ export type MessageType = keyof proto.Message @@ -51,7 +51,7 @@ type ViewOnce = { } type Buttonable = { /** add buttons to the message */ - buttons?: proto.IButton[] + buttons?: proto.Message.ButtonsMessage.IButton[] } type Templatable = { /** add buttons to the message (conflicts with normal buttons)*/ @@ -61,7 +61,7 @@ type Templatable = { } type Listable = { /** Sections of the List */ - sections?: proto.ISection[] + sections?: proto.Message.ListMessage.ISection[] /** Title of a List Message only */ title?: string @@ -117,13 +117,13 @@ export type AnyRegularMessageContent = ( { contacts: { displayName?: string - contacts: proto.IContactMessage[] + contacts: proto.Message.IContactMessage[] } } | { location: WALocationMessage } | { - react: proto.IReactionMessage + react: proto.Message.IReactionMessage } | { buttonReply: ButtonReplyInfo type: 'template' | 'plain' diff --git a/src/Utils/chat-utils.ts b/src/Utils/chat-utils.ts index 52eb756..085fe19 100644 --- a/src/Utils/chat-utils.ts +++ b/src/Utils/chat-utils.ts @@ -8,7 +8,7 @@ import { toNumber } from './generics' import { LT_HASH_ANTI_TAMPERING } from './lt-hash' import { downloadContentFromMessage, } from './messages-media' -type FetchAppStateSyncKey = (keyId: string) => Promise | proto.IAppStateSyncKeyData +type FetchAppStateSyncKey = (keyId: string) => Promise | proto.Message.IAppStateSyncKeyData const mutationKeys = (keydata: Uint8Array) => { const expanded = hkdf(keydata, 160, { info: 'WhatsApp Mutation Keys' }) @@ -21,14 +21,14 @@ const mutationKeys = (keydata: Uint8Array) => { } } -const generateMac = (operation: proto.SyncdMutation.SyncdMutationSyncdOperation, data: Buffer, keyId: Uint8Array | string, key: Buffer) => { +const generateMac = (operation: proto.SyncdMutation.SyncdOperation, data: Buffer, keyId: Uint8Array | string, key: Buffer) => { const getKeyData = () => { let r: number switch (operation) { - case proto.SyncdMutation.SyncdMutationSyncdOperation.SET: + case proto.SyncdMutation.SyncdOperation.SET: r = 0x01 break - case proto.SyncdMutation.SyncdMutationSyncdOperation.REMOVE: + case proto.SyncdMutation.SyncdOperation.REMOVE: r = 0x02 break } @@ -54,7 +54,7 @@ const to64BitNetworkOrder = (e: number) => { return Buffer.from(t) } -type Mac = { indexMac: Uint8Array, valueMac: Uint8Array, operation: proto.SyncdMutation.SyncdMutationSyncdOperation } +type Mac = { indexMac: Uint8Array, valueMac: Uint8Array, operation: proto.SyncdMutation.SyncdOperation } const makeLtHashGenerator = ({ indexValueMap, hash }: Pick) => { indexValueMap = { ...indexValueMap } @@ -65,7 +65,7 @@ const makeLtHashGenerator = ({ indexValueMap, hash }: Pick { const indexMacBase64 = Buffer.from(indexMac).toString('base64') const prevOp = indexValueMap[indexMacBase64] - if(operation === proto.SyncdMutation.SyncdMutationSyncdOperation.REMOVE) { + if(operation === proto.SyncdMutation.SyncdOperation.REMOVE) { if(!prevOp) { throw new Boom('tried remove, but no previous op', { data: { indexMac, valueMac } }) } @@ -212,7 +212,7 @@ export const decodeSyncdMutations = async( for(const msgMutation of msgMutations!) { // if it's a syncdmutation, get the operation property // otherwise, if it's only a record -- it'll be a SET mutation - const operation = 'operation' in msgMutation ? msgMutation.operation : proto.SyncdMutation.SyncdMutationSyncdOperation.SET + const operation = 'operation' in msgMutation ? msgMutation.operation : proto.SyncdMutation.SyncdOperation.SET const record = ('record' in msgMutation && !!msgMutation.record) ? msgMutation.record : msgMutation as proto.ISyncdRecord const key = await getKey(record.keyId!.id!) @@ -460,9 +460,9 @@ export const chatModificationToAppPatch = ( mod: ChatModification, jid: string ) => { - const OP = proto.SyncdMutation.SyncdMutationSyncdOperation + const OP = proto.SyncdMutation.SyncdOperation const getMessageRange = (lastMessages: LastMessageList) => { - let messageRange: proto.ISyncActionMessageRange + let messageRange: proto.SyncActionValue.ISyncActionMessageRange if(Array.isArray(lastMessages)) { const lastMsg = lastMessages[lastMessages.length - 1] messageRange = { @@ -713,7 +713,7 @@ export const processSyncAction = ( logger?.warn({ syncAction, id }, 'unprocessable update') } - function isValidPatchBasedOnMessageRange(id: string, msgRange: proto.ISyncActionMessageRange | null | undefined) { + function isValidPatchBasedOnMessageRange(id: string, msgRange: proto.SyncActionValue.ISyncActionMessageRange | null | undefined) { const chat = recvChats?.[id] const lastMsgTimestamp = msgRange?.lastMessageTimestamp || msgRange?.lastSystemMessageTimestamp || 0 const chatLastMsgTimestamp = chat?.lastMsgRecvTimestamp || 0 diff --git a/src/Utils/decode-wa-message.ts b/src/Utils/decode-wa-message.ts index a4e1cfc..daba362 100644 --- a/src/Utils/decode-wa-message.ts +++ b/src/Utils/decode-wa-message.ts @@ -79,7 +79,7 @@ export const decodeMessageStanza = (stanza: BinaryNode, auth: AuthenticationStat } if(key.fromMe) { - fullMessage.status = proto.WebMessageInfo.WebMessageInfoStatus.SERVER_ACK + fullMessage.status = proto.WebMessageInfo.Status.SERVER_ACK } return { @@ -92,7 +92,7 @@ export const decodeMessageStanza = (stanza: BinaryNode, auth: AuthenticationStat for(const { tag, attrs, content } of stanza.content) { if(tag === 'verified_name' && content instanceof Uint8Array) { const cert = proto.VerifiedNameCertificate.decode(content) - const details = proto.VerifiedNameDetails.decode(cert.details) + const details = proto.VerifiedNameCertificate.Details.decode(cert.details) fullMessage.verifiedBizName = details.verifiedName } @@ -135,7 +135,7 @@ export const decodeMessageStanza = (stanza: BinaryNode, auth: AuthenticationStat fullMessage.message = msg } } catch(error) { - fullMessage.messageStubType = proto.WebMessageInfo.WebMessageInfoStubType.CIPHERTEXT + fullMessage.messageStubType = proto.WebMessageInfo.StubType.CIPHERTEXT fullMessage.messageStubParameters = [error.message] } } @@ -143,7 +143,7 @@ export const decodeMessageStanza = (stanza: BinaryNode, auth: AuthenticationStat // if nothing was found to decrypt if(!decryptables) { - fullMessage.messageStubType = proto.WebMessageInfo.WebMessageInfoStubType.CIPHERTEXT + fullMessage.messageStubType = proto.WebMessageInfo.StubType.CIPHERTEXT fullMessage.messageStubParameters = [NO_MESSAGE_FOUND_ERROR_TEXT] } })() diff --git a/src/Utils/generics.ts b/src/Utils/generics.ts index edbcdd2..0226197 100644 --- a/src/Utils/generics.ts +++ b/src/Utils/generics.ts @@ -262,10 +262,10 @@ export const generateMdTagPrefix = () => { return `${bytes.readUInt16BE()}.${bytes.readUInt16BE(2)}-` } -const STATUS_MAP: { [_: string]: proto.WebMessageInfo.WebMessageInfoStatus } = { - 'played': proto.WebMessageInfo.WebMessageInfoStatus.PLAYED, - 'read': proto.WebMessageInfo.WebMessageInfoStatus.READ, - 'read-self': proto.WebMessageInfo.WebMessageInfoStatus.READ +const STATUS_MAP: { [_: string]: proto.WebMessageInfo.Status } = { + 'played': proto.WebMessageInfo.Status.PLAYED, + 'read': proto.WebMessageInfo.Status.READ, + 'read-self': proto.WebMessageInfo.Status.READ } /** * Given a type of receipt, returns what the new status of the message should be @@ -274,7 +274,7 @@ const STATUS_MAP: { [_: string]: proto.WebMessageInfo.WebMessageInfoStatus } = { export const getStatusFromReceiptType = (type: string | undefined) => { const status = STATUS_MAP[type!] if(typeof type === 'undefined') { - return proto.WebMessageInfo.WebMessageInfoStatus.DELIVERY_ACK + return proto.WebMessageInfo.Status.DELIVERY_ACK } return status diff --git a/src/Utils/history.ts b/src/Utils/history.ts index 3f4360a..32ddf5e 100644 --- a/src/Utils/history.ts +++ b/src/Utils/history.ts @@ -9,7 +9,7 @@ import { downloadContentFromMessage } from './messages-media' const inflatePromise = promisify(inflate) -export const downloadHistory = async(msg: proto.IHistorySyncNotification) => { +export const downloadHistory = async(msg: proto.Message.IHistorySyncNotification) => { const stream = await downloadContentFromMessage(msg, 'history') let buffer = Buffer.from([]) for await (const chunk of stream) { @@ -33,8 +33,8 @@ export const processHistoryMessage = ( const chats: Chat[] = [] switch (item.syncType) { - case proto.HistorySync.HistorySyncHistorySyncType.INITIAL_BOOTSTRAP: - case proto.HistorySync.HistorySyncHistorySyncType.RECENT: + case proto.HistorySync.HistorySyncType.INITIAL_BOOTSTRAP: + case proto.HistorySync.HistorySyncType.RECENT: for(const chat of item.conversations!) { const contactId = `c:${chat.id}` if(chat.name && !historyCache.has(contactId)) { @@ -72,7 +72,7 @@ export const processHistoryMessage = ( } break - case proto.HistorySync.HistorySyncHistorySyncType.PUSH_NAME: + case proto.HistorySync.HistorySyncType.PUSH_NAME: for(const c of item.pushnames!) { const contactId = `c:${c.id}` if(!historyCache.has(contactId)) { @@ -82,7 +82,7 @@ export const processHistoryMessage = ( } break - case proto.HistorySync.HistorySyncHistorySyncType.INITIAL_STATUS_V3: + case proto.HistorySync.HistorySyncType.INITIAL_STATUS_V3: // TODO break } @@ -98,7 +98,7 @@ export const processHistoryMessage = ( } export const downloadAndProcessHistorySyncNotification = async( - msg: proto.IHistorySyncNotification, + msg: proto.Message.IHistorySyncNotification, historyCache: Set, recvChats: InitialReceivedChatsState ) => { diff --git a/src/Utils/messages-media.ts b/src/Utils/messages-media.ts index 45b438d..d0d7011 100644 --- a/src/Utils/messages-media.ts +++ b/src/Utils/messages-media.ts @@ -12,7 +12,7 @@ import { Readable, Transform } from 'stream' import { URL } from 'url' import { proto } from '../../WAProto' import { DEFAULT_ORIGIN, MEDIA_PATH_MAP } from '../Defaults' -import { BaileysEventMap, CommonSocketConfig, DownloadableMessage, MediaConnInfo, MediaDecryptionKeyInfo, MediaType, MessageType, WAGenericMediaMessage, WAMediaUpload, WAMediaUploadFunction, WAMessageContent, WAProto } from '../Types' +import { BaileysEventMap, CommonSocketConfig, DownloadableMessage, MediaConnInfo, MediaDecryptionKeyInfo, MediaType, MessageType, WAGenericMediaMessage, WAMediaUpload, WAMediaUploadFunction, WAMessageContent } from '../Types' import { BinaryNode, getBinaryNodeChild, getBinaryNodeChildBuffer, jidNormalizedUser } from '../WABinary' import { aesDecryptGCM, aesEncryptGCM, hkdf } from './crypto' import { generateMessageID } from './generics' @@ -479,12 +479,8 @@ export function extensionForMediaMessage(message: WAMessageContent) { ) { extension = '.jpeg' } else { - const messageContent = message[type] as - | WAProto.VideoMessage - | WAProto.ImageMessage - | WAProto.AudioMessage - | WAProto.DocumentMessage - extension = getExtension (messageContent.mimetype) + const messageContent = message[type] as WAGenericMediaMessage + extension = getExtension(messageContent.mimetype!) } return extension @@ -666,8 +662,8 @@ export const decryptMediaRetryData = ( export const getStatusCodeForMediaRetry = (code: number) => MEDIA_RETRY_STATUS_MAP[code] const MEDIA_RETRY_STATUS_MAP = { - [proto.MediaRetryNotification.MediaRetryNotificationResultType.SUCCESS]: 200, - [proto.MediaRetryNotification.MediaRetryNotificationResultType.DECRYPTION_ERROR]: 412, - [proto.MediaRetryNotification.MediaRetryNotificationResultType.NOT_FOUND]: 404, - [proto.MediaRetryNotification.MediaRetryNotificationResultType.GENERAL_ERROR]: 418, + [proto.MediaRetryNotification.ResultType.SUCCESS]: 200, + [proto.MediaRetryNotification.ResultType.DECRYPTION_ERROR]: 412, + [proto.MediaRetryNotification.ResultType.NOT_FOUND]: 404, + [proto.MediaRetryNotification.ResultType.GENERAL_ERROR]: 418, } as const diff --git a/src/Utils/messages.ts b/src/Utils/messages.ts index 39c668a..f897c53 100644 --- a/src/Utils/messages.ts +++ b/src/Utils/messages.ts @@ -48,14 +48,14 @@ const MIMETYPE_MAP: { [T in MediaType]: string } = { } const MessageTypeProto = { - 'image': WAProto.ImageMessage, - 'video': WAProto.VideoMessage, - 'audio': WAProto.AudioMessage, - 'sticker': WAProto.StickerMessage, - 'document': WAProto.DocumentMessage, + 'image': WAProto.Message.ImageMessage, + 'video': WAProto.Message.VideoMessage, + 'audio': WAProto.Message.AudioMessage, + 'sticker': WAProto.Message.StickerMessage, + 'document': WAProto.Message.DocumentMessage, } as const -const ButtonType = proto.ButtonsMessage.ButtonsMessageHeaderType +const ButtonType = proto.Message.ButtonsMessage.HeaderType export const generateLinkPreviewIfRequired = async(text: string, getUrlInfo: MessageGenerationOptions['getUrlInfo'], logger: MessageGenerationOptions['logger']) => { const matchedUrls = text.match(URL_REGEX) @@ -210,7 +210,7 @@ export const prepareDisappearingMessageSettingContent = (ephemeralExpiration?: n ephemeralMessage: { message: { protocolMessage: { - type: WAProto.ProtocolMessage.ProtocolMessageType.EPHEMERAL_SETTING, + type: WAProto.Message.ProtocolMessage.Type.EPHEMERAL_SETTING, ephemeralExpiration } } @@ -287,22 +287,22 @@ export const generateWAMessageContent = async( } if(contactLen === 1) { - m.contactMessage = WAProto.ContactMessage.fromObject(message.contacts.contacts[0]) + m.contactMessage = WAProto.Message.ContactMessage.fromObject(message.contacts.contacts[0]) } else { - m.contactsArrayMessage = WAProto.ContactsArrayMessage.fromObject(message.contacts) + m.contactsArrayMessage = WAProto.Message.ContactsArrayMessage.fromObject(message.contacts) } } else if('location' in message) { - m.locationMessage = WAProto.LocationMessage.fromObject(message.location) + m.locationMessage = WAProto.Message.LocationMessage.fromObject(message.location) } else if('react' in message) { if(!message.react.senderTimestampMs) { message.react.senderTimestampMs = Date.now() } - m.reactionMessage = WAProto.ReactionMessage.fromObject(message.react) + m.reactionMessage = WAProto.Message.ReactionMessage.fromObject(message.react) } else if('delete' in message) { m.protocolMessage = { key: message.delete, - type: WAProto.ProtocolMessage.ProtocolMessageType.REVOKE + type: WAProto.Message.ProtocolMessage.Type.REVOKE } } else if('forward' in message) { m = generateForwardMessageContent( @@ -327,7 +327,7 @@ export const generateWAMessageContent = async( m.buttonsResponseMessage = { selectedButtonId: message.buttonReply.id, selectedDisplayText: message.buttonReply.displayText, - type: proto.ButtonsResponseMessage.ButtonsResponseMessageType.DISPLAY_TEXT, + type: proto.Message.ButtonsResponseMessage.Type.DISPLAY_TEXT, } break } @@ -339,8 +339,8 @@ export const generateWAMessageContent = async( } if('buttons' in message && !!message.buttons) { - const buttonsMessage: proto.IButtonsMessage = { - buttons: message.buttons!.map(b => ({ ...b, type: proto.Button.ButtonType.RESPONSE })) + const buttonsMessage: proto.Message.IButtonsMessage = { + buttons: message.buttons!.map(b => ({ ...b, type: proto.Message.ButtonsMessage.Button.Type.RESPONSE })) } if('text' in message) { buttonsMessage.contentText = message.text @@ -362,7 +362,7 @@ export const generateWAMessageContent = async( m = { buttonsMessage } } else if('templateButtons' in message && !!message.templateButtons) { - const msg: proto.IHydratedFourRowTemplate = { + const msg: proto.Message.TemplateMessage.IHydratedFourRowTemplate = { hydratedButtons: message.templateButtons } @@ -389,13 +389,13 @@ export const generateWAMessageContent = async( } if('sections' in message && !!message.sections) { - const listMessage: proto.IListMessage = { + const listMessage: proto.Message.IListMessage = { sections: message.sections, buttonText: message.buttonText, title: message.title, footerText: message.footer, description: message.text, - listType: proto.ListMessage.ListMessageListType['SINGLE_SELECT'] + listType: proto.Message.ListMessage.ListType.SINGLE_SELECT } m = { listMessage } @@ -537,7 +537,7 @@ export const normalizeMessageContent = (content: WAMessageContent | null | undef * Eg. extracts the inner message from a disappearing message/view once message */ export const extractMessageContent = (content: WAMessageContent | undefined | null): WAMessageContent | undefined => { - const extractFromTemplateMessage = (msg: proto.IHydratedFourRowTemplate | proto.IButtonsMessage) => { + const extractFromTemplateMessage = (msg: proto.Message.TemplateMessage.IHydratedFourRowTemplate | proto.Message.IButtonsMessage) => { if(msg.imageMessage) { return { imageMessage: msg.imageMessage } } else if(msg.documentMessage) { diff --git a/src/Utils/noise-handler.ts b/src/Utils/noise-handler.ts index ee9de0b..43034fb 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.CertChainNoiseCertificateDetails.decode(certIntermediate!.details!) + const { issuerSerial } = proto.CertChain.NoiseCertificate.Details.decode(certIntermediate!.details!) if(issuerSerial !== WA_CERT_DETAILS.SERIAL) { throw new Boom('certification match failed', { statusCode: 400 }) diff --git a/src/Utils/process-message.ts b/src/Utils/process-message.ts index 2a68b0b..fc9c48d 100644 --- a/src/Utils/process-message.ts +++ b/src/Utils/process-message.ts @@ -88,7 +88,7 @@ const processMessage = async( const protocolMsg = content?.protocolMessage if(protocolMsg) { switch (protocolMsg.type) { - case proto.ProtocolMessage.ProtocolMessageType.HISTORY_SYNC_NOTIFICATION: + case proto.Message.ProtocolMessage.Type.HISTORY_SYNC_NOTIFICATION: const histNotification = protocolMsg!.historySyncNotification! logger?.info({ histNotification, id: message.key.id }, 'got history notification') @@ -120,7 +120,7 @@ const processMessage = async( } break - case proto.ProtocolMessage.ProtocolMessageType.APP_STATE_SYNC_KEY_SHARE: + case proto.Message.ProtocolMessage.Type.APP_STATE_SYNC_KEY_SHARE: const keys = protocolMsg.appStateSyncKeyShare!.keys if(keys?.length) { let newAppStateSyncKeyId = '' @@ -143,7 +143,7 @@ const processMessage = async( } break - case proto.ProtocolMessage.ProtocolMessageType.REVOKE: + case proto.Message.ProtocolMessage.Type.REVOKE: ev.emit('messages.update', [ { key: { @@ -154,7 +154,7 @@ const processMessage = async( } ]) break - case proto.ProtocolMessage.ProtocolMessageType.EPHEMERAL_SETTING: + case proto.Message.ProtocolMessage.Type.EPHEMERAL_SETTING: Object.assign(chat, { ephemeralSettingTimestamp: toNumber(message.messageTimestamp), ephemeralExpiration: protocolMsg.ephemeralExpiration || null diff --git a/src/Utils/signal.ts b/src/Utils/signal.ts index a4a7e3d..e7e4ade 100644 --- a/src/Utils/signal.ts +++ b/src/Utils/signal.ts @@ -138,7 +138,7 @@ export const decryptGroupSignalProto = (group: string, user: string, msg: Buffer export const processSenderKeyMessage = async( authorJid: string, - item: proto.ISenderKeyDistributionMessage, + item: proto.Message.ISenderKeyDistributionMessage, auth: SignalAuthState ) => { const builder = new GroupSessionBuilder(signalStorage(auth)) diff --git a/src/Utils/use-multi-file-auth-state.ts b/src/Utils/use-multi-file-auth-state.ts index 085c9ff..70cb145 100644 --- a/src/Utils/use-multi-file-auth-state.ts +++ b/src/Utils/use-multi-file-auth-state.ts @@ -59,7 +59,7 @@ export const useMultiFileAuthState = async(folder: string): Promise<{ state: Aut async id => { let value = await readData(`${type}-${id}.json`) if(type === 'app-state-sync-key' && value) { - value = proto.AppStateSyncKeyData.fromObject(value) + value = proto.Message.AppStateSyncKeyData.fromObject(value) } data[id] = value diff --git a/src/Utils/use-single-file-auth-state.ts b/src/Utils/use-single-file-auth-state.ts index 556185c..6ec2b48 100644 --- a/src/Utils/use-single-file-auth-state.ts +++ b/src/Utils/use-single-file-auth-state.ts @@ -59,7 +59,7 @@ export const useSingleFileAuthState = (filename: string, logger?: Logger): { sta let value = keys[key]?.[id] if(value) { if(type === 'app-state-sync-key') { - value = proto.AppStateSyncKeyData.fromObject(value) + value = proto.Message.AppStateSyncKeyData.fromObject(value) } dict[id] = value diff --git a/src/Utils/validate-connection.ts b/src/Utils/validate-connection.ts index 0ba3733..77d499e 100644 --- a/src/Utils/validate-connection.ts +++ b/src/Utils/validate-connection.ts @@ -10,7 +10,7 @@ import { createSignalIdentity } from './signal' type ClientPayloadConfig = Pick -const getUserAgent = ({ version }: ClientPayloadConfig): proto.IUserAgent => { +const getUserAgent = ({ version }: ClientPayloadConfig): proto.ClientPayload.IUserAgent => { const osVersion = '0.1' return { appVersion: { @@ -18,8 +18,8 @@ const getUserAgent = ({ version }: ClientPayloadConfig): proto.IUserAgent => { secondary: version[1], tertiary: version[2], }, - platform: proto.UserAgent.UserAgentPlatform.WEB, - releaseChannel: proto.UserAgent.UserAgentReleaseChannel.RELEASE, + platform: proto.ClientPayload.UserAgent.Platform.WEB, + releaseChannel: proto.ClientPayload.UserAgent.ReleaseChannel.RELEASE, mcc: '000', mnc: '000', osVersion: osVersion, @@ -32,12 +32,12 @@ const getUserAgent = ({ version }: ClientPayloadConfig): proto.IUserAgent => { } const PLATFORM_MAP = { - 'Mac OS': proto.WebInfo.WebInfoWebSubPlatform.DARWIN, - 'Windows': proto.WebInfo.WebInfoWebSubPlatform.WIN32 + 'Mac OS': proto.ClientPayload.WebInfo.WebSubPlatform.DARWIN, + 'Windows': proto.ClientPayload.WebInfo.WebSubPlatform.WIN32 } -const getWebInfo = (config: ClientPayloadConfig): proto.IWebInfo => { - let webSubPlatform = proto.WebInfo.WebInfoWebSubPlatform.WEB_BROWSER +const getWebInfo = (config: ClientPayloadConfig): proto.ClientPayload.IWebInfo => { + let webSubPlatform = proto.ClientPayload.WebInfo.WebSubPlatform.WEB_BROWSER if(config.syncFullHistory && PLATFORM_MAP[config.browser[0]]) { webSubPlatform = PLATFORM_MAP[config.browser[0]] } @@ -47,8 +47,8 @@ const getWebInfo = (config: ClientPayloadConfig): proto.IWebInfo => { const getClientPayload = (config: ClientPayloadConfig): proto.IClientPayload => { return { - connectType: proto.ClientPayload.ClientPayloadConnectType.WIFI_UNKNOWN, - connectReason: proto.ClientPayload.ClientPayloadConnectReason.USER_ACTIVATED, + connectType: proto.ClientPayload.ConnectType.WIFI_UNKNOWN, + connectReason: proto.ClientPayload.ConnectReason.USER_ACTIVATED, userAgent: getUserAgent(config), webInfo: getWebInfo(config), } @@ -83,8 +83,8 @@ export const generateRegistrationNode = ( secondary: +(browserVersion[1] || 1), tertiary: +(browserVersion[2] || 0), }, - platformType: proto.DeviceProps.DevicePropsPlatformType[config.browser[1].toUpperCase()] - || proto.DeviceProps.DevicePropsPlatformType.UNKNOWN, + platformType: proto.DeviceProps.PlatformType[config.browser[1].toUpperCase()] + || proto.DeviceProps.PlatformType.UNKNOWN, requireFullSync: config.syncFullHistory, }